Repository navigation
fix(codex): fence propagated quota recovery aliases - #4938
Merged
lidge-jun merged 1 commit intoSep 18, 2026
Merged
Conversation
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Contributor
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
lidge-jun
marked this pull request as ready for review
September 18, 2026 09:26
This was referenced Sep 18, 2026
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.
Summary
propagatedAliasesonForcedRefreshOutcomeand forward it throughresolveCodexToken/forceRefreshCodexPoolToken, so the recovery settlement sees every record the flight advanced.fencePropagatedQuotaRecovery(accountId, lineage)insrc/codex/quota-401-recovery.tsand call it for each propagated alias in therecoverPoolQuotaFrom401settlement (src/codex/auth-api/pool-quota-probe.ts), deliberately superseding any stale pre-propagation claim.Verification
e7f81e3d351ab39006d3669961d6a5ab25f4cc0e(tree438d2439439bdc965bf963e5f32520bd862204d1), based on dev1c7ab30978093560224a477ba8fd35e233b9862b.bun test tests/usage/quota-401-recovery.test.ts tests/usage/quota-401-recovery-runtime.test.ts— 24 pass / 0 fail, including a new unit test for claim-superseding alias fences and a runtime regression that reproduces the owner/alias interleaving and asserts a single OAuth token refresh.bun x tsc --noEmit— clean.bun run structure:check— passed.bun run privacy:scan— passed.bun scripts/file-size-ratchet.ts— passed.Remaining gates
gh workflow run ci.ymlon this branch: diagnostic run 35269696053 (contributor fork Actions) . The macOS control job is expected to cancel at the 30-minute mark; that is the known upstream limitation tracked in [Bug]: macOS control is cancelled near its 30-minute limit in full dispatch CI #4905, not a signal from this change.Checklist
Summary by CodeRabbit
Bug Fixes
Tests