Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: generate the experiments list and document how to enable experiments - #28949

Closed
nickvigilante wants to merge 6 commits into
mainfrom
vigilante/docs-experiments-list
Closed

docs: generate the experiments list and document how to enable experiments#28949
nickvigilante wants to merge 6 commits into
mainfrom
vigilante/docs-experiments-list

Conversation

@nickvigilante

Copy link
Copy Markdown
Contributor

Problem

docs/install/releases/feature-stages.md says "Currently no experimental features are available." Its generator reads ExperimentsSafe, which is empty, while ExperimentsKnown in codersdk/deployment.go defines fourteen experiments. Readers cannot learn which experiments exist for the version they run or how to enable one, and the docs site has no machine-readable list to validate experimental-content markers against.

Change

  • scripts/experimentsdocgen (new): writes docs/experiments.json from ExperimentsKnown: id, displayName (Experiment.DisplayName()), description (the constant's comment, parsed from codersdk/deployment.go with go/ast), and safe (membership in ExperimentsSafe, i.e. whether --experiments=* enables it). Sorted by id, atomic write, --dry-run.
  • docs/experiments.json (new, generated, linguist-generated): 14 entries today.
  • scripts/release/docs_update_feature_stages.sh: the experiments table is now rendered from that JSON with jq (columns: Feature, Flag, Description, Enabled by --experiments=*), replacing the go doc scraping of ExperimentsSafe. The beta table is unchanged.
  • Makefile: _gen/bin/experimentsdocgen build rule; docs/experiments.json target; the feature-stages target depends on it; both added to the generated-files lists so make -B gen plus the unstaged-files check fails a PR that changes experiments without regenerating.
  • feature-stages.md prose: the enabling instructions now distinguish the opt-in set (--experiments=*, the rows marked Yes) from experiments that must be named explicitly, and note the table is generated from the code.

Verification

  • go test ./scripts/experimentsdocgen: description parsing (trailing and doc comments, non-Experiment constants ignored), document assembly (sort, safe flags), and a test against the real deployment.go asserting every known experiment has a display name and a declaring constant.
  • make docs/experiments.json builds and writes the file; running the generator and the release script a second time produces no further diff (idempotent, so the CI gen check is stable).
  • markdownlint-cli2 --fix and markdown-table-formatter applied to the page as the make target does. (Locally make docs/install/releases/feature-stages.md stopped at site/node_modules because of a Node engine mismatch on this machine, so the script and formatters were run directly with the same inputs.)

For reviewers

  • Descriptions are the constants' comments verbatim. Two read as developer notes rather than user-facing text (auto-fill-parameters: "This should not be taken out of experiments until…"; example: "This isn't used for anything."). Fixing those is a comment edit in codersdk/deployment.go, and whether ExperimentExample should stay in ExperimentsKnown at all is a codersdk question; this PR does not change either.
  • The docs engine (coder/docs-engine) will read docs/experiments.json per version to validate data-feature markers and to label experimental content; design in that repository's docs/superpowers/specs/2026-09-03-conditional-content-annotations-design.md.

I have read the AI Contribution guidelines.


🤖 Built with AI assistance.

…ments

The feature-stages page said no experimental features exist because its
generator read ExperimentsSafe, which is empty, while ExperimentsKnown
defines fourteen. Add scripts/experimentsdocgen, which writes
docs/experiments.json from ExperimentsKnown (id, display name, the
constant's comment as description, and whether --experiments=* enables
it), and have the release script render the feature-stages table from that
file so the two cannot disagree. Both are make gen targets, so CI's
unstaged-files check fails a PR that changes experiments without
regenerating. The enabling instructions now distinguish the opt-in set
from flags that must be named.

Assisted-by: AI
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@coderagents

coderagents Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

This PR is itself a documentation change: it updates docs/install/releases/feature-stages.md (already in docs/manifest.json) and adds the generated docs/experiments.json. That covers the primary docs need well.

Updates Needed

  • codersdk/deployment.go (source of the generated table/JSON) - The two experiment descriptions that read as developer notes were addressed:
    • example - now omitted from the user-facing list (generator skips ExperimentExample; docs/experiments.json down to 13 entries and it no longer appears in the feature-stages table).
    • auto-fill-parameters - reworded to user-facing text: "Pre-fills a new workspace's parameter form with the values from the user's most recent build of that template."

No further documentation changes needed.


Automated review via Coder Agents

…ple experiment

The generated experiments table published two constant comments that read as
developer notes. Reword the auto-fill-parameters comment (mirrored into the
generated apidoc files, which embed enum comments) and have the generator
skip ExperimentExample, a placeholder kept for tests.

Assisted-by: AI
@nickvigilante

Copy link
Copy Markdown
Contributor Author

Addressed the Documentation Check feedback:

  • auto-fill-parameters now reads "Pre-fills a new workspace's parameter form with the values from the user's most recent build of that template." The change is in the constant comment in codersdk/deployment.go; the generated coderd/apidoc/docs.go and swagger.json, which embed the same enum comments, were updated to match so the gen check stays green, along with docs/experiments.json and the table.
  • example is no longer listed. The generator has an explicit notDocumented set (currently ExperimentExample, a placeholder kept for tests) rather than removing the constant from ExperimentsKnown, which other code references. The table now has 13 rows.

@linear-code

linear-code Bot commented Sep 3, 2026

Copy link
Copy Markdown

DOCS-867

@nickvigilante

Copy link
Copy Markdown
Contributor Author

Closing this per discussion with @david-fraley. We're just going to remove the generator altogether.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 8, 2026
@nickvigilante

Copy link
Copy Markdown
Contributor Author

Superseded by #29113, which removes the generator and both generated lists instead of fixing the experiments table. Tracked in DOCS-878.

🤖 Generated with Coder Agents on behalf of @nickvigilante.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant