Repository navigation
test: Repair four CLI-surface tests and file the rest as product defects - #5041
Conversation
`_daemon_delete_route` in test_query_composition_laws still returned `authorization_token`, the key `_delete_authorization_refs` read before 1d901ec (#4867) renamed the authorization contract off one-time tokens onto durable refs. The production reader (`polylogue/cli/archive_query.py:2198-2211`) now accepts only `authorization_refs` / `authorization_ref`, so the apply leg refused with "daemon returned an invalid delete authorization" and the cardinality law never ran. Every other double in the suite was already migrated -- test_verb_cardinality.py:820, which this one's docstring says it mirrors, and test_query_exec_laws.py:2625 -- so this was the single straggler. Anti-vacuity: `_delete_authorization_refs` still refuses a count mismatch against the prepared id set, and restoring the `authorization_token` key makes the test red again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
`ops reset --blob --yes` no longer deletes in-process: 6be5d2f (#4955), "Delete CLI direct-writer bypasses and prove daemon sole write authority", moved the deletion behind the `maintenance.reset` operation, so with no daemon the verb refuses and exits 1. The test still asserted the removed bypass (exit 0 plus an in-process deletion). What this test actually owns is the archive-root override, so it now asserts the override where it is still observable: the read-only preview the CLI renders before lowering the intent must name the overridden blob root, and the refusal must be a refusal -- nothing deleted behind it. Anti-vacuity: if the override stopped reaching the reset preview the blob path assertion goes red, and reintroducing a CLI direct-writer reset bypass makes the refusal assertions red. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
`analyze --format json` now carries the `outcome` envelope field that CLAUDE.md declares for every row-bearing envelope, decided once at the operation boundary (`surfaces/outcome.py`, cabba8f / #4810). The new value is correct rather than a regression: the sibling `test_json_facets_snapshot` baseline in this same file already carries an identical `{"state": "ok", "reason": null, "detail": {}}` block and passes, so `analyze` was the envelope missing the declared field, not the one growing an undeclared one. Regenerated with syrupy `--snapshot-update` scoped to this single node so no other baseline in the file was rewritten. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
…exception
`test_blob_conservation_json_returns_failure_for_a_failed_census` passed
alone and failed inside any wider selection. Two compounding causes.
The command calls `archive_root()` (maintenance/_blob_conservation.py:19)
before the stubbed census runs, and the test pinned no root, so resolution
depended on whatever a previously executed test left in the environment.
That failure was then invisible: `CliRunner().invoke` catches exceptions by
default and reports `exit_code == 1` with empty output, which is exactly
what the test's first assertion expects. The status assertion passed for the
wrong reason and the run died one line later on
`json.loads('')` -> JSONDecodeError. `catch_exceptions=False` makes
`exit_code == 1` mean the command's own `Exit(1)` again.
Verification: tests/unit/cli (3040 tests) -- green before this change only
when the file ran alone, green at directory scope after it.
Anti-vacuity unchanged and now load-bearing: returning directly after the
JSON output, instead of raising `Exit(1)`, still makes the test red.
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 59 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 (4)
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 |
Triage of the CLI-output share of the 58 failures from the first complete
full-corpus run (job 650). Only 4 of 18 were test problems. The other 14 are
product defects, now on beads.
The lead I was given was wrong, and that mattered
I was told the two
convergence debt:assertions were almost certainly assertinga surface deliberately removed by #5027. They are not stale. The renderer
still emits
Convergence debt:atcli/commands/status.py:363/:454/:460, andthe
convergence_debttable survives across ~20 modules.Both tests die before any convergence rendering — on the daemon refusal.
Reproduced without pytest, same workspace both ways:
Fixing
polylogue-2d8oqshould turn them green with no test change.Recorded on that bead so it is not re-derived.
Fixed (4)
test_query_composition_laws_daemon_delete_routedouble returnedauthorization_token; #4867 renamed the contract toauthorization_refs. Every other double was already migrated — including the one this test's docstring says it mirrors.test_paths::test_archive_override_unifies_…maintenance.reset; the test asserted the deleted in-process bypass. Now asserts the refusal and that the override still reaches the read-only preview.test_plain_cli_snapshots::test_json_analyze_snapshotoutcomefield the envelope now carries.test_maintenance_registration::test_blob_conservation_json_…Not fixed — 14 product defects, on beads
polylogue-2d8oq(existing):basic_usage_cli×3,json_envelope_contract×2,test_json_status_snapshot,test_terminal_snapshots,test_convergence_surface_contract.polylogue-jih4s(filed): read-only query verbs take an exclusive maintenance ownership lock and mint an auth token into the archive root. Regression from perf: preserve pytest width and share wire receipts #4867.polylogue-kjy0a(filed):ops statuspublishesconverged: falsewithreason: "ready"on a pristine empty archive.daemon_status.py:158-162derivesreadyandsummaryfrom different predicates, and omitsdeterminate— so the converged-vs-unknown collapse frompolylogue-bp12n.1is still live on this path.polylogue-uf7un(filed): daemon and directfinddisagree on the resolved root filter.#4867 again
1d901ec73now accounts for 12 of these 18 — 7 via 2d8oq, 5 via jih4s — ontop of the five clusters already attributed to it on
polylogue-7lhl5.Verification
One snapshot updated, justified above. No test was written that agrees a
nonexistent daemon is running.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK