Repository navigation
Persist uncertain installation-token acquisition attempts - #220
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. |
|
Additional fault testing found and reproduced a retention bug at be81e4a: a malformed terminal JSON record could name a different unresolved attempt, delete its evidence, and make seven HTTP calls. Fixed in 3e255a0 by validating every historical record against its SQLite row role and attempt ID before any deletion. The regression now preserves unresolved evidence and makes zero HTTP calls. Full vet and fresh race suite passed at this exact head in 77.614 seconds; focused TLS, process-crash, locking, SQL-fault, recovery and retention checks passed in 3.870 seconds. |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
A process crash or lost response during installation-token acquisition could leave no durable indication that a token POST had already been attempted. A restarted caller could then mint again without acknowledging the uncertainty.
Add a nonsecret SQLite acquisition journal with per-role cross-process ownership. Persist intent before HTTP and
mint_pendingbefore the non-replayable POST. Uncertain acquisition stays latched across restart; no fresh attempt reaches HTTP until a separate stopped-owner recovery check passes. Qualified transports are withheld and closed if their receipt cannot be persisted. The low-level explicit handshake retains its current role, repository and identity checks.Records contain enrollment, attempt/role identity, stage, times, optional qualification metadata and hashed recovery evidence. Canonical JSON schemas and 4-KiB read/write bounds reject malformed records. Retention keeps at least seven days of terminal history, every unresolved attempt and the latest record per role, with a 1,024-record cap before HTTP. Credential acquisition changes no review job or provider budget. It creates no background renewal, key discovery, credential import, App installation or activation path.
Relates to #176 and #172. Atomic role-generation handover, admitted-request drain, refresh ownership, exact object acquisition and packaged runtime composition remain open. The owner freeze is unchanged.
Validation
Validated exact head
3e255a057c6d797be3dcf9fcb006e409cc75694a.go -C reviewer vet ./...andgo -C reviewer test -race -count=1 ./...passed, 77.614 seconds combined. Focused race tests passed in 3.870 seconds.All credentials and GitHub responses are synthetic. No public backend, actual account/profile/key, provider inference, activation or deployment was used. Reproduction commands and exact boundary limits are in
reviewer/INSTALLATION-JOURNAL.md. GitHub Actions remain disabled by owner instruction.Additional self-review regression: a malformed historical terminal record could point its JSON ID at another unresolved attempt. The pre-fix test deleted that evidence and made seven HTTP calls. Retention now validates every record against its SQLite row role and attempt ID before choosing deletions. The corrected case preserves unresolved evidence and makes zero HTTP calls.