Repository navigation
Harden durable runtime ownership against stale consent and unsafe replacement #5406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a37c96e
fix(service): make ownership state crash-safe and consent-bound
lidge-jun e94add4
fix(update): fence replacement and restart with ownership leases
lidge-jun 4a62649
docs(structure): define authoritative ownership and takeover compatib…
lidge-jun 3061cb0
fix(service): recover incomplete locks without poisoning delegates
lidge-jun 886f86d
fix(service): make lease cleanup intent explicit
lidge-jun 9ac25f2
fix(service): align typed evidence with shared record selector
lidge-jun 017f1f2
test: isolate corrupt authority and follow shared state paths
lidge-jun 70f2321
Merge latest dev and reconcile the landed ownership contract
lidge-jun 9bb8fab
test(update): follow the reconciled install-state facade
lidge-jun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Close the cross-port race between startup publication and package replacement. Startup releases the mutation lease before publishing its runtime record, while both updaters test only the endpoint captured before stopping.
src/cli/index.ts#L518-L520: retainstartLeaseuntilwritePidandwriteRuntimePortpublish the bound endpoint.src/update/index.ts#L564-L568: underreplacementLease, discover the current live proxy instead of probing onlycapturedListen.bin/ocx.mjs#L592-L594: underreplacementLease, reread the current runtime endpoint and reject replacement if any current OpenCodex proxy is live.A concurrent
ocx start --port <other-port>can otherwise finish binding before replacement. Both updaters can then see the old endpoint as dead and replace files under the live process.📍 Affects 3 files
src/cli/index.ts#L518-L520(this comment)src/update/index.ts#L564-L568bin/ocx.mjs#L592-L594🤖 Prompt for AI Agents