Skip to content

fix(storage): an absent source tier refuses nothing - #4703

Merged
Sinity merged 1 commit into
masterfrom
fix/master-reds-absent-source-tier
Sep 5, 2026
Merged

fix(storage): an absent source tier refuses nothing#4703
Sinity merged 1 commit into
masterfrom
fix/master-reds-absent-source-tier

Conversation

@Sinity

@Sinity Sinity commented Sep 5, 2026

Copy link
Copy Markdown
Owner

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_paths builds its projection from _unavailable_frontier_integrity_snapshot when the source tier file is missing. Both the broken-head and cursor checks then report unknown with zero counts, so both reasons are appended as unattributed, and _drain_raw_materialization_once raises. 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_count 0, 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 test test_absent_source_tier_refuses_nothing names 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

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
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 57c92912-8c01-4948-99a9-dd43a362306f


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T22:07:14.146656Z d751e79 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity
Sinity merged commit 3a15d8a into master Sep 5, 2026
3 checks passed
@Sinity
Sinity deleted the fix/master-reds-absent-source-tier branch September 5, 2026 23:55
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant