fix(usage): retain readable totals and disclose skipped history - #4357
Conversation
Carries #4111 at 2f07acb. Preserve positive omission evidence through retained aggregates and consumer caches; refuse most-used ordering from an incomplete snapshot. Replace fixed-delay GUI test completion with an observed predicate. Local suites NOT RUN; hosted verification follows. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
Carry #3458 runtime foundations with explicit session grants, private state stores and fail-closed Windows command support. Keep server and dashboard activation for the dependent integration layer. Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com>
|
✅ Deterministic PR hygiene checks passed. |
Adapt #4080 for the shared pool kernel, canonical settings API, cache-affinity policy, reset unit normalization and independent quota scopes. Co-authored-by: Terry Tan <tmy1995hflc@gmail.com>
Carry #3458 dashboard and CLI wiring with explicit Hub opt-in, session-only mutations and awaited optional cleanup. Preserve current server and documentation owners; hosted preview and final cumulative CI remain pending. Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com>
Expose a bounded GET /v1/usage projection for explicitly authenticated configured keys, reusing filtered aggregation and its incomplete-history metadata. Connected CLI reads the hub data plane with token/connection ownership checks, never local fallback or management credentials. Local tests NOT RUN; hosted CI follows.
리뷰 · 우선순위 54 / 80이 PR은 usage ledger에 oversized row가 있어도 읽을 수 있는 행의 합계는 유지하고, 사용자에게는 “합계가 사라짐”보다 “일부 건너뜀”이 낫다. #4205 connected-client hub usage 라우팅과는 별도라고 본문이 선을 긋는다. 테스트는 aggregate cache·api usage·CLI·GUI incomplete consumers를 건드린다. 다만 dirty 충돌과 넓은 문서 포장이 CI/리베이스 비용을 키운다. types.ts/config.ts split 캠페인 본선은 아니고, close-don't-rebase 대상은 아니다. 경로/심볼 - 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
Keep current origin/dev V2/thinking contracts and retain bounded quota-observation pointers.
No content conflicts.
Keep current origin/dev V2/thinking contracts and retain plan-exclusion coverage.
Keep current origin/dev V2/thinking contracts and retain reset-first ordering.
No content conflicts.
Keep current origin/dev V2/thinking/stream contracts, retain usage incomplete-history disclosure, and keep the GUI screenshots already attached for #4357.
Fifteen structure/ conflicts. Fourteen were additive appends with an empty merge base, so both sides survive. openai-tiers had a real base: this lane inserts an Automatic pool plan exclusions heading where dev inserts a canonical forwarding note, and the base heading still follows below, so both land. Both sides appending pushed transports/responses.md and gui-and-management-api.md past the 600-line budget. Rather than take a grace exemption, this lane's own appended paragraphs are consolidated and re-wrapped to the long-line style the rest of these files already use. No sentence, fact or link is dropped.
…age tip The parent branch moved again, so the PR was dirty against its own base and GitHub will not dispatch a pull_request run it cannot build a merge commit for. All 24 conflicts resolve to this side, verified rather than assumed. Both sides already carry current dev, so the parent contributes nothing new here: the nine locale catalogs add no keys this branch lacks, and every structure/ paragraph and anchor the parent offers is already present. The parent's en.ts also ships two entries collapsed onto one physical line from an earlier resolution, which this side does not reproduce.
React Doctor runs as a PR gate at blocking: warning and flagged three findings, all from the device-reauth work this stack carries. The hook parsed every reauth response before testing res.ok, so a failure body was consumed without a status check (react-doctor/no-fetch-response-used-without-status-check, twice). The status test now comes first and each branch reads the body it needs; the failure code still comes from the error payload, so behavior is unchanged. The test probe assigned the hook result to an outer binding during render, which react/react-compiler rejects. It publishes from an effect instead, and act() flushes effects, so every assertion still reads the latest committed value. All three tests in the file pass and React Doctor reports no issues.
…oute Hosted CI failed on Linux and macOS with "the scanner resolves a method for every route guard it finds": management-api.ts matches /api/codex-auth/main/reauth-device (#3898) only to hand the request to its own module, so the dispatch site names no verb. The route is not undeclared. The handler module owns the POST/GET/DELETE dispatch and answers 405 for anything else, and the registry declares all three against that module. Narrowing the guard to a method list would have resolved the scan and changed behavior: an unsupported verb would fall through to the generic codex-auth dispatch and 404 instead of 405. Prefix delegations are already invisible to the scanner for the same reason, so this teaches it the equality-guard form, which is what the test comment asks for. The rule is deliberately narrow: only a block whose statements are exactly the dynamic import and the return of its handler. A block that does any work of its own stays unresolved and still fails loudly, and the new test drives that second probe red to prove the rule cannot swallow a real route.
dev advanced 52 commits while this lane was repairing its CI failures. Twenty-two conflicts. The docs-site guides, the server index imports and most structure/ notes were additive on both sides and keep both. Three structure files had a real base because this lane had re-wrapped shared paragraphs: dev's new listener-diagnostics and live-sideband notes land, and the re-wrapped copy of the shared text is kept rather than reverting to the wrapped original. dev now sits at 596 and 591 lines in the two docs this lane appends to, so both crossed the 600-line budget again. Reclaimed the difference from this lane's own paragraphs only, by re-wrapping them to the long-line style already dominant in these files and folding adjacent cross-reference pointers together. No sentence, fact or link is dropped, and no grace exemption is taken.
Keep current origin/dev sideband/session contracts and retain the quota-history publication identity pointer.
Keep current origin/dev contracts and retain bounded quota-observation pointers.
No content conflicts.
…s-client-usage feat(usage): read connected hub usage scoped to the enrolled client key
Keep current origin/dev contracts and retain plan-exclusion coverage.
Keep current origin/dev contracts and retain reset-first ordering.
Keep current origin/dev contracts and retain quotaFailure diagnostics.
…ement SSOT under budget Keep current origin/dev model-capability, session, and text-only contracts. Compress usageIncomplete accounting so structure/gui-and-management-api.md stays at or under 600 lines.
Preserve trio-remote content and current origin/dev. Keep structure/gui-and-management-api.md at the 600-line budget with compressed usageIncomplete accounting.
Fold two wrapped owner pointers after the accounts/trio rematch added quota-observation text.
…ce overlay Fold the Z.AI overlay note and two trailing blanks so gui-and-management-api.md stays at or under 600 lines.
|
Maintainer integration record — accounts lane tip carrying two lanes, merged by @lidge-jun. This tip now carries both the accounts/quota lane and the trio-remote lane, because #4373's base was this branch and its merge collapsed that stack in here. Landing it closes twelve pull requests: #4375 (quota-history publication identity), #4404 (raw quota observation history), #4408 (observed effective quota capacity), #4361 (automatic plan exclusions), #4369 (accounts near shared quota reset), #4401 (Antigravity quota refresh failures), #4357 (readable totals and skipped-history disclosure), #4427 (L1 content-free WS upstream stage records), #4433 (L2 native-main device reauth), #4441 (L3 main-card re-login with device code), #4362 (bounded executor and hub runtime foundation), and #4372 (opt-in workspace dashboard and admission).
|
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. |
Summary
Keep readable usage totals when the ledger scanner skips an oversized row, and carry explicit incomplete-history metadata through aggregate and API-key caches. Usage, Dashboard, provider catalog/workspace and key list/detail views explain that counts, dates and rankings reflect readable rows. Most-used ordering refuses to save an incomplete ranking.
This tip also carries the accounts/quota stack: publication identity, raw quota history, effective capacity, automatic plan exclusions, reset-first pool ordering, and Antigravity quotaFailure diagnostics.
Carries #4111 at 2f07acb, with deterministic rendered-condition synchronization replacing its fixed-delay test wait. This is separate from connected-client hub usage routing (#4205). Existing non-oversized failure responses remain unchanged.
Screenshots
Usage totals disclose skipped history instead of presenting a complete ledger:
Codex pool cards show automatic plan exclusion, and rotation strategy includes soonest-reset-first:
Verification
Checklist
Co-authored-by: luvs01 27862058+luvs01@users.noreply.github.com