Repository navigation
fix(docs): check the guide's reference tables against the code in CI - #224
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
199d1e3 to
2aec07a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 199d1e3323
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
2aec07a to
697a413
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 697a413553
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
697a413 to
3dc6b5c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3dc6b5c99c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b0a63c84e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dfca7e073
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74c7395d66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb64707196
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Four docs-truth tests, plus one in qq-config, fail CI when a reference table drifts: - The policy table must mark managed-only keys `managed layers only`. qq-config publishes MANAGED_ONLY_POLICY_FIELD_NAMES and a test proves it equals the set a user layer is refused with PolicyOutsideManaged. - The precedence table must name every QQ_* override and both MDM sources. - tui.md "Every command" must be one row per registry command with exactly its slashes and default chords. qq-tui exports command_rows(), and the tui.ron defaults move to settings::default_chords so there is one source. - Every troubleshooting heading must quote text the code can print. Fix what they found: - Six policy keys were marked settable by any layer. - The precedence table lacked QQ_JEV_APPROVAL, QQ_APPROVAL_DELEGATE and the Windows policy. - Alt-Up was documented as focus-parent (it pulls back a queued draft; Esc focuses the parent). Linear: ENG-979
… messages
- policy: a row naming a key the loader does not accept, or a key listed
twice, fails; previously a removed key's stale row passed.
- precedence: each QQ_* variable must be an exact code span in its own
row (QQ_CONFIG explicit, QQ_CONFIG_CONTENT inline, the rest overrides)
and nowhere else; unknown QQ_* spans fail. Substring matching let a
misplaced or suffixed name pass.
- tui command table: a duplicate title fails.
- troubleshooting: headings are matched against string literals from
production code only (comments, test modules and tests/ are excluded).
Each clause must occur in one literal, where a `{…}` placeholder matches
one rendered token, not arbitrary text.
- tui.md: Esc dismisses only an error notice for the focused session, not
every notice (app.rs handle_compose_key).
Linear: ENG-979
… contextual keys - troubleshooting check: remove every `#[cfg(test)]` item, whatever its name (probe_tests, tests_support, gated fns and imports), not only `mod tests`. - Quoted spans stay literal, so fixed commands in a message such as `qq ask "<prompt>"` are compared; only `…` is a placeholder. - The xAI missing-credential heading is composed at run time, so it is rendered through the real CredentialStore and compared exactly. - The keyring heading now quotes the real backend name (`OS keyring`), asserted against CredentialBackend's Display; the other keyring heading quotes `credential `…`` as the template does. - tui command table: `?`, `Enter`, `Esc` and `Esc Esc` are checked on their own rows through an explicit per-command mapping instead of being dropped from every row. - tui.md: an open `@` completion list also claims Esc first. Linear: ENG-979
… every policy cell - troubleshooting check: collect literals only from files a non-test build compiles, found by following `mod name;` declarations from each crate root and skipping any declaration gated by a cfg(test) attribute. Files gated on their parent's `mod` line (src/docs_truth.rs, qq-tui/src/fixtures.rs, qq-provider test_support) are now excluded; the walk reaches 172 production files. - policy table: a non-managed key's cell must read `any layer` or `any; …`, so false guidance such as "administrator only" on allow_tools fails. - Esc: at an approval prompt it denies the call and at a question it declines, so it never focuses the parent there (app.rs mode() / handle_approval_key, pinned by approval_prompt_captures_keys_and_sends_the_decision). permissions.md said Esc "leaves the prompt open"; it now says Esc denies, like `n`. Linear: ENG-979
…during an amendment - `cfg_requires_test` evaluates the predicate. `test`, `all(… test …)`, and `any(test, feature = …)` are test-only; `any(test, target_os = …)` ships. Both the test-item stripper and the module walk use it, so `#[cfg(all(test, feature = "native"))] mod tests` and qq-core's `all(test, unix)` fixtures are excluded. - permissions.md: after Shift-Y / Shift-N, Esc first cancels the note and leaves the prompt open (handle_approval_key's amendment branch). Linear: ENG-979
…ses overlays first - configuration.md: allow_tools / allow_shell_prefixes / allow_hosts / shell_env are "any layer except an organization manifest"; enroll and refresh reject a manifest that sets them (RemotePolicyGrantsForbidden). - qq-config publishes ORGANIZATION_FORBIDDEN_POLICY_FIELD_NAMES; the behavioral test now parses every key from user, managed, MDM, and organization sources, and the docs check enforces the three labels. - tui.md: an open picker, palette, or overlay claims Esc before focus moves to the parent. Linear: ENG-979
eb64707 to
dfcff83
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…rust prompt Linear: ENG-979
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Stacked on #223 (GE0.2). Merge order: #222 → #223 → this.
Slice GE0.3 of
docs/plans/guide-expansion.md· Linear ENG-979. Last of the three GE0 sub-slices.What changes for users
allowed_providers,denied_providers,max_output_tokens,require_https,allow_custom_providers,allow_literal_secrets) were documented as settable by any layer. They are administrator-only: a user config that sets them fails withmanaged-only policy settings are only allowed in managed configuration. The table now says so, and points users at the top-levelmax_output_tokensinstead.Alt-Upwas documented as "focus the parent session". It pulls back the newest queued draft. The parent isEsc, when nothing else claims it; the footnote says what does.QQ_JEV_APPROVAL,QQ_APPROVAL_DELEGATE, and the exact MDM identifiers: macOSdev.qq/ManagedConfig, and WindowsHKLM\Software\Policies\dev.qq\ManagedConfig(REG_SZ).tui.md"Every command" is now one row per command, exactly as the help overlay lists it.How staleness is prevented
qq-config:published_managed_only_policy_keys_are_exactly_the_ones_a_user_layer_rejectsMANAGED_ONLY_POLICY_FIELD_NAMESdiffers from the set the loader actually refuses from a user layer. It is proven by loading each key from a Global and a Managed source.policy_table_marks_exactly_the_managed_only_keysprecedence_table_names_every_override_and_mdm_sourceQQ_*override the loader reads, or an MDM source, is missing from the precedence tabletui_command_table_is_the_registryqq-tuicommand registry (a rebound default, or an added or removed command)troubleshooting_headings_quote_real_messagesFor the table check,
qq-tuinow exportscommand_rows(). Thetui.rondefault chords moved from literals inSettingsBuilder::defaulttosettings::default_chords(action), which both the builder and the registry read. There is no second copy to drift, and all 330qq-tuitests pass unchanged.Checking that each test can fail: I planted one defect per test (a policy key marked "any layer", a dropped
QQ_*override, a changed chord, a reworded message), and each test named its defect.Verification
cargo fmt --checkcargo clippy --workspace --all-targets --all-features -D warningscargo test --workspace(0 failures)nub run build(480 links resolve)Compatibility and performance
qq-configgains one public const.qq-tuigainsCommandRowandcommand_rows(). The key-dispatch path is unchanged; the defaults are read once, as before.After this stack
GE0 is done. Every version, runnable sample, and reference table in the guide is now a CI failure when it drifts. The next pages (GE10 concepts, GE5 keybindings, GE4 environment, …) each extend these same tests as they land.