fix(storage): an absent source tier refuses nothing - #4703
Merged
Conversation
A freshly created archive root has no source.db, so the frontier projection reported the tier unavailable under both the broken-head and cursor checks and those reasons surfaced as an unattributed refusal that blocked the whole raw-materialization pass. Absence means nothing has been acquired; damage still refuses. The blob-reference-closure test seeded the explained shape (ref_count 0) while asserting the blocking one; ref_count is the discriminator. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 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. |
Sinity
added a commit
that referenced
this pull request
Sep 6, 2026
#4698) ## Summary Delete the manual rebuild engine and the generic repair product. Raw convergence keeps one owner, the storage/index FTS shim and the declared-not-routed candidate-build operation contract go with them, and the maintenance docs are rewritten for the sole surviving route. ## Problem Two retired build paths stayed in the tree behind the production daemon route: a manual rebuild engine with its own daemon bulk-rebuild entry point, and a generic "repair" product whose CLI verbs (`preview`, `plan`, `run-preview`, `run`, `blob-reference-closure`) duplicated convergence semantics the daemon already owns. Derived read models converge from durable evidence; a standing repair concept is a second truth. ## Solution - Remove the rebuild engine, the daemon bulk-rebuild route, the generic repair CLI surface, the FTS shim, and the candidate-build operation contract. - Rename the surviving entry point to `converge_materialization` and retarget every proof and doc reference at it. - Keep `blob-disposition` and its documentation: the command survives, and an earlier revision of this branch dropped its only doc section. - `tests/unit/daemon/test_daemon_cli.py` patches the global `polylogue.config.load_polylogue_config` seam. `convergence_stages.py` binds that name at module import, so a module first imported inside the patch window keeps a partial `SimpleNamespace` permanently — `monkeypatch` only restores `polylogue.config`. Deleting the bulk-rebuild tests changed which module imports first, so three daemon-startup tests began failing on `sinex_mode`. The stand-in now resolves a real `PolylogueConfig` through `cli_overrides`, so it answers every key. No production change: the stage builder and both of its call sites are byte-identical to master. ## Verification `devtools verify --quick` on the final merged tree, re-run by the pre-push hook on the pushed commit `c57680148` — 14/14 gates ok (format, lint, mypy, generated-surfaces, layering, patterns, doc-commands, schema-manifest, oracle-integrity, testmon-selection, consumer-reachability, timestamp-doctrine, durable-enum-checks, schema-privacy). `devtools gate layering` → `"violations":[],"count":0,"baselined_count":288, "stale_baseline_count":0`. `devtools render all --check` reports no `out of sync` surface. **No focused pytest run executed against this head.** Two attempts were queued on the host's single pytest slot while the `pytest` pueue group was paused under backpressure; the first (task 1719) ended as `Killed` without running, the second was abandoned under quota pressure. The last focused run on an earlier base gave 407 passed / 11 failed: four from the `converge_materialization` rename and three from the config seam, all fixed here; the remaining six were master's and landed on master as #4703. ## Residuals - No pytest evidence at this head, as above. - Six other test files hold partial `SimpleNamespace` fakes at the same `polylogue.config.load_polylogue_config` seam and carry the same leak hazard. Out of scope here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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
A freshly created archive root has no
source.db, and the source-selection gate treated that absence as an unexplained refusal, blocking the whole raw-materialization pass.Problem
raw_frontier_blocked_source_pathsbuilds its projection from_unavailable_frontier_integrity_snapshotwhen the source tier file is missing. Both the broken-head and cursor checks then reportunknownwith zero counts, so both reasons are appended as unattributed, and_drain_raw_materialization_onceraises. On master this is six red tests (five raw-materialization lease tests plus one cancellation test); on a fresh archive root it would block the first materialization pass of the fresh start.Solution
An absent source tier returns no blocked paths and no unattributed reason: nothing has been acquired, so there is nothing to select and nothing to refuse. An unreadable tier still refuses, since absence and damage are different states.
The blob-reference-closure test seeded
ref_count0, the shape #4701 defined as explained, while asserting the blocking outcome; it now seeds the vanished-refs shape it describes.Verification
devtools test tests/unit/storage/test_raw_retention.py tests/unit/daemon/test_daemon_cli.py tests/unit/maintenance/test_archive_verification.py. New testtest_absent_source_tier_refuses_nothingnames its anti-vacuity condition: dropping the absence branch restores the unattributed refusal.Residual
The absence branch is positional — it precedes the projection rather than being expressed inside it. A later refactor of the projection should carry the distinction rather than rely on the caller.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid