Repository navigation
test(gateway): assert logout ordering instead of a one-second deadline in auth refresh - #168330
Conversation
…e in auth refresh The learned-catalog logout test bounded the logout round trip to 1s while a discovery response was held, which failed on loaded CI shards (1139ms on the 2026.10.1 stable validation). Assert the ordering the deadline stood in for: exactly one held discovery response, logout resolves refreshed, the revoked list has no available models or learned rows, and revocation publishes before the held response is released. Extracted from a1f6f52 (open PR #165486).
|
🦞👀 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. What this changesThis PR replaces a one-second logout assertion with checks that revocation completes before a held discovery response is released. Example: Logout completes in 1139 ms while discovery for account-two is withheld.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: it makes a useful, focused test repair while preserving logout revocation coverage; no introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe integration test sends model RPCs through a real Gateway and controls a local HTTP discovery server to observe credential renewal, account replacement, and logout publication. flowchart LR
A[Test client] --> B[Gateway model RPCs]
B --> C[Auth refresh owner]
C --> D[Prepared model catalog]
D --> E[HTTP discovery fixture]
D --> F[Models list response]
Technical reviewBest possible solution: Retain the ordering-based assertions and land this focused test repair through the normal CI gates. Do we have a high-confidence way to reproduce the issue? The body reports a 1139 ms CI failure, and current main contains the matching 1000 ms assertion; this read-only review did not execute tests or independently reproduce the timing failure. Is this the best way to solve the issue? The replacement checks the intended observable ordering through Gateway RPCs and retains the late-response rejection check without imposing a machine-speed deadline. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c0d4070a293. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +14. Total +14 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 10, 2026, 4:10 AM ET / 08:10 UTC. |
…e in auth refresh (openclaw#168330) The learned-catalog logout test bounded the logout round trip to 1s while a discovery response was held, which failed on loaded CI shards (1139ms on the 2026.10.1 stable validation). Assert the ordering the deadline stood in for: exactly one held discovery response, logout resolves refreshed, the revoked list has no available models or learned rows, and revocation publishes before the held response is released. Extracted from a1f6f52 (open PR openclaw#165486). Co-authored-by: Peter Steinberger <[email protected]>
…e in auth refresh (#168330) The learned-catalog logout test bounded the logout round trip to 1s while a discovery response was held, which failed on loaded CI shards (1139ms on the 2026.10.1 stable validation). Assert the ordering the deadline stood in for: exactly one held discovery response, logout resolves refreshed, the revoked list has no available models or learned rows, and revocation publishes before the held response is released. Extracted from a1f6f52 (open PR #165486). Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit d476209)
…e in auth refresh (openclaw#168330) The learned-catalog logout test bounded the logout round trip to 1s while a discovery response was held, which failed on loaded CI shards (1139ms on the 2026.10.1 stable validation). Assert the ordering the deadline stood in for: exactly one held discovery response, logout resolves refreshed, the revoked list has no available models or learned rows, and revocation publishes before the held response is released. Extracted from a1f6f52 (open PR openclaw#165486). Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit d476209) (cherry picked from commit 62084f6) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes:
models-auth-refresh.catalog.integration.test.ts> "retains same-account rows while renewing and discovers a replacement account" fails intermittently on loaded CI shards. It asserts that the logout round trip finishes in under 1 s while a discovery response is held; 2026.10.1 stable validation measured 1139 ms (job 114152409085).User Impact
No user-visible change. Removes a wall-clock flake from the gateway server node lane; production code is unchanged.
Why This Change Was Made
The one-second deadline was standing in for an ordering contract: logout must revoke access without waiting for a held discovery reply. The test now asserts that contract directly:
{ refreshed: true };account-two-learnedrow;releasedHeldResponses === 0);finally.This is the test-only hunk from Peter's
a1f6f523ad03, extracted from the still-open #165486 so it can land on its own, credited to the original author.Evidence
main): the test passes 3/3 withnode scripts/run-vitest.mjs.oxfmtand scopedoxlintare clean.mainandrelease/2026.10.1, and the hunk applies cleanly to both.