Repository navigation
fix(cli): repair thirteen of master's red CLI tests - #4420
Merged
Merged
Conversation
`ROOT_COMMAND_ROLE_SECTIONS` declares `find` first among the search workflows, but the renderer skipped it because `get_command` returns None: `find` is the query marker the dispatcher consumes, not a registered command. Root help therefore taught `find QUERY then ACTION` in prose while omitting it from the list of commands it introduces. The row is now rendered from a declared marker help, sharing the same column budget as the commands beside it. `find` is still absent from `cli.commands`, so completion and dispatch are unchanged. `context` is registered lazily, and `_LazyCommand.get_short_help_str` deliberately does not import the module, so a lazily-registered command with no declared short help renders a blank description. `context` had none. `ops insights fable-packet --format` was missing the `-f` alias the flag-alias contract requires. Verification: pytest tests/unit/cli -p no:randomly — 10 failed, down from 19 on master; the nine repaired are the four help/alias tests here and the five delete-path tests fixed in #4419. devtools verify --quick — exit 0. Residual: the help snapshot tests pass in a fixed order but one fails under pytest-randomly when all three help modules run together, which is a pre-existing isolation defect, not a help-rendering one. The remaining ten CLI failures are unrelated and tracked on polylogue-4g1is. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
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. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
`test_select_row_from_summary_uses_query_result_display_contract` asserted `relative_time == "16w ago"` for a fixed 2026-05-02 timestamp measured against the wall clock, so it was correct when written and went red as the distance grew to 17 weeks. The clock is now frozen at 2026-08-22, which is what the recorded expectation describes. Verification: pytest tests/unit/cli/test_select.py -p no:randomly — 21 passed; devtools verify --quick — exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
`_archive_index_targets` resolved `.index-active-pointer` and only then refused to touch a managed generation. A pointer naming a target outside the archive root — the state the clone hardening now rejects — therefore raised `ArchiveLocationError` instead of the refusal written for exactly that case, so `ops reset --index` reported an internal error rather than telling the operator to promote a replacement. The refusal reads the pointer's presence, never its target, so it now runs first. The session-reset fixture placed its active generation outside the archive root, a layout the archive no longer permits; it now sits under `.index-generations/`, where managed generations live. The test still proves that reset follows the pointer rather than the root-level index.db. Verification: pytest tests/unit/cli -p no:randomly — 7 failed, 2864 passed, down from 19 failures on master; devtools verify --quick — exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
The fixture placed its index generation beside the archive root, a layout the clone hardening now refuses, so the test raised `ArchiveLocationError` before reaching what it asserts. The generation now sits under `.index-generations/`, which still keeps it out of the root's top-level `index.db` — the distinction the test exists to prove. Verification: pytest tests/unit/cli -p no:randomly — 6 failed, 2865 passed, down from 19 failures on master; devtools verify --quick — exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
Sinity
added a commit
that referenced
this pull request
Aug 29, 2026
## Summary Repairs eight of master's nineteen red CLI tests — the four help/alias ones and four fixture/expectation ones — by fixing what they were reporting. Together with #4419 (five delete-path tests) the selection goes 19 → 6. ## Problem and solution **Root help omitted `find`.** `ROOT_COMMAND_ROLE_SECTIONS` declares it first among the search workflows, but `format_commands` skips any entry `get_command` cannot resolve — and `find` is the query marker the dispatcher consumes, deliberately not a registered command. Help taught `find QUERY then ACTION` in prose while omitting `find` from the list of commands it introduces. A declared marker help now renders the row through Click's own short-help derivation, so it truncates on the same column budget as its neighbours. `find` stays out of `cli.commands`; dispatch and completion are unchanged. **`context` rendered blank.** `_LazyCommand.get_short_help_str` does not import the module — staying lazy is the point — so a lazily-registered command shows whatever short help the registration table declares. `context` declared none. **`fable-packet --format`** lacked the `-f` alias the flag-alias contract requires. **`ops reset --index` raised instead of refusing.** `_archive_index_targets` resolved `.index-active-pointer` and only then refused to touch a managed generation. A pointer naming a target outside the archive root — the state the clone hardening rejects — therefore produced `ArchiveLocationError` rather than the refusal written for exactly that case. The refusal reads the pointer's presence, never its target, so it now runs first. **Two fixtures placed a managed generation outside the archive root**, a layout the archive no longer permits. They now sit under `.index-generations/`, which still keeps them out of the root's top-level `index.db` — the distinction those tests exist to prove. **One relative-time expectation** was measured against the wall clock: `"16w ago"` for a fixed 2026-05-02 timestamp went red as the distance grew to 17 weeks. The clock is now frozen at what the expectation describes. ## Verification uv run pytest tests/unit/cli -p no:randomly # 6 failed, 2865 passed uv run devtools verify --quick # exit 0 Master fails 19 in that selection. Snapshots were regenerated, not hand-edited. The only content change is `context` gaining its description; the `find` row matches the text the snapshot already expected. ## Residual Six failures remain, deliberately untouched and classified on polylogue-4g1is: three depend on ambient environment (a live daemon, a real pty, a database path), and two are policy questions — cost estimate status (polylogue-e60z5) and whether a tiny `--max-tokens` budget should clip inside every segment or drop and account for one. Correcting those tests to match current output would encode whichever behaviour happens to exist, so they are left red. The three help modules pass in a fixed order but one fails under `pytest-randomly` when run together — a pre-existing isolation defect, not a help-rendering one. --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sinity
added a commit
that referenced
this pull request
Aug 29, 2026
…#4425) ## Summary Correcting my own change in #4420. That fixture built the copy shape — real durable files with only the index pointing away — which `archive_identity` refuses, because such a pointer resolves into the archive the copy was made from. I moved the index inside the root to make it pass, which fixed the symptom and removed the external index the test exists for. An out-of-root pointer is admitted as a symlink farm: every durable tier is a symlink out alongside the index. The fixture now builds that, so the test is about an external index again. Anti-vacuity: make any durable tier a real file and the pointer is refused with `active index pointer target is outside configured archive root`, which is the copy-versus-farm distinction the production code draws. Verification: pytest the named test — passes; devtools verify --quick — exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA Related: polylogue-cqv1a records the same guard colliding with the reindex canary's split-root contract. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sinity
added a commit
that referenced
this pull request
Sep 1, 2026
## Summary Repairs eight of master's nineteen red CLI tests — the four help/alias ones and four fixture/expectation ones — by fixing what they were reporting. Together with #4419 (five delete-path tests) the selection goes 19 → 6. ## Problem and solution **Root help omitted `find`.** `ROOT_COMMAND_ROLE_SECTIONS` declares it first among the search workflows, but `format_commands` skips any entry `get_command` cannot resolve — and `find` is the query marker the dispatcher consumes, deliberately not a registered command. Help taught `find QUERY then ACTION` in prose while omitting `find` from the list of commands it introduces. A declared marker help now renders the row through Click's own short-help derivation, so it truncates on the same column budget as its neighbours. `find` stays out of `cli.commands`; dispatch and completion are unchanged. **`context` rendered blank.** `_LazyCommand.get_short_help_str` does not import the module — staying lazy is the point — so a lazily-registered command shows whatever short help the registration table declares. `context` declared none. **`fable-packet --format`** lacked the `-f` alias the flag-alias contract requires. **`ops reset --index` raised instead of refusing.** `_archive_index_targets` resolved `.index-active-pointer` and only then refused to touch a managed generation. A pointer naming a target outside the archive root — the state the clone hardening rejects — therefore produced `ArchiveLocationError` rather than the refusal written for exactly that case. The refusal reads the pointer's presence, never its target, so it now runs first. **Two fixtures placed a managed generation outside the archive root**, a layout the archive no longer permits. They now sit under `.index-generations/`, which still keeps them out of the root's top-level `index.db` — the distinction those tests exist to prove. **One relative-time expectation** was measured against the wall clock: `"16w ago"` for a fixed 2026-05-02 timestamp went red as the distance grew to 17 weeks. The clock is now frozen at what the expectation describes. ## Verification uv run pytest tests/unit/cli -p no:randomly # 6 failed, 2865 passed uv run devtools verify --quick # exit 0 Master fails 19 in that selection. Snapshots were regenerated, not hand-edited. The only content change is `context` gaining its description; the `find` row matches the text the snapshot already expected. ## Residual Six failures remain, deliberately untouched and classified on polylogue-4g1is: three depend on ambient environment (a live daemon, a real pty, a database path), and two are policy questions — cost estimate status (polylogue-e60z5) and whether a tiny `--max-tokens` budget should clip inside every segment or drop and account for one. Correcting those tests to match current output would encode whichever behaviour happens to exist, so they are left red. The three help modules pass in a fixed order but one fails under `pytest-randomly` when run together — a pre-existing isolation defect, not a help-rendering one. --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sinity
added a commit
that referenced
this pull request
Sep 1, 2026
…#4425) ## Summary Correcting my own change in #4420. That fixture built the copy shape — real durable files with only the index pointing away — which `archive_identity` refuses, because such a pointer resolves into the archive the copy was made from. I moved the index inside the root to make it pass, which fixed the symptom and removed the external index the test exists for. An out-of-root pointer is admitted as a symlink farm: every durable tier is a symlink out alongside the index. The fixture now builds that, so the test is about an external index again. Anti-vacuity: make any durable tier a real file and the pointer is refused with `active index pointer target is outside configured archive root`, which is the copy-versus-farm distinction the production code draws. Verification: pytest the named test — passes; devtools verify --quick — exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA Related: polylogue-cqv1a records the same guard colliding with the reindex canary's split-root contract. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repairs eight of master's nineteen red CLI tests — the four help/alias ones and
four fixture/expectation ones — by fixing what they were reporting. Together
with #4419 (five delete-path tests) the selection goes 19 → 6.
Problem and solution
Root help omitted
find.ROOT_COMMAND_ROLE_SECTIONSdeclares it firstamong the search workflows, but
format_commandsskips any entryget_commandcannot resolve — andfindis the query marker the dispatcherconsumes, deliberately not a registered command. Help taught
find QUERY then ACTIONin prose while omittingfindfrom the list ofcommands it introduces. A declared marker help now renders the row through
Click's own short-help derivation, so it truncates on the same column budget as
its neighbours.
findstays out ofcli.commands; dispatch and completion areunchanged.
contextrendered blank._LazyCommand.get_short_help_strdoes not importthe module — staying lazy is the point — so a lazily-registered command shows
whatever short help the registration table declares.
contextdeclared none.fable-packet --formatlacked the-falias the flag-alias contractrequires.
ops reset --indexraised instead of refusing._archive_index_targetsresolved
.index-active-pointerand only then refused to touch a managedgeneration. A pointer naming a target outside the archive root — the state the
clone hardening rejects — therefore produced
ArchiveLocationErrorrather thanthe refusal written for exactly that case. The refusal reads the pointer's
presence, never its target, so it now runs first.
Two fixtures placed a managed generation outside the archive root, a layout
the archive no longer permits. They now sit under
.index-generations/, whichstill keeps them out of the root's top-level
index.db— the distinction thosetests exist to prove.
One relative-time expectation was measured against the wall clock:
"16w ago"for a fixed 2026-05-02 timestamp went red as the distance grew to 17weeks. The clock is now frozen at what the expectation describes.
Verification
Master fails 19 in that selection.
Snapshots were regenerated, not hand-edited. The only content change is
contextgaining its description; thefindrow matches the text the snapshotalready expected.
Residual
Six failures remain, deliberately untouched and classified on polylogue-4g1is:
three depend on ambient environment (a live daemon, a real pty, a database
path), and two are policy questions — cost estimate status (polylogue-e60z5)
and whether a tiny
--max-tokensbudget should clip inside every segment ordrop and account for one. Correcting those tests to match current output would
encode whichever behaviour happens to exist, so they are left red.
The three help modules pass in a fixed order but one fails under
pytest-randomlywhen run together — a pre-existing isolation defect, not ahelp-rendering one.