Repository navigation
fix(ci): create the pack destination before npm pack in the release workflow - #213
Merged
Merged
Conversation
… workflow publish.yml's build job ran `npm pack --pack-destination "$RUNNER_TEMP/pkg"` without creating `pkg/`, and npm does not create the destination (ENOENT on npm 10.9.7 and 11.20.0). Every Release run would fail at Pack and never reach the publish job. The defect came in with the build/publish split (#201) and was invisible to PR CI, because publish.yml only runs on a published Release. The Pack step now runs `mkdir -p` first. A live test in check-run-pins.test.mjs pins that every workflow's pack destination is either the runner temp root or created earlier in the same job, with a positive control against the live publish.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199owRmYfskqYQVQrVP679o
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
publish.yml'sbuildjob rannpm pack --pack-destination "$RUNNER_TEMP/pkg"without creatingpkg/. npm does not create the destination directory: this fails withENOENTon npm 10.9.7 and 11.20.0 (reproduced locally). So every Release run would have failed at Pack, and thepublishjob would never have run.The bug came in with the build/publish split (#201). PR CI never caught it because
publish.ymlonly runs on a published Release..github/workflows/publish.yml: the Pack step now runsmkdir -p "$RUNNER_TEMP/pkg"beforenpm pack..dev/floor/check-run-pins.test.mjs: new live test. It checks that everynpm pack --pack-destinationdirectory in every workflow is either the runner temp root or created by amkdir -pearlier in the same job. Amkdirin another job runs on a different runner, so it doesn't count. The test also folds together the different spellings of the runner temp dir ($RUNNER_TEMP,${RUNNER_TEMP},${{ runner.temp }}) and ignores quoting. A positive control deletes themkdirline from the livepublish.ymltext and checks that the test flags it.floor.ymlruns this file on every PR.CHANGELOG.md:[Unreleased]→ Fixed..dev/features/publish-pack-destination/: the pharn-dev-ship artifacts (plan, grill, regression and verify reports, review, ship roll-up).This is the first of four fixes from the review of the last 18 commits on
main. The next three will come as separate PRs.Type of change
feat— new stack option, wizard step, or command capabilityfix— bug fixdocs— docs-only changechore/refactor— tooling or internal restructure, no behavior changeArea(s) touched
repo tooling (release workflow + floor test), CHANGELOG
Checklist
.js-extension import convention.publish.ymlpins).docs/change needed.docs/RELEASING.mdalready describes the pack → smoke → upload flow this change makes work.Quality gates
npm run checkpasses locally (format:check+lint+typecheck+test).npm run buildsucceeds.npm run test:coveragepasses (coverage thresholds met).Floor workflow tests: 754/754 passed.
validate.mjs: GREEN. Pharn-dev verdicts: regressno-regressions, verifyPASS, review GREEN (3 minor advisory findings).The sandbox runs as root, so I ran the gates as root with the permission-override capabilities (
CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH,CAP_FOWNER) dropped, and with the proxy variables unset. That matches CI. Under plain root, 4 existingchmod-based tests inupdate.test.tsfail; they fail the same way onmain.Notes for the reviewer
publish.yml; after the change it passes. I checked both.publish.yml. Theupload-artifact/download-artifactSHAs pinned in ci(publish): keep the dev toolchain out of the job that can mint the npm OIDC token (PHARN-07) #201 remain unverified from this environment.🤖 Generated with Claude Code
https://claude.ai/code/session_0199owRmYfskqYQVQrVP679o
Generated by Claude Code