Skip to content

Publish the release tarball as a file path, not a package spec - #35

Merged
jimhoyd merged 1 commit into
mainfrom
claude/tender-gates-13ovkk
Sep 17, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/tender-gates-13ovkk

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Problem and change

The v0.2.0 release run failed at the npm step:

npm error code 128
npm error command git --no-replace-objects ls-remote ssh://[email protected]/candidate/urlcode-0.2.0.tgz.git
npm error [email protected]: Permission denied (publickey).

The token and the variable were both fine. npm read candidate/urlcode-0.2.0.tgz as the GitHub shorthand owner/repo and tried to clone it over SSH. npm parses an argument as a local tarball only when it starts with ./, ../, / or ~/; anything else containing a slash is a package spec. The fix is one prefix:

-npm publish --provenance --access public --ignore-scripts "candidate/urlcode-$VERSION.tgz"
+npm publish --provenance --access public --ignore-scripts "./candidate/urlcode-$VERSION.tgz"

Reproduced outside CI first, both directions:

$ npm publish --dry-run candidate/pkg-0.0.1.tgz
npm error command git ... ls-remote ssh://[email protected]/candidate/pkg-0.0.1.tgz.git   ← the CI failure

$ npm publish --dry-run ./candidate/pkg-0.0.1.tgz
npm notice package: [email protected]                                            ← reads the file

Verification

npm run verify   # 268 tests, 0 fail, 29 skipped

The new test pulls the publish argument out of the workflow and requires a file-path form. I confirmed it covers the real defect rather than a literal string — reverting the fix makes it fail and name the argument:

not ok 6 - the release publishes a tarball path npm reads as a file, not a GitHub repo
  error: 'npm publish argument "candidate/urlcode-$VERSION.tgz" is a package spec, not a file path'

It reads only the command line, never a comment that mentions npm publish — my first attempt matched the id-token: write # ... npm publish --provenance comment and passed vacuously, which is why it asserts exactly one publish command.

Compatibility and security

  • One workflow argument and one test. No runtime, API, YAML or CLI change.
  • Nothing about provenance, signing or the token handling changes.

State this leaves the release in, which is not clean and needs a decision: the gh release create step runs before the npm step and succeeded, so the v0.2.0 GitHub release exists but nothing was published to npm, and the urlcode.rb attached to it points at a registry URL that 404s. Re-running that run will not help: a re-run replays the workflow as it was at the tagged commit, so it would use the unfixed command and then fail on the already-created release. Getting [email protected] onto npm needs either the v0.2.0 tag and release deleted and the tag re-pushed after this merges, or a fresh version. There are also two dead tags, v0.1.1 and v0.1.2, both pointing at the pre-bump commit from earlier failed attempts.

  • Changes match the documented portable contract; docs/examples are updated where needed.
  • Relevant tests and package checks pass, or limitations are explained above.
  • No credentials, customer data or private project material are included.
  • Runtime/starter changes remain aligned where applicable.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WrwFcAcntyBBSk21irvgAV


Generated by Claude Code

The v0.2.0 release failed at the npm step:

  npm error command git --no-replace-objects ls-remote \
    ssh://[email protected]/candidate/urlcode-0.2.0.tgz.git
  npm error [email protected]: Permission denied (publickey).

npm read "candidate/urlcode-0.2.0.tgz" as the GitHub shorthand
owner/repo and tried to clone it. Only a path starting with ./ ../ /
or ~/ is parsed as a local tarball, so the argument is now
"./candidate/urlcode-$VERSION.tgz".

Reproduced outside CI before and after: with the bare path npm attempts
the SSH clone, and with ./ it packs and reports the tarball normally.

A test extracts the publish argument from the workflow and requires a
file-path form. Reverting the fix makes it fail with the offending
argument named, so the guard covers the actual defect rather than the
literal string. It reads only the command, never a comment that
mentions npm publish.

Nothing else in the release changed. The GitHub release for v0.2.0 was
created before this step ran, so v0.2.0 exists on GitHub with no npm
counterpart; getting a package published needs either that tag and
release removed and re-pushed, or a new version.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WrwFcAcntyBBSk21irvgAV

jimhoyd commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

verify (windows-latest, 24) failed on a22c8d8, and it is not this PR's failure. Re-running that job once.

It is a V8 crash, not a failing assertion. All eleven tests in test/sandbox.test.js printed ✔, then the process died in native code:

# Fatal error in , line 0
# Check failed: jit_page_->allocations_.erase(addr) == 1.
 3: v8::internal::ThreadIsolation::UnregisterWasmAllocation+198

That is V8's own internal consistency check failing while unregistering a WASM allocation — the QuickJS-WASM sandbox being torn down. Node exits non-zero, so node --test reports the whole file as failed with a bare 'test failed' and no assertion to point at.

Why it is not this change. The diff is one string in .github/workflows/release.yml and one test that reads that file. Nothing here touches WASM, worker threads or the sandbox. The evidence:

  • GitHub queued two runs for this same commit (push and pull_request). verify (windows-latest, 24) crashed in one and passed in the other — byte-identical code, same OS, same Node. Nondeterministic by construction.
  • main at bf3ecbd, the exact base of this branch, passed CI with all Windows legs green.
  • In this PR, windows-latest, 26 and every Ubuntu and macOS leg passed.

No fix is being ported, because there is nothing here to fix: the crash is below the JavaScript layer. test/sandbox.test.js is not being skipped, quarantined or weakened — it is the security boundary and the last thing that should be softened for convenience.

Worth separating from this PR: a V8 Check failed in WASM teardown is real platform fragility, not just CI noise. If it recurs it deserves its own investigation — plausibly a Node/V8 bug to report upstream, plausibly something about how the function pool disposes isolates on Windows. Tracking that is not this PR's job, but it should not be forgotten either.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants