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

Skip to content

docs: lead with env vars in admin docs and add configuration reference - #26824

Merged
nickvigilante merged 13 commits into
mainfrom
vigilante/docs-492-admin-docs-lead-with-flag-examples-env-var-names-hard-to
Aug 3, 2026
Merged

docs: lead with env vars in admin docs and add configuration reference#26824
nickvigilante merged 13 commits into
mainfrom
vigilante/docs-492-admin-docs-lead-with-flag-examples-env-var-names-hard-to

Conversation

@nickvigilante

@nickvigilante nickvigilante commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What & why

Admin/setup docs lead with coder server --flag examples, but most operators configure Coder through CODER_* environment variables (system service, container, or Helm chart). There is no single page mapping a setting to its env var, CLI flag, YAML key, and default, so searching the docs for an env var name such as CODER_PG_CONNECTION_URL returns nothing.

This adds a generated configuration reference and begins shifting admin docs to lead with the environment-variable form.

Changes

  • Generated configuration reference (docs/admin/setup/configuration-reference.md): a searchable, per-setting list of every visible deployment option. Each option is a heading (grouped and nested by serpent group) followed by its description and the environment variable, CLI flag, YAML key, and default that apply to it. Generated from codersdk.DeploymentValues so it stays in sync.
  • Generator + make gen wiring (scripts/configdocgen/): new binary plus a Makefile target and GEN_FILES entry, mirroring the existing clidocgen / auditdocgen pattern. Output is host-independent (same env normalization as clidocgen).
  • Demo conversion (docs/admin/users/github-auth.md): inverted to lead with the /etc/coder.d/coder.env env-var form; the CLI-flag form becomes a closing note that links to the reference. H2 slugs preserved.
  • Style guide (.claude/docs/DOCS_STYLE_GUIDE.md): documents the env-var-first convention for admin/setup docs.
  • Navigation: manifest entry under Administration → Setup, plus a TIP callout on the setup index.

Risk

Docs + gen pipeline only; no runtime change. The page is regenerated by make gen; the gen and check-docs CI checks pass.

Follow-up

Several other admin pages still lead with flag walls. Recommend sweeping them incrementally in separate PRs rather than expanding scope here.

Implementation notes (provenance, conflict resolution, verification)
  • Continues prior work by @aslilac and @bpmct from the kayla/docs-env-vars-first branch. Both original commits are cherry-picked here with authorship preserved.
  • Rebased onto current main. Resolved two Makefile conflicts where main had since added the feature-stages.md gen target at the same locations; kept both targets (union) in GEN_FILES, gen/mark-fresh, and the recipe block.
  • The original branch's checked-in page predated recent codersdk.DeploymentValues changes, so it was regenerated against current main (adds CODER_SCIM_USE_LEGACY, the Networking / Cluster section with CODER_CLUSTER_HOST, CODER_BOUNDARY_LOG_RETENTION, and the AI Gateway description rename). The gen CI check enforces this stays current.
  • Fixed flag-link anchors for short-form flags (--config, --log-filter): the generator derives the anchor from FlagShorthand to match clidocgen's heading (e.g. #-l---log-filter).
  • linkspector ignores the AWS Bedrock base URL that appears as an illustrative <region> placeholder in an option description, consistent with the existing openai.com ignore patterns.
Configuration reference layout (2026-07-08 update)

Reworked the reference from a wide table into a nested, per-setting list so it fits without horizontal scrolling and stops repeating the group name in every heading:

  • List, not table. Each option renders as a heading, its description, and a bullet list of only the configuration methods that apply to it (non-applicable methods are omitted instead of shown as -).
  • Nested sections. Sections nest by the serpent group hierarchy, so Email / Email Authentication becomes Email (h2) with an Email authentication (h3) subsection instead of a redundant flat title.
  • Shorter, sentence-case headings. The redundant group prefix is stripped from each option name and the remainder is lowercased to sentence case, preserving acronyms and mixed-case tokens (URL, TLS, OAuth2, GitHub) plus a small proper-noun allowlist (Coder, Terraform, Honeycomb, Anthropic, Bedrock, ...). Example: AI Gateway Send Actor Headers becomes Send actor headers.
  • Deprecated options sort to the end of each section and lead with an emphasized Deprecated marker. Headings stay clean (no (deprecated) suffix) so their anchors remain stable.
  • Section intros render from a group's Description when the source defines one (e.g. DERP); no hand-maintained prose or links are introduced.

All transformations run in pure Go at make gen time (no AI at generation time). Generation is idempotent, and markdownlint and golangci-lint both pass.


🤖 Opened by Coder Agents on behalf of @nickvigilante. Continues work by @aslilac and @bpmct.

@linear-code

linear-code Bot commented Jun 29, 2026

Copy link
Copy Markdown

DOCS-492

@github-actions

github-actions Bot commented Jun 29, 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.

@nickvigilante

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-07-08 19:58 UTC by @nickvigilante
Spend: $110.08 / $100.00

Review history
  • R1 (2026-06-29): 13 reviewers, 6 Nit, 4 P2, 4 P3, COMMENT. Review
  • R2 (2026-07-08): 8 reviewers, 6 Nit, 4 P2, 5 P3, 1 P4, COMMENT. Review
  • R3 (2026-07-08): 9 reviewers, 10 Nit, 1 Note, 4 P2, 9 P3, 1 P4, COMMENT. Review
  • R4 (2026-07-08): 6 reviewers, 11 Nit, 1 Note, 4 P2, 11 P3, 1 P4, COMMENT. Review
  • R5 (2026-07-08): 3 reviewers, 11 Nit, 1 Note, 4 P2, 11 P3, 1 P4, COMMENT. Review

deep-review v0.9.0 | Round 5 | 8853f55..429ae8f

Status: Panel review (3 reviewers)

Last posted: Round 4, 28 findings (4 P2, 11 P3, 1 P4, 11 Nit, 1 Note), COMMENT. Review

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P3 Author contested; panel closed R2 (6/6 accept) scripts/configdocgen/main.go:66 prepareEnv() is a verbatim copy of clidocgen prepareEnv() R1 Netero, Ryosuke Yes
CRF-2 P2 Author fixed (c3c8fba) scripts/configdocgen/main.go:147 Dangerous section sort order relies on Unicode accident, not explicit placement R1 Netero Note, Ryosuke P2 Yes
CRF-3 P2 Author fixed (5c6f79e) scripts/configdocgen/main.go:166 Flag-link anchors break for options with FlagShorthand (--config, --log-filter) R1 Mafuuu P3, Zoro P2 Yes
CRF-4 P2 Author fixed (c3c8fba) docs/admin/setup/configuration-reference.md:1 Generated file is stale: missing Boundary Log Retention, wrong registry URL default R1 Mafu-san P1 (downgraded: CI blocks merge) Yes
CRF-5 P3 Author fixed (c3c8fba) scripts/configdocgen/main.go:178 opt.Name enters markdown table unsanitized (pipe characters not escaped) R1 Hisoka Yes
CRF-6 P3 Author fixed (c3c8fba) scripts/configdocgen/main.go:34 Header claims every option supports all three config methods, but 17 options lack YAML key R1 Mafuuu Yes
CRF-7 P3 Author fixed (c3c8fba) scripts/configdocgen/main.go:174 "(dynamic)" default label is developer jargon, not operator-facing R1 Leorio Yes
CRF-8 P2 Author fixed (c3c8fba) scripts/configdocgen/main.go:1 10 of 12 comments in the generator are bloat per project comment rules R1 Gon Yes
CRF-9 Nit Author fixed (c3c8fba) .claude/docs/DOCS_STYLE_GUIDE.md:187 Style guide uses shell fenced blocks while rest of file uses sh R1 Gon Yes
CRF-10 Nit Author fixed (c3c8fba) .claude/docs/DOCS_STYLE_GUIDE.md:192 Style guide example uses non-existent env var CODER_DISABLE_TEMPLATE_INSIGHTS R1 Kite Yes
CRF-11 Nit Author fixed (c3c8fba) scripts/configdocgen/main.go:70 strings.SplitN should be strings.Cut (Go 1.18+) R1 Ging-Go Yes
CRF-12 Nit Author fixed (c3c8fba) scripts/configdocgen/main.go:142 sort.Slice and sort.Strings should use slices.SortFunc and slices.Sort (Go 1.21+) R1 Ging-Go Yes
CRF-13 Nit Author fixed (c3c8fba) Makefile:1333 configdocgen binary is order-only prerequisite, diverging from clidocgen pattern R1 Kite Yes
CRF-14 Nit Author fixed (c3c8fba) docs/admin/users/github-auth.md:123 "it's" should be "its" (possessive, not contraction) in YAML comment R1 Leorio Yes
CRF-15 P4 Author fixed (27c40cc) scripts/configdocgen/main.go:1 243 lines of pure-function Go code ships with zero unit tests R2 Bisky Yes
CRF-16 P3 Author fixed (d947c48, rewrite supersedes) scripts/configdocgen/main.go:1 Residual comment verbosity: remaining comments could be further trimmed R2 Gon P2 (downgraded: 7/8 reviewers verified CRF-8 fix, second pass) Yes
CRF-17 P3 Author fixed (91da01d) docs/admin/setup/index.md:10 TIP callout and manifest say "searchable table" but the format is a nested list R3 Netero, Mafu-san Yes
CRF-18 Note Author fixed (91da01d) scripts/configdocgen/main.go:1 Core pipeline functions (buildTree, render, etc.) at 0% coverage, helpers at 90%+ R3 Netero Yes
CRF-19 P3 Author fixed (91da01d) scripts/configdocgen/main.go:404 sentenceCase lowercases "Connect" in "OpenID Connect", headings disagree with descriptions R3 Mafuuu, Pariston, Gon Yes
CRF-20 P3 Author contested; panel closed R4 (3/5 accept) scripts/configdocgen/main.go:330 Duplicate heading anchors from stripped group prefixes; deep links unstable R3 Chopper P3, Hisoka Note Yes
CRF-21 P3 Author fixed (91da01d) scripts/configdocgen/main_test.go:113 TestEmphasizeDeprecation covers minority path, misses the majority UseInstead path R3 Bisky P3, Chopper Nit Yes
CRF-22 Nit Author fixed (91da01d) scripts/configdocgen/main.go:245 sectionRank, sentenceCase, featureNames comments could be trimmed further R3 Gon P2 (downgraded: third round, 83% to ~10% improvement) Yes
CRF-23 Nit Author fixed (91da01d) scripts/configdocgen/main.go:245 sectionRank comment claims "access URL" in General but it is in Networking R3 Mafuuu Yes
CRF-24 Nit Author fixed (91da01d) scripts/configdocgen/main.go:383 properNoun should be properNouns (singular for a map used as a set) R3 Gon Yes
CRF-25 Nit Author fixed (91da01d) scripts/configdocgen/main_test.go:1 Tests use map iteration instead of t.Run subtests with struct slices R3 Bisky Yes
CRF-26 P3 Open scripts/configdocgen/main_test.go:150 TestRenderPipeline does not exercise DefaultFn path in toOption R4 Bisky Yes
CRF-27 P3 Open scripts/configdocgen/main_test.go:150 TestRenderPipeline does not test Dangerous section ordering R4 Bisky Yes
CRF-28 Nit Open scripts/configdocgen/main_test.go:48 Three test functions use raw loops instead of t.Run subtests (inconsistent) R4 Bisky Yes

Contested and acknowledged

CRF-1 (P3, scripts/configdocgen/main.go:66) - prepareEnv() duplication

  • Finding: prepareEnv() is a verbatim copy of clidocgen's prepareEnv(). Both generators must be updated in lockstep if the env-preparation logic changes. Proposed extracting a shared helper.
  • Author defense: Only two copies exist today, mirrors the existing clidocgen/auditdocgen convention. Extracting a shared helper for two 24-line functions adds indirection without payoff. Offered to file a follow-up issue if the team prefers.
  • Panel closure (R2, 6/6): Hisoka confirmed the copies have already diverged (Cut vs SplitN) without behavioral divergence. Mafuuu verified both live in separate main packages with no shared library. Pariston traced the relationship and concluded a developer who needs to change prepareEnv will grep and find both copies. Meruem noted CI's gen check catches output mismatches. All six voters accepted the defense.

CRF-20 (P3, scripts/configdocgen/main.go:330) - Duplicate heading anchors

  • Finding: shortTitle strips group prefixes producing duplicate headings ("Enable" x5, "Address" x4). Markdown anchor suffixes (-1, -2) shift when options are added or reordered, making deep links unstable.
  • Author defense: The previous reference had no per-setting anchors. These headings are net-new deep-linkability, not a regression. Each setting lists its unique env var as a stable identifier. A cleaner fix is explicit heading IDs in the docs pipeline. Tracking as follow-up (no ticket linked).
  • Panel closure (R4, 3/5): Mafuuu verified the page is designed for search-by-env-var, not anchor navigation; strictly better than prior state. Meruem argued the finding was contested (not deferred), so the "deferral without ticket" rule doesn't apply. Pariston accepted the defense on substance, noting the ticket gap is a human call. Hisoka and Mafu-san dissented: both argued the missing ticket makes this a drop, not a deferral. This needs a human decision on whether to track the heading-ID follow-up.

Round log

Round 1

Panel. 4 P2, 4 P3, 6 Nit. Reviewed against a78982c..3bdb27b.

Round 2

Churn guard: PROCEED. 13 addressed, 1 contested. Panel: CRF-1 closed (6/6 accept). 1 P3, 1 P4 new. Reviewed against 8853f55..c3c8fba.

Round 3

Churn guard: PROCEED. CRF-15 addressed, CRF-16 superseded by rewrite. Panel: 4 P3, 1 Note, 4 Nit new. Reviewed against 8853f55..27c40cc.

Round 4

Churn guard: PROCEED. 8 addressed, 1 contested (CRF-20). Panel: CRF-20 closed (3/5 accept). 2 P3, 1 Nit new. Reviewed against 8853f55..91da01d.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-scoped PR with a clear goal: give operators a searchable lookup table for Coder server configuration. The generator follows the existing clidocgen/auditdocgen pattern, the Makefile wiring is correct, and the github-auth.md demo conversion reads well (env-var-first, restart inline, CLI-flag equivalence as a closing note). The generated output links back to the CLI reference for detail, so the two pages are complementary, not redundant.

"Boring code gets silence. This pipeline earned most of its silence." (Hisoka)

4 P2, 4 P3, 6 Nit. The P2s are: the generated file is stale and needs make gen before merge (CRF-4), flag-link anchors break for two options with shorthands (CRF-3), the Dangerous section sort order relies on a Unicode coincidence instead of explicit placement (CRF-2), and 10 of 12 comments in the generator are bloat per the project's comment rules (CRF-8). Note that CRF-3 and CRF-4 interact: regenerating without fixing the anchor bug produces fresh output with broken links.

Process note: the PR description claims "Verified no drift: make gen regenerates the page with no diff against current codersdk.DeploymentValues." Running the generator on the PR branch produces a file that differs from the checked-in version (missing CODER_BOUNDARY_LOG_RETENTION, changed Template Builder Registry URL default). CI's freshness check should block merge, but the verification claim is inaccurate. Also, the second commit subject is 78 characters (convention is under 72).


docs/admin/users/github-auth.md:123

Nit [CRF-14] "it's" should be "its" (possessive, not contraction) in the YAML comment: comment out CODER_OAUTH2_GITHUB_ALLOWED_ORGS and it's value. This line was not changed by this PR, but the PR restructured the surrounding section. (Leorio)

🤖

🤖 This review was automatically generated with Coder Agents.

Comment thread scripts/configdocgen/main.go Outdated
Comment thread scripts/configdocgen/main.go Outdated
Comment thread docs/admin/setup/configuration-reference.md
Comment thread scripts/configdocgen/main.go Outdated
Comment thread scripts/configdocgen/main.go Outdated
Comment thread .claude/docs/DOCS_STYLE_GUIDE.md Outdated
Comment thread .claude/docs/DOCS_STYLE_GUIDE.md
Comment thread scripts/configdocgen/main.go Outdated
Comment thread scripts/configdocgen/main.go Outdated
Comment thread Makefile Outdated
@nickvigilante

Copy link
Copy Markdown
Contributor Author

Round 2 ready

Rebased onto current main (resolved the .linkspector.yml conflict by keeping both the bedrock-runtime and merriam-webster.com ignores) and regenerated the reference in c3c8fba585.

Round-1 findings:

  • Fixed: CRF-2 (explicit sectionRank, ⚠️ Dangerous pinned last), CRF-4 (regenerated; make gen idempotent), CRF-5 (escapePipe on the Setting column), CRF-6 (softened the header claim), CRF-7 ((computed at runtime)), CRF-8 (trimmed restating comments), CRF-9 / CRF-10 (sh fences + real CODER_UPDATE_CHECK example), CRF-11 (strings.Cut), CRF-12 (slices.Sort*), CRF-13 (normal Makefile prereq), CRF-14 ("it's" → "its"). CRF-3 was already fixed in 5c6f79e and re-verified: all 205 flag anchors resolve to real server.md headings.
  • Pushed back: CRF-1 (prepareEnv duplication) mirrors the existing clidocgen / auditdocgen convention; thread left open for discussion.

Local verification: gofmt / go vet / golangci-lint clean, make gen idempotent, markdownlint clean. CI gen, check-docs, lint, and fmt are green.

🤖 Posted by Coder Agents on behalf of @nickvigilante.

@nickvigilante

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

nickvigilante added a commit that referenced this pull request Jul 8, 2026
## What

`clidocgen` and the new `configdocgen` (#26824) both carried
a byte-identical `prepareEnv()` that unsets `CODER_*` and pins
`CLIDOCGEN_*` / `TMPDIR` so generated docs don't embed the generating
host's home directory.

This extracts it to `scripts/docgenenv.Prepare()` and migrates
`clidocgen`.

## Why

Duplication flagged during review of #26824. `configdocgen` adopts the
shared helper in that PR, removing its copy.

## Risk

Behavior-preserving: regenerating the CLI reference (`make
docs/reference/cli/index.md`) yields no diff, and `make pre-commit`
passes (`lint/go`, `lint/ts`, `build`). A focused unit test pins the
`Prepare()` contract, and `_test.go` files are excluded from
`CLIDOCGEN_INPUTS` so test edits don't mark the generated docs stale.

<details>
<summary>CI status — blocked by an unrelated <code>main</code> breakage
(#24993)</summary>

All red checks on this PR are inherited from `main`, not caused by these
changes. This PR touches only `Makefile` and
`scripts/{clidocgen,docgenenv}`; it does not touch Helm.

`main` went red at `d0f68cb9b0` ("feat: add listenerset", #24993, merged
~18:26 UTC). The committed
`helm/coder/tests/testdata/listenerset*.golden` files don't match what
`helm template` renders, so:

- **`gen`** regenerates those goldens, and the unstaged-files check
fails.
- **`test-go-pg` (ubuntu-latest, pg-17) and `test-go-race-pg`** fail
only on `TestRenderChart/{coder,default}/listenerset[_redirect]` (golden
mismatch; the test prints "Run with -update to update golden files").
The same `test-go-pg` job passes on macOS and Windows, where the Helm
render test is skipped, and `scripts/docgenenv` reports `ok` on the
failing runners.

Base commit `14a61041d9` was green; `main` is red from `d0f68cb9b0`
onward. These checks clear once `main` is fixed and this branch is
updated. `fmt`, `lint`, `Storybook`, `check-build`, and `test-e2e` are
green.

</details>

---

🤖 Opened by Coder Agents on behalf of @nickvigilante.

---------

Co-authored-by: Cian Johnston <[email protected]>

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All four round 1 P2 findings are resolved. CRF-4 (stale file) regenerated, CRF-3 (flag anchors) fixed with FlagShorthand-aware anchors, CRF-2 (Dangerous sort) replaced with explicit sectionRank, CRF-8 (comment bloat) trimmed. Each fix verified by the panel.

CRF-1 (prepareEnv duplication): panel unanimously accepts the defense (6/6). The copies have already diverged stylistically (Cut vs SplitN) without diverging in behavior. Two small functions in separate main packages, following existing convention, bounded drift risk caught by make gen. Closing.

"I tried to construct a scenario where this change ships and something breaks." (Pariston)

1 P3, 1 P4 new. Both advisory. The generator is clean, the fixes are complete, and the pipeline works.

🤖 This review was automatically generated with Coder Agents.

Comment thread scripts/configdocgen/main.go
Comment thread scripts/configdocgen/main.go Outdated
@nickvigilante
nickvigilante marked this pull request as ready for review July 8, 2026 17:28
@nickvigilante
nickvigilante requested a review from bpmct July 8, 2026 17:28

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list rewrite is a substantial improvement over the original table. Nested headings grouped by serpent hierarchy, sentence-case titles with acronym preservation, deprecated options sorted to end with bold markers, and section intros from group descriptions. The sentenceCase/stripGroupPrefix/restoreFeatureNames pipeline handles the heading transforms cleanly. Tests added for the text transformation helpers.

CRF-15 (no tests) addressed with 131 lines of table-driven tests. CRF-16 (comment verbosity) superseded by the rewrite; comment quality is much improved (83% bloat rate in R1 down to ~10%).

"I tried to build a case against this approach and couldn't." (Pariston)

4 P3, 4 Nit new. The P3s: "OpenID Connect" gets lowercased to "OpenID connect" in headings while descriptions correctly say "OpenID Connect" (CRF-19), duplicate heading anchors from stripped group prefixes make deep links unstable (CRF-20), TestEmphasizeDeprecation misses the majority code path (CRF-21), and two locations still say "searchable table" after the format became a list (CRF-17). No P0-P2.

🤖 This review was automatically generated with Coder Agents.

Comment thread scripts/configdocgen/main.go
Comment thread scripts/configdocgen/main.go
Comment thread scripts/configdocgen/main_test.go
Comment thread docs/admin/setup/index.md Outdated
Comment thread scripts/configdocgen/main.go Outdated
Comment thread scripts/configdocgen/main.go Outdated
Comment thread scripts/configdocgen/main.go Outdated
Comment thread scripts/configdocgen/main_test.go
Comment thread scripts/configdocgen/main.go

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All R3 findings addressed. R4 coverage at 80.6% with TestRenderPipeline now exercising buildTree and render end to end. 25 of 28 findings resolved across 4 rounds.

CRF-20 (duplicate heading anchors): panel vote 3/5 accept the defense. The page had no per-setting anchors before; these are net-new deep-linkability. Each setting's unique env var is the stable identifier operators search for. The anchor instability is a known rough edge, not a regression. Two dissenters (Hisoka, Mafu-san) note the missing ticket for explicit heading IDs. This needs a human decision: file a ticket for stable heading IDs, or accept the current anchors as sufficient.

"These anchors are net-new surface area, not broken old surface area. The finding frames this as instability, but there was nothing stable before." (Meruem)

2 P3, 1 Nit new. Both P3s are test coverage gaps in TestRenderPipeline (DefaultFn path and Dangerous section ordering). Advisory.

CI note: gen is failing. Verified locally that configdocgen output matches the checked-in file; the failure may be from another gen target or a base-branch drift. Worth rebasing.

🤖 This review was automatically generated with Coder Agents.

Comment thread scripts/configdocgen/main_test.go
Comment thread scripts/configdocgen/main_test.go
Comment thread scripts/configdocgen/main_test.go

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 28 findings resolved across 5 rounds. Coverage at 82.3% with TestRenderPipeline exercising the full pipeline (buildTree, sortTree, render, toOption including DefaultFn, sectionRank including Dangerous ordering, deprecated sinking, flag shorthand anchors, nested sections). Two contested findings closed by panel (CRF-1 prepareEnv at 6/6, CRF-20 anchors at 3/5). No open items.

The generator is clean, proportional to the task, and follows the project's existing docgen patterns. The github-auth.md conversion reads well. The style guide codifies the env-var-first convention.

"Boring code gets silence. This pipeline earned most of its silence." (Hisoka, R1)

🤖 This review was automatically generated with Coder Agents.

@github-actions github-actions Bot added the stale This issue is like stale bread. label Jul 16, 2026
@github-actions github-actions Bot closed this Jul 19, 2026
@nickvigilante nickvigilante reopened this Jul 19, 2026
@nickvigilante nickvigilante removed the stale This issue is like stale bread. label Jul 19, 2026
@nickvigilante
nickvigilante force-pushed the vigilante/docs-492-admin-docs-lead-with-flag-examples-env-var-names-hard-to branch from 429ae8f to d8e0c8f Compare July 23, 2026 16:33
Comment thread docs/admin/users/github-auth.md Outdated
aslilac and others added 3 commits July 23, 2026 21:03
Coder server runs as a system service or container in production. Both
read configuration from environment variables, but the admin docs lead
with `coder server --flag` examples and only mention the env var form as
an afterthought. Operators have to translate every flag to its CODER_*
name.

Three changes, all small and independent:

- New generated page docs/admin/setup/configuration-reference.md with a
  searchable table of every visible deployment option (Setting, Env var,
  Flag, YAML key, Default, Description). Grouped by serpent group, with
  the General section first. Generated from codersdk.DeploymentValues so
  it stays in sync.
- docs/admin/users/github-auth.md inverted to lead with the env-var form
  in /etc/coder.d/coder.env. The CLI flag form becomes a closing note
  that links to the new configuration reference. H2 slugs preserved.
- DOCS_STYLE_GUIDE entry stating the env-var-first convention for
  admin/setup docs, with the CLI flag form reserved for ad-hoc
  invocations.

Plumbing: new scripts/configdocgen binary, Makefile target, and
GEN_FILES entry. docs/manifest.json wires the new page under
Administration / Setup. docs/admin/setup/index.md gains a TIP callout
pointing at the reference.

Co-authored-by: Coder Agents <[email protected]>
…alues

The page committed from the original branch was generated from an older
codersdk.DeploymentValues snapshot. Regenerate it so it matches current
main: adds CODER_SCIM_USE_LEGACY, the Networking / Cluster section with
CODER_CLUSTER_HOST, CODER_BOUNDARY_LOG_RETENTION, and refreshed option
descriptions (including the AI Gateway rename). Fixes the gen and
check-docs CI failures.
nickvigilante and others added 10 commits July 23, 2026 21:03
The generator linked every flag to server.md#--<flag>, but clidocgen
anchors short-form flags by their full heading ("### -l, --log-filter"
-> "#-l---log-filter"), so --config and --log-filter pointed at missing
anchors. Derive the anchor from FlagShorthand to match.

Also ignore the AWS Bedrock base URL in linkspector: it appears as an
illustrative https://bedrock-runtime.<region>.amazonaws.com placeholder
in an option description, matching the existing openai.com ignore
patterns.
Resolve the open findings from the coder-agents-review round:

- Pin the Dangerous section to last explicitly via sectionRank instead of
  relying on the emoji sorting after ASCII letters (CRF-2).
- Escape pipe characters in the Setting column so an option name cannot
  break a table row (CRF-5).
- Soften the header's universal claim; the table shows "-" where a method
  does not apply (CRF-6).
- Replace the "(dynamic)" default label with "(computed at runtime)" (CRF-7).
- Trim comments that restate the code, per the repo comment rules (CRF-8).
- Use strings.Cut and slices.Sort* over strings.SplitN and sort.* (CRF-11,
  CRF-12).
- Make _gen/bin/configdocgen a normal Makefile prerequisite to match
  clidocgen (CRF-13).
- Style guide: use sh fences and a real option (CODER_UPDATE_CHECK) in the
  examples (CRF-9, CRF-10).
- github-auth.md: fix "it's" -> "its" (CRF-14).

Regenerate the reference against current main; output is idempotent.

Co-authored-by: Coder Agents <[email protected]>
Replace the wide table with a nested, per-setting list so the reference fits without horizontal scrolling. Sections now nest by serpent group hierarchy (e.g. Email > Email authentication) and headings use sentence case with the redundant group prefix stripped (e.g. "AI Gateway Send Actor Headers" becomes "Send actor headers"). Deprecated options sort to the end of each section and lead with an emphasized marker, keeping heading anchors stable.
Keep branded feature names (AI Gateway, AI Gateway Proxy, Template Builder) in their canonical casing while sentence case remains the default for all other headings.
Cover sentenceCase, stripGroupPrefix, shortTitle, isDeprecated, emphasizeDeprecation, and collapse (addresses CRF-15).
Address configuration reference review feedback:

- Restore "OpenID Connect" casing in generated headings by adding it to the
  preserved-casing list.
- Describe the page as a list, not a table, in index.md and manifest.json.
- Add a render-pipeline test and cover the UseInstead deprecation path.
- Convert the map-based tests to table-driven subtests for deterministic
  output.
- Rename properNoun to properNouns and trim generator comments.
Rebasing onto main picked up the new --ai-gateway-proxy-target option and a
backtick fix in the GitHub allowed-teams help text. Regenerate the page so
make gen and check-docs stay clean.
Review feedback noted the demo conversion led with a systemd/coder.env
assumption, but a large share of deployments run on Kubernetes. Reframe
Step 2 so the environment-variable guidance does not assume a system
service: a neutral lead sentence, then Helm values.yaml and
/etc/coder.d/coder.env as co-equal paths (Helm first) rather than the
system service as default with Helm as an afterthought.

Also align the DOCS_STYLE_GUIDE env-var-first convention so it no longer
singles out systemd as its only concrete example.
@nickvigilante
nickvigilante force-pushed the vigilante/docs-492-admin-docs-lead-with-flag-examples-env-var-names-hard-to branch from d8e0c8f to bc9b7ac Compare July 23, 2026 21:09
@nickvigilante
nickvigilante requested a review from a team as a code owner July 23, 2026 21:09
@nickvigilante
nickvigilante requested a review from bpmct July 23, 2026 21:23
@github-actions github-actions Bot added the stale This issue is like stale bread. label Jul 31, 2026
@github-actions github-actions Bot closed this Aug 3, 2026
@nickvigilante nickvigilante reopened this Aug 3, 2026
@nickvigilante
nickvigilante merged commit ba4779f into main Aug 3, 2026
63 checks passed
@nickvigilante
nickvigilante deleted the vigilante/docs-492-admin-docs-lead-with-flag-examples-env-var-names-hard-to branch August 3, 2026 18:33
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport stale This issue is like stale bread.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants