Skip to content

test(docs): fail CI when the guide omits a config key, env var, command, or flag; write CHANGELOG at release (OB10) - #160

Merged
lg2m merged 1 commit into
mainfrom
feat/eng-883-docs-truth
Sep 25, 2026
Merged

lg2m merged 1 commit into
mainfrom
feat/eng-883-docs-truth

Conversation

@lg2m

@lg2m lg2m commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Stack (1/3): this PR → #161 → #162. Merge in order.

Plan slice OB10 of docs/plans/onboarding-ux.md. Linear: ENG-883.

What ships

The guide can no longer silently drift from the CLI. cargo test now fails when any of these is missing from docs/guide/*.md (as a code span or inside a fenced block):

Category Source of truth Count today
config.ron keys qq_config::DOCUMENT_FIELD_NAMES / POLICY_FIELD_NAMES (new; proven complete against serde's field list by parsing a document with every key and recovering the derive's FIELDS from the unknown-field error) 19 + 15
Environment variables qq_config::ENVIRONMENT_VARIABLES (new) — from_process_env now destructures it by position, so it cannot read a variable it doesn't publish; plus QQ_* parsed from install.sh; plus provider credential variables 8 + 2 + 5
Slash commands qq_tui::slash_names() (new), aliases included 41
CLI subcommands and long flags recursive walk of the clap Command tree; hidden args skipped automatically 68
qq doctor checks CHECK_NAMES vs cli.md 9

Misses are reported together, grouped by category, in one panic. Allow-list: one entry (QQ_RELEASE_BASE_URL, the installer's test hook), and the test asserts allow-listed names still exist so stale entries fail too.

It found one real gap: the seven qq jev observe flags lived only in a runbook. docs/guide/cli.md gains a qq jev table.

CHANGELOG.md at release. cargo xtask release X.Y.Z prepends a dated section grouped Features / Fixes / Performance / Other from Conventional Commit subjects since the last tag; ! → **breaking:**; chore(release): skipped; PR numbers kept; non-conforming subjects land in Other verbatim rather than vanishing. Runs before the release commit so the bump itself isn't listed. Smoke-tested against real history (10 entries, **breaking:** on #152).

Why it matters

The site (#156) is generated from the guide, so this is what keeps https://retsu-ai.github.io/qq/ true as the CLI grows.

Verification

  • fmt, clippy -D warnings, cargo test --workspace (qq bin 233, qq-config 102, xtask 61), cargo test -p qq-provider --no-default-features --features test-support
  • Failure path verified by injecting a bogus /bogus-command
  • cargo xtask release --help

Docs

guide/cli.md (qq jev), runbooks/release.md (changelog step), runbooks/website.md, ledger (OB10 in review, OB12 shipped).

Note

provider_credential_variables() derives from the presets and pins xAI's variable name in qq-config; the runtime/doctor still spell their own literals — consolidating is a small follow-up, kept out to stay narrow.

…nd, or flag; write CHANGELOG at release (OB10)

The binary's test suite now enumerates, from code, every `Document` and
`PolicyPatch` key (published as `qq_config::DOCUMENT_FIELD_NAMES` /
`POLICY_FIELD_NAMES`, proven complete against serde's field list), every
environment variable `LoadRequest::from_process_env` reads (now indexed
from `qq_config::ENVIRONMENT_VARIABLES` so the two cannot drift), the
installer's `QQ_*` variables, provider credential variables, every TUI
slash name, every clap subcommand and long flag, and every `qq doctor`
check name, and asserts each appears as a code span or fenced block in
docs/guide. Misses are reported together by category. It found one gap
(the `qq jev observe` flags), now documented in guide/cli.md.

`cargo xtask release X.Y.Z` prepends a section to CHANGELOG.md grouped
from Conventional Commit subjects since the last tag (Features / Fixes /
Performance / Other, `**breaking:**` for `!`, release bumps skipped).

Closes ENG-883.
@lg2m
lg2m added this pull request to stack #174 September 25, 2026 14:32
@lg2m
lg2m merged commit 4ddcc13 into main Sep 25, 2026
6 checks passed
@lg2m
lg2m deleted the feat/eng-883-docs-truth branch September 25, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant