Skip to content

fix(ci): stop stalled Windows E2E jobs promptly - #1785

Merged
RomneyDa merged 1 commit into
openclaw:mainfrom
RomneyDa:fix/ci-e2e-hang-watchdog-20261020
Oct 20, 2026
Merged

RomneyDa merged 1 commit into
openclaw:mainfrom
RomneyDa:fix/ci-e2e-hang-watchdog-20261020

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: Windows E2E CI can remain stuck in fixture provisioning for tens of minutes without failing the test run.

The reported setup/connect job stopped reporting progress at wsl.exe --install and was eventually cancelled after 55 minutes. Comparable healthy installs completed in 28 and 48 seconds.

User Impact

Developers get a failed E2E run promptly when a fixture or test stalls, instead of waiting for the workflow's long cancellation path. No shipped application behavior changes.

Why This Change Was Made

  • Enable the existing VSTest hang collector in the shared E2E runner, with a 10-minute timeout and no memory dumps. The timeout is overrideable for focused verification.
  • Limit all three E2E test steps to 20 minutes. Reduce the setup/connect job timeout from 45 to 25 minutes, matching the recovery lanes, with diagnostic upload still configured to run after failures.
  • Cover all lane deadlines, diagnostic upload conditions, timeout argument validation, test failure propagation, and retained required-proof rejection.

This is a symptom guard. The inherited-output-pipe timeout escape was reproduced independently, but the hosted process tree was unavailable, so this PR does not claim to fix the underlying WSL stall or change normal production command-output draining. Filters, test inventory, Gateway baseline recording, and TRX/proof enforcement stay intact.

Required proof pools

  • none: CI harness/deadline changes only. No changes to product WSL provisioning, MXC containment, node/MCP contracts, or UI behavior. Hosted Windows E2E remains selected for this infrastructure change.

Validation

  • Current-head hosted CI, attempt 2: passed, including the CI Gate, Shared/Tray suites, all three WSL Latest E2E lanes, UI/accessibility, and packaging checks.

  • The first attempt's UI test host crashed after 139 passing cases and no failed assertions. The same class of crash also occurred on main. One targeted UI-lane rerun passed on the unchanged head 0df42dd0; no source repair was made for this intermittent native-host crash.

  • pwsh -NoProfile -File ./scripts/test-ci-workflow-contract.ps1: passed on Windows x64, including all 5 new E2E harness cases and existing contracts (24.00s).

  • ./build.ps1: passed in the isolated Windows checkout (201.77s).

  • Required local unit-suite rerun, Windows 11 ARM64 VM with x64 .NET SDK 10.0.402:

    Command Actual result
    dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore 4,482 passed, 2 failed, 37 skipped (129.26s outer command wall)
    dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore 4,302 passed, 2 failed, 0 skipped (184.62s outer command wall)

    Local closeout is not all green. Shared failures were Interactive_ConcurrentDisconnectsLeaveServerUsable (fixture cleanup ObjectDisposedException) and AuthenticatedSigningIdentity_ComesFromConnectNotOptionalHelloEcho(spoofEcho: False, useManagedWebSocket: False) (timeout). Tray failures were the two app-local VC++ runtime floor guards: this VM has no Visual Studio C++ Redistributable Update component, so builds copy fallback 14.29 instead of the required 14.38.33130 or newer. These Shared/Tray suites passed in hosted CI. The earlier native ARM64 Shared receipt separately reported 4,484 passed and 37 skipped.

  • Auto Review: clean through P3 for the unchanged three-file change.

  • git diff --check: passed. No new repository code changes in this CI recovery.

Real behavior proof

Same VSTest/xUnit packages as the E2E project (Microsoft.NET.Test.Sdk 18.6.0, xUnit 2.9.3, adapter 3.1.5), with a fixture whose InitializeAsync never completes:

Probe Result
Portable healthy case, hang timeout 3s (.NET SDK 10.0.401, macOS ARM64) Passed, exit 0, 0.985s wall
Portable stalled fixture, hang timeout 3s, dump type none Aborted, exit 1, 3.664s wall; TRX written; no memory dumps
Portable stalled fixture without guard Still running after 8s; task-owned process group terminated
Real Invoke-CiE2e.ps1 wrapper, healthy case, timeout 3s (Windows 11 ARM64 VM, x64 .NET SDK 10.0.402 and PowerShell 7.6.7) Passed, exit 0, 4.52s outer wall
Same Windows wrapper, stalled fixture, timeout 3s Aborted, exit 1, 6.01s outer wall; fixture-entry marker observed; TRX written; zero memory dumps
Same Windows fixture through the unprotected parent-revision wrapper Still running after 8s with fixture-entry marker observed; task-owned process tree terminated

Windows proof completion marker: CI1785_WINDOWS_WATCHDOG_PROOF_PASSED.

The hung fixture was entered before any case completed. The portable run did not emit a sequence file before a case started; the aborted TRX and console diagnostics remained available. Hosted setup/connect, revocation recovery, and network recovery lanes all passed with the new guard enabled, including their normal artifact uploads.

Not verified / blocked

  • Required local Shared/Tray closeout is not fully passing, for the concrete failures above. Hosted success does not convert those local failures into passes.
  • The precise original hosted WSL stall trigger remains unconfirmed; no live process tree or stack was captured.
  • Actual Actions artifact upload following a hosted hang timeout was not exercised. Local abort/TRX behavior and workflow always() upload contracts passed.

Review

Independent Auto Review found no accepted/actionable P0-P3 findings. The focused runtime probe complements static review and mocked argument/exit contracts.

Security and compatibility

No product permissions, credentials, configuration, network calls, or migration changes. Hang diagnostics explicitly disable process-memory dumps. Existing test output and diagnostic upload behavior are retained.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@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 priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR adds a configurable E2E hang watchdog and shorter Windows CI deadlines while retaining diagnostic uploads.

Example: The setup/connect fixture stops progressing during wsl.exe --install.

  • Before: The reported hosted job remained stuck until cancellation after 55 minutes.
  • After: The runner requests a 600-second VSTest hang timeout, backed by a 20-minute test-step deadline and 25-minute job deadline.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused and apparently correct, with useful contract coverage and a portable watchdog probe, but limited direct evidence for the changed Windows entry point.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored CI-only PR is outside the ordinary contributor proof gate; its portable VSTest probe reports healthy success and stalled-fixture abortion, but does not verify Invoke-CiE2e.ps1 on Windows or Actions diagnostic upload.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Developers wait through prolonged CI cancellation when Windows E2E fixture provisioning stops progressing.
Reason: Maintainer authorship establishes direction, and bounded CI failure has clear operational value without claiming to repair the underlying WSL stall.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a documented CI stall, and main lacks its E2E watchdog. No actionable patch defect was found.

Priority: P2
Reviewed head: 0df42dd0c6cf850a6ae9e00ed815c802f8a74654

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not exercise the current Windows wrapper terminating a stalled fixture and retaining diagnostics; the new contract tests' base-fail/head-pass comparison is also unreported.
Agent review details

How this fits together

GitHub Actions invokes the shared PowerShell E2E runner with a shard filter; the runner launches VSTest, propagates failures, and checks TRX proof results before Actions uploads diagnostics.

flowchart TD
  A[GitHub Actions E2E lane] --> B[Shared PowerShell runner]
  B --> C[VSTest hang watchdog]
  C --> D[Windows E2E fixture and tests]
  D --> E[Exit status and TRX]
  E --> F[Proof checks and artifact upload]
Loading

Technical review

Best possible solution:

Retain the focused CI watchdog change while preserving production command-output draining and existing E2E proof enforcement.

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

Main's shared E2E runner has no VSTest hang watchdog, and the linked hosted job confirms an unfinished test step through cancellation; the underlying WSL stall is unconfirmed.

Is this the best way to solve the issue?

The small CI-only guard fits the stated operational problem and existing watchdog pattern without changing intentional production output draining.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Shared E2E runner and lane deadlines changes intended behavior with a stated reason (969fe6d: Split validation into conservative parallel lanes while retaining test selection, diagnostic artifacts, and fail-closed proof checks.)
  • Production command-output draining keeps the original intent (Preserve normal setup command output drains #1361: Preserve complete trailing output after normal process exits and restrict bounded inherited-pipe escape to explicit inspection callers.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Scott Hanselman: Raw commit 969fe6d adds scripts/test-ci-workflow-contract.ps1:241 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 969fe6dad230; files: scripts/test-ci-workflow-contract.ps1)
  • Karen: Raw commit 66343f7 adds .github/workflows/ci.yml:773 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 66343f741134; files: .github/workflows/ci.yml)

Review metrics

Metric Value Why it matters
Patch allocation CI runner/workflow +11/-2 lines; tests +79/-0 lines Most growth covers deadline configuration, argument validation, failure propagation, and retained proof rejection without adding a parallel production owner.

Labels

Label changes:

  • add P2: Stalled hosted E2E runs waste developer attention and delay validation, with no shipped application behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Stalled hosted E2E runs waste developer attention and delay validation, with no shipped application behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 October 20, 2026, 2:56 PM ET / 18:56 UTC.

@RomneyDa RomneyDa added status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. and removed status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. labels Oct 20, 2026
@RomneyDa
RomneyDa merged commit f6741aa into openclaw:main Oct 20, 2026
53 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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