Repository navigation
improve: retain quota refresh evidence from successful CI runs - #152173
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 7:52 PM ET / 23:52 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR retains sanitized quota diagnostics from successful CI runs, records native refresh reasons and provider response timing, and exposes concurrent asset-publication rejection details. Merge readiness✅ Ready for maintainer review Keep open: current main still lacks success-run quota evidence retention, and the patch has no actionable correctness findings. The latest assertion change preserves the existing concurrency requirements. Priority: P3 Review scores
Verification
How this fits togetherQuota recovery tests run a real Gateway and native Codex client against a synthetic provider. Their diagnostic collector filters transport and authentication observations into bounded public artifacts for CI investigation. flowchart LR
A[Quota recovery scenario] --> B[Gateway and native client]
B <--> C[Synthetic provider]
B --> D[Native refresh observer]
C --> E[Public diagnostic filter]
D --> E
E --> F[Seven-day CI artifact]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +278, Config +8. Total +286 across 7 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Retain the bounded public evidence on both successful and failed runs while keeping refresh attribution separate from claims about its cause. Do we have a high-confidence way to reproduce the issue? Not applicable as a product-bug reproduction: source confirms the failure-only retention gap, and hosted evidence demonstrates successful-run publication. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes: extending the existing diagnostic collector and narrowing publication to its sanitized artifact avoids a competing telemetry path or production authentication changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e623bcd437da. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* commit 'ca69b4d25dfcd488acc6ba1d878e4b4252f40cd2': (325 commits) perf(gateway): streamline config reload comparison (#152279) fix(xai): reject invalid UTF-8 OAuth responses (#111737) fix(release): accept waived advisory performance evidence for stable publication (#152290) fix: deliver watcher results while other sessions are busy (#152287) perf(media): reuse attachment filename classification (#152274) refactor(build): reuse forwarded option scanning (#152293) chore(diagnostics-otel): revert unapproved duration-bucket merge (#152292) fix: stop chat media reads after access changes (#152219) fix(test): use Gateway WebSocket transport in network fixtures (#152143) improve: retain quota refresh evidence from successful CI runs (#152173) improve(gateway): reduce memory used by session selection (#152260) perf(agents): use keyed subagent capability lookups (#152263) refactor(matrix): centralize media metadata assembly (#149128) chore(ui): refresh control ui locales (#152276) feat: open Crabbox apps beside the conversation (#152094) refactor: simplify worker and model fallback handling (#152268) perf(codex): reconcile session catalogs incrementally (#152257) fix(ui): keep submitted prompts visible across session startup (#152241) perf(sessions): move automatic maintenance database work to workers (#148630) fix: preserve reply metadata through outbound preparation (#152231) ...
…law#152173) * test: retain native quota refresh diagnostics * test(gateway): retain concurrent publication rejection details
Related: #152003
What Problem This Solves
Quota recovery CI can refresh OAuth credentials without retaining enough evidence to explain why, especially when the test passes.
User Impact
There is no user-visible behavior change. Maintainers get bounded, sanitized evidence from successful and failed quota recovery runs; production authentication and the historical refresh trigger are unchanged.
Why This Change Was Made
Replace the stack-based caller guess with observed native
account/chatgptAuthTokens/refreshmethod/reason and correlate it with synthetic provider response status and timing. Reuse the existing fixture response records and public diagnostic owner. CI retains onlyquota.public.jsonfor seven days, separately from failure-only timeout diagnostics.The test-artifact schema advances to version 2. It removes the unreliable
callerfield, limits each public stream to 128 entries, caps native auth receipts per process with an explicit truncation flag, and excludes payloads, credentials, IDs, headers, raw paths, and stacks. Response payloads, token expiry, test assertions, and deadlines are unchanged.Evidence
The successful real-Gateway job in the original hosted run retained three schema-2 artifacts with native refresh reason
unauthorized, no truncation or omissions, and no recorded fixture HTTP401. This identifies the native callback reason, not its triggering request or endpoint. WebSocket status describes emitted event payloads rather than a received HTTP response; temporal proximity does not establish cause. The historical refresh trigger remains unresolved.CI recovery
The original run failed only the unchanged private-child QA Smoke scenario and its aggregate gate. PR #152207 separately reproduced and fixed the conversation-identity settlement bug. This update integrates landed main through
2d1973e31d3a, including that repair, while preserving all six diagnostics feature files byte-for-byte.On the integrated candidate, all ten diagnostics tests, the selected CI upload-contract test, root test types, scoped typed lint, formatting, export/guard checks, and workflow validation pass. Fresh full-diff P0–P2 review is clean. The earlier real-Gateway diagnostic evidence remains scoped to its recorded revision; the integrated hosted run passed all four QA Smoke profiles. No retries, timeout changes, or assertion relaxations were used to address the Smoke failure.
The integrated run then failed Windows concurrent Control UI asset publication: one preparation rejected, but the assertion retained only its status and hid the error. A separate diagnostic-only seventh file now compares the full settled results while requiring the same two successful preparations. The six quota feature files remain unchanged. Both original concurrency cases and a task-only ordered shared-pruning probe passed on Linux; this does not establish the historical Windows cause. No production pruning change or retry policy is included. A subsequent green Windows run alone would not prove that cause fixed.
The diagnostic-only assertion passes both normal publication cases and its owning Gateway test type graph, typed lint, and formatting. Fresh independent P0–P2 review is clean. Exact-head CI passed at
14d560c4435022828579d86ae87af51f317e13c9: run 35406946696, attempt 2 completed all 133 jobs with no failures.At the current diagnostic head
14d560c4435, the hosted real-Gateway suite passed and uploaded three schema-2 artifacts from its successful job. Each records two nativeunauthorizedcallbacks, zero recorded fixture HTTP401 responses, no omitted entries, and no auth-capture truncation. The downloaded bounded artifacts were independently inspected; this strengthens success-path publication proof without identifying the historical triggering endpoint.Windows publication passed at
14d560c4435; this does not explain its earlier rejection. The only failure in that run was a core-lint runner shutdown (exit 143, no lint diagnostic). After the full run settled, a single failed-only recovery retained successful jobs and reran the interrupted lint job on the same commit; it and the aggregate gate passed.