fix: repair js release pipeline for monorepo layout#117
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #116
merge-changesets.mjs no longer reads from a hardcoded .changeset path or hardcoded "my-package" name. It now accepts --working-dir and reads the package name from <working-dir>/package.json, mirroring the existing version-and-commit.mjs pattern. The js.yml workflow now invokes the script with --working-dir js, so it finds js/.changeset and the start-command package. Both create-github-release calls in js.yml also pass --badge-type "npm" --package-name "start-command", adding the exact-version npm badge that was already in the Rust workflow. Adds js/test/merge-changesets.mjs for the merge logic and a case study under docs/case-studies/issue-116/.
Member
Author
Working session summaryThe PR is ready: all 23 CI checks pass on #117. This summary was automatically extracted from the AI working session output. |
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $7.851033📊 Context and tokens usage:Claude Opus 4.7: (2 sub-sessions)
Total: (2.0K new + 208.4K cache writes + 10.8M cache reads) input tokens, 46.3K output tokens, $7.851033 cost 🤖 Models used:
📎 Log file uploaded as Gist (3553KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
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.
Summary
Fixes #116. The JavaScript release pipeline was failing at the
"Merge multiple changesets" step on run 25263794761
with
Error: ENOENT: no such file or directory, scandir '.changeset'.The committed
scripts/merge-changesets.mjsstill had two templateplaceholder values that were never adapted to this monorepo:
The workflow runs the script from the repo root, so
'.changeset'resolvedto a path that doesn't exist (changesets live under
js/.changeset/).What changed
scripts/merge-changesets.mjsnow accepts--working-dir <dir>(mirroringscripts/version-and-commit.mjs) and reads the package name from<working-dir>/package.json. It also exportsmergeChangesetsIn(dir)soit is unit-testable. The direct-invocation guard is hardened so importing
the file from a same-named test file no longer triggers
main()..github/workflows/js.ymlinvokes the script with--working-dir js.create-github-release.mjscalls in.github/workflows/js.yml(auto-release and instant-release) now also pass
--badge-type "npm" --package-name "start-command", so JS GitHub Releasesinclude the exact-version npm badge alongside the existing Rust crates badge.
js/test/merge-changesets.mjscovering 0/1/N changesets, bump-typeprecedence (
major > minor > patch), arbitrary package names, and themissing-
.changeseterror path.docs/case-studies/issue-116/(README, requirements,timeline, root cause, solutions, plus the failed run's log excerpt).
Verification of release shape
js-v<version>[JavaScript] <ver>releaseTag/releaseNameinscripts/release-name.mjs(existing); badge args added to.github/workflows/js.yml.rust-v<version>[Rust] <ver>.github/workflows/rust.ymlfrom #115; verified unchanged.Existing tests in
js/test/release-name.mjsalready cover the tag/titlehelpers for both languages.
Test plan
bun run test(612 tests pass, including the new 6 injs/test/merge-changesets.mjs)bun run lint/bun run format:check/bun run check:file-sizenode scripts/merge-changesets.mjs --working-dir <tmp>merges two changesets with the correct bump type and removes originals.js/.changeset/is not mutated by running the test suite (regression guard for the import-timemain()bug).js-v<version>tag,[JavaScript] <version>title, and the npm badge in the release body.Closes #116.