Repository navigation
Description
Problem
The v0.5.1 trusted-publishing run successfully published the workflow-validated tarball with provenance, but publish-or-verify.mjs exhausted all 13 registry retries because npm view transiently reported a different dist.integrity. The GitHub Release job was skipped even though publication was good.
This is the residual propagation failure after #73/#74 fixed local re-packing and extended the retry window.
Forensic proof
- Failed run: https://github.com/openclaw/fs-safe/actions/runs/30729002894
- Workflow artifact and current registry tarball are byte-for-byte identical (
cmpclean), both 5,609,950 bytes. - Both have SHA-1
f4dabf3ed706bf08ea7a282750baa4ebf1707b60and integritysha512-WcaG3NUMd4q+puq/I55zxwc0+OjNVhqxSprKzpS17c2cDd9bYc8c2DrYrs6Io3mmNXNa90re/UWSwVkX4I6PkA==. - Extracted inventories match: 417 files, 17,092,354 bytes, with identical paths, modes, sizes, and per-file hashes.
- The publish log reported the same SHA-1 and integrity, then observed stale/different registry metadata until the retry budget expired. Current
npm viewreports the correct integrity and provenance.
Expected
Keep strict artifact identity, but avoid a false-negative when packument metadata is temporarily inconsistent after a successful trusted publish. On an integrity mismatch, consider downloading the versioned registry tarball and verifying its SHA-512 directly before failing, and log the observed integrity to make propagation incidents diagnosable.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Aug 2, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 2, 2026, 2:47 PM ET / 18:47 UTC.
Summary
This issue remains necessary: current
mainstill exhausts its bounded retries and fails whenever npm continues to return a differentdist.integrity, so the GitHub Release job remains blocked even if the actual registry tarball matches. The requested fallback changes the supply-chain evidence accepted by the release gate and needs an explicit maintainer security-boundary decision before implementation.Reproducibility: yes. Current source deterministically treats any persistent
dist.integritymismatch as pending and throws after the configured retry budget; the existing focused test demonstrates only the eventually-convergent variant.Root-cause cluster
Relationship:
canonicalCanonical: #81
Summary: This is the remaining registry-metadata propagation problem after the earlier validated-tarball and retry-window work.
Members:
adjacent_distinct: Release workflow: publish re-packs instead of publishing the validated tarball, and registry verification times out #73 - The closed report covered repacking and retry-window defects; this issue documents the remaining case where metadata stays inconsistent even though the registry tarball itself is identical.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Maintainer decision needed
npm viewstill reports a differentdist.integrity, and which registry-origin and provenance checks must remain mandatory?Why: This is not only a retry policy: it defines which independent evidence can satisfy the project’s trusted-publishing release gate after registry metadata has not converged.
Next step
The behavior is source-proven, but a repair must wait for a maintainer choice about the release integrity and provenance trust boundary.
Security
Needs attention: The proposed fallback changes the evidence accepted by a trusted-publishing release gate and needs explicit security-boundary approval before implementation.
Review details
Best possible solution:
Keep the validated-artifact identity requirement, then add a bounded, tested direct registry-tarball verification fallback only if maintainers define it as acceptable alongside an independently verified provenance signal and audit logging of the conflicting metadata.
Do we have a high-confidence way to reproduce the issue?
Yes. Current source deterministically treats any persistent
dist.integritymismatch as pending and throws after the configured retry budget; the existing focused test demonstrates only the eventually-convergent variant.Is this the best way to solve the issue?
Unclear. Direct tarball hashing is the narrowest technical repair, but a maintainer must first decide whether it is sufficient evidence under this package’s trusted-publishing security model.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 2477f5681f68.
Label changes
Label justifications:
P2: The defect can block GitHub Release publication after a successful npm trusted publish, but it is a bounded release-operation failure rather than a user-data or runtime emergency.impact:other: The concrete impact is release workflow reliability and registry propagation, outside the more specific owned impact categories.Evidence reviewed
Security concerns:
scripts/publish-or-verify.mjs:66A direct tarball fallback must constrain registry origin and redirects, verify the downloaded bytes against the validated manifest, and retain an independently checked provenance condition so inconsistent metadata does not silently weaken the release gate.
Confidence: 0.96
What I checked:
publishOrVerifythrows; there is no direct download-and-hash verification path for the versioned registry tarball. (scripts/publish-or-verify.mjs:66, 2477f5681f68)test/publish-or-verify.test.ts:85, 2477f5681f68)publish-or-verify.mjs, and the GitHub Release job depends on that publish job, so verifier exhaustion prevents release creation. (.github/workflows/release.yml:260, 2477f5681f68)git blameattributes the current verifier lines to the v0.5.1 release commit, which shipped the validated-tarball and bounded-backoff solution but retained the metadata-only final check. (scripts/publish-or-verify.mjs:58, 16e1bd489ae8)v0.5.1tag points to commit16e1bd489ae8a1c0e752797ca1e8501a36790d98, dated 2026-08-01T19:29:39-07:00; current main is descended from that tag and its changelog records bounded registry backoff. (CHANGELOG.md:20, 16e1bd489ae8)CHANGELOG.md:20, 2477f5681f68)Likely related people:
scripts/publish-or-verify.mjs,.github/workflows/release.yml,test/publish-or-verify.test.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon Aug 2, 2026
Fixed on
mainin 8926c33 (#90).The framing in this issue turned out to be backwards, and that changed the fix. The gate was not strong-and-being-loosened: it accepted exactly two packument facts — an integrity string match, and that
dist.attestations.urlwas truthy. The URL was never fetched, no Sigstore bundle was verified, no DSSE subject digest checked,dist.signaturesnever verified against-/npm/v1/keys, anddist.tarballnever downloaded. Hashing the published bytes is therefore strictly stronger evidence than string-comparing a field that describes them.There was also a second gate that would have made a narrow fix useless:
scripts/append-release-proof.mjsrepeated the same comparison inside thereleasejob, without--prefer-onlineand with zero retries. Fixing onlypublish-or-verify.mjswould have moved the v0.5.1 failure downstream rather than curing it. Both gates now share one verifier.What landed:
registry.npmjs.org, rejecting redirects, bounding the response, and constructing the canonical tarball URL rather than following one supplied by the metadata that is itself in question.append-release-proof.mjs, which had no test file.Verified against the really-published
0.5.1, and the observed values match this issue's forensics exactly: 5,609,950 bytes, 417 files, SHA-1f4dabf3ed706bf08ea7a282750baa4ebf1707b60, integritysha512-WcaG3NUMd4q+puq/I55zxwc0+OjNVhqxSprKzpS17c2cDd9bYc8c2DrYrs6Io3mmNXNa90re/UWSwVkX4I6PkA==, registry keySHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U, subjectpkg:npm/%40openclaw/[email protected], workflow refrefs/tags/v0.5.1.Both directions proven: with only
dist.integrityaltered, the old code exhausts all 13 attempts while the new verifier logs the conflict, downloads the real tarball and passes signature and provenance. Flip a single byte and it fails fatally in 6 ms withtarball-integrity-mismatch, no retry — the fallback cannot mask real corruption.[email protected]is a devDependency; the package still ships zero runtime dependencies.Not exercised: an actual publish, tag push, or real draft promotion from a protected release tag. Those only prove out on the next real release.