Repository navigation
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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
## 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-relocation` and `source-continuity-recovery` end to end, plus the relocation coupling inside `durable_change_train.py`. ## Problem Both are self-documented as acting on an old archive root: `--old-root` names "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 by `polylogue-2x6xu`, whose earlier "already landed" claim was verified false — all three route groups were fully live, including three `assert_no_prepared_*` calls on the `polylogued run` startup 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_floor` justified 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 ``` devtools verify --quick 15/15 gates ok (exit 0) ``` 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 closure` reports `operations/archive_root_relocation.py` and `storage/sqlite/durable_change_train.py` as **IN** the derived schema closure. Must merge before a fresh rebuild starts, never during one. ## Residuals `_SOURCE_CONTINUITY_REFRESH_V1_FORMAT` and its `_legacy_source_continuity_*` helpers are left in place: they sit on the *retained* refresh path, which `maintenance/blob_ref_liveness_reconciliation.py` still calls. Separate blast radius, separate decision. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Deletes the two remaining campaign-only archive-root transition bridges named in
polylogue-2x6xu's census —maintenance archive-root-relocationandmaintenance source-continuity-recovery— together with their operations modules, daemon startup assertions, durable-train coupling, generated CLI output schemas, docs and tests. Net −8,887 / +29 lines across 23 files, with no replacement mechanism added.Stacked on #5079 (
delete-durable-reference-transition); review only the second commit.Problem
Both routes act on an old configured archive root, and both say so themselves at this head:
archive-root-relocationis documented as usable "only after an offline inode-preserving root move", with--old-rootnaming "the retired pre-move root". It CAS-revises releasedsource/user/audittrain manifests and remaps every retained index generation's sealedarchive_root,index_pathand absolute tier symlinks.source-continuity-recoveryis documented verbatim as "a one-purpose bridge for a committed pre-fix(storage): attest source mutations across train continuity #3868 blob-reference-liveness receipt that lacks the modern manifest digest and post-orphan fields."The archive is about to be wiped and rebuilt from current code. A fresh archive has no retired pre-move root and no pre-#3868 receipt, so neither bridge has an input it can act on — they are dead by construction the moment the rebuild happens, not merely unused today. Nothing in either points forward at an unfinished new shape: the forward route for changing a root is a verified
full_evidencebackup restored at the new root plus ordinary daemon reconvergence, which is what the rewrittendocs/archive-backup.mdsection now documents.They also sat on the daemon's hot path.
polylogued run,polylogued watch, and_reconcile_durable_change_train_startup_lockedeach calledassert_no_prepared_archive_root_relocation/assert_no_prepared_historical_source_continuity_recoverybefore any other startup work — a fail-closed check for prepared campaign state that a fresh root can never contain.Timing:
devtools schema closurereportspolylogue/operations/archive_root_relocation.pyandpolylogue/storage/sqlite/durable_change_train.pyasINthe derived schema closure. This must land before the rebuild starts; landing it mid-run would silently invalidate the run.Solution
Deleted outright — no shim, no deprecation stub, no absence gate:
operations/archive_root_relocation.py(2083)operations/historical_source_continuity_recovery.py(1447)operations/historical-source-continuity-operation-20260807.jsoncli/commands/maintenance/_archive_root_relocation.py,_source_continuity_recovery.py_COMMANDS/_NESTED_GROUP_COMMANDSentriesdaemon/cli.py× 3 call sitesmigration_runner.validate_full_evidence_backup_for_archive_root_relocationrender_cli_output_schemas.py× 2 specs + bothdocs/schemas/cli-output/*.schema.json+ README rowsmaintenance.md,archive-backup.md,sqlite-connection-policy.mddevtools/patterns/baselines/{exclusive-create-write,replace-without-parent-fsync}.txt,sqlite-degradation-baseline.jsonDurable-train surgery — where the cut lands, and why there. The bead requires "stripping only campaign source-continuity recovery from the general durable train implementation. Do not delete the general train engine." Removed from
durable_change_train.pyas reachable only from the two deleted operations:rebind_released_durable_train_archive_identity("the one permitted root-relocation revision of a durable train")recover_released_source_train_continuitywrite_source_continuity_relocation_transition,_read_source_continuity_relocation_receipt,_validate_archive_root_relocation_receipts_SourceContinuityAuthorityKindis nowLiteral["refresh"]and_validate_source_continuity_refresh_receiptlost itsallowed_pending_relocation_receipt_sha256parameterKept, deliberately: the general train engine, and the source-continuity refresh API —
refresh_released_source_train_continuity,write_source_continuity_pending_intent,assert_source_continuity_apply_allowed. These are not campaign-only:maintenance/blob_ref_liveness_reconciliation.py, a retained blob-owner module the bead explicitly excludes, is a live caller of all three. That caller is the boundary this change cuts along.Deletion-hazard check. Per the epic's note that "a comment that names a mechanism is an uncaught reference to code", removed symbol names were grepped across comments and docstrings, not only call sites. One hit: the docstring of
_released_train_proven_floorexplained the fresh-bootstrap marker as a fact "carried by evidence archive-root relocation already rebinds". It is corrected in this PR rather than left describing a deleted mechanism. Post-change grep for all removed names acrosspolylogue,devtools,tests,docs,.agentctlreturns zero hits.Test disposition, stated deliberately:
tests/unit/storage/test_archive_root_relocation.py(4412 lines) — covered only the deleted route; deleted with it. It was also the only coverage of the removed relocation branch of the chain validator, so that logic and its tests leave together.test_archive_maintenance_cli.py— the twoarchive-root-relocationCLI tests removed; the rest of the file is untouched and still runs.test_daemon_cli.py—test_daemon_archive_root_relocation_prepared_receipt_blocks_componentsremoved: it asserted the startup block this PR deletes.test_archive_identity.py— kept unchanged in behavior, only renamed off the deleted route's name (..._after_archive_root_relocation→..._after_a_root_move). It exercisesArchiveLocationpointer resolution after a plain filesystem move, which survives.No test was weakened or relaxed to let a deletion pass.
Verification
That selection is the point:
test_durable_change_train.pyandtest_blob_ref_liveness.pyare the retained owners of the machinery the surgery cut around, and both are green.consumer-reachabilityis the deciding gate: it is what goes red if a deleted module is still reachable from a registered surface.Scope is honest: focused run plus the full static gate set, not the whole corpus.
Residuals
polylogue-2x6xushould be closeable once this and chore: Delete the durable-reference transition actuator #5079 land. Its earlier "already implemented" claim was wrong — all three route groups were live atf90c94d79._SOURCE_CONTINUITY_REFRESH_V1_FORMATand its_legacy_source_continuity_*helpers indurable_change_train.py. These read a v1 refresh receipt shape from disk. They are dead against a fresh archive for the same reason as the above, but they belong to the retained refresh path, so removing them is a separate decision with a separate blast radius — I did not fold it in unasked. Flagging it rather than silently leaving it.🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK