Repository navigation
fix(reindex): gate on raw failure lifecycle evidence - #3819
Conversation
Problem Stopped-daemon raw parse and validation failures were counted as failed archive evidence without a readiness decision. Reindex could therefore proceed while unresolved failures remained unexplained. What changed Add a read-only source-tier lifecycle projection that accepts only durable deferred or terminal artifact evidence. Expose it in the preflight ledger and archive verification, and make full index rebuilds stop before creating a candidate generation when unexplained failures remain. Add mutation-sensitive tests for typed evidence, validation failures, preflight blocking, and rebuild refusal. Compatibility/migration The check is read-only and does not alter retained raws or run live remediation. Existing archives with historical failures require classification evidence before reindex; the operator remediation remains a separate backup-gated operation. Ref polylogue-dyica Co-Authored-By: Codex <[email protected]>
|
Warning Review limit reached
Next review available in: 4 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (21)
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 |
Problem Daemon bulk rebuild could create or resume generation state and select raw pages without the raw-failure lifecycle decision used by offline reindex. Status also counted terminal artifacts without validating their support status or source identity. What changed Run the shared lifecycle preflight before daemon transaction resolution. Require matching raw identity and evidence-kind support status, and make daemon status consume the same projection. Add real-route mutation tests for pre-generation refusal, malformed or mismatched evidence, and status parity. Compatibility/migration Cursor authority mechanics are unchanged. Unexplained or unavailable raw failure evidence now fails closed before daemon bulk rebuild mutation.
Problem Daemon and direct archive status could fall back to index relations or zero-valued output when source.db was missing or unreadable. The health route could then report no raw failures without lifecycle evidence. What changed Make source.db lifecycle evidence authoritative, carry explicit unavailable and blocked state through daemon, snapshot, and direct status, and make medium health return an error with the source reason. Add mutation-sensitive status and health route coverage for missing, malformed, unreadable, and healthy source tiers. Compatibility/migration Successful source archives retain their existing zero-failure and typed deferred or terminal status. Archives without readable lifecycle evidence now require source-tier recovery before status can be healthy. Co-Authored-By: Codex <[email protected]>
Problem: fast health and status surfaces could treat missing or omitted raw-failure lifecycle evidence as healthy or actionable, while human status output did not always disclose the evidence gap. What changed: require an explicit healthy zero-failure lifecycle for fast health and status claims, propagate unavailable and blocked states through daemon and root CLI status, align JSON and exit-code semantics, and add route-level regressions for source evidence failure shapes. Compatibility: clean source-tier evidence remains healthy; typed degraded and blocked outcomes remain visible; bulk and offline rebuild safety paths are unchanged. Ref #3819 Co-Authored-By: Codex <[email protected]>
ops.db is disposable and evolves by re-applying its additive DDL, so an absent or superseded identity stamp is a convergence input, not a refusal; the derived-identity refusal now applies to the index tier only. Writers that lazily created ops.db opened an empty version-0 file the tier gate then refused; SLO samples, the context ledger, the context image, and the daemon HTTP ops read bootstrap it through initialize_archive_database when it is missing. The write coordinator refused its own managed post-write tasks while draining on shutdown, stranding the terminal whale receipt the drain exists to deliver; managed tasks stay admissible while draining. Tests: status reports a not-ready schema mismatch with exit 1 (#3819) and asserts the integrity fields; the daemon-services test uses tmp_path instead of a fixed /tmp archive. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01YGi8wLWGR2HYBh8p8fXFXz
Summary
Make stopped-daemon raw failure evidence an explicit pre-reindex readiness decision. Every retained parse or validation failure is classified as deferred, terminal, or unexplained, and unexplained failures block a full index rebuild before candidate generation.
Problem
The 2026-08-04 read-only census found 112 stopped-daemon failures: 111 raw parse failures and one maintenance failure. Only 59 raw parse failures had typed artifact observations. The remaining 52 failures had no durable lifecycle explanation, so a converged-archive claim could hide unresolved parser errors.
Solution
Add a read-only source-tier lifecycle projection over
raw_sessionsand the latestraw_artifactsobservation. Wire it into the preflight ledger and archive verification. Full rebuilds now run this production verification path before creating an index generation and stop loudly when unexplained failures remain. Mutation-sensitive tests cover typed terminal evidence, validation-failure red twins, preflight blocking, and rebuild refusal.Verification
direnv exec . devtools verify --quickpassed with all 24 steps exiting 0, including format, lint, mypy, generated surfaces, layering, degradation policy, and schema/promotion checks.direnv exec . devtools test tests/unit/maintenance/test_archive_verification.pypassed: 91 tests.direnv exec . devtools test tests/unit/devtools/test_preflight_ledger.pypassed: 6 tests.direnv exec . devtools test tests/unit/maintenance/test_rebuild_index_ownership.pypassed: 5 tests.Acceptance matrix
raw_failure_lifecyclereports counts, origins, artifact kinds, and samples. Current unexplained rows remain visible as unexpected instead of being silently accepted.warnfor typed deferred/terminal evidence andfailfor unexplained or unavailable lifecycle data.rebuild_index_from_sourcerejects the failing verification result before generation creation.Ref polylogue-dyica