Repository navigation
fix(ci): restore compact shard failure annotations - #156119
Conversation
The shard relay labeled every child stdout and stderr line, hiding Vitest workflow commands from the Actions parser. Forward annotation and group commands at column zero while preserving labels on ordinary output. Cover both streams, split commands, escaped payloads, and final partial lines through the shard runner.
|
🦞👀 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 September 22, 2026, 11:26 PM ET / September 23, 2026, 03:26 UTC (Revision 3). ClawSweeper reviewWhat this changesThe CI shard runner preserves GitHub annotation and log-group commands while retaining shard labels on ordinary output, with regression coverage for both child streams. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main. The earlier intentional-failure blocker is resolved, live GitHub annotations demonstrate the repair, and no actionable correctness or security findings remain. Priority: P2 Review scores
Verification
How this fits togetherCompact CI jobs run groups of tests through a shared output relay. That relay feeds GitHub Actions, which interprets workflow commands as file annotations and log groups. flowchart LR
A[Compact CI job] --> B[Test child processes]
B --> C[Shared output relay]
C --> D{Recognized diagnostic command?}
D -->|Yes| E[Preserve command prefix]
D -->|No| F[Add shard label]
E --> G[GitHub annotations and log groups]
F --> H[Labeled job logs]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +59, Other +3. Total +62 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Preserve diagnostic commands in the existing shared relay while keeping ordinary output labeled and retaining the runner-level regression. Do we have a high-confidence way to reproduce the issue? Yes: current main prefixes GitHub reporter commands, and the inspected Actions parser rejects that prefix. Historical annotations corroborate the failure; this read-only review did not run a new current-main reproduction. Is this the best way to solve the issue? Yes: repairing the shared relay addresses both child streams without adding another reporter or configuration path, and live CI proves GitHub ingests the resulting file annotation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6cbf27b004fb. 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 (2 earlier review cycles)
|
8987d63 to
9329dac
Compare
The shard relay labeled every child stdout and stderr line, hiding Vitest workflow commands from the Actions parser. Forward annotation and group commands at column zero while preserving labels on ordinary output. Cover both streams, split commands, escaped payloads, and final partial lines through the shard runner.
Backport f9dc441 (#156119). Preserve whitelisted workflow annotations at column zero while retaining ordinary shard labels, stream handling and child exit status. Reviewed exact head with paired 122-test regression proof, passing related static checks and actual release-head GitHub annotation evidence. Separate failing runtime/setup jobs remain tracked for final qualification. Release inclusion selected under Dallin’s explicit repair authority; no publication implied. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes missing GitHub test-failure annotations from compact Node CI jobs.
User Impact
Maintainers can see failing files on the job/PR and retrieve them through the check-run annotations API. Ordinary shard logs keep their labels. This affects CI diagnostics only.
Why This Change Was Made
The shared stdout/stderr relay in
scripts/ci-run-node-test-shard.mtsprepended[shard:…]to every line, including Vitest's GitHub reporter commands. Actions' v2 parser requires::at the start after trimming whitespace, so those commands became plain log text.The relay now passes
error,warning,notice,group, andendgroupcommands through at column zero. Ordinary output, embedded command text, buffering, and backpressure retain their existing behavior. The regression exercises the shard runner with both child streams, a split command, escaped payload bytes, and an unterminated final line.Evidence
Historical sighting: run 35728945370, job/check 106749856390,
checks-node-compact-small-4. Its saved log emitted[shard:core-runtime-infra-storage-state-hosted-5] ::error file=…/src/agents/worktrees/service.gc.test.ts,…; the annotations API returned only the generic process-exit failure. Runner 2.337.0'sActionCommand.TryParseV2confirms why the prefix prevents ingestion.Live proof: exact-head run 35811790626, compact job/check 107025800809 ran temporary probe head
8987d63ab4808f7fc63f25ee5597845bc715519f. Thechecks-node-compact-small-40-tailjob ran 46 files: 45 passed and one deliberately failed.gh api repos/openclaw/openclaw/check-runs/107025800809/annotationsreturned the test-file annotation attest/scripts/ci-run-node-test-shard.test.ts:49, titled[tooling] test/scripts/ci-run-node-test-shard.test.ts > CI-A1 intentional annotation proof. The file took 2.740s including the temporary assertion. Remaining probe-run jobs were canceled after this completed proof. The temporary commit was dropped; this PR contains only permanent fix9329dac17ac2aa05c6902bd3479cb90e728796d8.The new regression failed on the original relay in both cases (2/2), then passed throughout 20 complete file runs at
OPENCLAW_VITEST_MAX_WORKERS=8(0/20 failing runs, 122 tests each; median wall 3.483s). This proves deterministic annotation loss and repair, not a statistical claim about underlying flakes. The required one-worker cost command,pnpm test test/scripts/ci-run-node-test-shard.test.ts --maxWorkers=1, passed in 3.29s wall / 1.90s Vitest duration.Three Linux replays of the complete canonical compact row passed: 46 files, 1,136 passing tests, three existing skips each. Wall times were 231.247s, 183.100s, and 178.724s; changed-file times were 1.835s, 2.532s, and 1.669s. The tooling config and two-worker policy were retained, and 52 source hashes match the permanent fix. Provider: Blacksmith Testbox, lease
tbx_01m3621x3xyx1592g6pmqzspbc, hydration run 35811160014; lease stopped. Initial dependencies were prepared in the empty transport checkout; no unchanged-lock reinstall, test retries, or timeout changes.Direct runner siblings
run-vitest.test.tsandtest-projects.test.tspassed all 1,750 tests.node scripts/check-changed.mjspassed both typechecks, three dead-export scans, type-aware lint, boundary guards, and formatting.oxfmt --checkandgit diff --checkpassed. Branch-mode P2 autoreview is scoped-clean with no actionable findings.Final PR CI run 35812664859 passed on head
9329dac17ac2aa05c6902bd3479cb90e728796d8, includingopenclaw/ci-gate. Auto-merge is disabled; this PR remains open for review.