Skip to content

fix(ci): keep progressing E2E fixtures alive under the hang guard - #1831

Merged
RomneyDa merged 1 commit into
mainfrom
fix/e2e-progress-watchdog
Oct 22, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/e2e-progress-watchdog

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes progressing WSL E2E fixtures being aborted as inactive before their first test case can complete.

Prerequisite for #1474 (feat(release): automate Microsoft Store submission). Follow-up to #1785 (fix(ci): stop stalled Windows E2E jobs promptly).

User Impact

CI still terminates silent E2E processes after 10 minutes, but fixture output now counts as activity. Existing 20-minute test-step and 25-minute job limits remain unchanged. No shipped application behavior changes.

Why This Change Was Made

In failed run, setup/connect and network-recovery fixtures were aborted by VSTest's 600-second hang collector while still making progress. Setup's WSL creation took 325 seconds, followed by successful CLI installation, gateway startup, operator/node pairing and connectivity verification. VSTest resets this timer on test events, not fixture output.

The shared E2E runner now uses an output-idle process owner. It streams and retains stdout/stderr chunks, including partial lines, preserves the native exit status, terminates an active process tree on silence, and explicitly cancels/disposes pending pipe reads. Post-exit inherited pipes cannot leave the runner waiting forever. Existing TRX and required-proof checks remain intact. Sequence diagnostics use --blame; memory dumps remain disabled. The workflow retains its independent hard wall deadlines.

Required proof pools

  • none: CI process/diagnostic lifecycle only. Production WSL setup, pairing, MXC execution and UI behavior are unchanged. Hosted full Windows E2E remains selected.

Validation

Head: 0faca6a2e9f2e227fd4810df77c3e663b47e530f.

  • pwsh -NoProfile -File scripts/Test-CiProcess.Tests.ps1: passed. Real subprocess cases cover argument/exit/stdout/stderr/trailing-output fidelity, partial-line progress beyond the idle window, silent fixture termination, process-tree termination and exited-root inherited pipes. Reader settlement is checked before the test separately cleans up its orphaned descendant.
  • pwsh -NoProfile -File scripts/test-ci-workflow-contract.ps1: passed, including all 5 existing E2E invocation/proof-gate cases and the real process suite.
  • git diff --check: passed.
  • Codex AutoReview: scoped-clean after fixing partial-line activity accounting and explicit reader ownership. Static review is separate from runtime proof.
  • Required native Windows ARM64 closeout on this head completed in an isolated Parallels checkout:
    • ./build.ps1: passed, 81.4s.
    • Shared dotnet test ... --no-restore: 4,656 passed / 1 failed / 27 skipped, 130.3s.
    • Tray dotnet test ... --no-restore: 4,467 passed / 7 failed, 125.2s.
    • Native full workflow contracts, including the real process tests: passed, 30.1s.
    • Local failures match the previously recorded Parallels symbolic-link privilege, ARM64/x64 prerequisite fixtures, missing speech DLL and redirected known-folder limitations. They are failures, not waived or counted green. Temporary guest state was removed after proof.
  • Current-head hosted CI: passed on this exact head, including core/CLI, tray/setup/integration, UI/accessibility, both package architectures, combined bundle, all three WSL E2E lanes and CI Gate. Setup/connect completed in 22m21s overall, network recovery in 16m27s and revocation recovery in 14m08s. The test-step hard deadline remained 20 minutes, with build/setup outside that step.

Real Behavior Proof

Portable fixture uses the exact E2E test packages: Microsoft.NET.Test.Sdk 18.6.0, xUnit 2.9.3, adapter 3.1.5. Its InitializeAsync prints progress every 200ms for 5 seconds before one test executes.

Runner Result
Old VSTest hang collector, 2-second limit Aborted while fixture output was continuing, exit 1
New output-idle runner, 2-second limit Fixture and test passed, exit 0; test run 5.55 seconds
New process runner, silent fixture Terminated after the idle window, output and failure reason retained

Native Windows 11 ARM64 proof, same pinned test packages and a 3-second guard:

Runner Result (outer command wall)
Old VSTest guard, continuously progressing fixture Expected abort, exit 1, 3.99s
New runner, same progressing fixture Passed 1 test, exit 0, 6.79s
New runner, silent fixture after entry marker Expected abort, exit 1, 4.56s

Both new-runner console receipts confirm CI output readers settled after cancellation. The native fixture actually entered before the silent timeout. No process-memory dumps were collected. No release or Store submission dispatched. This corrects the watchdog's progress signal; it does not claim to fix Microsoft download latency or an unobserved underlying WSL hang.

@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@RomneyDa RomneyDa added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 22, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review October 22, 2026 09:36
@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. P2 Normal priority bug or improvement 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR makes E2E fixture output reset the inactivity deadline while preserving hard workflow deadlines and existing proof checks.

Example: A fixture prints progress every 200 ms for five seconds under a two-second guard.

  • Before: VSTest aborts the progressing fixture before its test executes.
  • After: The output-idle runner allows the fixture and test to finish successfully.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused repair with reported native before/after behavior, meaningful subprocess coverage, and no actionable introduced defect.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored CI repair is outside the ordinary contributor proof gate; supplied current-head Windows results exercise the real output-idle runner with progressing and silent VSTest fixtures, including reader settlement.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Developers receive failed E2E runs when fixture provisioning continues progressing beyond the test-event watchdog interval.
Reason: Maintainer authorship establishes direction, and correcting false CI aborts has clear value within the existing watchdog boundary.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs a documented CI watchdog regression that remains on main, and no actionable introduced defect was found.

Priority: P2
Reviewed head: 0faca6a2e9f2e227fd4810df77c3e663b47e530f

Before merge

None.

Findings

None.

Agent review details

How this fits together

GitHub Actions invokes the shared E2E script with a shard filter; its process supervisor streams diagnostics and returns the dotnet exit status before TRX proof checks and artifact upload.

flowchart TD
  A[GitHub Actions E2E lane] --> B[Shared E2E script]
  B --> C[Output idle supervisor]
  C --> D[Dotnet fixture and tests]
  D --> E[Console output and exit status]
  E --> C
  C --> F[TRX proof checks]
  F --> G[Diagnostic artifact upload]
Loading

Technical review

Best possible solution:

Retain the focused output-idle supervisor with the existing hard deadlines, output retention, and E2E proof enforcement.

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

Main uses VSTest's test-event hang timer during fixture initialization; the supplied before/after probes demonstrate a progressing fixture exceeding that timer, although this review executed no target code.

Is this the best way to solve the issue?

The change corrects the watchdog's activity signal in the existing CI runner while preserving independent wall deadlines and leaving intentional production output draining alone.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • E2E watchdog activity signal changes intended behavior with a stated reason (f6741aa: Terminate stalled fixture provisioning promptly without collecting process-memory dumps.)
  • Shared E2E invocation and proof contracts keeps the original intent (969fe6d: Split validation into conservative lanes while retaining test selection, diagnostic artifacts, and fail-closed proof enforcement.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned change and current main: The introduced diff replaces VSTest hang arguments with the output-idle supervisor. REST main still resolves to the pinned base, which retains the test-event watchdog. (scripts/Invoke-CiE2e.ps1:19, 0faca6a2e9f2)
  • Process lifecycle coverage: Real subprocess cases exercise argument and exit-status fidelity, stderr and trailing output, partial-line activity, silent termination, live-root tree termination, and cancellation of inherited-pipe readers. (scripts/Test-CiProcess.Tests.ps1:1, 0faca6a2e9f2)
  • Preserved operational boundaries: The workflow retains a 20-minute E2E step deadline, a 25-minute job deadline, and unconditional diagnostic upload; the existing TRX and named-proof checks remain unchanged. (.github/workflows/ci.yml:840, 0faca6a2e9f2)
  • Original watchdog intent: fix(ci): stop stalled Windows E2E jobs promptly #1785 (fix(ci): stop stalled Windows E2E jobs promptly) introduced the replaced timer to bound silent stalls without memory dumps; this PR explains why fixture progress requires a different signal. (scripts/Invoke-CiE2e.ps1:29, f6741aa100f5)
  • Supplied runtime evidence: The complete supplied body, sourceRevision 33deb6d3312d4b7df23a54e53e2bd7bbb4e25c2d46583537340c7a7dc0ceb415, reports portable and native Windows ARM64 progressing-fixture success, silent-fixture termination, and settled output readers on the reviewed head. The author also records local Shared and Tray failures rather than presenting them as passes. (0faca6a2e9f2)
  • Hosted validation status: https://github.com/openclaw/openclaw-windows-node/actions/runs/39755798752 targets the reviewed head. The latest read shows setup/connect still running and no failed jobs; network and revocation recovery have completed successfully. Raw job-log retrieval was blocked by the proxy's Azure storage allowlist. (0faca6a2e9f2)

Review metrics

Metric Value Why it matters
Patch allocation CI runner code +103/-14; tests +129/-13 The added supervisor has focused lifecycle coverage for distinct failure modes and does not alter shipped application owners.

Labels

Label changes:

  • add P2: False watchdog aborts disrupt developer CI validation without changing shipped application behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: False watchdog aborts disrupt developer CI validation without changing shipped application behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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 22, 2026, 5:50 AM ET / 09:50 UTC.

@RomneyDa
RomneyDa merged commit 6647e54 into main Oct 22, 2026
30 of 31 checks passed
@RomneyDa
RomneyDa deleted the fix/e2e-progress-watchdog branch October 22, 2026 09:55
@RomneyDa RomneyDa removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 22, 2026
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: 🐚 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant