Skip to content

fix(codex): report bounded main quota refresh outcomes - #3693

Merged
lidge-jun merged 4 commits into
devfrom
codex/c-lane-3658-d778
Sep 5, 2026
Merged

fix(codex): report bounded main quota refresh outcomes#3693
lidge-jun merged 4 commits into
devfrom
codex/c-lane-3658-d778

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

A successful main-account login can still show null quota without explaining whether the usage request failed. Return a bounded, optional quotaRefresh diagnostic for real main-account refresh attempts and expose it through the opt-in account CLI JSON path. Categories distinguish HTTP errors, missing quota, timeouts, network/response errors, and internal publication failures without serializing raw errors or credentials.

Carries #3658 (source commit 035dfc2c77e3825e507442dff3f98a6631ee0e99) onto the current credential-generation and Reserve fencing. Diagnostic metadata is ephemeral, main-account only, and omitted for stale identity or cached/no-request paths. Existing admission, quota, cache and retry policy remain unchanged.

Partially addresses #3644. This diagnostic slice does not resolve or close the underlying Windows/WHAM failure report.

Stack layer 5/5, depends on #3691 (codex/c-lane-3576-d778). Review this layer only; merge bottom-up into dev.

Verification

  • No local tests, typechecks or builds, per explicit maintainer instruction.
  • macmini-cf Bun 1.4.0 at b2a0a22aa9582b554a296ddfcd2ee1ae0f2516c5: 554 pass / 0 fail across eleven focused files, source archive SHA256 verified.
  • Independent security re-review: PASS. Real Reserve-slot malformed-response cases and deferred same-ID/A→B→A invalidations cover the repaired boundaries.
  • Remote frozen-lockfile docs build at the same head: 425 pages built successfully.
  • The prior macOS CI shard stalled in an unchanged client-state subprocess probe. This branch bounds that test-owned child, checks exit/error/signal before parsing, cleans up in finally, and exercises a real stalled-child timeout/reaping case. Product client behavior and workflow timeouts are unchanged; the new head requires a fresh full CI pass.
  • Independent review confirms the quota-diagnostic production blobs are unchanged from the reviewed a22 implementation and current dev integration preserves A’s core changes.
  • Verify category precedence, sanitizing DTO reconstruction, opt-in CLI behavior, stale-identity omission, and preservation of Reserve/credential guards.
  • Independent security review, remote documentation build and hosted exact-head full CI are required before merge.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: Ingwannu ingwannu@users.noreply.github.com

Carry #3658 onto the current credential-generation and Reserve publication
boundary. Keep diagnostics ephemeral and omit stale identity results.

Source-commit: 035dfc2
Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 5, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 52 / 80

이 PR은 main Codex quota refresh 결과를 Bounded outcome으로 투영해 CLI/account API에 붙입니다. 원본 #3658 계열 diagnostics입니다. C-lane에서 #3691 위(5/5)이고 base는 codex/c-lane-3576-d778입니다. 새 파일 src/codex/quota-refresh-outcome.ts가 중심입니다. 지금 dev HEAD에는 #3662 Advanced quota activation UI와 hard-lock·auto-refresh 상태가 있지만, “이번 refresh가 왜 바운드/스킵/실패했는지”를 계정 row에 실어 주는 작은 DTO는 없습니다.

quota 숫자만 보이면 운영자가 자동 refresh·hard-lock·수동 refresh 실패를 구분하기 어렵습니다. refresh outcome을 같은 스키마로 내보내면 CLI와 향후 GUI가 같은 말을 할 수 있습니다. 제품 라우팅·failover를 바꾸지 않는 관측 면이라 우선순위는 중간입니다. 아래 OAuth 401 층(#3691)과 설정 보존(#3688)이 먼저여야 스택이 안전합니다. types/config 분할과 무관합니다.

문서(providers-accounts)와 CLI/auth-api 테스트가 같이 옵니다. draft이고 상위 base 의존이 있습니다. A/B 카탈로그·런타임 버그보다 급하지 않습니다.

projectCodexQuotaRefreshOutcome - API/CLI로 나가는 안전한 투영. 내부 상세를 과도하게 새지 않게 막는 층입니다.

경로 src/cli/account-api.ts / src/codex/auth-api.ts - includeQuota일 때 quotaRefresh 필드를 붙입니다.

경로 테스트 cli-account / codex-auth-api - outcome 투영·부재 케이스를 잠급니다.

경로 원본 #3658 - 랜딩 후 rebase 말고 landed 닫기.

메인테이너의 판단이 필요한 지점

  • GUI에도 같은 outcome을 바로 그릴지, CLI/API만 이번 범위로 둘지
  • outcome enum을 공개 문서로 고정할지
  • C-lane을 #3688부터 통째로 랜딩할지

너의 추천
#3688#3691 다음으로 CI 후 머지. #3658 landed 닫기. 관측 면이라 급하지 않으면 A/B 스택 뒤에 넣어도 됩니다.

이 댓글은 grok-bot이 작성했습니다

Base automatically changed from codex/c-lane-3576-d778 to dev September 5, 2026 18:37
@lidge-jun

Copy link
Copy Markdown
Owner Author

Owner explicitly authorized admin merging the C-lane stack. Independent security/code review: PASS at b2a0a22aa9582b554a296ddfcd2ee1ae0f2516c5. Remote focused verification: 554pass/0fail. Exact-head Cross-platform CI run 33985146886 succeeded with actual Linux/macOS suites and typecheck. Admin merge uses the owner-authorized review bypass; no self-approval is claimed. Original author attribution is retained.

@lidge-jun
lidge-jun marked this pull request as ready for review September 5, 2026 19:25
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 5, 2026 19:25
@lidge-jun
lidge-jun merged commit 71edeec into dev Sep 5, 2026
30 of 31 checks passed
@lidge-jun
lidge-jun deleted the codex/c-lane-3658-d778 branch September 5, 2026 19:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T19:27:10.430001Z b2a0a22 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant