Skip to content

fix: stabilize worker and browser E2E fixtures - #164535

Merged
steipete merged 3 commits into
mainfrom
fix/w121-e2e-harness
Oct 3, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/w121-e2e-harness

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The skill-worker E2E fixture expects direct Workshop tools, but newly respected Tool Search hides them. E2E refresh checks can also observe a request made before its response was deferred. Browser checks also assume a runtime-specific navigation error prefix and read dashboard iframe geometry before asynchronous initialization has settled.

User Impact

No product behavior changes. Existing E2E checks retain their coverage while avoiding these false failures on Node and Bun.

Why This Change Was Made

The direct-tool worker fixture now explicitly disables Tool Search alongside Code Mode, preserving its real Workshop and resource assertions. The mock Gateway now arms deferral and captures the matching request cursor in one browser turn. Goal recovery waits from that cursor. The lifecycle test checks the fixture's ERR_EMPTY_RESPONSE cause while preserving browser ownership, rollback, and cleanup assertions. Dashboard geometry checks poll their existing exact invariants after expansion, resize, and split restoration.

The patch reuses the existing matcher, adds cursor assertions to an existing test, and removes one net line. It adds no test cases, runtime matrix, or required check. Production build selection is unchanged.

Evidence

The cursor regression fails against the original helper (undefined instead of the captured cursor). After the fix, its three cases pass on Node 24 and the checksum-verified Bun fork in 4.26s/2.60s wall. The original lifecycle assertion reproduces the Bun failure; all three cases pass after the correction on both runtimes.

All six goal-recovery browser cases pass on Node/Bun in 32.12s/24.68s wall. A Linux CI/Testbox cost sample of the same fixes measured 19.01s/21.01s for those six cases and 5.00s/5.00s for the three corrected lifecycle cases; that frozen candidate predates the expression-only matcher cleanup. Existing case counts are unchanged. These are command wall times including startup, not isolated assertion timings.

check:changed passes, including typechecks, formatting, lint, line-growth guards, and dead-export checks. Local and complete-branch P2 reviews are scoped-clean. The original advisory Bun release run remains unchanged; unrelated runtime failures are tracked separately.

The first exact-head CI run failed the existing dashboard retention test while its iframe was still zero-height; five sibling jobs were cancelled. Its readiness helpers check identity, visibility, and panel state, while the iframe is attached before bridge initialization completes. The three geometry assertions now use the existing polling budget; no timeout was increased. All five dashboard cases pass without screenshot capture on Node/Bun in 24.25s/22.63s. A temporary forced-zero-height negative control still fails the corrected assertion. The changed-file gate passes in 151.69s. A local baseline pass did not reproduce the CI timing and is not claimed as repair evidence.

The skill-worker test reproduces the same missing-Workshop-schema failure on Node and Bun after successful private workspace admission (57.02s/48.02s). With the explicit fixture setting, the complete existing case passes on both runtimes in Linux/Testbox (66.03s/60.02s), including Workshop create/read/update, pinned resources, refresh, and worker replacement. The one-line addition is LOC-neutral. Its changed-file checks pass in 206.80s using physically owned dependencies; the initial shared-dependency attempt was correctly rejected by the declaration containment guard.

The second CI head reported an unrelated MCP App message denial. A focused actual-handler diagnostic on the same source contract passed with content/focus/rate permission, confirmation, and event custody all accepted (42.01s). That does not explain the original timing failure; it remains an investigated uncertainty. No permission policy or MCP assertion was changed, and neither failed workflow was rerun.

@clawsweeper

clawsweeper Bot commented Oct 3, 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 October 3, 2026 21:08
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 6:31 PM ET / 22:31 UTC (Revision 4).

ClawSweeper review

What this changes

The PR stabilizes existing browser and worker tests by capturing deferred-request cursors atomically, waiting for iframe geometry, matching the underlying navigation error, and explicitly exposing direct tools.

Merge readiness

✅ Ready for maintainer review

Keep open: these focused fixture repairs remain absent from current main, and no actionable introduced defect was found. The previous review had no findings; the added worker-fixture change also preserves its existing coverage.

Priority: P2
Reviewed head: 66a864c162caa1397101e4bc5f29cbde4a4e9411

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported fixture repair with retained coverage and no blocking finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body maps the changed fixture owners to after-fix Node/Bun browser runs and a Linux/Testbox run through the real Gateway and node worker, with preserved lifecycle assertions and a failing layout negative control. These observations support the fixture repairs; they do not resolve the separate MCP denial. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body maps the changed fixture owners to after-fix Node/Bun browser runs and a Linux/Testbox run through the real Gateway and node worker, with preserved lifecycle assertions and a failing layout negative control. These observations support the fixture repairs; they do not resolve the separate MCP denial. No stored-data contract changes.
Evidence reviewed 10 items Introduced changes: Inspected the pinned merge-base-to-head delta. Changes are confined to tests and test helpers; production defaults, permission enforcement, dependencies, workflows, and stored-data contracts are unchanged.
Atomic cursor contract: Deferral registration and matching-request counting now occur synchronously in the browser. Capture and deferral reuse the same parameter matcher, and the browser adapter returns the cursor to the goal-recovery test.
Worker fixture uses supported configuration: The mock provider explicitly requires a directly advertised skill_workshop schema. The fixture disables Tool Search through the documented existing setting while retaining real Workshop publication, private-library isolation, resource pinning, refresh, cancellation, and worker-replacement assertions.
Findings None None.
Security None None.

How this fits together

OpenClaw’s E2E fixtures drive real browser pages and isolated Gateway/node-worker flows. Their request controls and assertions determine whether asynchronous behavior is tested reliably.

flowchart TD
  A[Existing test scenarios] --> B[Browser and worker fixtures]
  B --> C[Atomic request deferral]
  B --> D[Direct tool configuration]
  C --> E[Browser state assertions]
  D --> F[Gateway and worker assertions]
  E --> G[Test results]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -1. Total -1 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 8 20 21 -1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 20 21 -1

Review metrics

None.

Technical review

Best possible solution:

Keep fixture synchronization with the test owner while preserving exact layout, cleanup, and worker-resource assertions.

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

Yes, source establishes the missing cursor return and the direct-schema mismatch with the fixture provider; the body also records baseline failures. This read-only review did not execute a reproduction.

Is this the best way to solve the issue?

Yes, the patch repairs existing fixture contracts through the existing configuration and matcher owners while retaining their substantive assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs bounded E2E fixture failures without changing user-facing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body maps the changed fixture owners to after-fix Node/Bun browser runs and a Linux/Testbox run through the real Gateway and node worker, with preserved lifecycle assertions and a failing layout negative control. These observations support the fixture repairs; they do not resolve the separate MCP denial. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body maps the changed fixture owners to after-fix Node/Bun browser runs and a Linux/Testbox run through the real Gateway and node worker, with preserved lifecycle assertions and a failing layout negative control. These observations support the fixture repairs; they do not resolve the separate MCP denial. No stored-data contract changes.

Evidence

What I checked:

  • Introduced changes: Inspected the pinned merge-base-to-head delta. Changes are confined to tests and test helpers; production defaults, permission enforcement, dependencies, workflows, and stored-data contracts are unchanged. (66a864c162ca)
  • Atomic cursor contract: Deferral registration and matching-request counting now occur synchronously in the browser. Capture and deferral reuse the same parameter matcher, and the browser adapter returns the cursor to the goal-recovery test. (ui/src/test-helpers/control-ui-e2e.ts:2640, 66a864c162ca)
  • Worker fixture uses supported configuration: The mock provider explicitly requires a directly advertised skill_workshop schema. The fixture disables Tool Search through the documented existing setting while retaining real Workshop publication, private-library isolation, resource pinning, refresh, cancellation, and worker-replacement assertions. (test/e2e/qa-lab/runtime/skill-library-worker-wire.e2e.test.ts:103, 66a864c162ca)
  • Implementation boundary: Tool Search documentation defines tools.toolSearch:false as restoring direct schemas and expressly distinguishes OpenClaw Tool Search from Codex-native surfaces. This fixture uses the mock OpenAI provider and supplies no affirmative dependency on the sibling Codex implementation. Public docs: docs/tools/tool-search.md. (docs/tools/tool-search.md:25, 66a864c162ca)
  • Assertions retain their contracts: Dashboard polling retains the exact zero-inset and height-gap expectations at the existing budget. Navigation still verifies browser disconnection, owner rollback, successor opening, and cleanup after the loopback server destroys the request socket. (ui/src/e2e/board-mcp-app.e2e.test.ts:527, 66a864c162ca)
  • Still necessary on current main: The fetched main helper still arms deferral without returning a cursor. Comparisons against the merge base found no changes in the affected test paths that implement this PR’s repairs. (ui/src/test-helpers/control-ui-e2e.ts:2640, 51abe1b45a0c)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Raw commit 24d91be adds extensions/qa-lab/src/web-runtime.lifecycle.e2e.test.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 24d91be3e312; files: extensions/qa-lab/src/web-runtime.lifecycle.e2e.test.ts)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-03T21:14:23.234Z sha 3003e1d :: needs maintainer review before merge. :: none
  • reviewed 2026-10-03T21:19:51.160Z sha 3003e1d :: needs maintainer review before merge. :: none
  • reviewed 2026-10-03T21:43:00.906Z sha c847912 :: needs maintainer review before merge. :: none

@steipete steipete changed the title fix: stabilize E2E deferral and navigation checks fix: stabilize E2E request and browser assertions Oct 3, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 3, 2026
@steipete steipete changed the title fix: stabilize E2E request and browser assertions fix: stabilize worker and browser E2E fixtures Oct 3, 2026
@steipete
steipete merged commit 3d66dd5 into main Oct 3, 2026
127 of 129 checks passed
@steipete
steipete deleted the fix/w121-e2e-harness branch October 3, 2026 22:40
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
* fix: stabilize E2E deferral and navigation checks

* fix: wait for dashboard iframe geometry in E2E checks

* fix: expose direct tools in the skill worker E2E fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui extensions: qa-lab P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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