Repository navigation
chore(test): guard Vitest progress and stall reporting - #131868
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
43d83ed to
ec2869a
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 12:00 PM ET / 16:00 UTC. ClawSweeper reviewWhat this changesThe PR adds a real-Vitest watchdog regression and includes the shared tooling configuration in reporter-resolution coverage. Merge readinessKeep open for routine maintainer review: this active, maintainer-labeled test follow-up has no blocking defect in its introduced change. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s test wrapper observes Vitest child-process output to distinguish live work from a stalled process. Shared reporter configuration determines whether completed cases emit that observable progress. flowchart LR
A[Test command] --> B[Test wrapper]
B --> C[Vitest child]
C --> D[Reporter output]
D --> E[No-output watchdog]
E --> F[Continue or terminate]
F --> G[CI and developer result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +175. Total +175 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain this focused boundary regression and accept it after the exact-head required checks complete green. Do we have a high-confidence way to reproduce the issue? Not applicable to a current product bug: this is a regression-test follow-up, and the PR body provides an exact-head focused wrapper run. Is this the best way to solve the issue? Yes. Exercising actual Vitest output through the watched-child boundary complements the existing synthetic-watchdog and silent-child coverage without adding a production seam. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4601b0a61805. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Publication and review-preparation evidence for head ec2869a:
The current review lists no actionable code findings and has no separate Landing acceptance and verification for the same head:
Native prepare completed successfully at the unchanged accepted head: review validation and hosted CI/Testbox gates passed, both accepted test-file SHA256 hashes were preserved, and prepare skipped pushing because the remote branch already matched. The native gate artifacts identify the exact target head. No remote lease was acquired. A final required-check read still reports |
|
Merged via squash.
|
Related: #131448 (shared verbose reporter repair)
What Problem This Solves
Adds maintainer-requested executable regression coverage for healthy macOS validation being mistaken for a stalled child. The reported
check-changedinvocation selectedpnpm test:macos:ci; the tooling shard executed new elevation-host fixture subprocesses but produced no successful-case output for 900,000 ms, so the no-output watchdog terminated and retried it. The identical selected suite passed when run with--reporter=verbose.The production repair is already on
mainin the linked PR. Existing coverage resolved reporter configuration and tested watchdogs against synthetic stream activity or silent Node children, but did not connect real Vitest completions to watchdog survival.Why This Change Was Made
The regression runs real Vitest through
spawnWatchedVitestProcess, the shared child boundary used bytest-projectsand the direct wrapper. It inherits the actual tooling reporter policy rather than forcing a reporter on the command line. Real successful cases keep the child alive across multiple watchdog windows; a later silent case must time out, exit 143, and leave no live child or worker.Only the watchdog's captured clock is controlled. File-based synchronization never enters the watched output streams, and native timers are restored immediately after registration. Each fixture module contains one case because Vitest guarantees a task-result flush at module completion; the initial within-file report/release handshake exposed a separate dependency batching edge case and was replaced rather than hidden with retries or longer deadlines. The existing reporter-resolution table now includes the tooling config, retaining GitHub Actions and explicit reporter-override coverage.
No production behavior, reporter policy, watchdog/test timeout, retry policy, assertion, dependency, or live app/Gateway is changed. No heartbeat is used as liveness proof. Production LOC: +0/-0. Tests: +175/-0.
User Impact
No new product-runtime behavior. This protects the existing reporting repair against regression and verifies that preserving real progress does not let genuinely silent children escape termination. This tests-only follow-up was explicitly requested by a maintainer.
Evidence
Local proof on macOS with Node 24.20.0:
node scripts/run-vitest.mjs test/scripts/run-vitest-progress.test.ts test/vitest-reporters-config.test.ts test/scripts/vitest-process-diagnostics.test.ts— 8 tests passed; three sequential worker reruns and an independent final rerun passed. The final run took 26.43 seconds through the wrapper. Active completions survived 2.4 watchdog windows; the later silent child timed out at the controlled 1,000 ms boundary and exited 143.node scripts/run-vitest.mjs test/scripts/run-vitest.test.ts— all 103 wrapper regressions passed.pnpm test:macos:ci— unchanged command, no reporter override: 508 tests in 14 files across 7 shards passed in 1,963.51 seconds. The log contained all 508 case-completion lines, zero no-output terminations, and zero retries. This is the current checkout's macOS selection, not a claim that the original signing branch's additional tests are present here.node scripts/check-changed.mjs -- test/scripts/run-vitest-progress.test.ts test/vitest-reporters-config.test.ts— passed all selected guards, formatting, test-root typechecking, and script lint.git diff --checkpassed. Fresh isolated Codex autoreview completed before commit with no actionable findings at its default P0 threshold.Publication update: the native PR wrapper required a mechanical rebase onto its current trusted main baseline. Both reviewed test-file SHA256 hashes remained identical. At head
ec2869ad759a3cddb18e6c3f007090045a003d81, the same focused command passed 8/8 again in 46.24 seconds and the changed-file gate passed again. Exact-head CI attached successfully. The longer macOS and wrapper-suite results above remain pre-rebase evidence; they were not rerun after this mechanical refresh.The executable regression is POSIX-only; Windows keeps its existing process handling coverage. No UI or product-runtime surface changed, so screenshots are not applicable. The separately reproduced Vitest batching issue is tracked as a follow-up, not patched in this PR.
AI-assisted. The ownership boundary, dependency contracts, regression design, and observed proof were inspected during this maintainer-requested work. No agent transcripts or private host data are included.