Skip to content

fix(talk): avoid readiness failures during slow test setup - #156376

Merged
steipete merged 1 commit into
mainfrom
codex/talk-registration-readiness-20260923
Sep 23, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/talk-registration-readiness-20260923

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes native Talk test failures when legitimate workspace or session preparation consumes the fixture's backend-registration deadline.

User Impact

There is no user-visible behavior change. The Talk test fixture can tolerate slow preparation while retaining the existing 1000 ms registration deadline and cleanup checks.

Why This Change Was Made

Start the readiness timer when the completion owner creates its registration claim, after preparation. Observe the original delegation's terminal frame so setup rejection before a claim also settles the fixture promptly. This changes two test files only; it does not increase timeouts or add retries.

Evidence

A real workspace-preparation boundary held for 1100 ms fails with the original fixture and passes with this repair. A separate preclaim rejection regression exposed a 120-second hang before the terminal-frame observer was added and passes in approximately 2.6 seconds afterward. Both native Talk suites pass all 40 tests, including missing-registration cleanup. Targeted test types, lint, line/assertion ratchets, and independent review pass.

The patch and both preimages were rechecked against current main before publication; the restored files match the reviewed candidate byte for byte. Local proof used Node 24.21 on macOS arm64 and does not reproduce the original Linux Node 24.19 parallel CI shard. Exact-head hosted CI remains the landing gate; no full local build or repository-wide test suite was run.

Start the existing 1000 ms readiness deadline when the real completion owner creates its registration claim, after workspace and session preparation. Observe original-delegation completion so setup rejection still settles readiness and closes the fixture.

Prove a held 1100 ms workspace preparation fails on the original fixture and succeeds after the repair. Preserve missing-registration cleanup and add preclaim setup-rejection coverage. Both native Talk files pass 40 tests; targeted test types, lint, ratchets, and independent P2 review pass. No production behavior or timeout duration changes.
@clawsweeper

clawsweeper Bot commented Sep 23, 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.

@steipete
steipete marked this pull request as ready for review September 23, 2026 08:50
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 6:00 AM ET / 10:00 UTC.

ClawSweeper review

What this changes

Adjusts native Talk test readiness to begin at backend registration and adds coverage for slow preparation and setup rejection.

Merge readiness

⛔ Blocked before merge - 3 items remain

The fixture repair remains useful on current main, but the new regression should use controlled time before merge.

Priority: P3
Reviewed head: 05506532195fbb08254c2167d5a2dfa4f07b4fff

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Recorded reviewer rating: The repair is focused and source-supported, with one concrete test-cost correction remaining. Real behavior proof remains required by host policy.
Proof confidence 🌊 off-meta tidepool Recorded reviewer rating; Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts ordinary contributor proof; the changed owner is a test fixture, and the body supplies targeted before/after fixture observations. Transport and backend execution are simulated, so these results do not establish live voice behavior, which this patch does not change. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Required by policy Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts ordinary contributor proof; the changed owner is a test fixture, and the body supplies targeted before/after fixture observations. Transport and backend execution are simulated, so these results do not establish live voice behavior, which this patch does not change. No stored-data contract changes.
Evidence reviewed 7 items Introduced change: The pinned introduction changes only test support and tests, moving the existing deadline to claim creation and observing terminal delegation frames.
Current main still needs the repair: The fetched main retains the preimage in both affected files, including starting the registration deadline before dispatching the delegation. Release-source inspection was unavailable because the required object could not be retrieved; no shipped-fix claim is made.
Preparation precedes registration: The real consultation path awaits workspace preparation before invoking onRunStarted, where the Gateway consultation owner creates its completion claim. This supports the fixture's revised deadline boundary.
Findings 1 actionable finding [P2] Replace the real preparation sleep with controlled time
Security None None.

How this fits together

Native Talk connects voice-provider delegations to OpenClaw agent runs. These test fixtures exercise registration, voice control, and cleanup through the plugin entrypoint with simulated transport and backend execution.

flowchart TD
 A[Simulated voice delegation] --> B[Workspace and session preparation]
 B --> C[Backend registration claim]
 C --> D[Registration deadline]
 D --> E[Parked backend ready]
 B --> F[Setup rejection frame]
 E --> G[Assertions and cleanup]
 F --> G
Loading

Before merge

  • Add real behavior proof - Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts ordinary contributor proof; the changed owner is a test fixture, and the body supplies targeted before/after fixture observations. Transport and backend execution are simulated, so these results do not establish live voice behavior, which this patch does not change. No stored-data contract changes.
  • Replace the real preparation sleep with controlled time (P2) - This regression adds an unconditional 1.1-second wall-clock delay whenever the file runs. Root guidance and the testing cost policy explicitly require controlled clocks instead of real sleeps. Advance a narrowly scoped fixture clock while preparation is held, retaining failure against the original fixture and success after this repair; keep actual asynchronous preparation and cleanup intact.
  • Complete next step (P2) - Replace the real sleep with controlled time, preserve before/after regression coverage, and report focused test costs.

Findings

  • [P2] Replace the real preparation sleep with controlled time — src/gateway/talk/handlers/client-native-control.test.ts:78-79
Agent review details

Security

None.

PR surface

Tests +76. Total +76 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 87 11 +76
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 87 11 +76

Review metrics

Metric Value Why it matters
Added wall-clock wait 1100 ms per preparation regression run Controlled time can preserve deadline coverage without repeatedly paying this delay in CI.

Technical review

Best possible solution:

Keep registration-scoped readiness and terminal-frame cleanup, with a deterministic regression that advances the fixture clock instead of sleeping.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes that current main starts the 1000 ms deadline before awaited workspace preparation; holding that boundary beyond the deadline exposes the fixture defect. This review did not execute the reproduction.

Is this the best way to solve the issue?

The readiness-boundary repair is appropriate, but the new regression should use controlled time to retain coverage without adding a real sleep.

Full review comments:

  • [P2] Replace the real preparation sleep with controlled time — src/gateway/talk/handlers/client-native-control.test.ts:78-79
    This regression adds an unconditional 1.1-second wall-clock delay whenever the file runs. Root guidance and the testing cost policy explicitly require controlled clocks instead of real sleeps. Advance a narrowly scoped fixture clock while preparation is held, retaining failure against the original fixture and success after this repair; keep actual asynchronous preparation and cleanup intact.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6b4ebc043bc8.

Labels

Label changes:

  • add P3: This is a bounded test-fixture reliability repair with no user-visible production change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts ordinary contributor proof; the changed owner is a test fixture, and the body supplies targeted before/after fixture observations. Transport and backend execution are simulated, so these results do not establish live voice behavior, which this patch does not change. No stored-data contract changes.

Label justifications:

  • P3: This is a bounded test-fixture reliability repair with no user-visible production change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts ordinary contributor proof; the changed owner is a test fixture, and the body supplies targeted before/after fixture observations. Transport and backend execution are simulated, so these results do not establish live voice behavior, which this patch does not change. No stored-data contract changes.

Evidence

Acceptance criteria:

  • [P1] pnpm test src/gateway/talk/handlers/client-native-control.test.ts --maxWorkers=1.
  • [P1] pnpm test src/gateway/talk/handlers/client-native-actions.test.ts --maxWorkers=1.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Replace the real sleep with controlled time and verify the regression still fails against the original fixture.
  • Record focused per-file wall times and available CI test duration in the PR evidence.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 058e664 into main Sep 23, 2026
172 of 173 checks passed
@steipete
steipete deleted the codex/talk-registration-readiness-20260923 branch September 23, 2026 10:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 23, 2026
* commit '91ee6aa3de1072401b2ff6eb2dd724c276061dbc':
  fix(test): supply pane identity to footer scroll fixture
  fix(test): include limit helper in packaging harness
  revert: gateway session fixture settlement (cb13cf8, fc574da)
  test(talk): scope readiness deadline to backend registration (#156376)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
…w#156376)

Start the existing 1000 ms readiness deadline when the real completion owner creates its registration claim, after workspace and session preparation. Observe original-delegation completion so setup rejection still settles readiness and closes the fixture.

Prove a held 1100 ms workspace preparation fails on the original fixture and succeeds after the repair. Preserve missing-registration cleanup and add preclaim setup-rejection coverage. Both native Talk files pass 40 tests; targeted test types, lint, ratchets, and independent P2 review pass. No production behavior or timeout duration changes.
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant