Skip to content

fix(scripts): preserve same-version installer smoke candidates - #159490

Merged
steipete merged 1 commit into
mainfrom
deslop/l94-install-smoke-tarball-collision
Sep 27, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/l94-install-smoke-tarball-collision

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Installer smoke could pass without testing the candidate when its version matched the published baseline: both npm packs used the same filename and directory, so the baseline overwrote the candidate.

User Impact

Release maintainers can trust that fresh-install and update smoke paths consume the selected candidate even when the baseline has the same version. No installed-product behavior, CLI options, budgets, or publication behavior changes.

Why This Change Was Made

Pack the baseline in a dedicated subdirectory and prefix its served URL only after the existing opaque npm-filename validation. Candidate packaging, artifact guards, audit output and installer paths retain their existing owners.

This defect was found while validating #159199. The regression executes the full shell wrapper with synthetic npm and Docker edges, downloads its actual HTTP-served bytes, and verifies that fresh/update receive the candidate while baseline receives the published package. It synchronizes on listener readiness without adding test sleeps or polling.

Evidence

On Blacksmith Testbox tbx_01m3grs2shvceyfbz31z6xqfvs, the regression fails on original source because fresh/update receive baseline bytes, then passes with the fix. All 122 installer-smoke tests pass (15.448s wall with pnpm test test/scripts/test-install-sh-docker.test.ts --maxWorkers=1; new case 0.580s), and all five candidate-payload tests pass (2.139s).

node scripts/check-changed.mjs --base 168ebc5b67080909f825858d16308a94278c5342 --timed passed in 247.179s; pnpm check:workflows passed in 20.571s. Independent Codex review is scoped-clean through P2. No boundary import changes.

pnpm build passed in 395.700s; canonical package construction and tarball integrity passed in 58.927s. Exact-head hosted CI passed for cd0e4c56fba07a82606c6d31e5eb986cb49f4c5c, including openclaw/ci-gate; its full 122-test installer file took 16.652s. ClawSweeper found no code/security defect and marked this head ready for maintainer review.

Real artifact proof and separate Node shutdown failure

The real same-version smoke proved distinct HTTP delivery: the 99,025,905-byte candidate matched the canonical artifact SHA-256 ae31c83e174b0b495b01353c6ac6c446824465f0fe2960294a35a2f0bcec99fb; the 95,336,387-byte baseline matched npm's published SHA-512 integrity. URLs were /openclaw-2026.9.6.tgz and /baseline/openclaw-2026.9.6.tgz. Fresh candidate installation, CLI/AI-runtime checks, the published updater's package swap, and updated-version verification passed.

The complete smoke did not pass: it reached the unchanged 2,700s command limit at post-update openclaw --help and exited 137 (2,768.520s total). Native debugging isolated a Node 24.20.0 shutdown deadlock, after JavaScript requested process exit:

main: DefaultProcessExitHandlerInternal
      -> NodePlatform::Shutdown
      -> WorkerThreadsTaskRunner::Shutdown
      -> uv_thread_join
V8 compiler workers: CollectionBarrier::AwaitCollectionBackground
                     -> HeapAllocator::AllocateRawWithRetryOrFailSlowPath

This is the upstream Node shutdown deadlock already documented by docs/reference/test/local.md and mitigated in the existing test-only Node argument owner. The stalled process had no active package/SQLite descriptors or child processes. This PR changes only archive isolation, not Node execution or CLI shutdown. Its boundary regression, file suites, changed checks, build, exact-head CI, and reviews are green; the failed extended smoke is retained as a separate runtime limitation, not claimed as passing proof. No retries, weakened assertions, larger timeout, new Node flags, or runtime-version changes were applied. Runtime mitigation outside this fix needs a separate maintainer decision.

Proof provider: Blacksmith Testbox, lease tbx_01m3grs2shvceyfbz31z6xqfvs, lease workflow. The wrapper returned exit 1 for the extended smoke, with all preceding gates recorded separately. This PR is ready for maintainer landing under the repository's bounded test-failure policy; no merge requested.

@clawsweeper

clawsweeper Bot commented Sep 27, 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 docker Docker and sandbox tooling size: S labels Sep 27, 2026
@steipete
steipete marked this pull request as ready for review September 27, 2026 06:50
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 4:00 AM ET / 08:00 UTC (Revision 2).

ClawSweeper review

What this changes

The branch packs the published installer-smoke baseline separately and tests that fresh-install and update URLs serve candidate bytes when both packages have the same version.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for normal maintainer review. Current main still has the same-version archive collision, while the proposed fix has direct boundary coverage and no actionable review finding. The linked script refactor does not contain this repair.

Priority: P2
Reviewed head: cd0e4c56fba07a82606c6d31e5eb986cb49f4c5c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow owner-level repair has direct byte-delivery coverage, reported real-artifact observations, and passing exact-head CI; the later full-smoke shutdown failure is transparently scoped.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The changed owner is the installer smoke wrapper: the PR body reports distinct candidate and published-baseline bytes fetched through its HTTP URLs on Blacksmith Testbox, followed by successful install/update checkpoints. The full smoke later failed during unchanged Node shutdown; that failure is recorded separately. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The changed owner is the installer smoke wrapper: the PR body reports distinct candidate and published-baseline bytes fetched through its HTTP URLs on Blacksmith Testbox, followed by successful install/update checkpoints. The full smoke later failed during unchanged Node shutdown; that failure is recorded separately. No stored-data contract changes.
Evidence reviewed 8 items Introduced patch: The pinned PR delta moves baseline packing into a subdirectory and prefixes its served path after the existing filename validation; it does not change installer runtime code.
Current-main behavior: Against fetched main, the PR still changes the baseline pack destination from the candidate directory; main therefore retains the reported collision when npm produces the same filename.
Consumer boundary: The wrapper constructs separate baseline and candidate URLs and sends them to the fresh-install and update Docker runs; the release workflow invokes this wrapper with a frozen candidate payload.
Findings None None.
Security None None.

How this fits together

OpenClaw’s installer smoke wrapper prepares candidate and published baseline packages, serves them over HTTP, and passes their URLs to Docker install and update checks. The change affects which archive each check receives, not installed-product behavior.

flowchart LR
  A[Candidate package] --> C[Installer smoke wrapper]
  B[Published baseline] --> C
  C --> D[Separate archive locations]
  D --> E[HTTP package URLs]
  E --> F[Docker install checks]
  F --> G[Smoke results]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +122, Other +4. Total +126 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 122 0 +122
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 1 +4
Total 2 127 1 +126

Review metrics

Metric Value Why it matters
Production and test growth production +4 net lines, tests +122 net lines The added test exercises the wrapper and served bytes for the reported collision without adding another packaging owner.
Regression cost 0.580 s new case; 15.448 s file locally; 16.652 s file in CI The PR records the new boundary check’s cost and the file remains below the repository’s 30-second explanation threshold.

Technical review

Best possible solution:

Keep candidate and baseline archives in separate wrapper-owned locations and verify their identities at the served-URL boundary.

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

Yes. Current main packs same-named candidate and baseline archives into one directory, and the PR reports a before/after wrapper regression; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Separating the baseline at its pack destination fixes the collision at the existing wrapper owner, and the regression checks the bytes delivered through the wrapper’s URLs.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed owner is the installer smoke wrapper: the PR body reports distinct candidate and published-baseline bytes fetched through its HTTP URLs on Blacksmith Testbox, followed by successful install/update checkpoints. The full smoke later failed during unchanged Node shutdown; that failure is recorded separately. No stored-data contract changes.

Label justifications:

  • P2: This is a bounded release-validation correctness fix with no reported installed-product regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The changed owner is the installer smoke wrapper: the PR body reports distinct candidate and published-baseline bytes fetched through its HTTP URLs on Blacksmith Testbox, followed by successful install/update checkpoints. The full smoke later failed during unchanged Node shutdown; that failure is recorded separately. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed owner is the installer smoke wrapper: the PR body reports distinct candidate and published-baseline bytes fetched through its HTTP URLs on Blacksmith Testbox, followed by successful install/update checkpoints. The full smoke later failed during unchanged Node shutdown; that failure is recorded separately. No stored-data contract changes.

Evidence

What I checked:

  • Introduced patch: The pinned PR delta moves baseline packing into a subdirectory and prefixes its served path after the existing filename validation; it does not change installer runtime code. (scripts/test-install-sh-docker.sh:474, cd0e4c56fba0)
  • Current-main behavior: Against fetched main, the PR still changes the baseline pack destination from the candidate directory; main therefore retains the reported collision when npm produces the same filename. (scripts/test-install-sh-docker.sh:473, 9ae6e1853062)
  • Consumer boundary: The wrapper constructs separate baseline and candidate URLs and sends them to the fresh-install and update Docker runs; the release workflow invokes this wrapper with a frozen candidate payload. (scripts/test-install-sh-docker.sh:525, cd0e4c56fba0)
  • Regression coverage: The new test runs the shell wrapper with synthetic npm and Docker edges, fetches bytes through its HTTP URLs, and distinguishes fresh/update candidate bytes from published baseline bytes. (test/scripts/test-install-sh-docker.test.ts:765, cd0e4c56fba0)
  • Real artifact observations: The captured PR body reports distinct HTTP URLs, a 99,025,905-byte candidate matching the canonical SHA-256, a 95,336,387-byte published baseline matching npm integrity, and completed install/update checkpoints. It expressly records that the later full smoke failed at post-update CLI shutdown.
  • Shutdown failure context: Repository test documentation describes the Node 24 shutdown deadlock and its separate test-process mitigation; the PR does not alter that runtime path. Public docs: docs/reference/test/local.md. (docs/reference/test/local.md:119, cd0e4c56fba0)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: 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 (1 earlier review cycle)
  • reviewed 2026-09-27T06:57:30.850Z sha cd0e4c5 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 27, 2026
@steipete
steipete merged commit 4ed8936 into main Sep 27, 2026
168 of 169 checks passed
@steipete
steipete deleted the deslop/l94-install-smoke-tarball-collision branch September 27, 2026 08:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling 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