Repository navigation
fix: Degrade an operation read on unseeded audit continuity - #5123
Conversation
`AuditContinuityCoordinator.is_available` raises the base `AuditContinuityError` -- not the `AuditContinuityPendingError` subclass -- for an archive carrying a continuity-era schema version without the matching control or head table. Every operation-read degradation handler caught only the subclass, so that bootstrap shape escaped as an unhandled error from a read that is never allowed to repair anything. Widen the seven handlers to the base class and name the wider state `audit_continuity_unavailable` so a degraded read still carries an explicit gap rather than being reported as empty. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 22 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 (4)
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. |
Summary
settled_readis on every operation read, and the one audit-continuity error shape it can raise on a not-yet-seeded archive was the one no degradation handler caught. Widen the handlers and give the wider state its own named gap.Problem
AuditContinuityCoordinator.is_available(polylogue/storage/sqlite/audit_continuity.py:305,:307,:314) raises the baseAuditContinuityError, not theAuditContinuityPendingErrorsubclass, for an archive whose source or audit tier carries a continuity-era schema version without the matchingaudit_continuity_control/audit_continuity_headtable. All seven degradation handlers (operations/operation_context.py:141anddaemon/operation_runtime.py:252,:274,:376,:573,:687) caught only the subclass.Concrete input: a bootstrapped archive (
bootstrap_archive_root, sourceuser_version44) whoseaudit_continuity_controltable is absent.Wrong observable outcome:
observe_control_authority(root)raisesout of a read that is documented never to repair or wait. Before the squash in #4867 operation reads did not consult audit continuity at all, so this is an always-on dependency whose bootstrap shape is unhandled.
Solution
AuditContinuityErrorat all seven sites;AuditContinuityPendingErroris a subclass, so the pending behaviour is unchanged.observe_control_authoritynow names the wider stateaudit_continuity_unavailablerather than reusingaudit_continuity_pending, so a degraded read still carries an explicit gap instead of collapsing to an empty scope.Verification
Anti-vacuity, verified by reverting the handler in
observe_control_authoritytoAuditContinuityPendingErrorand re-running:devtools schema closure:polylogue/operations/operation_context.pyout,polylogue/daemon/operation_runtime.pyout,polylogue/operations/audit.pyIN — the one-line re-export there moves the derived schema identity, so this must land before a fresh rebuild starts, never during one. No durable DDL changes; no migration.Closure
Closes the defect in polylogue-gwns3.
Residuals
operations/operation_context.pyhandler through the real route. The fivedaemon/operation_runtime.pyhandlers are the same one-word widening but are not independently covered here; standing up aDaemonOperationRuntimefor each was out of proportion to the change.is_available's classification of those states. If any of the three is genuinely a fault rather than a bootstrap condition, it still deserves a louder signal than a degraded read — that judgement is left open.🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK