Skip to content

test(talk): fail fast when native-action readiness is missed - #152177

Merged
steipete merged 1 commit into
mainfrom
upd/flake109-talk-native-actions-final-insertion
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/flake109-talk-native-actions-final-insertion

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Related: #151678

What Problem This Solves

Fixes native Talk ownership tests hanging until the outer timeout when setup misses backend registration. Cleanup previously waited for a provider stream whose release lived inside the callback that failed setup had skipped.

User Impact

No user-visible runtime change. CI gets a prompt readiness failure with the last startup phase, and the fixture closes its synthetic stream and joins the backend before returning.

Why This Change Was Made

The fixture now observes the real completion owner's registration promise while preserving the existing 1,000 ms readiness deadline. It owns provider-stream completion in its cleanup path. The five final-insertion scenarios retain their ownership, liveness, reassignment, replay, and insertion assertions.

Evidence

  • A forced missing-registration regression hangs on the original fixture until its bounded 10-second test timeout. With the repair, it rejects with the readiness cause, skips dependent assertions, and verifies that the stream and backend have settled.
  • Local native-action file: 25 tests passed; forced-miss case completed in 2.2 seconds including setup and the unchanged one-second deadline.
  • pnpm check:changed passed, including full core-test typechecking, guards, dead-export scans, and changed-file lint.
  • Testbox lease workflow: Ubuntu 24.04.3, Node 24.19.0, four available CPUs. The original shard was attempted once: its core configuration passed 710 tests and failed two unrelated workspace-transfer cases on unsafe temporary-directory permissions (116.13 s), so its unexecuted client configuration was continued separately and passed all 90 tests (52.17 s). The two failures were not rerun.
  • The native-action file then passed 10/10 focused runs, 25 tests each, in 33.66–57.11 s per run, with two concurrent invocations and separate caches/state. All 55 hosted final-insertion cases and all 11 forced-miss regression executions passed.
  • Fresh committed-branch Codex review: scoped-clean through P1.
  • Production LOC: +0/-0. Test and test-support LOC: +208/-127 (net +81).

The unrelated hosted failures were node-workspace-transfer-service.test.ts > streams workspace and changed results beyond worker credential expiry and repository-workspace-startup.test.ts > adopts completed setup, restores accepted repository edits, and retains the bound workspace on restart. Both reported FsSafeError: temp workspace directory is group/world writable without sticky protection before the changed Talk test was loaded.

Landing verification: the native watcher returned GREEN, with zero pending checks, for exact-head CI run 35397519787 at a1838d5fc412f00f7c962957bb24c629d4e7b0f9. No tests or CI jobs were rerun by the landing lane. The campaign committed-branch Codex review of record is scoped-clean through P1, with no accepted/actionable findings; it did not independently rerun the reported proof.

ClawSweeper's completed exact-head review, reviewed September 18 at 21:42 UTC, found no actionable correctness or security defect. It lists no Rank-up moves and no before-merge actions, so none require application or a skip. The native completed-review gate passed. This remains a fixture repair with no claim of changed live Talk behavior.

@clawsweeper

clawsweeper Bot commented Sep 18, 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 18, 2026 21:35
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Sep 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 5:42 PM ET / 21:42 UTC.

ClawSweeper review

What this changes

The PR makes native Talk tests fail promptly when backend registration is missing and ensures cleanup releases the synthetic provider stream before joining the backend.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still needs this focused fixture repair, and no actionable correctness or security defect was found. The maintainer-owned work is not a cleanup-close candidate.

Priority: P3
Reviewed head: a1838d5fc412f00f7c962957bb24c629d4e7b0f9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture repair with meaningful regression coverage, reported repeated validation, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository context identifies maintainer-owned work, so the external-contributor proof gate does not apply. The changed owner is a test fixture; its supplied forced-miss and repeated-run results address cleanup and readiness without claiming live Talk behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository context identifies maintainer-owned work, so the external-contributor proof gate does not apply. The changed owner is a test fixture; its supplied forced-miss and repeated-run results address cleanup and readiness without claiming live Talk behavior.
Evidence reviewed 6 items Introduced scope and cleanup ownership: The pinned introduced delta changes only tests and test support. The fixture observes the existing registration promise, retains a 1,000 ms deadline, and releases the supplied stream before awaiting backend settlement. Read-only diff checking passed.
Current main still contains the defect: Fetched main still polls activeRun and unconditionally awaits settleBackend in cleanup, without owning provider-stream completion. The latest release does not contain this fixture path; this review does not identify a shipped product regression.
Existing registration contract: The completion owner exposes a registration promise, and setActiveEmbeddedRun settles it when the matching backend registers. Talk prepares that claim before backend execution. The fixture observes this existing OpenClaw contract without changing production authority or adding a test-only production API.
Findings None None.
Security None None.

How this fits together

Talk connects voice requests to OpenClaw agent runs. These tests exercise that connection through plugin registration and Gateway handlers, using synthetic transports to verify run ownership and control behavior.

flowchart TD
  A[Synthetic voice request] --> B[Talk Gateway handlers]
  B --> C[Agent run registration]
  C --> D[Test readiness deadline]
  D -->|Registered| E[Ownership assertions]
  D -->|Missing or failed| F[Readiness error]
  E --> G[Release stream and join backend]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +81. Total +81 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 208 127 +81
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 208 127 +81

Review metrics

Metric Value Why it matters
Production versus test growth Production +0/-0; tests and test support +208/-127 Growth is confined to readiness diagnostics, fixture cleanup, and a regression case; no production implementation grows.

Technical review

Best possible solution:

Keep readiness tied to the existing registration owner and make fixture cleanup release every parked resource before awaiting completion.

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

Yes, from source: suppress backend registration while the synthetic provider remains open, causing setup to fail before callback-owned stream release. The supplied regression targets this path; no tests were executed in this review.

Is this the best way to solve the issue?

Yes. Observing the existing registration promise and moving stream release into fixture cleanup directly repairs the lifecycle defect without extending the readiness deadline or weakening ownership assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This repairs internal test failure reporting and cleanup without changing user-visible runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository context identifies maintainer-owned work, so the external-contributor proof gate does not apply. The changed owner is a test fixture; its supplied forced-miss and repeated-run results address cleanup and readiness without claiming live Talk behavior.

Label justifications:

  • P3: This repairs internal test failure reporting and cleanup without changing user-visible runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository context identifies maintainer-owned work, so the external-contributor proof gate does not apply. The changed owner is a test fixture; its supplied forced-miss and repeated-run results address cleanup and readiness without claiming live Talk behavior.

Evidence

What I checked:

  • Introduced scope and cleanup ownership: The pinned introduced delta changes only tests and test support. The fixture observes the existing registration promise, retains a 1,000 ms deadline, and releases the supplied stream before awaiting backend settlement. Read-only diff checking passed. (src/gateway/talk/handlers/client-native-control.test-support.ts:587, a1838d5fc412)
  • Current main still contains the defect: Fetched main still polls activeRun and unconditionally awaits settleBackend in cleanup, without owning provider-stream completion. The latest release does not contain this fixture path; this review does not identify a shipped product regression. (src/gateway/talk/handlers/client-native-control.test-support.ts:570, bc9e86ff940c)
  • Existing registration contract: The completion owner exposes a registration promise, and setActiveEmbeddedRun settles it when the matching backend registers. Talk prepares that claim before backend execution. The fixture observes this existing OpenClaw contract without changing production authority or adding a test-only production API. (src/agents/embedded-agent-runner/runs.ts:1018, a1838d5fc412)
  • Regression coverage and supplied validation: The added case suppresses registration and checks the readiness error, skipped dependent assertions, completed stream, stopped streaming, and empty active-run indexes. Existing final-insertion assertions remain. The captured PR body reports a pre-fix timeout, 25 passing focused tests, and 10/10 hosted repetitions; these executions were not independently rerun during this read-only review. (src/gateway/talk/handlers/client-native-actions.test.ts:399, a1838d5fc412)
  • Area history and routing: Main history identifies Peter Steinberger's recent work on these tests. GitHub commit metadata verifies steipete and the move from src/gateway/server-methods/talk-client-native-control.test-support.ts. Deeper local blame/history traversal encountered unavailable objects, so no introducing-author claim is made. (src/gateway/talk/handlers/client-native-control.test-support.ts, c4a6c17dafbf)
  • Related work is distinct: fix: reduce repeated update validation for large agent fleets #151678 addresses fleet update validation costs and supplies context for this test repair; its captured description does not establish that it replaces this readiness and cleanup change. (dea5dda016c6)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 6d43ed9 into main Sep 18, 2026
174 checks passed
@steipete
steipete deleted the upd/flake109-talk-native-actions-final-insertion branch September 18, 2026 22:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…w#152177)

Related: openclaw#151678

Native Talk ownership tests could hang until their outer timeout when setup missed backend registration: teardown waited for a provider stream whose release lived in the callback that failed setup never reached.

Keep readiness with the real completion owner's registration promise and preserve the 1,000 ms deadline. The fixture now finishes its synthetic provider stream before joining backend cleanup and reports the last startup phase on a readiness miss. Existing final-insertion ownership, liveness, reassignment, replay, and insertion assertions remain intact.

This changes tests and support only, with no user-visible runtime behavior or update migration. Production LOC: +0/-0; test/support LOC: +208/-127.

Validation: the forced-miss regression hung on the original fixture and passes after the repair; the native-action file passed locally (25 tests) and in 10/10 focused hosted runs. Exact-head CI run 35397519787 is GREEN at a1838d5, with zero pending checks. The committed-branch Codex review of record is scoped-clean through P1. The original hosted shard's two unrelated temporary-directory permission failures remain documented in the PR; no tests or CI jobs were rerun by the landing lane.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant