Skip to content

fix(ci): keep fork embedded-agent shard alive on cold runners - #115035

Merged
steipete merged 2 commits into
openclaw:mainfrom
steipete:codex/fix-fork-embedded-shard-stall
Jul 28, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
steipete:codex/fix-fork-embedded-shard-stall

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #114777

What Problem This Solves

Fixes an issue where every fork pull request that falls back to the compact full Node matrix can fail checks-node-compact-large-2 on GitHub-hosted ubuntu-24.04. The agentic-agents-embedded project produces no reporter output while its first 157-test file runs, so cold four-core runners can cross the global 300-second no-output watchdog and exit 143 even though Vitest is still making progress.

Why This Change Was Made

The embedded-agent whole-config group now carries a narrowly scoped seven-minute no-output budget and an honest 430-second compact-planner weight, which gives the known long first file enough cold-runner headroom and keeps the group in its own compact job. The same heavyweight file's setup hook now uses the matching seven-minute cap; the first fork proof got past the watchdog and exposed that separate five-minute hook limit. These changes do not widen either timeout for other shards. The PR also folds the fork-harness-safe Bash SHA validation from #114777 because that commit has not landed on main.

The diagnosis compared the last green four-core fork run with two failing fork runs and reproduced the project from a full Linux clone. The last green run was already silent for 269 seconds and completed the full project in 429 seconds; both failing runs reached the 300-second kill twice. A same-host timing bisect became progressively faster as filesystem state warmed and incorrectly pointed at an unrelated UI-only commit, while warmed current main fell from 220 seconds to 133 seconds for the heavyweight file. That rules out an attributable embedded-agent deadlock or deterministic product regression and identifies cold-runner/cache variance around a stale CI threshold.

User Impact

Fork contributors can get a valid CI result again instead of an infrastructure-owned exit 143. There is no product runtime or user-visible behavior change.

Evidence

  • Failure: run 30328377693 / job 90182649954 and run 30331244182 / job 90186821703 both killed agentic-agents-embedded after two 300-second silent attempts.
  • Last green four-core fork baseline: run 30261226113 / job 89964964317 was silent for 269 seconds in run.incomplete-turn.test.ts and finished the project in 428.55 seconds.
  • First fork proof: run 30337828822 passed the former no-output boundary, then exposed the same file's independent beforeAll timeout at 300 seconds. The follow-up aligns that hook with the group budget.
  • Exact-head fork proof: run 30339535472 / job 90211859071 passed on GitHub-hosted 4-vCPU Ubuntu. The first file completed in 311.14 seconds, the embedded project passed 131 files / 2,191 tests in 593.98 seconds, and openclaw/ci-gate was green.
  • Full Testbox/Linux four-core proof: 130 files and 2,188 tests passed in 355.31 seconds through the exact shard runner; Testbox tbx_01kyknt23rz9vp0xj501z7x0y1, run 30334202719.
  • Focused follow-up proof: all 157 heavyweight-file tests passed in 236.83 seconds on fresh Testbox tbx_01kykte8vdabnkcbevcnrhd6g8, run 30339050739.
  • Focused planner/runner/PR-artifact proof: 62 tests passed; targeted formatting clean.
  • pnpm check:changed passed on Testbox tbx_01kykrap8r9a39rqps6gyzqfd7, run 30336707558.
  • Fresh Codex autoreview: no accepted/actionable findings; patch correct at 0.96 confidence.
  • Follow-up Codex autoreview: no accepted/actionable findings; hook-timeout patch correct at 0.99 confidence.
  • Final combined-branch Codex autoreview: no accepted/actionable findings; patch correct at 0.97 confidence.

Rank-up Move Disposition

The optional refresh against current main is intentionally skipped. The branch is conflict-free, and the intervening main commits do not touch these four CI/test-harness files. OpenClaw's landing workflow treats behind-main drift as advisory and validates the actual merge result during prepare-run; retaining the exact patch head also preserves the complete hosted fork proof above.

AI-assisted: yes. I reviewed the implementation and the evidence above.

Rank-up moves

  • Current-main refresh: the head was rebased immediately before exact-head run 30339535472. I am not rewriting the fork branch again for unrelated, conflict-free behind-main drift; repo-native prepare and the App-owned strict test-merge gate validate the current merge result before landing.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete steipete self-assigned this Jul 28, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 3:48 AM ET / 07:48 UTC.

ClawSweeper review

What this changes

The PR extends the embedded-agent compact shard’s no-output and setup budgets for cold runners, increases its scheduling estimate so it stays isolated, and validates fork PR artifact SHAs with Bash rather than requiring ripgrep.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This is a focused, evidence-backed CI reliability fix with no blocking correctness finding. Keep it open for the assigned maintainer’s normal merge decision: the affected checks-node-compact-large-2 run has passed, while the branch is behind current main and remaining required checks should complete against a refreshed merge result.

Priority: P2
Reviewed head: b4b53139d1179f9291e37735cf2189f39470055a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is narrowly scoped and backed by direct affected-path CI evidence; remaining confidence work is the normal refreshed-base and full-matrix completion, not a contributor proof gap.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides after-fix real CI-path evidence: the formerly affected compact shard passed, a four-core Linux/Testbox shard run completed, and a fresh focused run completed all 157 heavyweight-file tests. Evidence should remain redacted if copied into further discussion.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides after-fix real CI-path evidence: the formerly affected compact shard passed, a four-core Linux/Testbox shard run completed, and a fresh focused run completed all 157 heavyweight-file tests. Evidence should remain redacted if copied into further discussion.
Evidence reviewed 5 items Scoped CI plan change: The branch gives only the embedded-agent group a 420-second no-output budget and raises its compact-planner estimate to 430 seconds; the adjacent test asserts that this group remains alone in its compact job and retains the configured environment.
Harness timeout aligns with shard budget: The second branch commit changes the heavyweight embedded-agent harness beforeAll timeout from 300 seconds to the same 420-second cold-runner allowance, addressing the independent timeout exposed after the watchdog change.
Real affected-path proof: The PR body records two prior fork failures at the 300-second silent-output watchdog, a green baseline that took about 429 seconds, and after-fix Linux/Testbox plus focused 157-test evidence. The provided current check state also shows checks-node-compact-large-2 succeeding at the new head.
Findings None None.
Security None None.

How this fits together

The compact CI planner groups Node test configurations into GitHub Actions jobs using runtime estimates and per-group environment settings. The embedded-agent suite is one unusually long serial test group; its watchdog and harness setup limits determine whether fork CI records progress or exits early.

flowchart LR
  A[Fork pull request] --> B[Compact CI planner]
  B --> C[Embedded-agent test group]
  C --> D[No-output watchdog]
  C --> E[Harness setup]
  D --> F[GitHub check result]
  E --> F
  A --> G[Review artifact metadata]
  G --> F
Loading

Before merge

  • Resolve merge risk (P1) - The changed 420-second watchdog intentionally delays failure reporting by up to two minutes for a genuine silent hang in this one test group; the isolation test and affected-job pass reduce, but do not eliminate, CI-packing and detection-latency risk.
  • Resolve merge risk (P1) - The branch is behind current main; refresh the merge result and let the remaining required checks finish before landing rather than assuming stale-base drift removes current-main behavior.
  • Complete next step (P2) - The remaining action is the assigned maintainer’s normal merge decision after current-main refresh and required-check completion; no narrow automated repair is indicated.
Agent review details

Security

None.

PR surface

Tests +12, Other +11. Total +23 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 13 1 +12
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 13 2 +11
Total 4 26 3 +23

Review metrics

Metric Value Why it matters
Embedded-agent CI budget 1 group changed: no-output 300s to 420s; planner estimate 57s to 430s These two values determine both silent-hang detection latency and whether the heavyweight suite stays isolated in compact fork CI.

Merge-risk options

Maintainer options:

  1. Refresh and merge after CI (recommended)
    Rebase or refresh the merge result, then merge once required checks confirm that the isolated compact shard and the rest of the matrix remain healthy.
  2. Accept the scoped timeout tradeoff
    Accept that a real silent embedded-agent hang will be reported later, in exchange for avoiding false 300-second kills on cold fork runners.

Technical review

Best possible solution:

Land the narrow group-specific timeout and scheduling adjustment after rebasing or refreshing the merge result and confirming the remaining CI matrix; retain the isolation assertion so future planner changes cannot combine this cold-runner-heavy group with other work.

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

Yes, from the supplied evidence and source diff: run the embedded-agent compact shard on a cold four-core fork-style runner and observe the prior 300-second no-output termination; the PR’s after-fix run and focused shard proof demonstrate the intended recovery path.

Is this the best way to solve the issue?

Yes. The patch fixes the failure at its two independent limits—the group watchdog and the heavyweight setup hook—while keeping the longer allowance and higher duration estimate confined to the one demonstrated cold-runner-heavy group.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs an important contributor CI workflow without changing product runtime behavior or constituting an emergency outage.
  • merge-risk: 🚨 automation: The patch changes CI watchdog behavior and compact-job packing, so an incorrect estimate or scope could affect future GitHub Actions execution.
  • 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): The PR body provides after-fix real CI-path evidence: the formerly affected compact shard passed, a four-core Linux/Testbox shard run completed, and a fresh focused run completed all 157 heavyweight-file tests. Evidence should remain redacted if copied into further discussion.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix real CI-path evidence: the formerly affected compact shard passed, a four-core Linux/Testbox shard run completed, and a fresh focused run completed all 157 heavyweight-file tests. Evidence should remain redacted if copied into further discussion.

Evidence

What I checked:

  • Scoped CI plan change: The branch gives only the embedded-agent group a 420-second no-output budget and raises its compact-planner estimate to 430 seconds; the adjacent test asserts that this group remains alone in its compact job and retains the configured environment. (scripts/lib/ci-node-test-plan.mjs:30, b4b53139d117)
  • Harness timeout aligns with shard budget: The second branch commit changes the heavyweight embedded-agent harness beforeAll timeout from 300 seconds to the same 420-second cold-runner allowance, addressing the independent timeout exposed after the watchdog change. (src/agents/embedded-agent-runner/run.incomplete-turn.test.ts:53, b4b53139d117)
  • Real affected-path proof: The PR body records two prior fork failures at the 300-second silent-output watchdog, a green baseline that took about 429 seconds, and after-fix Linux/Testbox plus focused 157-test evidence. The provided current check state also shows checks-node-compact-large-2 succeeding at the new head. (scripts/lib/ci-node-test-plan.mjs:1190, b4b53139d117)
  • Fork harness dependency removal: The Bash regex guard replaces a ripgrep invocation in the fork review-artifact setup path, so a runner without rg no longer turns a valid 40-character SHA into an exit-127 identity failure. (scripts/pr-lib/review.sh:160, b4b53139d117)
  • Prior review continuity: The previous ClawSweeper cycle at 53c023288aedabdb155eb8b0692f7caef023f54f had no findings; the follow-up commit is limited to aligning the harness hook timeout with the already-reviewed cold-runner budget. (src/agents/embedded-agent-runner/run.incomplete-turn.test.ts:68, b4b53139d117)

Likely related people:

  • steipete: Authored both commits in this PR, supplied the cold-runner diagnosis and validation evidence, and is assigned to the PR; history access was unavailable for a broader feature-owner attribution. (role: recent CI-area contributor; confidence: medium; commits: cd2fbc3c9bd6, b4b53139d117; files: scripts/lib/ci-node-test-plan.mjs, scripts/pr-lib/review.sh, src/agents/embedded-agent-runner/run.incomplete-turn.test.ts)

Rank-up moves

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

  • Refresh the branch against current main and confirm the remaining required checks complete on the resulting merge candidate.

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 (1 earlier review cycle)
  • reviewed 2026-07-28T07:21:08.812Z sha 53c023288aedabdb155eb8b0692f7caef023f54f :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/fix-fork-embedded-shard-stall branch from 53c0232 to b4b5313 Compare July 28, 2026 07:43
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Jul 28, 2026
@steipete
steipete merged commit 97c19a9 into openclaw:main Jul 28, 2026
139 of 143 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/fix-fork-embedded-shard-stall branch July 28, 2026 08:04
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…aw#115035)

* fix(ci): unstick fork embedded-agent shard

* test(ci): allow cold embedded harness setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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: XS 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