Repository navigation
feat: Add a CLI acceptance lane for legibility and error behavior - #5191
Conversation
`devtools verify cli-acceptance` renders the public CLI at four terminal widths across three color lanes, lints the rendered text for accessibility and legibility properties, checks every declared invocation terminates typed, and delegates the latency lane to `devtools bench slo`. It registers as a subcommand of the existing `verify` root, so the folded twelve root verbs stay twelve. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
The date column is both localized and width-sensitive and had no contract of its own. Pins field alignment across present/missing timestamps, the `unknown` fallback, the instant-versus-declared-wall-day split between `_display_date` and `_canonical_date`, the width breakpoints that keep the date column, and that recency is text rather than a color cue. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 22 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
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 |
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. |
## Summary
Nine commits closing harness-honesty gaps: a gate that blamed the code
for an
unprovisioned environment, a verify receipt that proved nothing about
which tree
it tested, a scheduled run whose killer was discarded, and two inherited
reds
answered rather than re-recorded.
## Problem
- **`gate layering` blamed the code for a pruned environment.** Without
the audit
group, `grimp` is absent and the gate emitted findings-shaped output,
sending
readers to investigate code that was never inspected.
`verify_patterns.py`
carried the same trap in its remediation string: `uv sync --group audit`
prunes the dev extra and lands you in a *second* broken checkout.
- **A verify receipt was not bound to a tree.**
`[operations.verify_all]`
declared `checkout = "default"`, which does not select a tree —
`projects.py`
validates against `{"any","default"}` and `launch.py` refuses any
workspace
other than `project.root` — so the corpus run executed on the operator's
working branch and its receipt could be read as candidate evidence.
- **A killed run reported an undifferentiated abandonment.**
`_adopt_outcome`
kept only AgentCTL's coarse bucket, in which an OOM kill and an ordinary
non-zero exit are both "failed", discarding the `systemd_result` the
`.outcome` file already held — so `devtools why` sent readers to
`journalctl`
for a fact the receipt contained.
- Two reds on master were unattributed: three `test_cli_acceptance.py`
reflow
baselines, and `grok-export` reporting `partial (schema_package is
missing)`.
## Solution
`audit_checker_unavailable()` probes before any import is read, so a
refusal
cannot emit a partial finding list. Exit **3**
(`ENVIRONMENT_REFUSAL_EXIT`) is
distinct from the 1 that means a violation, with a new
`gate_missing_analysis_dependency` diagnosis. `AUDIT_GROUP_SYNC_COMMAND`
is one
shared constant naming the whole correct command, fixing both sites.
`verify_receipt_check.py` gains `candidate_tree_refusal()` and
`--candidate`,
with four refusals each naming both SHAs — including *no tested SHA
recorded*,
so the field cannot be removed to opt out. The tree check runs
**before** the
test-evidence check, so a flawless green run on another tree does not
read as
evidence. CI passes `--candidate ${{ github.sha }}`.
The reflow raise was **attributed, not guessed**: a detached worktree at
44c5f86 (#5191, which recorded the baselines) reproduced the gallery,
and the
diff shows 100% of the raise is f8a63f0 (#5249). The arithmetic closes
exactly
(156+3=159, 100+1=101, 9+1=10, 54+1=55, 2+1=3). The help text does not
reflow at
all, so "narrowing" would mean deleting words — recorded with its reason
beside
the table.
`grok-export` is answered by refutation: `schemas/providers/grok` was
deleted by
d7d3dda (#5224) because its element schemas carried
`$id polylogue://schemas/claude-ai/v2/session_document` — verified by
decompressing the deleted bytes, which are Claude.ai's shape. A
withdrawn
package is correct, so `partial` is **truthful**.
## Verification
- `devtools verify --quick` — all 23 gates, 23,547 collected
- `devtools test` over 13 devtools modules — **287 selected, 287
passed**,
`terminal_green true`, `git_dirty false`
- Red reproduced *before* fixing: 4 failed / 21 passed at f6f899c; 27
passed after
- `devtools render all --check` — exit 0, `grep -c 'out of sync'` = 0
- `devtools schema closure` on **all 25 changed files — every one
reports `out`.**
No commit here moves the derived identity.
## Residuals
- **`016xl` criterion 1 is further away than when filed**: 581.3 MiB
over 23,547
tests against a 430 MiB target, up from 533 MiB over 20,681. Per-item
cost is
flat; the total tracked corpus growth. Neither named lever pays — a
one-file
selection collects in 1.9 s / 112 MiB, and `-X importtime` shows 1.20 s
of
2.68 s is `readline` via pytest's own pdb. Re-measure with the new
`devtools bench collection --budget-mib 430`.
- **A 4.6% admission margin.** `charge_mib(3)` is 11,725 MiB against a
12,288 MiB
`memory.high` — exactly the condition the 2026-09-17 run stalled in. The
corrected charge model fills a ceiling whose 1.2x safety margin was
computed
under the superseded anonymous-RSS model. `WORKER_PEAK_CACHE_MIB =
2,850` is
~80% of a worker's charge, driven by 47-55 GB of scratch SQLite writes.
- `p2mbi` AC4 and `k1o3t` AC4 are **not satisfiable in this
repository**:
agentctl's operation vocabulary has no key naming a candidate tree and
no
memory/admission key. Recorded rather than faked; both need a sinnix
change.
- `origin_specs.py:3210` still declares `schema_paths` to a path #5224
deleted.
Not fixed here — that file is **IN** the derived closure, so correcting
it
forces a reconvergence and belongs at the rebuild boundary.
- The larger inherited storage/schema red cluster is untouched and
outside this
packet; one owner should confirm #5290 is the single cause before anyone
fixes
it test-by-test.
Advances polylogue-mkucv, 1khzy, p2mbi, yk0zz, 016xl, 62j1f, k1o3t.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Adds
devtools verify cli-acceptance, aggregating CLI usability and accessibility properties that had strong per-behavior coverage but no acceptance entry. Delivers criteria 1, 2 and 4 of polylogue-dpm6o; criterion 3 (latency) is unsatisfied with a named blocker.Problem
polylogue-dpm6o asks for demonstrated CLI usability, accessibility and performance. A census found no
galleryconcept anywhere in the repo and no devtools command aggregating CLI acceptance — that was the real gap.The per-behavior coverage underneath criteria 1–2 already existed and is strong, so it was not duplicated:
test_help_contract.py(every recursive command path has help),test_completions_contract.py+test_completion_matrix.py(~45 per-shell completer tests),test_interaction_oracles.py(generated scripts fed to realbash -n/zsh -n/fish --no-execute),test_exit_code_contracts.py,test_cli_error_boundaries.py(Hypothesis fuzz: never a traceback),test_contextual_errors.py,test_stdout_stderr_split.py,test_color_and_layout.py,test_terminal_cells.py,test_terminal_snapshots.py.Solution
devtools/cli_acceptance.pyadds a scenarios lane asserting every declared public invocation terminates inside{0,1,2}with no traceback, at 4 widths × 3 color lanes, plus nine properties run against the live CLI:echo_preserved(a rejected token survives verbatim at every width),color_is_not_meaning(default /NO_COLOR=1/POLYLOGUE_FORCE_PLAIN=1byte-identical off a TTY),failure_is_textual,repair_named,control_safety,no_ansi_off_ttyamong them.tests/unit/cli/test_cli_temporal_layout.py(the bead's namedplanned_test_filesentry) pins the date column: a fixed 10-cell field whether or not a timestamp exists,unknownas a word rather than blank padding, the instant-vs-declared-wall-day split between_display_date/_canonical_date, the date surviving to the 40-column breakpoint, and recency carried as text rather than color.Ratchet respected. The new command is
verify cli-acceptance, a subcommand of an existing root.test_top_level_command_surface_is_the_folded_twelveis unmodified and passes, and a new test assertscommand_path == ("verify", "cli-acceptance")so the fold stays intentional rather than incidental.Recorded defect (new evidence)
The CLI's hand-written help and error prose does not reflow — Click only wraps what it owns. Measured overflowing lines at 40 columns: root help 156,
read --help54,find --help14; at 80 columns root help still 9; and--origin <bad>overflows at every width including 120.Captured as
REFLOW_OVERFLOW_BASELINE, a falling-only ratchet: a new unwrapped paragraph turns the lane red at the width where it first does not fit, and repairing the prose lets the baseline tighten. This is recorded as a defect, not an accepted design.Verification
Schema-identity closure: out for both
devtools/cli_acceptance.pyanddevtools/command_catalog.py. No rebuild implication.Residuals
Criterion 3 (cold/warm/concurrent latency vs declared budgets) is UNSATISFIED. The lanes exist in
docs/plans/slo-catalog.yaml—cli_status_cold(500/800 ms),daemon_warm_status(400/800),daemon_concurrent_reads(250/500) — but all three aregate: informational, tier: lab, so nothing blocks on them, and the catalog itself admits cold-start's budget is aspirational (measured p50 ~1.80 s, blocked on the import tax in polylogue-8s70).The lane could not be executed here:
devtools bench sloshells out to bare pytest, whichdevtools/agent_env.py:refuse_bare_pytestrefuses inside an agent job — andPOLYLOGUE_ALLOW_BARE_PYTEST=1does not lift it, since the guard keys on the agent cgroup rather than the shell. Remaining action: rundevtools bench slo --include-labon the host outside an agent job, compare the three rows against their budgets, then decide whether they graduate from informational.Following from that:
devtools bench slois unreachable from any agent job at all. Routing it through the managed pytest harness the waydevtools testis routed deserves its own bead.Narrow-terminal reflow is baselined, not fixed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK