Skip to content

fix(release): validate exact prepared npm package sets#102759

Merged
vincentkoc merged 2 commits into
mainfrom
fix/release-package-set-main
Jul 9, 2026
Merged

fix(release): validate exact prepared npm package sets#102759
vincentkoc merged 2 commits into
mainfrom
fix/release-package-set-main

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Closes #102757

What Problem This Solves

Fixes an issue where release managers validating an npm candidate could pass Telegram and Parallels checks against the prepared openclaw tarball while companion packages such as @openclaw/ai were resolved from a different registry artifact set. The candidate registry could also advertise the compressed upstream Content-Length after fetch decoded the response body.

Why This Change Was Made

The npm preflight manifest now records the exact companion tarballs, versions, and SHA-256 digests. Candidate consumers reject duplicate, missing, extra, or mismatched tarballs and install the prepared set through a local npm registry in Docker and all Parallels guest lanes. The registry keeps public npm as an upstream fallback and emits the decoded body length.

This preserves main's existing Bun package-build fix; it forward-ports only the package-set validation and transport hardening proven during v2026.7.1-beta.3.

User Impact

Release candidates are now validated against the same root and companion package bytes intended for publication. A mixed or incomplete artifact set fails closed before publish instead of passing against already-published dependencies.

Evidence

  • Testbox-through-Crabbox tbx_01kx3as3asakb5sz9h9692j6qa (https://github.com/openclaw/openclaw/actions/runs/29015534662)
  • pnpm check:changed passed for all 19 touched release/tooling files
  • pnpm test:serial test/scripts/npm-telegram-live.test.ts test/scripts/package-acceptance-workflow.test.ts test/scripts/parallels-npm-update-smoke.test.ts test/scripts/parallels-smoke-model.test.ts test/scripts/plugins-assertions.test.ts test/scripts/release-candidate-checklist.test.ts
    • 6 test files passed
    • 231 tests passed
  • git diff --check origin/main...HEAD passed
  • Final structured autoreview: no accepted/actionable findings; patch correctness 0.84
  • Final rebase preserved the stable patch id: de7843fc2bf1fc267b3fc30c1892f297561926f8

AI-assisted maintainer change; the implementation and proof were reviewed before push.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: L maintainer Maintainer-authored PR labels Jul 9, 2026
@vincentkoc vincentkoc self-assigned this Jul 9, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 9, 2026 11:43
@vincentkoc
vincentkoc requested a review from a team as a code owner July 9, 2026 11:43
@vincentkoc
vincentkoc force-pushed the fix/release-package-set-main branch from bf32a16 to 127452c Compare July 9, 2026 11:43
Comment thread scripts/e2e/lib/plugins/npm-registry-server.mjs Fixed
@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 8:03 AM ET / 12:03 UTC.

Summary
The PR records and validates exact npm root and companion tarballs across npm preflight, release checklist, Docker Telegram validation, Parallels npm-update smoke, and the local fixture registry.

PR surface: Tests +263, Config +127, Other +400. Total +790 across 19 files.

Reproducibility: yes. Current main records only the root npm tarball in the preflight manifest and passes only that tarball through the checklist/Parallels path, so companion packages can resolve from a different registry set.

Review metrics: 1 noteworthy metric.

  • Release validation surfaces: 1 manifest array added; 2 harness CLI flags added; 4 harness env inputs added. The PR changes the release package-set contract and the operator-facing validation harness, so maintainers should notice the new strict inputs before merge.

Stored data model
Persistent data-model change detected: serialized state: .github/workflows/npm-telegram-beta-e2e.yml, serialized state: .github/workflows/openclaw-npm-release.yml, serialized state: scripts/e2e/lib/plugins/npm-registry-server.mjs, serialized state: scripts/e2e/npm-telegram-live-docker.sh, vector/embedding metadata: .github/workflows/npm-telegram-beta-e2e.yml, vector/embedding metadata: scripts/release-candidate-checklist.mjs, and 2 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #102757
Summary: The linked issue is the canonical bug report for the same mixed npm package-set release validation gap, and this PR is the open fix candidate.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Have release/security owners clear or address the fixture-proxy CodeQL SSRF comment before merge.

Risk before merge

  • [P1] Release-candidate consumers now fail closed on preflight artifacts without dependencyTarballs, so release managers may need to regenerate older preflight artifacts with the updated workflow instead of reusing them.
  • [P1] GitHub Advanced Security left an SSRF review comment on the fixture proxy fetch; source review bounds it to a harness-controlled upstream host, but the code-scanning alert still needs owner disposition before merge.

Maintainer options:

  1. Accept fail-closed release validation (recommended)
    Proceed with the stricter package-set contract and require release managers to regenerate mismatched or old preflight artifacts.
  2. Preserve old artifact reuse
    Add a narrow compatibility path or operator message for preflight artifacts that predate dependencyTarballs if that workflow still matters.
  3. Pause for owner sign-off
    Wait for release/security owners to resolve the CodeQL alert and operational strictness before landing.

Next step before merge

  • [P1] Manual review is appropriate because this maintainer PR intentionally changes fail-closed release automation and has a GitHub Advanced Security comment to disposition; no narrow automated repair is identified.

Maintainer decision needed

  • Question: Should this fail-closed release package-set contract land now, including rejecting old npm preflight manifests without dependencyTarballs and treating the fixture-proxy SSRF alert as bounded?
  • Rationale: This changes release automation behavior and introduces a local registry proxy; the code path looks correct, but the operational strictness and security-alert disposition belong to release/security owners.
  • Likely owner: vincentkoc — He authored the current fix and has recent release-tooling history on the affected workflow set.
  • Options:
    • Accept strict package-set validation (recommended): Land the PR with the fail-closed manifest contract and clear the CodeQL comment as a bounded release-harness fixture if security agrees.
    • Add legacy artifact compatibility: Require a narrow compatibility path for old preflight artifacts before merge if release managers still need to reuse them.
    • Pause for release/security review: Hold the PR until release managers and security owners explicitly decide the manifest strictness and proxy behavior.

Security
Cleared: No concrete production security issue was found; the CodeQL SSRF comment is on a release/test fixture proxy whose upstream host is harness-controlled and whose request path cannot select arbitrary hosts.

Review details

Best possible solution:

Keep the exact package-set contract and merge after release/security owners accept the strict manifest requirement and clear or address the fixture-proxy CodeQL comment.

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

Yes. Current main records only the root npm tarball in the preflight manifest and passes only that tarball through the checklist/Parallels path, so companion packages can resolve from a different registry set.

Is this the best way to solve the issue?

Yes, with owner sign-off on strictness. The PR fixes both the producer and every checked consumer path, which is the right release-boundary solution; the remaining question is operational/security acceptance, not a better code location.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P2: This is a release-integrity bug fix for maintainer validation tooling with limited direct runtime blast radius.
  • add merge-risk: 🚨 automation: The diff changes release workflows, release checklist behavior, Docker Telegram package validation, and Parallels smoke install routing, so merge could affect release automation even with ordinary CI green.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Maintainer-authored PR, so the external-contributor real behavior proof gate does not apply; CI/Testbox evidence remains relevant supplemental proof.

Label justifications:

  • P2: This is a release-integrity bug fix for maintainer validation tooling with limited direct runtime blast radius.
  • merge-risk: 🚨 automation: The diff changes release workflows, release checklist behavior, Docker Telegram package validation, and Parallels smoke install routing, so merge could affect release automation even with ordinary CI green.
  • 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: Maintainer-authored PR, so the external-contributor real behavior proof gate does not apply; CI/Testbox evidence remains relevant supplemental proof.
Evidence reviewed

PR surface:

Tests +263, Config +127, Other +400. Total +790 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 273 10 +263
Docs 0 0 0 0
Config 2 135 8 +127
Generated 0 0 0 0
Other 11 425 25 +400
Total 19 833 43 +790

What I checked:

  • Repository policy read: Read the full root AGENTS.md plus scripts/AGENTS.md and test/AGENTS.md; release-tooling compatibility, security, and proof guidance shaped this review. (AGENTS.md:1, c9b3358d43f7)
  • Linked canonical issue: The linked issue describes the same bug: release candidate checks can validate the prepared openclaw tarball while companion packages resolve from another registry artifact set.
  • Current main behavior: Current main's npm preflight manifest records only the root tarball metadata, and the release checklist passes only that root tarball to Parallels, which leaves companion tarballs unbound. (.github/workflows/openclaw-npm-release.yml:409, c9b3358d43f7)
  • Manifest producer fix: The PR requires exactly one @openclaw/ai tarball, verifies its version matches openclaw, copies that exact tarball, and writes dependencyTarballs metadata with SHA-256 digest. (.github/workflows/openclaw-npm-release.yml:399, 127452cf4fd0)
  • Release checklist consumer fix: The PR validates dependencyTarballs metadata, checks dependency tarball existence and digest, and passes those paths to the Parallels npm-update smoke command. (scripts/release-candidate-checklist.mjs:647, 127452cf4fd0)
  • Parallels package-set install path: The PR starts a local npm registry when dependency tarballs are provided, serves openclaw plus companion packages, routes fresh installs and updates through that registry, and validates dependency package names/versions against the root tarball dependencies. (scripts/e2e/parallels/npm-update-smoke.ts:812, 127452cf4fd0)

Likely related people:

  • vincentkoc: Recent history shows release tooling work in commit e085fa1, and this PR is also authored and assigned to him. (role: recent release-tooling contributor; confidence: high; commits: e085fa1a3ffd, 127452cf4fd0; files: .github/workflows/openclaw-npm-release.yml, scripts/release-candidate-checklist.mjs, scripts/e2e/parallels/npm-update-smoke.ts)
  • Peter Steinberger: Recent release/preflight workflow commits by this author touch the same npm release validation area. (role: frequent adjacent release-tooling contributor; confidence: medium; commits: 664680318eea, f3d73628ad6f, b27918007ad2; files: .github/workflows/openclaw-npm-release.yml)
  • Onur Solmaz: Release workflow history includes release checks and npm workflow restructuring commits by this author. (role: adjacent release-workflow contributor; confidence: medium; commits: 01c1fc797f87, cdcdb4bb93c0, 27b14124d0fb; files: .github/workflows/openclaw-npm-release.yml, scripts/release-candidate-checklist.mjs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added 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 9, 2026
Forward-port the beta3 package-set preflight, Telegram, and Parallels validation to main while preserving main's existing Bun install smoke. Recompute decoded proxy response lengths and require artifact tarballs to exactly match the verified manifest.
@vincentkoc
vincentkoc force-pushed the fix/release-package-set-main branch from 127452c to 8f8e51c Compare July 9, 2026 12:10
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof for exact head 8f8e51c7ad20b99e2a23261d280de28f01e59914.

  • Before/after: an absolute-form target such as http://registry.invalid//127.0.0.1:<port>/probe could be reinterpreted as a network-reference URL. The regression now requires a 502 refusal with zero hits on both the configured and escape servers, while /pkg?x=1 still reaches the configured upstream unchanged.
  • Testbox-through-Crabbox tbx_01kx3as3asakb5sz9h9692j6qa: focused registry fixture suite 27/27; six release/tooling suites 232/232; scoped pnpm check:changed -- <19 PR files> passed.
  • Hosted exact-head gates: CI, CodeQL, Blacksmith Testbox, Build Artifacts, and ARM Testbox all passed. CodeQL's network-ssrf-boundary job is green.
  • Final Codex autoreview: clean, no accepted/actionable findings, confidence 0.86.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 102759: passed with matching prep and PR head SHAs.

Known proof gap: this forward-port did not duplicate the live Telegram and Parallels release matrix; those scenarios remain owned by the release workflows. No local or hosted blocker remains for this PR.

@vincentkoc
vincentkoc merged commit 0535679 into main Jul 9, 2026
94 of 96 checks passed
@vincentkoc
vincentkoc deleted the fix/release-package-set-main branch July 9, 2026 12:19
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 10, 2026
* fix(release): validate prepared npm package sets

Forward-port the beta3 package-set preflight, Telegram, and Parallels validation to main while preserving main's existing Bun install smoke. Recompute decoded proxy response lengths and require artifact tarballs to exactly match the verified manifest.

* fix(release): lock fixture registry proxy origin
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
* fix(release): validate prepared npm package sets

Forward-port the beta3 package-set preflight, Telegram, and Parallels validation to main while preserving main's existing Bun install smoke. Recompute decoded proxy response lengths and require artifact tarballs to exactly match the verified manifest.

* fix(release): lock fixture registry proxy origin

(cherry picked from commit 0535679)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox 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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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.

[Bug]: Release candidate checks can validate a mixed npm package set

2 participants