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: Advanced 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 |
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. |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31b435efbf
ℹ️ 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".
| commit: (tokens: NativeMainReauthTokens) => Promise<{ chatgptAccountId: string }>; | ||
| commit: ( | ||
| tokens: NativeMainReauthTokens, | ||
| options?: { signal?: AbortSignal }, |
There was a problem hiding this comment.
Update every mapped structure document
This changes the src/codex/ authentication contract, but the commit updates only structure/codex-home.md; structure/INDEX.md:104 also maps this area to runtime.md, config.md, catalog.md, subagents.md, providers/openai-tiers.md, gui-and-management-api.md, and ops/docs-and-release.md. Reconcile the cancellation contract across every mapped document in this change as required by the repository's source-to-doc ownership rule.
AGENTS.md reference: src/AGENTS.md:L10-L11
Useful? React with 👍 / 👎.
| idToken: grant.idToken, | ||
| chatgptAccountId: grant.credential.accountId!, | ||
| }); | ||
| }, { signal: flow.controller.signal }); |
There was a problem hiding this comment.
Document the new cancellation semantics
Passing the flow signal into the commit changes user-visible behavior for ocx account main reauth cancel and DELETE /api/codex-auth/main/reauth-device: cancellation while waiting to publish now fences the credential write instead of allowing eventual success. Update the English CLI/management documentation to describe that guarantee and ensure the localized pages do not contradict it.
AGENTS.md reference: AGENTS.md:L380-L381
Useful? React with 👍 / 👎.
Motivation
auth.json, clearing the reauth quarantine.AbortSignalinto the prepared commit and exclusive claim so in-flight commits observe aborts.Description
options?: { signal?: AbortSignal }parameter and pass the flow'sAbortSignalthrough to the commit call path and towithNativeMainExclusiveClaiminsrc/codex/main-account.ts.signalintoflow.prepared.commit(...)fromsrc/codex/main-device-reauth.tsand recheck cancellation immediately before and after claim acquisition so a cancelled flow cannot proceed to writeauth.jsonor clear quarantine.finish(...)so an already-terminal flow cannot be overwritten by a later succeeded result, preventing a cancelled terminal from being replaced by success.tests/codex-integration/main-device-reauth.test.tsto cover cancelling a commit-in-flight and a pre-aborted production commit, and updatestructure/codex-home.mdto document the cancellation fencing guarantee.Testing
bun test tests/codex-integration/main-device-reauth.test.ts tests/codex-integration/main-device-reauth-api.test.tsand the focused suites passed (24 tests, all green).bun run typecheck,bun run structure:check, andbun run privacy:scanand each check completed successfully.bun run test:changedbut it could not run in this checkout because no resolvabledevcomparison ref was available in this environment.bun run test; the changed reauth tests passed but the full-suite run returned nonzero due to unrelated, environment-sensitive failures intests/server/api-catalog-route.test.tsandtests/codex-integration/codex-shim.test.ts, which are not caused by these changes.Codex Task