Skip to content

fix(ci): restore compact shard failure annotations - #156119

Merged
steipete merged 1 commit into
mainfrom
ci-burden/ci-a1-annotations
Sep 23, 2026
Merged

steipete merged 1 commit into
mainfrom
ci-burden/ci-a1-annotations

Conversation

@steipete

@steipete steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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.mts prepended [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, and endgroup commands 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's ActionCommand.TryParseV2 confirms why the prefix prevents ingestion.

Live proof: exact-head run 35811790626, compact job/check 107025800809 ran temporary probe head 8987d63ab4808f7fc63f25ee5597845bc715519f. The checks-node-compact-small-40-tail job ran 46 files: 45 passed and one deliberately failed. gh api repos/openclaw/openclaw/check-runs/107025800809/annotations returned the test-file annotation at test/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 fix 9329dac17ac2aa05c6902bd3479cb90e728796d8.

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.ts and test-projects.test.ts passed all 1,750 tests. node scripts/check-changed.mjs passed both typechecks, three dead-export scans, type-aware lint, boundary guards, and formatting. oxfmt --check and git diff --check passed. Branch-mode P2 autoreview is scoped-clean with no actionable findings.

Final PR CI run 35812664859 passed on head 9329dac17ac2aa05c6902bd3479cb90e728796d8, including openclaw/ci-gate. Auto-merge is disabled; this PR remains open for review.

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.
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 11:26 PM ET / September 23, 2026, 03:26 UTC (Revision 3).

ClawSweeper review

What this changes

The 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
Reviewed head: 9329dac17ac2aa05c6902bd3479cb90e728796d8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with strong production-boundary proof and meaningful regression coverage.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): A real compact GitHub Actions job exercised the changed relay with a deliberate Vitest failure, and its check-run API exposes the expected file annotation. The probe and permanent heads have identical production code; only the temporary failing test was removed. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): A real compact GitHub Actions job exercised the changed relay with a deliberate Vitest failure, and its check-run API exposes the expected file annotation. The probe and permanent heads have identical production code; only the temporary failing test was removed. No stored-data contract changes.
Evidence reviewed 8 items Pinned introduced change: The merge-base-to-head patch changes only the output classification in the existing relay and adds a regression through runShardPlans. Buffering, final-line flushing, backpressure, child completion, and exit-code propagation remain intact.
Current main still has the defect: The fetched main revision unconditionally prepends the shard label to every child line, including GitHub reporter commands.
Latest release comparison: The supplied latest release, v2026.9.5, also contains the unconditional-prefix relay; it does not already contain this repair.
Findings None None.
Security None None.

How this fits together

Compact 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +59, Other +3. Total +62 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 59 0 +59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 1 +3
Total 2 63 1 +62

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This restores useful CI failure diagnostics without changing product runtime behavior or test outcomes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): A real compact GitHub Actions job exercised the changed relay with a deliberate Vitest failure, and its check-run API exposes the expected file annotation. The probe and permanent heads have identical production code; only the temporary failing test was removed. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. A real compact GitHub Actions job exercised the changed relay with a deliberate Vitest failure, and its check-run API exposes the expected file annotation. The probe and permanent heads have identical production code; only the temporary failing test was removed. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head patch changes only the output classification in the existing relay and adds a regression through runShardPlans. Buffering, final-line flushing, backpressure, child completion, and exit-code propagation remain intact. (scripts/ci-run-node-test-shard.mts:311, 9329dac17ac2)
  • Current main still has the defect: The fetched main revision unconditionally prepends the shard label to every child line, including GitHub reporter commands. (scripts/ci-run-node-test-shard.mts:311, 6cbf27b004fb)
  • Latest release comparison: The supplied latest release, v2026.9.5, also contains the unconditional-prefix relay; it does not already contain this repair. (scripts/ci-run-node-test-shard.mts, ec9c1a13db89)
  • Authoritative command-parser contract: The PR explicitly depends on GitHub Actions command parsing. Inspection of ActionCommand.TryParseV2 at runner v2.337.0 confirms that the trimmed message must begin with ::; a shard prefix prevents recognition. The tag resolves to the cited dependency commit. (src/Runner.Common/ActionCommand.cs:51, 397b032cbf86)
  • Observed annotation through the production CI boundary: The annotations API for compact check 107025800809 returns the intentional test failure at test/scripts/ci-run-node-test-shard.test.ts:49 with its test title and assertion details. Check metadata binds this observation to probe head 8987d63ab4808f7fc63f25ee5597845bc715519f. The historical check 106749856390 exposes only a generic process-exit annotation. (test/scripts/ci-run-node-test-shard.test.ts:49, 8987d63ab480)
  • Prior blocker resolved and proof remains applicable: GitHub's comparison shows that the probe head differs from the permanent head only by the intentional failing test. The production relay is identical, and the deliberate failure is absent from the reviewed head. This resolves the retained earlier finding without discarding the live proof. (test/scripts/ci-run-node-test-shard.test.ts:48, 9329dac17ac2)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-23T02:53:55.265Z sha 8987d63ab4808f7fc63f25ee5597845bc715519f :: needs real behavior proof before merge. :: [P1] Remove the intentional failing probe before landing
  • reviewed 2026-09-23T03:06:02.070Z sha 9329dac :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the ci-burden/ci-a1-annotations branch from 8987d63 to 9329dac Compare September 23, 2026 03:00
@steipete
steipete marked this pull request as ready for review September 23, 2026 03:01
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. labels Sep 23, 2026
@steipete
steipete enabled auto-merge (squash) September 23, 2026 03:25
@steipete
steipete merged commit f9dc441 into main Sep 23, 2026
214 of 216 checks passed
@steipete
steipete deleted the ci-burden/ci-a1-annotations branch September 23, 2026 03:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
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.
roboclaw-bot added a commit that referenced this pull request Sep 27, 2026
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]>
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

1 participant