Repository navigation
fix(test): wait for guest dictation catalog publication - #195385
Conversation
Join the catalog refresh root before checking readiness instead of timing an asynchronous RPC with a shorter polling deadline. Preserve the exact catalog payload and WebSocket authorization assertions. Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: steipete <[email protected]>
|
🦞👀 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 changes before merge. What this changesThis PR replaces guest-dictation catalog polling with the existing catalog refresh root release observer. Example: The guest-dictation WebSocket test requests talk.catalog for agent:main:guest-dictation-websocket on a cold worker.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the focused test repair preserves authorization coverage and passes exact-head CI; its public description needs one disclosure cleanup. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway test sends authenticated WebSocket RPCs through session authorization into the Talk catalog owner, which publishes provider readiness asynchronously. flowchart TD
A[Guest WebSocket test] --> B[Session authorization]
B --> C[Talk catalog handler]
C --> D[Detached catalog refresh]
D --> E[Snapshot publication]
E --> F[Root release observer]
F --> G[Ready catalog assertion]
Technical reviewBest possible solution: Use the existing refresh release observer while preserving the exact catalog payload and real WebSocket authorization coverage. Do we have a high-confidence way to reproduce the issue? Source confirms the mismatched polling and RPC deadlines, and the linked scheduled-main job failed; this read-only review ran no target code and could not retrieve its redirected logs. Is this the best way to solve the issue? The patch uses the existing lifecycle owner and an established observer pattern, removes polling, and preserves the distinct authorization failures covered by the test. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9dc3499d415c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 November 8, 2026, 3:08 PM ET / 20:08 UTC. |
) Join the catalog refresh root before checking readiness instead of timing an asynchronous RPC with a shorter polling deadline. Preserve the exact catalog payload and WebSocket authorization assertions. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: steipete <[email protected]>
) Join the catalog refresh root before checking readiness instead of timing an asynchronous RPC with a shorter polling deadline. Preserve the exact catalog payload and WebSocket authorization assertions. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes the guest-dictation WebSocket test failing before its first catalog RPC returns on a cold CI worker. Scheduled main run 42514980580 failed with
Dictation catalog did not become ready: undefinedandTimed out in waitFor!.User Impact
No production behavior changes. The regression keeps the same guest authorization, revocation, and exact catalog payload coverage.
Why This Change Was Made
The five-second polling deadline wrapped an RPC with its own ten-second timeout. Replace polling with the existing catalog refresh root release observer, as used by provider-discovery tests: assert the cold warming response, await publication, then read and assert the ready catalog once. No timeout increases, retry loops, assertion weakening, or baseline changes. Production delta: zero; net test lines: zero.
The flaky synchronization was introduced by
14d9d554f7d04b0c036c543ff2c2b4592faf958cin #193658. #194612 records an earlier matching failure but explicitly leaves dictation unchanged; it does not own this repair.Evidence
scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json: passed.git diff --check: passed.44662c4c196431fdabf9ae3b1ddae62368f6857d, including catalog/admission owner sources: scoped-clean for P0–P2. The reviewer confirmed that snapshot publication precedes root release. No remaining actionable findings.server.auth.guest-dictation.test.ts --maxWorkers=1reproduction: setup failed before any test ran because the borrowed dependency layout could not resolvequickjs-wasiduring compiled-subprocess preparation. The attempted run took 24.21 seconds; this is not runtime proof of the fix. The original CI failure is the red evidence; local red/green proof is unavailable.