Repository navigation
fix(core): refuse bound lifecycle transitions before catalog reads - #1027
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
Reviewer's GuideThis PR changes lifecycle lock, unlock, and shutdown precedence so a committed live migration binding is authenticated first and returns Sequence diagram for bound lifecycle transition precedencesequenceDiagram
participant Caller
participant ProtectedStorage
participant RootStore
participant Catalog
Caller->>ProtectedStorage: lifecycle transition
ProtectedStorage->>RootStore: load_committed_root(fs, provider, layout)
alt root load error
RootStore-->>ProtectedStorage: AuthorityError::Root(...)
ProtectedStorage-->>Caller: Catalog(AuthorityError::Root(...))
else live migration binding
RootStore-->>ProtectedStorage: committed root with live_migration
ProtectedStorage-->>Caller: RecoveryPending
else unbound root
RootStore-->>ProtectedStorage: committed root without live_migration
ProtectedStorage->>Catalog: load_catalog(fs, provider, layout)
alt catalog unavailable
Catalog-->>ProtectedStorage: catalog error or None
ProtectedStorage-->>Caller: existing catalog error or MigrationRequired
else catalog loaded
Catalog-->>ProtectedStorage: catalog
ProtectedStorage-->>Caller: existing lifecycle behavior
end
end
Flow diagram for lifecycle authority and catalog read orderingflowchart TD
A[Lifecycle transition requested] --> B{Provider locked?}
B -->|Yes| C[Existing provider refusal or idempotent lock]
B -->|No| D[load_committed_root]
D --> E{Root load succeeds?}
E -->|No| F[Return Catalog AuthorityError Root]
E -->|Yes| G{Committed live migration binding?}
G -->|Yes| H[Return RecoveryPending]
G -->|No| I[load_catalog]
I --> J{Catalog available?}
J -->|No| K[Return existing catalog error or MigrationRequired]
J -->|Yes| L[Continue existing lifecycle behavior]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
|
@codex review @CodeAnt-AI review Please independently review the exact current head |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
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. |
|
Question: @codex review review please independently review the exact current head Answer:
The added tests cover bound roots with intact, missing, and corrupt catalog pages; bound and unbound root-read errors; and the unbound missing-page control. I did not independently run the test suite. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
CodeAnt PR Risk: Low Risk
Assessed commit: |
|
@codex review Exact current head Please independently review this current matrix correction and unchanged lifecycle refusal/root-error-envelope/key-clearing boundary. Previous completed Codex review covered 7270e70; this request covers the new head. No journal/phase window or additional gate admission. |
|
@CodeAnt-AI review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
CodeAnt Nitpicks1 code suggestion1. For unbound transitions,
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@codex review Exact current head Please independently review this exact current observation-adapter delta and the unchanged lifecycle authority boundary. Previous completed review was b567e36 and is not substituted for this head. |
|
@CodeAnt-AI review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
User description
Scope and owner admission
Owner-approved narrow Gate-4 E2 preparation, based on main
ee526cb405f9ad94b0650a9b8b1704cdccde4bb9after #1026's complete exact-main postmerge proof. The owner confirmed the bundled locator/phase/lifecycle A/A/A direction on 2026-10-11; this PR implements only the previously admitted four-file lifecycle precedence wave.RecoveryPendingbefore intact/missing/corrupt catalog pages are read.Catalog(AuthorityError::Root(...))errors, unbound catalog errors, locked/idempotent behavior and refused-unlock key clearing.No journal locator implementation, binding producer, PREPARE/DONE permission window, E3 transition, Gates 5–7, release or production storage-authority switch. The strict E1 ordinary-operation barrier remains. Future windows require separately admitted/proven exclusive fencing of every relevant phase-changing writer; stale journal snapshots never grant permission.
Validation and race boundary
One lifecycle authority family: existing exclusive admission covers verification, writer/root ordering unchanged, second catalog binding check retained defensively. No new retry/await/stream or data write.
Local focused Gate4B target: all 45 tests passed after the final observation-adapter correction. The adapter's own control proves interception of all four direct/bounded file-read and directory-enumeration APIs. Rustfmt, signing doctor, hooks, actual/prospective PR budget and ci:prepush passed. Four files, 270 meaningful lines / 4 signed commits. Both CodeScene complexity findings were corrected without dropping the twelve root-error scenarios. CodeAnt's catalog-directory observation gap was corrected in the same testfile; bounded methods delegate to real bounded StdFs I/O. Required full remote CI/Core Rust/platform evidence and independent completed exact-current-head Codex review remain merge prerequisites; all actual findings in all three channels must be reconciled.
Optional Sourcery NO_SIGNAL/rate limit is non-blocking. Optional CodeRabbit NO_SIGNAL/rate limit is non-blocking with completed independent exact-head Codex review. Missing signal is never PASS; deterministic/security/signing/protection/admission gates remain mandatory.
Current production/retention baseline: #627 consolidated evidence; Gate8 cap count11 including unknowns, no provider mutations.
Owner: #445 / #922 / #359, QNB-168 / QNB-11; no owner closure from this preparatory slice.
Rollback: ordinary reviewed revert; no history rewrite or provider cleanup.
Summary by Sourcery
Refuse bound migration lifecycle transitions before catalog observation while preserving existing authority and recovery error behavior.
Bug Fixes:
RecoveryPendingfor committed migration bindings before reading missing or corrupt catalog pages.Enhancements:
Documentation:
Tests:
CodeAnt-AI Description
Refuse lifecycle transitions before reading a bound migration catalog
What Changed
RecoveryPendingfor a committed migration binding without reading catalog pages, even if those pages are missing or corrupt.Impact
✅ Bound migrations stay blocked when catalog pages are damaged✅ Root authority errors remain visible✅ Unbound catalog failures keep their existing outcomes💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
Bug Fixes
RecoveryPending, including when catalog pages are missing or corrupt.Documentation