Skip to content

PR changelog entries keep merging under the just-released heading, and nothing catches it #1101

Closed

Description

@scttfrdmn

What happens: a PR opened before a release adds its entry under ## [Unreleased]. The release PR then inserts ## [X.Y.Z] - date directly beneath [Unreleased]. When the older PR merges, git's 3-way merge places its lines by their surrounding context, which now sits inside the released section. The merge is clean, CI is green, and the curated notes for an already-tagged release silently change.

Evidence (2026-10-17):

changelog_test.go checks structure (duplicate groups, unknown groups, compare links), so a moved entry passes.

Proposed gate: for every ## [X.Y.Z] section with a vX.Y.Z tag, the section must equal the same section in git show vX.Y.Z:CHANGELOG.md. Released sections are then immutable unless someone deliberately edits that test's allowlist. The Test job checks out shallow, so it needs tags (fetch-depth: 0, or git fetch --tags --depth=1). Under CI=true, a missing tag must fail, not skip, or the gate can never fire where it matters (CLAUDE.md rule 1). Locally it can skip with a message.

Activity

  1. scttfrdmn commented on Oct 18, 2026

    @scttfrdmn
    ContributorAuthor

    More evidence: #1099 copied the #1090 and #1093 entries into [Unreleased], but on main at 5b6a3ff the copies under [0.132.1] are still there, so each entry appears twice. changelog_test.go passed it, because it checks group structure, not whether a released section matches its tag or whether an entry appears twice. #1103 restores [0.132.1] from the tag. The proposed gate would have failed #1098, #1095 and #1099.

  2. scttfrdmn commented on Oct 18, 2026

    @scttfrdmn
    ContributorAuthor

    Two more, and one of them is mine.

    1. Add spawn results retention, a read-only report on retention by regeneration cost (#1076, phase 2) #1103's squash-merge deleted the --idle-timeout never fires on an untouched default instance: system background I/O is 10-40x the 100 KB/min disk threshold #1093 and spawn status / spored status always show CPU, network and disk I/O as "unknown (single sample)" #1090 entries from the already-released [0.132.2] section. Cause: a clean-up I'd folded into my second commit was replayed during the final rebase, after v0.132.2 had moved those entries under its own heading. I checked the section after resolving the first commit but before rebase --continue replayed the second. Restored from tag v0.132.2 in the v0.133.0 release PR. That's another case a structural changelog test passes and the proposed tag-equality gate would catch.
    2. Historic drift, found by comparing every released section with its tag (131 tagged sections): [0.126.0] has gained a ttl-reaper: cross-account trust names a CFN-generated role ARN suffix — recreating the stack breaks EVERY account at once (#457 trap 1) #476 entry since tagging, and [0.97.0] has lost a ### Fixed block (Pool worker should survive an early spored pool-worker exit (restart-on-exit), not run once at boot #465). Tags v0.42.0 and earlier have no CHANGELOG.md, so the gate must skip them. These two need a decision, restore or accept, before the gate can go green, so it'll want a short, explained allowlist of accepted historic edits.

    The check, for whoever builds the gate:

    for v in $(grep -oE '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | tr -d '#[] '); do
      git show v$v:CHANGELOG.md >/dev/null 2>&1 || continue
      diff -q <(git show v$v:CHANGELOG.md | awk -v v="## [$v]" 'index($0,v)==1{f=1;print;next} f&&/^## \[/{exit} f') \
              <(awk -v v="## [$v]" 'index($0,v)==1{f=1;print;next} f&&/^## \[/{exit} f' CHANGELOG.md) >/dev/null || echo "DIFFERS: $v"
    done
    
  3. added this to the v0.135.2 milestone on Oct 19, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions