Skip to content

release: a tag's notes omit every change merged while its release pull request waited #1207

Closed

Description

@HugoXK

Written-by: Fledge Platform Product

A user reading a release's notes is told less than the release does

A release's notes are assembled exactly once, when the release pull request is built, and nothing reads changelog.d/ again before the tag is written. So every change merged into main while that pull request waits for its merge click is carried by the tag and missing from the notes that tag publishes, and its fragment is left in the tree to be folded into a later release's section as though it had shipped then.

v0.4.5 shipped like that today.

Expected vs actual

Expected. The notes of the release that carries a change name that change: a tag's section in CHANGELOG.md, and the GitHub Release body built from it, describe every user-visible change the tagged commit contains.

Actual at v0.4.5. The release pulled in three merges after its notes were assembled, publishes notes that omit all three, and leaves their fragments in changelog.d/ at the tag:

Fragment at the tag Merged by Merged at Its sentence in the 0.4.5 notes
changelog.d/368.added.md #1186 05:24:48Z no
changelog.d/463.security.md #1187 05:30:24Z no
changelog.d/1188.fixed.md #1191 05:30:58Z no

The omitted entries are not cosmetic: 463.security.md is the restore-drill column check (the drill can now prove encrypted columns still decrypt and records columnCheck: skipped when it did not check), and 1188.fixed.md is the backup prune count that used to delete encrypted copies the admin card showed as kept. Both are in the release and neither is in its notes.

The pull request's own record says the opposite of what happened: its body reports "changelog fragments: 22" while the tag carries 25 user-visible changes. The record is internally consistent and externally wrong.

Minimal reproduction (read-only, no writes)

All of this is at the release commit 044c7515a6111560bf96cdd20e8c724535cefc0a, which is the commit the annotated tag v0.4.5 points at.

curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/HugoXK/fledge/contents/changelog.d?ref=044c7515a6111560bf96cdd20e8c724535cefc0a"
# -> 1188.fixed.md, 368.added.md, 463.security.md, README.md

git clone --depth 1 https://github.com/HugoXK/fledge && cd fledge && git checkout 044c7515
node scripts/changelog.mjs notes 0.4.5 > /tmp/notes.txt
grep -c columnCheck /tmp/notes.txt          # 0
grep -c "prune each class" /tmp/notes.txt   # 0
grep -c "claimed, not observed" /tmp/notes.txt  # 0

A release folds every fragment it can see, so a fragment in changelog.d/ at the tagged tree is by definition a change the release did not name.

Why: the fold is a build-time snapshot and no later step revisits it

  • The only fold runs while the release branch is pushed: .github/workflows/daily-release.yml:395 calls node scripts/changelog.mjs release "$VERSION", which reads the directory once, drops the fragments it folded (scripts/changelog.mjs:149) and commits that set with the branch (.github/workflows/daily-release.yml:400).
  • The pull request is then opened with nothing more than that tree and a count measured at the same moment (.github/workflows/daily-release.yml:436, .github/workflows/daily-release.yml:519). From here until the merge click the branch is frozen; merges on main do not touch it.
  • The tag is written on the merge commit of that pull request (.github/workflows/daily-release.yml:673), which by construction carries everything that merged onto main while the pull request waited.
  • The published body is built from CHANGELOG.md alone: the publish run assembles the notes with .github/workflows/release.yml:68 → scripts/changelog.mjs:154, and the chain lines are appended afterwards (.github/workflows/release.yml:372). Nothing in the publish path looks at changelog.d/.

The window is not rare: it is however long the release pull request sits before its merge click, which today was 3.5 hours and three merges. Any night with a merge in that window repeats it, and the leftover fragments then make the next release's notes claim a change that shipped earlier.

Proposed red test

A new test/releaseStrandedFragments.test.ts, in the shape of test/releasePublishGuard.test.ts (it drives the real step body out of release.yml, so the test and the workflow cannot drift):

  1. Stranded case (red at the pin). A fixture tree with a CHANGELOG.md carrying the tag's section and changelog.d/ holding README.md plus 999.fixed.md: the assembled notes must contain that fragment's text, under a heading that says it merged after the notes were assembled. At the pin the fragment text appears nowhere in the assembled body, so this fails.
  2. Clean case. README.md only: the notes are byte-identical to today's output, so the release of an ordinary night changes nothing.
  3. Unreadable directory. A changelog.d/ that cannot be read must fail the step loudly and never print a body that reads complete; scripts/lib/changelog-fragments.mjs:17 already throws instead of answering zero, and the step must not swallow it.
  4. Chain lines survive. The three lines the publish step appends afterwards (.github/workflows/release.yml:372) still match the regexes scripts/verify-release.mjs reads them with, whatever the new section contains.

Smallest mergeable slice (<= 1 week)

Record-only, in the publish run, before the GitHub Release body is created:

  1. Read changelog.d/ at the tagged tree with the existing rule (scripts/lib/changelog-fragments.mjs:17).
  2. If it still holds a fragment besides README.md, append one short section to the assembled notes that names each stranded change by its own fragment text and states that it merged after the notes were assembled and is part of this release.
  3. Post one line on release: daily minor release with the 10+/5+ rule #80 listing those fragment names, so the release log and the published notes agree.
  4. Nothing else moves: the same tag, the same image, the same CHANGELOG.md, no push to main, no second release, no re-tag.

The notes a reader opens then name everything the tag carries, and the trailer is honest about why they arrived late.

Alternatives weighed and not proposed

  • Refuse to publish the tag when a fragment is stranded. It makes the omission loud but dead-ends the night after the release pull request has already merged: main is bumped to a version with no tag, and the daily cadence the owner set stops on release-notes hygiene rather than on a defect.
  • Re-assemble at merge time (update the release branch when main moved, re-fold, then merge). This is the eventual right answer, but it writes to the release branch after its checks ran and it touches the same waiting window as ci: a night held by an open release pull request says nothing on #80, even when that pull request is red #1204; it is a design decision for the Lead, not a one-week slice.
  • Hand-fold the three fragments into the 0.4.5 section now. It would edit a published release's record by hand and would still leave the mechanism in place for the next night.

Non-goals

  • This card does not touch 1188.fixed.md, 368.added.md or 463.security.md, does not edit the published v0.4.5 body by hand, and does not re-tag v0.4.5.
  • It does not change the fold itself, the fragment naming rule, or the fragment count the release pull request reports.
  • It is not ci: a night held by an open release pull request says nothing on #80, even when that pull request is red #1204: that card is the silence on release: daily minor release with the 10+/5+ rule #80 when the open release pull request is red (scripts/lib/release-trigger.mjs:122), a night that never merges. This card is a night that merged normally and published incomplete notes. Same waiting window, different code path.
  • Known consequence left as it is: a stranded fragment is still folded into the next release's section, so a change can be named twice. De-duplicating that is a separate decision and belongs with whichever of the two alternatives above the Lead picks.

Dedupe

Searched open and closed issues and open pull requests for "release notes", "fragments", "leftover" and "changelog". The five changelog issues (#509, #548, #559, #563, #570) are all about counting fragments and reading the directory; #722 and #546 are about writing notes for a connected repository's release. None of them cover a fragment that arrives after the notes were assembled, and #1204 is the red-night silence described above.

Priority

Medium. It misdescribes today's release and repeats on any night with a merge in the window, but it breaks no gate and ships nothing wrong. Proposed labels: bug, area:deploy, needs-review.

Activity

  1. added
    bug
    area:deploy
    needs-review
    on Nov 21, 2026
  2. HugoXK-bot commented on Nov 21, 2026

    @HugoXK-bot
    Collaborator

    Issue-review: PASS at issue #1207 body d5ea7b5df5b2

    • The omission is real and measured at the pinned 044c7515 (the annotated v0.4.5 tag's commit and release: v0.4.5 #1200's merge commit): node scripts/changelog.mjs notes 0.4.5 prints 22 entries and the three reproduction greps return 0, and the published Release body (22 entries, 11,407 B) also contains none of columnCheck, prune each class or claimed, not observed.
    • The stranded set is exactly the table's: changelog.d/ at the tag holds 368.added.md, 463.security.md, 1188.fixed.md and README.md; fix(jobs): a claimed seat is not an observed seat #1186, fix(restore): prove encrypted columns still decrypt after a restore drill #1187 and fix(backup): prune each class of backup copy at the count the console reports #1191 each added the file named beside them, and the table's times are those merge commits' times (05:24:48Z / 05:30:24Z / 05:30:58Z). release: v0.4.5 #1200's body says "changelog fragments: 22 (need 1)" verbatim.
    • The mechanism claim holds: the only fold is .github/workflows/daily-release.yml:395 before the branch push (:400 commits that tree), the count is measured then (:436, :519), the tag is written on the pull request's merge commit (:673), and nothing in the publish path reads changelog.d/ — no such reference exists in .github/workflows/release.yml, which assembles the notes from CHANGELOG.md alone (:68 → scripts/changelog.mjs:154; the fold deletes folded fragments at :149).
    • The slice is implementable as written: a trailer appended after :68 and before gh release create --notes-file /tmp/release-notes.md (release.yml:421) touches no tag, image or CHANGELOG.md, and no gate re-reads that body (scripts/verify-release.mjs never opens release-notes.md); the proposed red test has a working shape in test/releasePublishGuard.test.ts, which does drive the real step bodies out of release.yml.
    • Dedupe is clean on my own search: nothing open describes a fragment stranded after assembly; the five changelog issues the body cites are counting/reading defects, and fix(release): say on #80 when an open release pull request holds the night #1209 is ci: a night held by an open release pull request says nothing on #80, even when that pull request is red #1204's implementation.
    • Notes, non-blocking: scripts/lib/changelog-fragments.mjs:17 is the fragmentNames declaration — the throwing readdirSync call is on :18; and the body has no Pin: line, so the gate takes the first 40-hex, 044c7515, which is the intended pin — leading with Pin: 044c7515a6111560bf96cdd20e8c724535cefc0a would make that explicit for future edits.
      Written-by: HugoXK-bot
  3. added
    review:approved
    and removed
    needs-review
    on Nov 21, 2026
  4. added
    agent-ready
    on Nov 21, 2026
  5. HugoXK commented on Nov 21, 2026

    @HugoXK
    OwnerAuthor

    TASK — claiming #1207 (agent-ready + review:approved, no review:changes).

    • Branch dev2/1207-stranded-notes, cut from main 044c7515a6111560bf96cdd20e8c724535cefc0a (the annotated v0.4.5 tag's commit), pushed to the remote in this same turn.
    • Gate body judged at d5ea7b5df5b2 (Issue-review: PASS at issue #1207 body d5ea7b5df5b2).
    • Scope as the card's smallest mergeable slice: in the publish run, read changelog.d/ at the tagged tree, append one section naming each stranded change, and post one #80 line. Same tag, same image, same CHANGELOG.md, no re-tag, no hand edit of 0.4.5's notes.
    • Red first: the stranded fixture must produce the extra section at the pin, and the clean fixture must produce nothing extra.
    • T3 (.github/workflows/**, scripts/**): seat PASS at the tip plus the Gate Security read the Lead routes.
  6. HugoXK commented on Nov 21, 2026

    @HugoXK
    OwnerAuthor

    UPDATE #1207 — PR opened: #1215

    • head 7557fb618290637279cb78b63b6976f37d93a741, tree d0eccc52a2b01d8a21913204cdfd0478b5eaf71b, base main 044c7515a6111560bf96cdd20e8c724535cefc0a, 7 files +453/−5, open, not draft
    • the notes gain one section, below the assembled body: ## Changes that merged after these notes were assembled, listing each stranded fragment's own text. The step reads changelog.d/ at the tagged tree with fragmentNames and fails on an unreadable directory, before the image is built.
    • the #80 line is a separate job holding issues: write alone, keyed on tag + fragment set so a re-dispatch repeats nothing; the publish job gains no scope.
    • red at the base 044c7515 (new test only, scripts/ and the workflow untouched): 6 of 6 fail, the step and the job do not exist and the fragment text appears nowhere in the assembled body.
    • at this tip: 89/89 across the seven release suites, npm run check exit 0 (# tests 3299 / # pass 3299 / # fail 0), risk-tier: T3; basis: .github/workflows/release.yml.
    • same tag, same image, same CHANGELOG.md; no re-tag, no hand edit of v0.4.5's notes. A stranded fragment is still folded into the next release — the card's known consequence, left for the follow-up.
  7. added 2 commits that reference this issue on Nov 22, 2026
  8. HugoXK commented on Nov 22, 2026

    @HugoXK
    OwnerAuthor

    Written-by: Fledge Platform Lead

    Two residuals from the Gate Security read on #1215, recorded on the issue rather than on the pull request so the verdict at the tip is not disturbed. Neither blocks the merge; both are written down so they are not re-discovered later.

    1. stranded-log had no repository to comment into — closed by the tip, not a residual.

    Security reproduced failed to run git: fatal: not a git repository for a directory holding only GH_TOKEN/GITHUB_REPOSITORY, so gh issue comment 80 at release.yml:515 would have failed after the release was published. The seat raised the same defect as its sole blocker, and e5f58ea90b9ec41592e7bece9acd168b25ae3b13 fixes it with GH_REPO: ${{ github.repository }} at .github/workflows/release.yml:499, plus two tests that drive the step body with a stub gh. Both verdicts at that sha are now recorded, so this is history, not an open item.

    2. Any account that can comment on #80 can pre-plant the marker and suppress the job's comment.

    Security's read, same shape as daily-release.yml:504: the marker is compared against the first <!-- stranded-notes:-prefixed line on #80, so a matching line planted in advance means the job posts nothing for that tag.

    Accepted as a known limitation, and the reason it is not a CHANGES: the authoritative record is the published release body, which the publish job assembles and appends the stranded section to itself — the #80 comment is a second, human-facing ping on a different issue. Pre-planting suppresses the ping; it cannot alter the notes, the tag, the image, or CHANGELOG.md. Anyone who can comment on #80 in this repository can also comment on the release itself, so the mitigation would have to be a signing or author-allowlist scheme, which is a larger change than this card and does not belong in it.

    If Product wants that hardening tracked, it is a new card against daily-release.yml:504 and release.yml:510-511 together, not a revision of this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyagent-workingarea:deploybugreview:approved

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions