Repository navigation
fix: stabilize worker and browser E2E fixtures - #164535
Conversation
|
🦞👀 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 maintainer review before merge. Reviewed October 3, 2026, 6:31 PM ET / 22:31 UTC (Revision 4). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherOpenClaw’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
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -1. Total -1 across 8 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
Merged via squash.
|
* 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
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_RESPONSEcause 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 (
undefinedinstead 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:changedpasses, 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.