Skip to content

fix: repair js release pipeline for monorepo layout#117

Merged
konard merged 2 commits intomainfrom
issue-116-01c61894edbd
May 3, 2026
Merged

fix: repair js release pipeline for monorepo layout#117
konard merged 2 commits intomainfrom
issue-116-01c61894edbd

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented May 3, 2026

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.mjs still had two template
placeholder values that were never adapted to this monorepo:

const PACKAGE_NAME = 'my-package';
const CHANGESET_DIR = '.changeset';

The workflow runs the script from the repo root, so '.changeset' resolved
to a path that doesn't exist (changesets live under js/.changeset/).

What changed

  • scripts/merge-changesets.mjs now accepts --working-dir <dir> (mirroring
    scripts/version-and-commit.mjs) and reads the package name from
    <working-dir>/package.json. It also exports mergeChangesetsIn(dir) so
    it 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.yml invokes the script with --working-dir js.
  • Both JS create-github-release.mjs calls in .github/workflows/js.yml
    (auto-release and instant-release) now also pass
    --badge-type "npm" --package-name "start-command", so JS GitHub Releases
    include the exact-version npm badge alongside the existing Rust crates badge.
  • Added js/test/merge-changesets.mjs covering 0/1/N changesets, bump-type
    precedence (major > minor > patch), arbitrary package names, and the
    missing-.changeset error path.
  • Added a case study under docs/case-studies/issue-116/ (README, requirements,
    timeline, root cause, solutions, plus the failed run's log excerpt).

Verification of release shape

Language Tag Title Badge Source
JS js-v<version> [JavaScript] <ver> npm exact releaseTag/releaseName in scripts/release-name.mjs (existing); badge args added to .github/workflows/js.yml.
Rust rust-v<version> [Rust] <ver> crates.io exact Already in .github/workflows/rust.yml from #115; verified unchanged.

Existing tests in js/test/release-name.mjs already cover the tag/title
helpers for both languages.

Test plan

  • bun run test (612 tests pass, including the new 6 in js/test/merge-changesets.mjs)
  • bun run lint / bun run format:check / bun run check:file-size
  • CLI smoke test: node scripts/merge-changesets.mjs --working-dir <tmp> merges two changesets with the correct bump type and removes originals.
  • Verified js/.changeset/ is not mutated by running the test suite (regression guard for the import-time main() bug).
  • Confirm the next JS release run picks up js-v<version> tag, [JavaScript] <version> title, and the npm badge in the release body.
  • Confirm Rust release shape is preserved (no Rust workflow changes in this PR).

Closes #116.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #116
@konard konard self-assigned this May 3, 2026
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/.
@konard konard changed the title [WIP] Fix all CI/CD issues fix: repair js release pipeline for monorepo layout May 3, 2026
@konard konard marked this pull request as ready for review May 3, 2026 10:53
@konard
Copy link
Copy Markdown
Member Author

konard commented May 3, 2026

Working session summary

The PR is ready: all 23 CI checks pass on #117.


This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 3, 2026

🤖 Solution Draft Log

This 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)

  1. 116.0K / 1M (12%) input tokens, 10.8K / 128K (8%) output tokens
  2. 108.1K / 1M (11%) input tokens, 30.3K / 128K (24%) output tokens

Total: (2.0K new + 208.4K cache writes + 10.8M cache reads) input tokens, 46.3K output tokens, $7.851033 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.7 (claude-opus-4-7)

📎 Log file uploaded as Gist (3553KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 3, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 7a6d8b9 into main May 3, 2026
23 checks passed
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.

Fix all CI/CD issues

1 participant