Repository navigation
Keep credential generations owned until acquisition stops - #225
Conversation
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.
🟡 Changes recommended
Three unresolved findings remain, including one critical stop-handling issue.
1 open issue
What changed in this PR
This PR keeps GitHub credential generations owned through acquisition shutdown, including HTTP-body draining and trusted stop verification.
Changes:
- Adds paired credential ownership and stable scoped role handles.
- Adds acquisition leases with borrowing, cancellation, refresh draining, and lock retention.
- Adds lifecycle, race, expiry, process-lock tests, and documentation.
Review findings:
- Critical: Synchronous stop callbacks can bypass timeout handling and block retries.
- Moderate: Final eligibility does not recheck context cancellation.
- Moderate: HTTP admission can proceed after request cancellation.
| File | Summary |
|---|---|
reviewer/github_credential_owner_unix.go |
Paired credential ownership and lifecycle management |
reviewer/github_credential_owner_unix_test.go |
Owner lifecycle, qualification, refresh, and isolation tests |
reviewer/github_credential_generation_unix.go |
Acquisition leases and trusted stop handling |
reviewer/github_credential_generation_linux_test.go |
Generation draining, stop races, expiry, and process tests |
reviewer/CREDENTIAL-OWNER.md |
Ownership, lease, and shutdown documentation |
Review effort: Lite
|
@codex 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". |
48f4c2d to
2faef5a
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2faef5af7f
ℹ️ 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".
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ff78a88d0
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ab48ca8f5
ℹ️ 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".

Summary
Keep GitHub credential generations owned through acquisition shutdown, including the interval after an HTTP body finishes. The owner qualifies reader/publisher roles as one pair, supplies stable scoped handles, and closes admission while a replacement drains. Unknown mint outcomes stay in the durable journal; there is no automatic renewal or old-pair fallback.
A private acquisition lease pins the pair and requires a trusted stop capability at admission. Cancellation revokes work, but the lease survives until borrowed HTTP calls/bodies return and the stop capability succeeds. Failed or unreturned stop evidence retains the pair and service lock. The production factory must provide broker join and exact unit-stop evidence; the lease does not manufacture it.
Related to #174 and #176. The owner uses the durable installation journal merged in #220. These broader issues remain open. No credential import, activation, live inference, App change or paid usage is supplied.
Acceptance Criteria
Validation
817d34594c2f4676fe6b8f971704fa49474e3052, based on merged main7ddf301.go -C reviewer vet ./...: pass.go -C reviewer test -race -count=1 ./...: pass, main package 121.208 seconds.Risks and deferred work
The stop capability is explicitly trusted. The test capability proves termination of an inert process, not whole-cgroup or broker shutdown. The production acquisition factory must revoke/join the broker and verify the exact owned unit, cgroup and runtime before releasing this lease. Durable unit/archive recovery must run before eligibility can allow a restarted owner to refresh. The lease itself is in-memory ownership, not a replacement journal or restart proof.
After #220 merged, this PR was retargeted to main and only its owner-owned commits were replayed onto
7ddf301. The squashed journal parent was not replayed. This correction changes three of the same five owner-owned files; the two dependent branches have disjoint file ownership. The final review provenance is recorded below.Complete factory/controller startup and recovery, physical isolation qualification, provider/account and public-target subscription evidence, native controls/benchmark, trusted-release promotion, rendered GitHub evidence and explicit owner live authorization remain in #172 through #177.
Merge uses the merge-mission bounded-review rule after three reviewed heads and repeated finding-fix rounds. The latest required review evaluated
9ab48ca8f55890359cf7a0daed17586c2ac027e6and raised one P2, with no P1. Its publisher-fence finding is corrected and covered by a failing-before regression in the published head. Every known finding has a fixing reply and is resolved under that rule. This corrected head is not claimed clean-reviewed. No further unchanged-head retry or review request was made. Formal approval and repository protections remain unchanged.