release: align main with published 1.2.2#336
Conversation
# Conflicts: # lib/refresh-guardian.ts
# Conflicts: # test/accounts-load-from-disk.test.ts
# Conflicts: # lib/refresh-guardian.ts # test/refresh-guardian.test.ts
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (27)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📝 WalkthroughSummaryThis PR aligns the main branch with the already-published codex-multi-auth@1.2.2 release by merging the validated integration branch. The changes introduce foundational improvements to token refresh persistence, account identity resolution, and circuit-breaker availability tracking; test validation was comprehensive (221/221 files, 3221/3221 tests passed). The PR modifies public method signatures in Key ChangesCore Token Refresh & Account Persistence
Account Selection & Runtime Identity Keying
Circuit Breaker Enhancements
Auth Refresh Guardian Consolidation
Health & Storage Transactionality
Test Enhancements
Breaking Changes
ValidationAll validation steps passed: lint, typecheck, build, test suite (3221/3221 tests), and dry-run package creation. Walkthroughmajor auth refresh refactor introducing circuit-breaker-based per-account gating, runtime-derived identity keying for trackers, restructured refresh error handling with Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes flags for reviewer attention:
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
release: align main with published 1.2.2
What Changed
mainwith the already-publishedcodex-multi-auth@1.2.2release integrationrelease/integration-1.2.2#323-#334Why
1.2.2was published from the validated integration branch before the PR stack landed onmainmainmatch the shipped npm package before tagging and GitHub release creationValidation
npm run clean:repo:checknpm run lintnpm run typechecknpm run buildnpm test -- --pool=threads --maxWorkers=1npm pack --dry-run221/221files,3221/3221testsnote: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
this catch-up pr aligns
mainwith the already-publishedcodex-multi-auth@1.2.2release by merging the validatedrelease/integration-1.2.2branch. it carries a substantial set of correctness and reliability fixes across the account pool, token refresh path, and circuit-breaker integration.key changes:
AccountManager.commitRefreshedAuthreplaces the previous fire-and-forgetupdateFromAuth + clearAuthFailures + saveToDiskDebouncedtriple with a singlewithAccountStorageTransactioncall that rolls back live in-memory state if the disk write failsconsumeToken,recordSuccess, andrecordFailureall now route through the per-account circuit breaker; healthy-count requirescircuitState === "closed"HealthScoreTrackerandTokenBucketTrackeracceptstring | numbertracker keys so accounts keep consistent health/token state across index reassignmentsRefreshGuardian.tickfilters cooling-down accounts, graduates auth-failure penalties by streak, delegates persistence tocommitRefreshedAuthEAGAIN/EBUSY/EPERMretries present in all new persistence pathstwo p2 style notes: duplicate persistence helpers in
forecast.ts/report.ts, and missing vitest coverage for theconsumeTokenopen-circuit token-refund path.Confidence Score: 5/5
safe to merge — all remaining findings are p2 style/coverage suggestions with no correctness impact
the core transactional refresh, circuit-breaker wiring, and guardian hardening all look correctly implemented; rollback on persist failure is properly scoped; the only open items are a duplicate-code extraction opportunity and one missing vitest case for the token-refund-on-open-circuit path, both p2
lib/codex-manager/commands/forecast.ts and lib/codex-manager/commands/report.ts — duplicate persistence helpers should be extracted before the two copies diverge
Important Files Changed
Sequence Diagram
sequenceDiagram participant Plugin as index.ts participant AM as AccountManager participant ST as StorageTransaction participant CB as CircuitBreaker participant Disk as Storage Plugin->>AM: commitRefreshedAuth(source, auth) AM->>ST: acquire storage lock ST-->>AM: (current, persist) AM->>AM: buildStorageSnapshot() AM->>AM: findAccountIndexByIdentity() AM->>AM: patch storedAccount tokens and clear cooldown AM->>AM: getAccountByIdentity() to get liveAccount AM->>AM: snapshot previousLiveAccountState AM->>AM: updateFromAuth(liveAccount, auth) AM->>AM: enable liveAccount and clear auth failures AM->>ST: persist(nextStorage) ST->>Disk: writeFile accounts.json alt persist succeeds Disk-->>ST: ok ST-->>AM: committed AM->>CB: recordSuccess() AM-->>Plugin: liveAccount else persist fails Disk-->>ST: error ST-->>AM: throw AM->>AM: revert liveAccount to previousLiveAccountState AM-->>Plugin: throw CodexAuthError retryable flag set endPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "chore: finalize 1.2.2 release integratio..." | Re-trigger Greptile