Skip to content

fix(test): wait for guest dictation catalog publication - #195385

Merged
steipete merged 1 commit into
mainfrom
loops/l441-guest-dictation
Nov 8, 2026
Merged

steipete merged 1 commit into
mainfrom
loops/l441-guest-dictation

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

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: undefined and Timed 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 14d9d554f7d04b0c036c543ff2c2b4592faf958c in #193658. #194612 records an earlier matching failure but explicitly leaves dictation unchanged; it does not own this repair.

Evidence

  • Touched-file lint with scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json: passed.
  • Touched-file oxfmt and git diff --check: passed.
  • Codex autoreview of the local change against 44662c4c196431fdabf9ae3b1ddae62368f6857d, including catalog/admission owner sources: scoped-clean for P0–P2. The reviewer confirmed that snapshot publication precedes root release. No remaining actionable findings.
  • Focused server.auth.guest-dictation.test.ts --maxWorkers=1 reproduction: setup failed before any test ran because the borrowed dependency layout could not resolve quickjs-wasi during 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.
  • A typecheck configuration including only the touched test was attempted, but the wrapper refused dependency symlinks outside the checkout before checking types. Typecheck remains unproven.
  • Full runtime validation and broad checks are deferred to this PR's CI. The production Team Gateway host prohibits heavy local preparation, and this task prohibits dispatching/rerunning CI or warming Testbox. CI seconds are pending.

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]>
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Nov 8, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This 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.

  • Before: A five-second polling deadline can expire before the RPC's ten-second timeout.
  • After: The test asserts the warming response, awaits refresh release, and checks the exact ready payload.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and supported by successful CI and verified lifecycle ordering; evidence remains harness-level.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored, test-only PR changes no shipped behavior; the real-WebSocket harness shard and exact-head CI gate passed, while the disclosed local attempt stopped during setup.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: A cold-worker synchronization timeout can fail CI before guest-dictation authorization coverage runs.
Reason: This maintainer-authored repair replaces an arbitrary polling deadline with existing completion ownership and adds no production machinery.

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
Reviewed head: e6723157f65c80635d9fa4bedeb3ccf5d83ae60d

Before merge

  • Remove internal host and agent-workflow details from the description (P3) - The public description includes agent-review boilerplate and identifies an internal production Gateway host while explaining task restrictions. Remove those details under the public-content rule; retain the concrete dependency-resolution limitation, validation results, and remaining coverage gap.

Findings

  • [P3] Remove internal host and agent-workflow details from the description — PR description:19-22

Tests

  • Missing end-to-end proof: The reported cold-worker failure has no independently inspected matching red/green trace; exact-head CI supplies passing harness evidence.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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:

  • [P3] Remove internal host and agent-workflow details from the description — PR description:19-22
    The public description includes agent-review boilerplate and identifies an internal production Gateway host while explaining task restrictions. Remove those details under the public-content rule; retain the concrete dependency-resolution limitation, validation results, and remaining coverage gap.
    Confidence: 0.97

Overall correctness: patch is correct
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9dc3499d415c.

Provenance checked

  • Guest dictation catalog readiness assertions keeps the original intent (14d9d55: Enable session-scoped guest dictation while retaining restricted provider disclosure and live session authorization.)
  • Asynchronous catalog publication contract keeps the original intent (4b0eb92: Serve snapshots immediately, return a retryable warming response on cold reads, and retain background refresh custody until completion.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 24 24 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 24 24 0

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The change repairs a documented main-CI test synchronization failure without changing production behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The change repairs a documented main-CI test synchronization failure without changing production behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 8, 2026, 3:08 PM ET / 20:08 UTC.

@steipete
steipete merged commit a4e4638 into main Nov 8, 2026
121 checks passed
@steipete
steipete deleted the loops/l441-guest-dictation branch November 8, 2026 20:21
alkor2000 pushed a commit to alkor2000/openclaw that referenced this pull request Nov 9, 2026
)

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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
)

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants