Skip to content

fix(scripts): release prepare and context budget error cases - #176

Merged
krypton225 merged 1 commit into
mainfrom
fix/release-budget-errors
Oct 24, 2026
Merged

krypton225 merged 1 commit into
mainfrom
fix/release-budget-errors

Conversation

@krypton225

Copy link
Copy Markdown
Member

Summary

  • scripts/release.js prepare: on a release notes error (returned or thrown) it now restores every file it wrote and exits 1 with notes: <error> (files restored), instead of printing the error and exiting 0 with the files changed. A good run prints the same changed: and notes: vX.Y.Z ok lines, so /axis-release is unaffected. prepare takes the root folder and the notes function as optional arguments for the test, and is exported.
  • scripts/context-budget.js: a --base revision from before reference/vcs-*.md no longer fails with Reduce of empty array with no initial value; it is measured without a vcs file. Reports without --base or with --base main are unchanged.
  • Tests: tests/release-script.test.js (restore on a notes error, files written on success), tests/foreman/context-budget.test.js (measure on a plugin without vcs files).
  • Changelog entries under Unreleased > Marketplace > Fixed.

Closes #171

Test plan

  • node scripts/check-all.js: 278/278 tests (2 new), both claude plugin validate runs pass
  • node scripts/context-budget.js --base v1.0.0 prints a report
  • Changelog tests (release, manifests, docs): 17/17
  • CI validate passes on this pull request

🤖 Generated with Claude Code

release.js prepare printed a release notes error and still exited 0
with the files changed. It now restores every file it wrote (also when
the notes step throws) and exits
1 with "notes: <error> (files restored)"; a good run prints the same
lines as before.

context-budget.js --base failed with "Reduce of empty array with no
initial value" on a revision from before the vcs reference files. It
now measures such a base without them.

Tests cover both; changelog entries added.

Closes #171

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@krypton225 krypton225 added this to the v1.7.1 milestone Oct 24, 2026
@krypton225 krypton225 added bug Something isn't working marketplace Marketplace and repository: manifests, docs, CI labels Oct 24, 2026
@krypton225 krypton225 self-assigned this Oct 24, 2026
@krypton225
krypton225 merged commit 9229145 into main Oct 24, 2026
3 checks passed
@krypton225
krypton225 deleted the fix/release-budget-errors branch October 24, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working marketplace Marketplace and repository: manifests, docs, CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release.js prepare exits 0 on a notes error; context-budget.js --base fails on old revisions

1 participant