Skip to content

fix(ci): stop releasable-commit-types flagging release-please's own release commit - #10287

Merged
JSONbored merged 1 commit into
mainfrom
fix/releasable-commit-types-release-commits-10286
Aug 2, 2026
Merged

fix(ci): stop releasable-commit-types flagging release-please's own release commit#10287
JSONbored merged 1 commit into
mainfrom
fix/releasable-commit-types-release-commits-10286

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #10286. Unblocks #10283, whose drift-checks-history is red for exactly this reason.

What

releasable-commit-types:check fails on every release-please release PR, flagging release-please's own release commit:

  54e2df7e chore(release): cut ui-kit v1.7.0
      packages/loopover-ui-kit/package.json

publishedSourcePrefixes includes <pkg>/package.json, and a release commit's whole job is to write the new version into that file under chore(release): — a hidden type. The match is structural, so it fires on every release PR, and the message's claim is backwards: that commit is the one that performs the release, not one that will never reach npm. A maintainer also cannot fix it by rewording, because release-please generates the commit.

The file's own isPublishedFile note already makes the argument: "a guard that fires on the ordinary case is a guard that gets disabled."

Why keyed on the diff, not the subject

Matching chore(release): in the subject would be simpler and weaker — a hand-written commit borrowing that subject while editing a dependency range or an exports map still strands a real change. So isVersionOnlyManifestBump exempts a path only when its diff's sole changed lines are the "version" field. Consequences, all tested:

  • A commit left with no other published-source path is release-please's own → not stranded.
  • A mixed commit still reports its remaining paths (the version bump drops out, the source file stays).
  • An empty diff proves nothing and stays flagged — which keeps the default accessor's behaviour, and every existing caller, unchanged.

Verified against the live failure

Ran the fixed code over #10283's real commit range (origin/main...release-please--branches--main--components--ui-kit), with real git show diffs:

commits checked: 2
  4bcced8a0 chore(release): sync package-lock.json
  54e2df7e6 chore(release): cut ui-kit v1.7.0

RESULT: none stranded -- check PASSES

Tests

33 pass. New coverage: the release commit is allowed; a chore(release): that also edits a dependency range is still flagged; a mixed commit reports only its non-version paths; no-diff still flags; plus five direct isVersionOnlyManifestBump cases including diff-header lines and a non-manifest file. The original #9937 recharts regression test is untouched and still passes.

…elease commit

publishedSourcePrefixes includes <pkg>/package.json, and a release-please release commit is
`chore(release): …` whose entire job is to write the new version into exactly that file. So the
guard matched by construction on every release PR it ever ran against -- #10283 surfaced it, where
the flagged claim ("would merge green and then never reach npm") is exactly backwards: that commit
is the one that performs the release, and a maintainer cannot reword it because release-please
generates it. This file's own isPublishedFile note already warns that a guard firing on the
ordinary case is a guard that gets disabled.

The exemption keys on what the diff DID, not on the subject: a commit borrowing the
`chore(release):` subject while editing a dependency range or an exports map still strands a real
change, so only a manifest whose sole changed lines are the "version" field is dropped. A commit
left with no other published-source path is release-please's own and is not stranded; a mixed
commit still reports its remaining paths. An empty diff proves nothing and stays flagged, which
keeps the default accessor's behaviour unchanged.

Closes #10286
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.31%. Comparing base (7f27a0f) to head (321ef8f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10287   +/-   ##
=======================================
  Coverage   92.31%   92.31%           
=======================================
  Files         939      939           
  Lines      114816   114816           
  Branches    27729    27729           
=======================================
  Hits       105989   105989           
  Misses       7527     7527           
  Partials     1300     1300           
Flag Coverage Δ
backend 95.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@JSONbored
JSONbored merged commit d8fbcc1 into main Aug 2, 2026
9 checks passed
@JSONbored
JSONbored deleted the fix/releasable-commit-types-release-commits-10286 branch August 2, 2026 01:24
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(ci): releasable-commit-types:check flags release-please's own release commit as stranded

1 participant