Skip to content

fix: name every available remedy in the unlinked-commit gate message - #171

Merged
androidand merged 1 commit into
mainfrom
fix/changelog-unlinked-remedies
Sep 28, 2026
Merged

androidand merged 1 commit into
mainfrom
fix/changelog-unlinked-remedies

Conversation

@androidand

@androidand androidand commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner
  • Name the ## Release note proposal remedy in the unlinked-commit gate message. It was documented in AGENTS.md but absent from the message, and it is the only remedy for a squash-merge author, whose commit message they cannot edit.
  • Explain that a trailing (#N) in a squash-merge header is often the PR number rather than the change's issue, so a printed ref can still be unlinked. The ref's kind was never surfaced, which is why the output read as self-contradictory.
  • Keep (#42) in the examples. extractRefs files a header (#N) under PRRefs, which looks like exclusion, but BuildChangelog consults PRRefs too, so it binds when 42 is the change's issue. Pinned so it cannot be removed on the mistaken reasoning.
  • Add TestBindingDistinguishesHeaderRefFromPRRef (both directions) and message-pinning subtests that fail if the remedy sentence is removed.
  • Message-only: one line of production code, no detection logic touched, no change to which commits are flagged. go test ./... 823 passed. Fixes the messaging half of Repair CI dogfooding gates #119.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Deploying specsync with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a2c172
Status: ✅  Deploy successful!
Preview URL: https://9f8f2a91.specsync.pages.dev
Branch Preview URL: https://fix-changelog-unlinked-remed.specsync.pages.dev

View logs

@androidand
androidand force-pushed the fix/changelog-unlinked-remedies branch 2 times, most recently from a0aa726 to ab27ae2 Compare September 27, 2026 20:56
The gate is correct — it flags exactly the commits that cannot bind to a
change's issue. The message was not: it recommended only forms that require
editing the commit message, which is impossible for a squash-merge, and it
omitted the ## Release note remedy that AGENTS.md already documents and that is
the only option when the message is generated by the merge.

It also never surfaced the ref's kind, so a commit ending in a PR number
prints a ref next to its own rejection. That reads as self-contradictory and
sends readers to suspect the gate rather than the commit.

Keeps "(#42)" in the examples deliberately. It is filed under PRRefs by
extractRefs, which makes it look untrustworthy, but BuildChangelog consults
PRRefs too, so it binds whenever 42 is the change's issue. Pinned by
TestBindingDistinguishesHeaderRefFromPRRef so a future edit cannot drop correct
advice on the mistaken reasoning that header refs never bind.

Message-only change; no detection logic touched. Both new tests fail when the
message is reverted. (#119)
@androidand
androidand force-pushed the fix/changelog-unlinked-remedies branch from ab27ae2 to 1a2c172 Compare September 28, 2026 00:00
@androidand

Copy link
Copy Markdown
Owner Author

Full rationale, the (#42) derivation, and the negative-control evidence are in the earlier comment on this PR and on issue #119. Condensing the body to the shipped-bullets form, per AGENTS.md: the PR body is the permanent commit message on main.

@androidand
androidand merged commit 0a976c3 into main Sep 28, 2026
2 checks passed
@androidand
androidand deleted the fix/changelog-unlinked-remedies branch September 28, 2026 00:02
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.

1 participant