fix(codex): restore OAuth subscription renewal dates - #3338
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fcda19f4e
ℹ️ 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".
| async let subscriptionRequest = CodexOAuthUsageFetcher.fetchSubscription( | ||
| accessToken: accessToken, | ||
| accountId: accountId, | ||
| env: env) |
There was a problem hiding this comment.
Avoid pairing required and best-effort async-let tasks
When the required usage request throws while the optional subscription request is still running, unwinding this scope must cancel and drain the best-effort sibling; this is the exact mixed required/optional async let pattern associated in this repository with Swift task-lifecycle crashes. Await these sequentially or use a fully drained task group that explicitly contains subscription failures.
AGENTS.md reference: AGENTS.md:L43-L43
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed September 1, 2026, 2:05 PM ET / 18:05 UTC. ClawSweeper reviewWhat this changesThe branch fetches ChatGPT subscription metadata alongside Codex OAuth usage and carries renewal or expiry dates into the menu-bar usage snapshot. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep open: the requested OAuth metadata path is useful, but the introduced mixed required/best-effort Priority: P1 Review scores
Verification
How this fits togetherCodexBar’s Codex OAuth provider converts account credentials and OpenAI usage responses into the usage snapshot displayed by the menu-bar card. This change adds a best-effort subscription metadata request before that snapshot is reconciled. flowchart LR
A[OAuth credentials] --> B[Usage request]
A --> C[Subscription request]
B --> D[Usage reconciliation]
C --> D
D --> E[Usage snapshot]
E --> F[Menu bar card]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Fetch required usage before the best-effort subscription enrichment, or use a fully drained task group, then retain the parsed metadata only when the optional request succeeds and demonstrate the result with redacted real OAuth evidence. Do we have a high-confidence way to reproduce the issue? Yes, at source level: make the required usage request fail while the subscription request is still in flight at the introduced sibling-task pair. Repository policy identifies that exact lifecycle as unsafe, although no live crash trace was supplied. Is this the best way to solve the issue? No: parallelizing a required request with a best-effort request is not the repository-approved solution. Sequential awaits or an explicitly drained task group preserves the intended metadata enrichment without the unsafe cleanup path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a0d5d2f66794. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Problem
Codex OAuth-mode usage did not surface subscription renewal/expiry dates: the ChatGPT
subscriptionspayload was parsed only on the web-dashboard path, so OAuth-mode cards lost the renewal metadata (rebased from ad636d819 whose architecture has since moved on; the change applies cleanly to current main).Change
active_until/will_renewfrom the subscriptions payload in the Codex OAuth usage fetcher (newOpenAISubscriptionDatesvalue kept WebKit-free).