Skip to content

fix(test): keep fork E2E setup builds observable - #120653

Merged
vincentkoc merged 4 commits into
openclaw:mainfrom
vincentkoc:fix/e2e-global-setup-watchdog
Aug 8, 2026
Merged

vincentkoc merged 4 commits into
openclaw:mainfrom
vincentkoc:fix/e2e-global-setup-watchdog

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Related: #119267

What Problem This Solves

Fixes an issue where fork pull-request E2E jobs could time out after five minutes even while their setup builds were still making progress.

Why This Change Was Made

The E2E global setup now forwards build output through owned pipes and keeps build processes in Vitest's process group. The existing outer inactivity watchdog remains the single timeout owner, and setup failures still propagate immediately.

User Impact

There is no product-runtime change. Contributors get reliable GitHub-hosted fork CI, and cancelled jobs clean up the setup build and its descendants.

Evidence

  • 158 focused setup, watchdog, process-group, and tsdown tests passed.
  • 71 focused run-node tests passed.
  • The real descendant-cleanup regression passed three consecutive runs.
  • Targeted oxlint, oxfmt, git diff --check, TruffleHog, and autoreview passed.
  • Independent owner review found no remaining P0-P3 findings.
  • This targets the repeated 300-second setup stalls seen in feat(trajectory): record native tool events and structured delegation origin #119267 and unrelated fork PR runs.

@vincentkoc vincentkoc self-assigned this Aug 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 8, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 8, 2026 17:48
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 2:48 PM ET / 18:48 UTC.

ClawSweeper review

What this changes

The PR streams E2E global-setup build output into Vitest and keeps setup descendants in Vitest’s process group so the existing watchdog can observe and cancel them.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking code finding: this is the owner-boundary repair for a current fork-E2E observability defect, and current main still has the buffered setup implementation. Keep it open for protected-label maintainer review and exact-head check completion.

Priority: P2
Reviewed head: 616a24e7f1d855528f7bf9d9de152afc8a49a6e0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with meaningful process-lifecycle coverage and no supported correctness or security finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nonetheless includes a production-boundary descendant-cleanup regression and reports repeated successful runs.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nonetheless includes a production-boundary descendant-cleanup regression and reports repeated successful runs.
Evidence reviewed 5 items Current main still has the defect: Current main retains buffered execFile setup commands with separate 300-second timeouts; it has none of this PR's forwarding implementation or regression test.
Repair follows the existing owner boundary: The runner's outer watchdog observes Vitest stdout/stderr and terminates its process group on inactivity; the PR forwards setup-child output into those streams rather than adding another timeout owner.
Proposed implementation and boundary regression: The PR uses fixed Node-script arguments without a shell, forwards stdout and stderr, preserves sequential failure handling, and adds a POSIX child-and-descendant cleanup regression.
Findings None None.
Security None None.

How this fits together

Fork E2E jobs run global setup before their parallel workers start. Setup builds shared artifacts, and its output and lifecycle feed the Vitest watchdog that determines progress reporting and cancellation cleanup.

flowchart LR
  ForkPR[Fork pull request] --> Vitest[Vitest E2E runner]
  Vitest --> Setup[Global setup builds]
  Setup --> Streams[Forwarded build output]
  Streams --> Watchdog[Existing inactivity watchdog]
  Watchdog --> Workers[E2E workers]
  Watchdog --> Cleanup[Group cancellation cleanup]
Loading

Before merge

  • Resolve merge risk (P1) - The supplied context does not include the latest ClawSweeper comment’s Rank-up moves, and live GitHub reads were unavailable; confirm those moves before landing.
  • Resolve merge risk (P1) - The exact-head lint check was still in progress in the supplied check state.
  • Complete next step (P2) - This member-authored PR has the protected maintainer label; no mechanical repair is indicated, so maintainers should complete the protected review after exact-head checks finish.
Agent review details

Security

None.

PR surface

Tests +150. Total +150 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 169 19 +150
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 169 19 +150

Review metrics

Metric Value Why it matters
Production versus test LOC production +27, tests +123 The production growth creates the explicit setup-runner ownership boundary; the added tests cover output forwarding, failure propagation, and descendant cleanup.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the streamed-output, shared-process-group approach after protected-label review confirms the latest review actions and the exact head is green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the streamed-output, shared-process-group approach after protected-label review confirms the latest review actions and the exact head is green.

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

Yes, from source: current main buffers setup-build output while the outer watchdog only observes Vitest streams, so a progressing build can appear silent until timeout.

Is this the best way to solve the issue?

Yes. Forwarding setup output and keeping descendants inside the already-owned Vitest group fixes observability and cleanup without creating a competing timeout policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 82f6280fa86a.

Labels

Label changes:

  • add P2: The defect can stall contributor fork E2E jobs, but it does not affect product runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 author is a repository member, so the external-contributor proof gate does not apply; the PR nonetheless includes a production-boundary descendant-cleanup regression and reports repeated successful runs.

Label justifications:

  • P2: The defect can stall contributor fork E2E jobs, but it does not affect product 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. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nonetheless includes a production-boundary descendant-cleanup regression and reports repeated successful runs.

Evidence

What I checked:

  • Current main still has the defect: Current main retains buffered execFile setup commands with separate 300-second timeouts; it has none of this PR's forwarding implementation or regression test. (test/vitest/vitest.e2e.global-setup.ts:9, 82f6280fa86a)
  • Repair follows the existing owner boundary: The runner's outer watchdog observes Vitest stdout/stderr and terminates its process group on inactivity; the PR forwards setup-child output into those streams rather than adding another timeout owner. (scripts/run-vitest.mjs:1068, 616a24e7f1d8)
  • Proposed implementation and boundary regression: The PR uses fixed Node-script arguments without a shell, forwards stdout and stderr, preserves sequential failure handling, and adds a POSIX child-and-descendant cleanup regression. (test/vitest/vitest.e2e.global-setup.ts:7, 616a24e7f1d8)
  • History provenance: Blame attributes the current buffered global setup to the commit that introduced isolated shared E2E artifact builds; the adjacent process-group/watchdog helper has the same area owner. (test/vitest/vitest.e2e.global-setup.ts:9, 40385bb5c153)
  • Release/main provenance: The introducing setup commit is not contained by v2026.7.1-2, so neither the defect nor this proposed repair is a shipped-release change. (test/vitest/vitest.e2e.global-setup.ts:9, 0790d9f593ad)

Likely related people:

  • steipete: Git blame attributes the current global setup to the isolated-artifact-build commit, and the neighboring watchdog/process-group code has the same area history. (role: introduced current setup behavior and recent area contributor; confidence: high; commits: 40385bb5c153, f4f53103558a; files: test/vitest/vitest.e2e.global-setup.ts, scripts/run-vitest.mjs, scripts/vitest-process-group.mjs)
  • vincentkoc: History includes prior process-cleanup work in this test-runner area in addition to the proposed repair. (role: adjacent process-cleanup contributor; confidence: medium; commits: 730c726; files: test/vitest/vitest.e2e.global-setup.ts, scripts/vitest-process-group.mjs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the latest ClawSweeper Rank-up moves, then let the exact-head lint check complete before protected-label maintainer review.

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.

@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready at exact head 616a24e7f1d855528f7bf9d9de152afc8a49a6e0.

  • ClawSweeper exact-head review found no actionable findings; latest Rank-up moves were read and are resolved by the completed checks: fix(test): keep fork E2E setup builds observable #120653 (comment)
  • Hosted CI run 31272129875 passed with 53 successful jobs and 14 skipped: https://github.com/openclaw/openclaw/actions/runs/31272129875
  • The repaired long-running jobs passed beyond 300 seconds: build-artifacts 12m56s, checks-fast-bun-launcher 7m21s, and check-sqlite-session-flip-proof 10m10s.
  • check-test-types, check-lint, and the previously failing checks-node-compact-small-2 shard passed.
  • Focused proof before publication: 158 setup/watchdog/process-group/tsdown tests, 71 run-node tests, three consecutive descendant-cleanup runs, targeted oxlint/oxfmt, git diff --check, TruffleHog, signed commits, and independent autoreview.
  • Native review artifacts validated with READY FOR /prepare-pr, zero findings, and no proof gaps.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 120653 passed in hosted_exact_or_recent_parent mode and verified the remote PR tree matches the prepared head. No separate Testbox lease was needed because exact-head hosted CI was green.

Native commands completed: scripts/pr review-init, review-checkout-main, review-checkout-pr, review-artifacts-init, review-validate-artifacts, and prepare-run.

@vincentkoc
vincentkoc merged commit a901261 into openclaw:main Aug 8, 2026
96 checks passed
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

1 similar comment
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit to IsaiahStapleton/openclaw that referenced this pull request Aug 8, 2026
…0807

* origin/main:
  fix(qa): honor Crabbox SSH fallback ports (openclaw#120539)
  refactor(core): adopt normalization-core leaf helpers across production (openclaw#120350)
  fix(release): scope upgrade plugin credentials (openclaw#120666)
  fix(ai): preserve long Responses sessions after server compaction (openclaw#120457)
  fix(test): keep fork E2E setup builds observable (openclaw#120653)
  fix(cloud-workers): retain provider operation ownership (openclaw#120661)
  docs: runners plan — one placement model for sessions, devices, and cloud (openclaw#120657)
  refactor(cli): inline state migration policy (openclaw#120641)
  feat(update): scheduled update campaigns with countdown, dev-channel auto-update, and Updates settings page (openclaw#120506)
  chore(i18n): refresh native locales (openclaw#120614)
  fix(ci): retry transient artifact API reads (openclaw#120654)
  fix(clawrouter): honor advertised reasoning efforts (openclaw#120631)
  fix(infra): unify env-truthiness, missing-path, realpath, and abort-sleep semantics (openclaw#120359)
  fix(maintainers): parse merge comment URL structurally (openclaw#120649)
  fix(ui): label only operator-pinned runtimes in model picker rows (openclaw#120646)
  docs(agents): replace exact-head re-review gate with 12-hour review window

# Conflicts:
#	src/agents/payload-redaction.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
* fix(test): stream E2E setup build progress

* fix(test): keep E2E setup builds in runner group

* fix(test): own E2E setup streams and signals

* test(ci): route E2E setup regression correctly
tomorrowflow pushed a commit to tomorrowflow/openclaw that referenced this pull request Aug 16, 2026
* fix(test): stream E2E setup build progress

* fix(test): keep E2E setup builds in runner group

* fix(test): own E2E setup streams and signals

* test(ci): route E2E setup regression correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

2 participants