Skip to content

fix: prevent release-check from hanging on prepared tarballs - #154567

Merged
steipete merged 1 commit into
mainfrom
ci-burden/f52-release-check-timeout
Sep 21, 2026
Merged

steipete merged 1 commit into
mainfrom
ci-burden/f52-release-check-timeout

Conversation

@steipete

@steipete steipete commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes release-check hanging while inspecting an already prepared tarball on small Linux CI runners.

User Impact

Release validation reads the prepared artifact without starting an unnecessary npm process. Package-content, unpacked-size, worker, and gateway checks remain intact; there is no public contract change.

Why This Change Was Made

The captured blocked call was inspectPackedTarball → execNpm → runReleaseCheckCommand → execFileSync(node, [npm-cli.js, "pack", tarball, "--dry-run", "--json", "--ignore-scripts", "--offline"]). On Node 24.19.0 with 2 CPUs and 8,220,487,680 bytes RAM, release-check waited in epoll_pwait while npm's main thread futex-waited for its remaining V8 worker. The parent esbuild service was still responding. No native userspace GC stack was captured, so this does not claim a particular V8 frame.

The release-check owner now collects paths and unpacked size during its existing strict tar extraction, using npm's own entry-path and size rules. The retained CLI fixture rejects the removed inventory subprocess and still asserts the missing worker artifact. No timeout increase, retry, or weakened assertion.

The branch preserves the merged #154335 worker/gateway matrix, #154345 outer-child shutdown-policy assertions, and #154506 canonical source packer and new packing test. Outer-child command-line flags do not propagate to the npm grandchild captured here; eliminating that unnecessary child fixes the remaining boundary.

Evidence

Current head: 1d00fe5d32495ca6c1257f9f0b5fc6d717781098.

  • 20/20 paired replays: the full 31-file target shard and 32-file neighbour ran concurrently at the CI two-worker limit, in the captured file order. Each pair completed 1,614 passing tests and three existing skips. Ten complete pairs ran on each of two identically sized Linux Testboxes; no test was interrupted. The temporary ordering override was removed before standalone proof.
  • 20/20 standalone runs with OPENCLAW_VITEST_MAX_WORKERS=8. Across paired runs, the sparse CLI case took 2.08–4.26 seconds, median 2.89 seconds.
  • The regression fails on the original implementation with Prepared tarball inspection must not launch npm pack, naming the removed call chain, and passes with the fix.
  • Four sibling files passed: 115 tests, covering release-check policy, CLI bootstrap imports, the command fixture, and archive downloads.
  • pnpm test test/scripts/release-check.test.ts --maxWorkers=1: 9.90 seconds wall, 8.61 seconds reported by Vitest, 16 tests, including main's new source-packing test.
  • node scripts/check-changed.mjs, direct type-aware lint for both files with a failing floating-Promise canary, oxfmt --check, and git diff --check passed on the rebased source. Linux check-changed also passed in 551 seconds. P2 autoreview is clean.
  • Current-head CI passed.

Both proof leases used Node 24.19.0, 2 CPUs and 8,220,487,680 bytes RAM. Candidate source hashes matched the published head. Provisioning runs: rounds 1–10, lease tbx_01m31e6tnxmkzvhvm7yhvhtem5; rounds 11–20 and standalone proof, lease tbx_01m31fkqsy499zg49fkecdkmcq. The scratch sizing workflow is outside this PR.

An earlier candidate also passed 20 paired and 20 standalone runs. Main then changed the adjacent source-packing path, so the conflict was resolved preserving that owner and the complete campaign was repeated on the rebased source. Two initial replay-harness startup errors ran no tests and were corrected before the campaigns. No failed test was retried.

Sightings:

All three already contained the F45 fixture repair. Their tooling config was file-serial with a two-worker limit. The matching-class baseline failed once in four paired attempts; the captured timeout was 120056 ms. The repaired current-head campaign had zero failures in 20 paired attempts.

@clawsweeper

clawsweeper Bot commented Sep 21, 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: XS maintainer Maintainer-authored PR labels Sep 21, 2026
@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 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 21, 2026, 3:47 AM ET / 07:47 UTC (Revision 2).

ClawSweeper review

What this changes

Release validation collects archive paths and unpacked size during extraction, removing an extra npm subprocess and guarding against its return in the existing CLI fixture.

Merge readiness

⛔ Blocked before merge - 1 item remains

This focused fix remains necessary on current main. No actionable correctness or security defects were found, and the previous conflict and draft concerns are resolved.

Priority: P2
Reviewed head: 1d00fe5d32495ca6c1257f9f0b5fc6d717781098

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with a meaningful boundary regression and no actionable findings; reported earlier-head qualification remains clearly identified.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER association exempts this internal tooling repair from the external-contributor proof gate. Reported Linux CLI campaigns support the unchanged prepared-tarball path at the earlier head; integrated qualification is still running and was not represented as complete.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER association exempts this internal tooling repair from the external-contributor proof gate. Reported Linux CLI campaigns support the unchanged prepared-tarball path at the earlier head; integrated qualification is still running and was not represented as complete.
Evidence reviewed 10 items Introduced change and retained validation: The pinned introduced diff removes only prepared-tarball npm inspection and collects its two consumed inventory fields during existing extraction. Strict extraction, path protection, package identity checks, downstream validation, and cleanup remain intact.
Still necessary on main: Fetched main still calls inspectPackedTarball before extraction, including npm pack with --dry-run and --offline. The merged fixture changes do not eliminate this subprocess.
Latest release comparison: The supplied latest release, v2026.9.5, also retains npm-based prepared-tarball inspection. Its unavailable local blob was inspected through the GitHub contents API.
Findings None None.
Security None None.

How this fits together

Release-check validates prepared OpenClaw packages before publication. Archive contents feed package, size, worker, and runtime checks that determine whether validation succeeds.

flowchart TD
  A[Prepared package archive] --> C[Strict archive extraction]
  B[Source package builder] --> C
  C --> D[File inventory and unpacked size]
  C --> E[Extracted package]
  D --> F[Package validation]
  E --> F
  F --> G[Success or diagnostic failure]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Tests +15, Other +1. Total +16 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 17 2 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 15 14 +1
Total 2 32 16 +16

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: scripts/release-check.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep archive inventory collection in the existing extraction owner while preserving all package validation and source-packing contracts.

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

The blocking subprocess path is verified on current main, and the contributor reports a matching-runner reproduction. This read-only review did not independently reproduce the intermittent hang.

Is this the best way to solve the issue?

Yes. Reusing extraction removes the captured blocking operation while preserving npm's consumed inventory semantics and the existing validation owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 164e18ea9336.

Labels

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P2: This repairs a demonstrated release-tooling hang with a bounded change and no product configuration impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 supplied MEMBER association exempts this internal tooling repair from the external-contributor proof gate. Reported Linux CLI campaigns support the unchanged prepared-tarball path at the earlier head; integrated qualification is still running and was not represented as complete.

Evidence

What I checked:

  • Introduced change and retained validation: The pinned introduced diff removes only prepared-tarball npm inspection and collects its two consumed inventory fields during existing extraction. Strict extraction, path protection, package identity checks, downstream validation, and cleanup remain intact. (scripts/release-check.ts:1355, 1d00fe5d3249)
  • Still necessary on main: Fetched main still calls inspectPackedTarball before extraction, including npm pack with --dry-run and --offline. The merged fixture changes do not eliminate this subprocess. (scripts/release-check.ts:351, 164e18ea9336)
  • Latest release comparison: The supplied latest release, v2026.9.5, also retains npm-based prepared-tarball inspection. Its unavailable local blob was inspected through the GitHub contents API. (scripts/release-check.ts:341, ec9c1a13db89)
  • npm inventory contract: The PR explicitly claims npm-compatible inventory semantics. Installed npm 11.19.0 identifies npm/cli as its repository; getContents sums entry.size and strips the leading package/ from entry.path, matching the replacement. Sorting and additional npm receipt fields are not consumed by this validation path. (lib/utils/tar.js:57)
  • Exact tar dependency contract: OpenClaw pins tar 7.5.22 and directly adds onReadEntry to extraction. That version registers the callback in Parser before Unpack registers its extraction listener, preserving original entry paths for inventory while retaining extraction safeguards. (src/unpack.ts:147, 2a22bfc5d3a4)
  • Regression coverage: The existing sparse CLI fixture intercepts the removed subprocess call and still requires the real checker to reach its missing-worker-artifact diagnostic. It adds no CLI launch, timeout increase, or retry. (test/scripts/release-check.test.ts:188, 1d00fe5d3249)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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 (1 earlier review cycle)
  • reviewed 2026-09-21T07:34:31.666Z sha bfb1c65e3b7a41a06114956951fea3435a407b8a :: blocked before merge. :: none

@steipete
steipete force-pushed the ci-burden/f52-release-check-timeout branch from bfb1c65 to 1d00fe5 Compare September 21, 2026 07:37
@steipete
steipete marked this pull request as ready for review September 21, 2026 07:40
@steipete
steipete requested a review from a team as a code owner September 21, 2026 07:40
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 21, 2026
@steipete
steipete merged commit 67ac02f into main Sep 21, 2026
131 checks passed
@steipete
steipete deleted the ci-burden/f52-release-check-timeout branch September 21, 2026 09:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
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. 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