Skip to content

fix(storage): preserve complete raw frontier counts - #2965

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/raw-authority-readiness-inventory
Jul 17, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/raw-authority-readiness-inventory

Conversation

@Sinity

@Sinity Sinity commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Preserve a complete raw-authority frontier state inventory alongside the residual map, so readiness can show proven-current heads while retaining correct postflight blocking semantics.

Problem

PR #2962 used the postflight residual as public frontier state counts. The residual deliberately omits proven_current, so a healthy frontier could be reported with an incomplete inventory.

Solution

  • Persist frontier_state_counts beside the existing residual state_counts in new census residuals.
  • Project complete counts from that field, while calculating blocking strictly from postflight residual state.
  • Preserve the existing scope fallback for older ledger records.
  • Add dry-run and applied-postflight contract coverage.

Ref polylogue-lkrc.5. Ref polylogue-lkrc.

Verification

  • devtools test tests/unit/storage/test_archive_readiness.py tests/unit/storage/test_raw_authority_ledger.py tests/unit/storage/test_duplicate_raw_identity_repair.py tests/unit/storage/test_quarantined_accepted_raw_repair.py tests/unit/storage/test_browser_capture_origin_repair.py tests/unit/daemon/test_daemon_cli.py tests/unit/cli/test_archive_maintenance_cli.py — 201 passed.
  • devtools verify --quick — 16 checks passed, including render, topology, and layering.

Problem: readiness projected the postflight residual as a complete frontier\ninventory, omitting proven-current heads while presenting the result as\nstate counts.\n\nWhat changed: residuals now bind both their retry-oriented state map and a\ncomplete frontier state map. Readiness exposes the complete map while deriving\nblocking counts from the postflight residual.\n\nCompatibility: older ledgers retain their existing scope fallback; no schema\nchange is required.
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4072ca2a-4493-4136-87ea-a2eb6e5325b9

📥 Commits

Reviewing files that changed from the base of the PR and between f654480 and b0f26fa.

📒 Files selected for processing (3)
  • polylogue/storage/archive_readiness.py
  • polylogue/storage/raw_reconciler.py
  • tests/unit/storage/test_archive_readiness.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/raw-authority-readiness-inventory

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.

@Sinity
Sinity merged commit 0dc5773 into master Jul 17, 2026
2 checks passed
@Sinity
Sinity deleted the feature/fix/raw-authority-readiness-inventory branch July 17, 2026 01:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0f26faceb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread polylogue/storage/archive_readiness.py Resolved
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 73.F030 / P2: refuted at the checked revision: The requested fallback preserves a pre-reset apply-census encoding. AGENTS.md:75-77 excludes earlier Polylogue state from the fresh archive, and :192-194 rejects retaining legacy read paths, so a compatibility projection for those durable records is not required.

Only the rows listed above are dispositioned. Held findings remain open.

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