Repository navigation
fix: Serve every status surface from budgeted component snapshots - #5285
Conversation
…17' into batch/polylogue-20260920-103155-6f91e012/integration
|
Warning Review limit reachedNext included review available in 11 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 (7)
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6936485f6a
ℹ️ 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".
…status (#5371) ## Summary Closes the three `polylogue-6kur` residuals — AC3, AC5 and AC6 — and fixes a **live product defect on the primary health command** found while clearing the stale snapshot behind them. ## The defect nobody was looking for **`polylogue ops status` reported `ok: false` and exited 1 on any archive.** #5285 broadened `_component_readiness_ok`'s unknown rule from `name in required_known` to `(name in required_known or name in required_missing)` and made `tier_count_unavailable` a verdict refutation. That turned two stale operands into a **permanent refusal**: 1. `transforms` was published UNKNOWN because an exact archive-readiness probe was skipped — though the component is a function of the transform-registry size and the session count, and that probe contributes **neither**. Direct status already counts sessions for `archive_stats`. 2. `_TIER_STATUS_TABLES` named a user-tier relation `settings` that the user DDL has **never** declared — it is `user_settings` — so the tier reported an inexact declared-relation count. Only the two operands are fixed here. `_component_readiness_ok`'s broadened clause is untouched: **polylogue-20d.17 owns that rule and is still open.** Worth that lane's attention — the clause contradicts `overall_status_ok`'s own docstring, *"Absence of evidence never refutes the verdict here — refuting on it would make every direct/pinned read permanently not-ok."* ## AC6 — the declaration, and why it lives where it does `CAMPAIGN_ACTUATOR_RETIREMENTS` in `maintenance/declarations.py`, enforced by the **existing** `declaration-bindings` gate through the maintenance family's `domain` hook — the declared seam for "bindings the shared kernel cannot resolve", previously unused for this family. **No gate name added, no `docs/plans` file added.** It sits beside the thing it retires: the two actuators exist only to back four `ops maintenance blob-reference-*` commands this module already declares. The record names dotted symbols and tracked owner paths, which is what the check must resolve; a YAML would have needed a new parser and a new gate. **Both directions executed**, which is what makes it a successor rather than a deletion test: - `condition_met=True` with the actuators present → **exit 1**, two `actuator-retirement-overdue` lines naming each actuator and quoting the condition and the commands it backs. - `condition_met=False` with one actuator renamed away → **exit 1**, one `actuator-retirement-premature` line. - A wiring mutant removing the `domain` hook reddens the gate-ownership test while the diagnostics' own tests stay green. The AC6 work reads `maintenance_actuators.py` as **source text rather than importing it**, so nothing new reaches `blob_integrity.py`. ## AC5 — the owner existed; the retry did not `LiveBatchProcessor._compact_superseded_raw_snapshots` is a real recurring owner: once per live-ingest pass, through the daemon write coordinator, under `ActiveWriterLease` plus an explicit `require_write_lease`, bounded to 25 superseded snapshots per source path. **The previous lane was right not to assert an owner it had not verified — but the owner is there. What was missing is bounded retry.** Three outcomes were a `logger.warning` and nothing else: a safety refusal returned immediately, a filled bound **reported a finished answer it had not computed**, and neither left any record the work was still owed. Unfinished paths now land in the ordinary `convergence_debt` ledger under stage `raw_retention` — `deferred` for a hit bound with **the bound named in the row**, `failed` for a refusal — reusing the existing attempts and exponential backoff. Each pass drains up to 25 retry-due paths through the same authority resolution, so the backlog costs no extra writer hold. Blob-unlink errors are deliberately **not** residual: their subjects are already unreferenced and belong to blob GC, and filing them here would leave a row no retention pass could ever clear — found by hitting exactly that while building it. The one-authority-call-per-page cost contract is preserved and asserted, because the backlog extension is empty when there is no debt. ## AC3 — and the `foreign_keys` question answered properly **Yes, foreign keys are off on exactly one production route, and it is compensated.** The bulk-ingest window runs `PRAGMA foreign_keys = OFF`, but before committing it runs `_foreign_key_violations_for_sessions` over a plan derived from `PRAGMA foreign_key_list` **on the live schema** — not a written-down list — and raises rather than committing anything that window admitted. `session_profiles` carries `session_id`, so it lands in the **scoped** half of that plan. Every write profile reaching `index.db` sets `foreign_keys=ON`, and a full session-insight rebuild unconditionally prunes orphan per-session rows — so even a hypothetical orphan has a recurring owner. So the orphan half was a **permanently-zero count with no actuator behind it**: repair-shaped, not a measure. Deleted. The missing half is real derivation lag and is kept, with the detail text and `issue_count` naming only it. The `derived_repair` category token is deliberately **not** renamed — it is a public filter shared with `archive_messages_fts` and belongs to the vocabulary pass. ## The snapshot, and why the order mattered `test_json_status_snapshot` was red — **but not on a snapshot mismatch.** It failed asserting `ops status --format json` exits 0, so the `.ambr` block was never compared and `--snapshot-update` **could not have regenerated it**. Fixing the underlying red made the command exit 0; only then was `--snapshot-update` run, scoped to that single node id. The regenerated block drops five `raw_authority_*` keys — all verified to have zero producers repo-wide — and picks up tier `state` fields. One hunk group, nothing else in the file. ## Landing window `archive.py`, `live/batch.py`, `live/cursor.py`, `raw_retention.py` **IN**; the rest `out`. All three fingerprints move; closure size **555 → 555**, `added: []`, `removed: []`. **Must land before a rebuild starts, never during one.** Both known traps are IN and neither was touched. ## Verification `devtools verify --quick` exit 0 (25 gates, read as `$?` directly) · `render all --check` exit 0, zero `out of sync` · `gate declaration-bindings` exit 0 clean and exit 1 under each condition mutant · `gate atlas` exit 0 after re-anchoring · `gate mypy` clean over 2963 files · focused part 1 exit 0 · focused part 2 469 passed / 13 failed. **14 failures at base → 13 at head**, proven in a detached worktree at the exact base with its own venv: the base set **minus** the snapshot test this branch fixes. **No new failure.** ## Residuals - **AC4 has no evidence at this head from any lane** — neither this one nor #5350 audited current writer defects and their producer fixes. Treat as unknown. - **AC8 is unsatisfiable as written**: it demands a net-LOC figure against a deleted baseline, which is not checkable at a SHA. The bead records a drafted replacement that needs applying. - `6kur` also still depends on the open `bp12n.1` and closes from its members, so the gate cannot close on this branch alone regardless. - Raw-retention backlog drains on the next ingest pass with a succeeded path, not a standalone timer. Coherent — superseded snapshots are produced by ingest — and strictly better than vanishing into a log line, but a permanently dormant source with >25 superseded snapshots keeps a visible `convergence_debt` row until it is ingested again. - Two design docs still describe the retired raw-authority census ledger as live. Closes polylogue-rtgmi. Advances polylogue-6kur (AC3, AC5, AC6). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
Closing out open Codex review threads on this PR (evidence checked against master at ef10e59):
Resolving the fixed, stale and refuted threads; tracked threads stay open. |
|
Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
|
Closing out open Codex review threads on this PR (evidence checked against master at 0914f89):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Batch
polylogue-20260920-103155-6f91e012on base2aecd38f0be1.polylogue-20d.17 Serve every status surface from budgeted component snapshots