[WRONG BRANCH] fix(codex): run owned startup after ownership retry - #320
Closed
luvs01 wants to merge 1 commit into
Closed
[WRONG BRANCH] fix(codex): run owned startup after ownership retry#320luvs01 wants to merge 1 commit into
luvs01 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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 |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
ownership-unknownreprobe could delete the admission fence without starting the owned startup lifecycle, allowing admitted native-main traffic to read physicalauth.jsonbefore recovery finished.ownedafter boot, the server initializes the same owner/ recovery path it would have taken at boot so credential, recovery, and stage-sweep invariants hold.Description
activate/onOwnedhook to the service-ownership reprobe entry so a successful reprobe can arm the standard owned lifecycle before the fence is spent (src/codex/native-profile-startup.ts).owned, call the lifecycle activator and then spend the fence while preserving the transitioned lifecycle until the server that installed it releases it (src/codex/native-profile-startup.ts).onOwned: () => startNativeMainStartupLifecycle(...)wheninspectStartupOwnershipinitially returnedownership-unknown, so a later reprobe starts the owned startup flow rather than merely removing the fence (src/server/index.ts).recovery-pendinguntil recovery settles) and only reopens admission after the owned lifecycle settles (tests/native-profile-startup.test.ts).Testing
./node_modules/.bin/bun test tests/native-profile-startup.test.ts tests/core-lab-boundary.test.tsand observed all tests in those files passed after the change.bun run typecheckandbun run privacy:scan, both succeeded in this environment.bun run test; the run completed but reported unrelated, environment/timing-sensitive failures elsewhere in the repo (CLI/service detection, process shutdown, and some stream/timeouts). The native-profile focused tests and the core lab-boundary checks passed, validating the fix for the affected subsystem.Codex Task