Under an agent, run every release step but the publish, and hand a person the npm command only for a package that would publish
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Review of 715. - Fix: under an agent, any run with `--publish` was refused whole and exited 0. So `--build --publish` and `--upload --publish` built or uploaded nothing yet reported success. The printed `npm publish` command also skipped the checks a person's `--publish` runs: the staged version, and every file the manifest names. Today that means it handed over a package without dist/pi.js, or one of another version. - `releaseRun` (scripts/lib/release.ts) gives the steps a run takes and the agent markers it hands the publish to. Under an agent, it runs every other step the flags name. `releasePlan` still fails with PublishNeedsAPerson, as the issue's Check asks. Both share one step list (`stepsOf`) and one input type (`ReleaseFlags`). - steps.ts splits the publish step's checks out as `publishable`. scripts/release.ts runs it before printing the command, so an agent's `--publish` needs `--version`, as a person's does, and refuses an incomplete package. `main` takes the env as a parameter; the entry reads process.env once. - Fix: the comment on the import scanner said generated source in strings never starts a line with `import`. dist/bin.js has one: the rules' /bun main template imports ./job.json. The comment now says such a line is read, and that one naming a package fails Unpinned. - Fix: the npm README's start block wrote `claim` without its <ask>. - Tests: two releaseRun cases in packages/config/test/release.test.ts. One checks that an agent's build-upload-publish runs every other step and hands the publish over, while a person's publishes. The other checks that an unknown stage is refused under an agent too. Both were red by assertion against a stub that refused the whole plan. - Checked by hand under CLAUDECODE. `--publish` alone fails with VersionNeeded. `--publish --version 0.1.0` against the 0.0.0 staged package is refused. `--build --publish --version 0.1.0-review.715` builds, then refuses because dist/pi.js is missing (706). With a stand-in pi.js, the run prints the command and exits 0.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+174 added−54 removed
- tests:+52 added−0 removed
- other:+122 added−54 removed