Repository navigation
chore: Delete the campaign archive-root transition bridges - #5086
Merged
Merged
Conversation
Two one-purpose campaign bridges are removed with their CLI groups, operations modules, daemon startup assertions, durable-train coupling, generated schemas, docs and tests: - `maintenance archive-root-relocation` — moved an OLD archive root to a new one in place, rebinding released durable-train identity and every retained index generation's sealed paths. - `maintenance source-continuity-recovery` — a self-described "one-purpose bridge for a committed pre-#3868 blob-reference-liveness receipt that lacks the modern manifest digest and post-orphan fields". Both act on an old configured root. A rebuilt-from-scratch archive has no retired pre-move root and no pre-#3868 receipt, so both are dead by construction after the restart; the replacement for changing a root is a verified full_evidence backup restored at the new root plus ordinary daemon reconvergence. Neither points forward at an unfinished shape. Also removed as reachable only from these two: - `migration_runner.validate_full_evidence_backup_for_archive_root_relocation` - `durable_change_train`: `rebind_released_durable_train_archive_identity`, `recover_released_source_train_continuity`, `write_source_continuity_relocation_transition`, `_read_source_continuity_relocation_receipt`, `_validate_archive_root_relocation_receipts` and the relocation branch of the continuity authority chain (`_SourceContinuityAuthorityKind` is now `Literal["refresh"]`). The general durable train engine stays, and so does the source-continuity *refresh* API (`refresh_released_source_train_continuity`, `write_source_continuity_pending_intent`, `assert_source_continuity_apply_allowed`): `maintenance/ blob_ref_liveness_reconciliation.py`, a retained blob-owner module, is a live caller. That is the boundary this change cuts along. Per the deletion-hazard rule, a comment in `_released_train_proven_floor` that explained the fresh-bootstrap marker as "carried by evidence archive-root relocation already rebinds" was corrected rather than left describing a deleted mechanism. Test disposition: tests/unit/storage/test_archive_root_relocation.py (4412 lines) covered only the deleted route and is removed with it; the two archive-root-relocation CLI tests in test_archive_maintenance_cli.py and the prepared-receipt startup-block test in test_daemon_cli.py are removed for the same reason. test_archive_identity.py keeps its pointer-resolution test unchanged, renamed off the deleted route's name. No test was weakened. 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. |
Sinity
added a commit
that referenced
this pull request
Sep 22, 2026
…#5417) ## Summary `devtools verify` ended its output with a gate's `ok` line whether it passed or failed, so `devtools verify | tail` reported **tail's exit 0** whatever the gates found. Salvaged from `fix/test-verify-reds`, a two-week-old branch whose other five defects all turned out to be superseded. ## Problem Measured at base `74e1aa3d0`: the last line of a green `verify --quick` is ``` gate population-coverage ... ok (1.3s) ``` and a **failing** run ends identically. The verdict lived only in the exit status, which a pipeline discards. `#4718` gave the last-line verdict contract to `devtools test` (`run_tests.py:681`) but never to `devtools verify`, whose `_main` ended at `_emit(payload, ...)`. This is the hazard the environment contract already names — *read command exit status directly; a pipeline's final status does not prove an earlier check passed* — with no way to comply short of not piping. ## Solution `_write_verdict_line`, called from `_emit`, covering all four terminal paths: completion, checkout-import mismatch, affected-admission refusal, and interruption. Written to **stderr**, so the `--json` stdout contract stays exactly one document. A green run's absent diagnosis is **omitted** rather than reported as `diagnosis=unknown` — an absent determination is not a failed one. Live production output at the branch tip: ``` verify: PASSED exit=0 receipt=.cache/verify/runs/20260922T130618Z-quick-1977478-53268ffe/run.json ``` `TESTING.md:146` is corrected; it claimed the last-line-verdict contract for `devtools test` alone. ## Anti-vacuity — four mutations, each executed and restored 1. **delete the write entirely** → `assert 'gate populat...... ok (1.3s)' == 'verify: FAIL...0922/run.json'`, plus two `IndexError: list index out of range` because stderr was empty. That is the defect itself: a run that exited 1 whose last line is a gate's `ok`. 2. **guard with `if exit_code:`** so only failures speak → exactly 1 red, `test_a_passing_run_states_its_verdict_too`. The failing case stayed green, so red/green separates on the named axis and a failure-only verdict cannot pass. 3. **write to `sys.stdout`** → `json.decoder.JSONDecodeError: Extra data: line 3 column 1` — the prose landed after the document, exactly as the contract test names. 4. **restore `payload.get("diagnosis") or "unknown"`** → exactly 1 red: `+ verify: PASSED exit=0 diagnosis=unknown receipt=...`. The failing case, which has a real diagnosis, stayed green — so the test pins the absence-vs-unknown distinction, not merely the presence of a line. ## Verification - **Inherited-red baseline** at base `74e1aa3d0` before any edit: `devtools verify --quick` exit 0, 25 gates all ok, zero FAILED. Nothing to attribute. - `devtools verify --quick` at the tip: exit 0, 25 gates, gate set **byte-identical to the base run** (diffed). - `devtools render all --check`: exit 0, `grep -c 'out of sync'` = **0** — checked explicitly, since this command can print per-surface `sync OK` and still exit 1. - `devtools test` over `test_verify.py`, `test_run_tests.py`, `test_pytest_invocation.py`: exit 0, **111 passed**, selected 111 / terminal 111. - **Schema closure**: both changed files `out`. Identity measured directly on both trees, not inferred — `index=5274c9cc…`, `ops=86866235…`, **identical**. Unlike several PRs today, this one carries no rebuild-boundary constraint. ## The other five defects on that branch were superseded Reported rather than landed: - the rerun report path — landed as `pytest_rerun.py:72 _path_for_receipt`, identical remedy - the venv diagnosis expectation — head is already parametrized `[(False, "gate_unprovisioned_environment"), (True, "gate_missing_executable")]` - the pueue task-id identity hazard — closed by a *different, better* mechanism: the pueue route is gone, replaced by `agentctl job start` with a durable job id and a per-pid result file the runner unlinks first - the testmon expectation — head carries the branch's exact assertions - **`current-pytest-summary.json` — decided the opposite way on purpose.** `#4718` closed the same bead choosing "stop naming it" over "write it"; `run_tests.py:675` states *"The receipt is this run's own file, never a `current-*` name a concurrent run in the same checkout would overwrite."* Reviving the branch would have regressed a landed adjudication. ## Residual `devtools verify`'s agent-tier refusal (`verify.py:894-912`) returns 2 before any `VerifyRun` exists and still ends in its own prose refusal rather than a `verify:` line. That is a refusal *before* a run, not a run with a lost verdict, so it is left alone; if one sentence shape is wanted for every exit, that path is the remaining gap. Separately, `tests/unit/storage/test_index_generation.py:305` still says *"which later blocks archive-root relocation"*, describing a mechanism `#5086` deleted. It is the only surviving reference in the tracked tree — a one-line follow-up owed by that change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy 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
Reopens the work from #5083, rebased onto current master. The original PR's base branch (#5079) was squash-merged and deleted, which closed it and left the branch conflicting.
Deletes
archive-root-relocationandsource-continuity-recoveryend to end, plus the relocation coupling insidedurable_change_train.py.Problem
Both are self-documented as acting on an old archive root:
--old-rootnames "the retired pre-move root", and the other is "a one-purpose bridge for a committed pre-#3868 receipt". Both are dead by construction once the archive is rebuilt with current code. Tracked bypolylogue-2x6xu, whose earlier "already landed" claim was verified false — all three route groups were fully live, including threeassert_no_prepared_*calls on thepolylogued runstartup path.Solution
−8,887/+29 across 23 files: operations modules, registered CLI groups, generated CLI output schemas, docs sections, tests.
Also fixes a deletion hazard the sweep caught: the docstring of
_released_train_proven_floorjustified the fresh-bootstrap marker's retirement on evidence that "archive-root relocation already rebinds" — it would have merged clean in a different file and stood as authoritative over a deleted mechanism.Verification
Rebase checked for silent revert: the first rebase attempt was cut against a master predating #5085 and its diff showed 117 deletions in
tests/unit/storage/test_blob_gc.py— it would have reverted that PR's protection tests. Re-cut against current master; the diff now touches no blob-GC file.Timing
devtools schema closurereportsoperations/archive_root_relocation.pyandstorage/sqlite/durable_change_train.pyas IN the derived schema closure. Must merge before a fresh rebuild starts, never during one.Residuals
_SOURCE_CONTINUITY_REFRESH_V1_FORMATand its_legacy_source_continuity_*helpers are left in place: they sit on the retained refresh path, whichmaintenance/blob_ref_liveness_reconciliation.pystill calls. Separate blast radius, separate decision.🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK