Repository navigation
refactor(storage): Retire the dead index-rebuild transaction lifecycle - #5336
Conversation
Its production caller was deleted by cfc4c73 (#4698) and the cold-build replacement landed in cc1c740 (#5236). PR #5325 lifted the last live obligation -- `require_candidate_capacity` -- onto `ColdBuildGeneration.begin`, so removing the unreachable lifecycle no longer turns an unreachable guard into a nonexistent one. Removed: `IndexRebuildTransaction`, `RebuildRawPage`, `create_transaction`, `load_transaction`, `save_transaction`, `save_pass_receipt`, `checkpoint_transaction`, `discard_transaction`, `next_raw_page`, `seal_candidate_membership`, `commit_candidate_membership`, `candidate_membership_status`, `_transaction_path`, the store's `transactions_root` (and the empty `.index-rebuild-transactions/` it created in every archive), and the now-unwritable `sealed_membership_*` metadata fields. `observe_candidate_capacity` stays: `sources/live/cold_build.py` calls it on the live promote path. The three `_atomic_json_write` / `_read_json_nofollow` hardening tests that merely used the transaction record as a vehicle are retargeted onto the surviving generation-metadata write, so that coverage survives the deletion. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
`polylogue/cli/shared/machine_errors.py` was the only file under `cli/` (1 of 133) inside the derived schema-identity closure, pulled in by a function-local `from polylogue.cli.shared.machine_errors import emit_success` at `analysis/registry.py:151`. `_import_bases` walks the AST, so an import written to break a runtime cycle is still a full closure edge -- and it dragged `surfaces/outcome.py` along. An ordinary CLI edit therefore moved the derived identity and demanded an archive reconvergence. Moves the success half of the envelope -- `MachineSuccess`, `MachineSuccessEnvelope`, `success`, `emit_success` -- into `polylogue/surfaces/machine_envelope.py`, the package the layering manifest already describes as "payload types shared by every public adapter" and that `analysis` already imports (`analysis/measurement/outcome_coverage.py`). `machine_errors` re-exports them, so no CLI caller changes. The error half stays: its error-code vocabulary and argv pre-scanning tables have no caller outside `cli/`. Measured `derived_schema_identity(DerivedTier.INDEX)`: cddd06b38027a88bb4c484a27662706ca38ac4dedf433cf35707198e6dc57bc4 before, 594ac05fa22960c85d607cfcdbd3a2cd060babb50fae0caf56003f88e0a93a16 after. All 133 files under `polylogue/cli/` now report `out`. The closure baseline also drops six entries that were already stale at origin/master (archive/phase/extraction.py, archive/session/extraction.py, archive/session/provenance.py, storage/derived/session/timeline_rows.py and two query-store modules); shrinking is the gate's free direction. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
…rify` has `devtools verify` has reran each failure alone since the workstation pytest pool made contention normal: "a run beside other work can fail hundreds of tests on load alone; that is not a verdict on the head." `devtools/run_tests.py` -- the `devtools test <sel>` path every parallel worker actually uses -- had no equivalent, so the mitigation existed and was bypassed by the command most exposed to it. Three tests went red under contention in one session and cost real lane budget proving they were not regressions. Lifts the existing mechanism into `devtools/pytest_rerun.py` and calls it from both routes rather than writing a second one. `verify.py` and `run_tests.py` already define four same-named top-level functions with differing behaviour; this adds no fifth -- `_rerun_failed_once`, `_report_nodeid_to_selector`, `MAX_RERUN_NODEIDS` and `_path_for_receipt` leave `verify.py` entirely. The rule is unchanged on both routes: only exit 1 is adjudicable, a test that fails twice decides the run, and a run whose every failure passes alone is green with its flakes named in the report. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
Retiring `seal_candidate_membership` / `commit_candidate_membership` left `polylogue/storage/index_generation.py` with no DML, so `devtools gate layering` reported its census entry as `writer_module_census_baseline_stale`. The census is an exact inventory: an entry that no longer writes is a violation in the shrinking direction, not free slack. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Warning Review limit reachedNext included review available in 58 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 (18)
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. |
#5790) ## Summary Lands the real fixes from the worker-5 pass over storage Codex review debt (beads `polylogue-1tyq5.98`, `.99`, `.100`, 75 findings). 28 findings are fixed here with production-route regressions. 13 were already fixed on master, 8 are stale, 2 are refuted and 24 were not reached. Every kept fix was re-checked against current master. None of the cited or touched storage files changed on master after the salvage base `ab28700c1b`, and the later master merge touched none of this PR's files. ## Problem Each defect below was confirmed on master by a regression test that fails against master's production code (revert-proof job 2488): - **Archive location and tuples.** A root named `.index-generations` resolved to its parent. Local ops/embeddings tiers refused a durable symlink farm. The tuple manifest loader normalized unknown, missing and coerced fields before recomputing the seal, and it admitted a sealed obsolete schema fingerprint. An inactive destination could be a symlink or hard link to a foreign database, which SQLite then initialized; this happened both through bootstrap and through embedding preparation. A forged destination generation passed when the caller gave no hint. A replaced `audit.db` escaped the authority digest. Neither new directory entry was fsynced. Any root that merely contained `.archive-tuples` was refused. - **Readiness.** With a zero denominator the result was `UNMEASURED` even when blocking evidence loss had been measured. - **Block anchors.** Relocation followed NULL-inheritance edges. A private 512-node composer hid blocks that production reads expose. It also bound one SQL variable per transcript message, returned the first sibling match instead of `ambiguous`, and skipped same-session drift when the anchored message had vanished. - **Profiles and status.** `selected_part_facts` reported `valid` while ordinary inspection reported `stale` under pending demand. A session missing only its latency sibling was never rediscovered. Sync hydration dropped `direction`/`producer_ref`. A shared dependency superset zeroed `run_count` on archives that lacked `session_events`. - **Lineage and topology.** A compact-lineage page with `node_limit=1` could not advance past the seed. `siblings()` listed a child once per evidence edge. An unrelated component's cycle or conflict flagged a healthy topology. - **Markers, embeddings and FTS.** One accepted-marker convergence sweep delivered one batch and stopped. Reordered request options changed the recipe hash, and non-float32 recipes produced usable-looking contracts. A failing owned `COMMIT` in FTS repair ran outside rollback protection and left the transaction open. ## Solution - `archive_identity.py`: the innermost generations marker owns the path. Symlink-farm admission counts only the source, user and audit tiers. - `archive_tuple_location.py`: exact manifest key and type validation before the seal. Schema fingerprints must equal the running writer's. The final tier entry must be absent or an unshared regular file (`lstat`, `st_nlink == 1`). The destination generation must equal the manifest's. The live location is re-resolved and the audit identity rechecked. Both new directory entries are fsynced. Only `.archive-tuples/tuple-<id>` marks a candidate path. The unused whole-tuple `expected_tier` is removed; single-tier writers keep it on `validate_inactive_destination`. - `archive_readiness.py`: positive blocking counts are evaluated before the zero-denominator return. - `block_anchor.py`: the private composer and its cap are deleted. Relocation walks every prefix-sharing and spawned-fresh neighbour once and collects the distinct own physical rows that match the hash. Each query binds two values. More than one match is `ambiguous`. Same-session drift is checked before lineage, even when the message is gone. - `derivation.py`: required-page discovery includes sessions missing a latency sibling. Selected facts use the demand-aware classifier. - `rebuild.py`: the sync loader selects and hydrates the attachment provenance columns. The `input_binding.py` exclusion reasons are updated to match. - `status.py`: each run projection declares exactly the relations its own body reads. - `compact.py`: the seed rides every page outside the `node_limit` budget. - `topology.py`, `topology/derivation.py`: siblings are deduplicated as nodes, while evidence edges stay on `edges`. Cycle and conflict flags come from the returned edges. - `marker_domain.py`: `required_page` returns the head as its continuation, and it ends the sweep when the head has not moved (held or failed). One pass drains every committed batch without looping on or overtaking a held head. - `embeddings/identity.py`: request options are sorted and duplicate keys refused; only float32 output is accepted. Production recipes carry no options, so no stored recipe hash or vector address moves. - `fts_lifecycle.py`: the owned `COMMIT` moves inside the rollback guard. ## Derived-identity closure This PR is identity-moving: it must land before the fresh rebuild, never mid-run. It touches 12 members of the committed closure baseline (`docs/plans/schema-closure-baseline.json`, unchanged; the `schema-closure` gate passed): `polylogue/analysis/topology.py`, `polylogue/storage/archive_identity.py`, `polylogue/storage/archive_readiness.py`, `polylogue/storage/archive_tuple_location.py`, `polylogue/storage/derived/lineage/compact.py`, `polylogue/storage/derived/session/{derivation,input_binding,rebuild,status}.py`, `polylogue/storage/derived/topology/derivation.py`, `polylogue/storage/embeddings/identity.py`, `polylogue/storage/fts/fts_lifecycle.py`. Not in the closure: `polylogue/storage/block_anchor.py`, `polylogue/storage/derived/session/marker_domain.py`. ## Verification All checks ran as AgentCTL jobs on this worktree; nothing ran in-process. - `agentctl job start polylogue verify_quick --workspace /realm/worktrees/salvage-w5` returned job **2686** on head `2136284cf0`: `verify: PASSED exit=0` (all gates, including `schema-closure`, `layering` and `mypy`). - `agentctl job start polylogue pytest_focused --workspace /realm/worktrees/salvage-w5 -- <36 test modules covering every changed module and its consumers>` returned job **2687** on `2136284cf0`: 855 passed, 3 failed, 1 error. The 3 failures and the error are `test_archive_readiness::test_pinned_materialization_readiness_degrades_like_its_path_twin`, `test_read_view_operations::test_lineage_and_topology_use_the_pinned_graph_engines`, `test_session_partition_convergence::test_the_partition_input_columns_are_projected_or_declared_excluded`, and a descriptor-leak teardown error in `test_event_order_permutations_converge_to_the_same_relation`. All four fail identically on master `1beb2e516a` (job **2643**) and are untouched by this PR. - Revert proof: the new regression tests ran on a master checkout (`1beb2e516a`, production code unchanged) in job **2488**: `38 failed in 273.95s`, which is every named regression. The rebuilt deep-anchor test then ran alone in job **2685** and failed on the assertion (`message_id not found in the named session or its lineage neighborhood`) in 10.6 s. On this branch it passes (job **2684**, 22 passed). - Hosted: `ci/circleci: quick-gate` and `stacked-review-threads` gate the merge. ## Self-review - **Sibling sites.** The final-entry link check sits in `validate_inactive_destination`, the one gate that bootstrap, embedding preparation and whole-tuple validation all call. The `COMMIT`-outside-`try` pattern also occurs in `fts_invariant_snapshot_sync`, but that closes a read-only snapshot transaction whose `COMMIT` cannot lose writes, so it is left as it is. The FTS derivation writers (`fts/derivation.py`) already commit inside their guard. The status dependency map was re-derived for all three run projections from the tables their SQL actually reads. - **Cancellation, shutdown and loops.** The marker page loop cannot spin. The kernel rejects a continuation it has already visited, and `required_page` returns no keys and no cursor once the head stops moving. The anchor neighbourhood walk visits each session once through a `visited` set, and it terminates on cycles. - **Unbounded reads.** The anchor walk is now bounded by the lineage component rather than by an arbitrary 512-node cap, which had produced wrong `missing` answers. Each step is one indexed edge query and one two-bind hash query. Removing the per-transcript `IN` list removes the only unbounded bind list. - **Fail-open fallbacks.** The manifest loader no longer defaults a missing `state` to inactive. Readiness no longer lets a zero denominator mask measured loss. Anchors refuse on ambiguity and never pick the first match. - **Compatibility shims.** There are none. The removed `expected_tier` parameter had no caller, and mypy (`verify_quick`) proves none remains. The `float16` case was removed from `test_embedding_request_identity.py` because that element type is now refused. - **Removed symbols still referenced.** `_MAX_LINEAGE_SEARCH_NODES`, `_prefix_edge`, `_composed_message_ids` and `_hash_matches_in_composed_session` have no remaining references in code, tests or monkeypatch targets (grep, plus the mypy gate). - **Tests on the production route.** The regressions drive `initialize_archive_database`, `prepare_inactive_embedding_generation`, `ArchiveTupleAllocator.load`, `resolve_block_anchor` over `write_parsed_session_to_archive` data, `converge()` over a real derivation registry, `load_sync_batch` + `hydrate_sessions`, `session_insight_status_sync`, and `repair_message_fts_index_sync` with a real SQLite authorizer denying the first `COMMIT`. The 520-deep anchor test asserts that the cited session's `read_archive_session_envelope` really contains the block. Every named test fails on master (job 2488). ## Per-finding dispositions | key | disposition | evidence | test | |---|---|---|---| | 98.01 | fixed | archive_identity innermost marker | A::test_generation_root_uses_the_final_index_shape | | 98.02 | fixed | farm admission over durable tiers | A::test_durable_symlink_farm_allows_local_disposable_tiers | | 98.03 | fixed-already | archive_readiness.py:798,1167 `attach_readonly_database` | — | | 98.04 | fixed | blockers before zero denominator | A::test_zero_denominator_does_not_erase_measured_evidence_loss | | 98.05 | fixed-already | archive_readiness.py:1886 `attach_readonly_database` | — | | 98.06 | fixed | exact manifest shape before seal | A::test_tuple_loader_rejects_unsealed_manifest_shape_changes | | 98.07 | fixed | fingerprints equal running writer | A::test_tuple_loader_rejects_a_sealed_obsolete_schema | | 98.08 | fixed | unshared regular final entry | A::test_inactive_writer_refuses_foreign_final_file_links | | 98.09 | fixed | generation bound to manifest | A::test_destination_generation_must_match_its_manifest_without_a_caller_hint | | 98.10 | fixed | live re-resolve + audit identity | A::test_tuple_writer_rechecks_audit_identity_after_allocation | | 98.11 | fixed | whole-tuple `expected_tier` removed (no caller; mypy) | — (removed parameter) | | 98.12 | fixed | fsync archive root and tuples root | A::test_allocation_fsyncs_both_new_directory_entries | | 98.13 | fixed | typed `tuple-<id>` child required | A::test_reserved_name_alone_is_not_an_inactive_tuple | | 98.14 | not reached | — | — | | 98.15 | fixed-already | blob_gc.py:235,258 catch SchemaSkewError | — | | 98.16 | fixed-already | blob_gc.py:438-444 fsync marker + dir | — | | 98.17 | fixed-already | blob_gc.py:497 64-hex check | — | | 98.18 | refuted | pre-reset index as GC authority is forbidden legacy authority | — | | 98.19 | not reached | — | — | | 98.20 | fixed-already | blob_gc.py:1352-1355 marker only when `not dry_run` | — | | 98.21–98.24 | not reached | — | — | | 98.25 | stale | `_write_jsonl_rows` removed in e20f6f5 (#5680) | — | | 99.01, 99.02 | stale | writer removed in e20f6f5 (#5680) | — | | 99.03 | fixed-already | blob_integrity.py:1262 subtracts unowned | — | | 99.04 | stale | no generation-scoped projection remains | — | | 99.05–99.07 | not reached | — | — | | 99.08 | fixed | only classified inheritance edges | L::test_anchor_does_not_relocate_through_an_unclassified_edge | | 99.09 | fixed | private capped composer deleted | L::test_anchor_relocation_reaches_an_ancestor_beyond_the_former_search_cap | | 99.10 | fixed | two binds per lookup | L::test_anchor_hash_lookup_does_not_bind_every_transcript_message | | 99.11 | fixed | drift before lineage for a vanished message | L::test_anchor_relocates_locally_after_its_original_message_disappears | | 99.12 | fixed | all distinct matches before uniqueness | L::test_anchor_refuses_two_distinct_sibling_hash_matches | | 99.13 | not reached | — | — | | 99.14 | fixed-already | iterative walk landed in df70214 (#5685); worker rewrite dropped | — | | 99.15 | fixed | seed outside page budget | test_compact_lineage.py::test_one_node_pages_advance_past_the_seed | | 99.16–99.18 | not reached | — | — | | 99.19 | stale | plan-no-progress path gone | — | | 99.20, 99.21 | not reached | — | — | | 99.22 | fixed | demand-aware selected facts | P::test_selected_profile_facts_do_not_certify_pending_demand | | 99.23 | fixed | latency sibling in discovery | P::test_required_profile_page_recovers_a_missing_latency_sibling | | 99.24, 99.25 | not reached | — | — | | 100.01 | not reached | — | — | | 100.02 | fixed | head as continuation; stop on unmoved head | test_accepted_marker_consumer.py::test_one_convergence_sweep_delivers_every_accepted_marker_batch | | 100.03 | stale | per-session marker-set cursor gone | — | | 100.04 | fixed-already | `applied_sequence` + `expected_prior_sequence` in BEGIN IMMEDIATE | — | | 100.05 | fixed | provenance through sync loader | P::test_sync_hydration_preserves_stored_attachment_provenance | | 100.06, 100.07 | fixed-already | rebuild retires absent families; revision-matched acks | — | | 100.08 | stale | thread-row stamping gone | — | | 100.09 | refuted | retaining removed fields is a forbidden compatibility path | — | | 100.10 | fixed | per-projection dependencies | P::test_status_counts_runs_without_unrelated_product_tables | | 100.11 | fixed | siblings deduplicated as nodes | L::test_topology_siblings_are_nodes_not_duplicate_evidence_rows | | 100.12 | fixed | flags from returned edges | L::test_topology_fault_flags_are_scoped_to_the_returned_component | | 100.13–100.15 | not reached | — | — | | 100.16 | fixed-already | generations.py:759 contract before child | — | | 100.17 | fixed | options sorted, duplicates refused | C::test_equal_provider_requests_have_equal_recipe_identities | | 100.18 | fixed | float32 only | C::test_embedding_recipe_refuses_unimplemented_output_encodings | | 100.19–100.21 | not reached | — | — | | 100.22 | fixed | shared final-entry check via embedding preparation | A::test_embedding_preparation_rejects_a_foreign_final_symlink | | 100.23 | fixed | COMMIT inside rollback guard | C::test_fts_owned_commit_failure_rolls_back_and_allows_retry | | 100.24 | fixed-already | index_generation.py:892,949 restore predecessor | — | | 100.25 | stale | `commit_candidate_membership` removed in 0b1e99d (#5336) | — | A = `tests/unit/storage/test_archive_location_admission.py`, L = `test_block_anchor_lineage_and_topology.py`, P = `test_profile_selection_and_hydration.py`, C = `test_embedding_recipe_and_fts_commit.py`. Counts: `.98` 11 fixed / 6 fixed-already / 1 stale / 1 refuted / 6 not reached. `.99` 8 / 2 / 4 / 0 / 11. `.100` 9 / 5 / 3 / 1 / 7. ## Residuals - 24 findings are not reached and remain open on their beads. - The link check on the final entry is a pre-open `lstat`. A process that swaps the entry between the check and SQLite's open is outside the single-writer contract. - The anchor neighbourhood walk costs grow with the size of the lineage component; the walk is not capped, because a cap produced wrong answers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Summary
Three structural changes that remove recurring cost rather than fix a
user-visible defect: retire the dead index-rebuild transaction lifecycle, make
the CLI package identity-neutral, and give
devtools testthe rerun-on-failurethat
devtools verifyalready had.1. The dead transaction lifecycle is retired
storage/index_generation.pygoes 1925 → 1468 lines. Removed:IndexRebuildTransaction,RebuildRawPage,create_transaction,load_transaction,save_transaction,save_pass_receipt,checkpoint_transaction,discard_transaction,next_raw_page,seal_candidate_membership,commit_candidate_membership,candidate_membership_status,_transaction_path, the store'stransactions_root(so a new archive no longer gets an empty.index-rebuild-transactions/), and the now-unwritablesealed_membership_*fields.
The discharge was verified first:
require_candidate_capacityis on the liveroute at
sources/live/cold_build.py:120insideColdBuildGeneration.begin.Removing this before that lift would have turned an unreachable guard into a
nonexistent one.
Two corrections to the dispatch: the method is
observe_candidate_capacity,not
_observe_candidate_capacity, and it is live —cold_build.py:207callsit in
promote(), so it stays.commit_candidate_membershipwas not on the listbut is in the same dead lifecycle with no production caller.
/realm/state/polylogue/.index-rebuild-transactions/untouched.Three tests used the transaction record only as a vehicle for
_atomic_json_write/
_read_json_nofollowhardening; they were retargeted onto the survivinggeneration-metadata write rather than deleted with it.
2. The CLI package is identity-neutral
emit_success,success,MachineSuccessandMachineSuccessEnvelopemove topolylogue/surfaces/machine_envelope.py;machine_errors.pyre-exports them sono CLI caller changes;
analysis/registry.py:151imports fromsurfaces.surfaces/is the right home by the layering manifest's own words ("payload typesshared by every public adapter"), and
analysis/measurement/outcome_coverage.pyalready imports
surfaces/outcome.py, so the edge direction is established.Measured
derived_schema_identity(DerivedTier.INDEX):9da022cd8027…at base→
cddd06b38027…after item 1 →594ac05fa229…after item 2.devtools schema closureover all 133 files underpolylogue/cli/: 0 reportIN (was 1). Every future CLI change is now identity-neutral.
Half of the dispatch's premise was wrong:
surfaces/outcome.pystays IN, becauseanother closure member reaches it. The CLI edge still went away.
3.
devtools testreruns a failure aloneThe mechanism lifted into
devtools/pytest_rerun.pyand called from bothroutes. No fifth same-named sibling:
_rerun_failed_once,_report_nodeid_to_selector,MAX_RERUN_NODEIDSand_path_for_receiptleftverify.pyentirely (−155 lines there).Observed working in production during the run itself:
rerun 2 failed test(s) alone ...fired from a realdevtools testinvocation.Verification
devtools verify --quick— exit 0, all 23 gates (re-run after rebase, sincetwo baselines were edited)
devtools render all --check— exit 0,grep -c "out of sync"= 0devtools testover 13 files — 316 passed, exit 0devtools schema closureon all 15 touched.pyfiles: IN =analysis/registry.py,storage/index_generation.py,surfaces/machine_envelope.py; all othersout7 of 7 mutations red under their own named mutation: disarming
_atomic_json_write's glob pre-scan andO_EXCL|O_NOFOLLOWplus the post-replacelstat, and wrappingload'sFileNotFoundError→ the three retargeted tests;restoring the
machine_errorsimport inregistry.py→ the identity-neutralitytest; deleting the
rerun_failed_oncecall → the two new focused-rerun tests,while
test_an_unfinishable_focused_run_is_never_adjudicatedcorrectly stayedgreen, and widening the guard to
!= 0turned that one red.Scope expansion, declared
docs/plans/schema-closure-baseline.jsonanddocs/plans/writer-module-census-baseline.json— both declared artifacts of thechanged contract. Removing the last DML from
index_generation.pymade itswriter-census entry stale, which
gate layeringtreats as a violation. Theclosure baseline also shed six entries already stale at base.
⚠ Landing constraint
This moves the derived schema identity twice over. Must land before a rebuild
starts, never during one.
Residuals
candidate_source_membership(created atarchive_tiers/index.py:535) now hasno writer at all.
storage/source_generation_receipts.py:281still reads itand will always get an empty
source_snapshotsset — already true in production,now provably dead. Both files outside scope. Filed separately.
surfaces/payloads.pyalready declares its ownMachineSuccessEnvelope/MachineSuccessPayload, duplicating the new module. Pre-existing; collapsingthem touches
cli/query_verbs.py.archive_tiers/source.py:390still citesIndexGenerationStore.next_raw_pageina comment; in the prohibited path list, left alone.
test_json_envelope_contract.py(ops status --format jsonexiting 1 while emitting valid JSON), proven by checking out
origin/master -- polylogue devtoolsinto the worktree and reproducing theidentical assertion, then restoring. These are resolved by fix(cli): Make a nonzero click Exit reach the process exit status #5335, which moves
those assertions as part of the exit-code contract.
🤖 Generated with Claude Code
https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq