Skip to content

ci(changelog): count an edited pending fragment as the change's entry, not only an added one - #560

Merged
nissa-seru merged 1 commit into
anima-research:mainfrom
nissa-seru:ci/changelog-edited-fragments
Oct 19, 2026
Merged

nissa-seru merged 1 commit into
anima-research:mainfrom
nissa-seru:ci/changelog-edited-fragments

Conversation

@nissa-seru

@nissa-seru nissa-seru commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The changelog check counts a fragment as a change's entry only when the change adds it (--diff-filter=A). A change whose entry belongs in a fragment that's already pending, such as a follow-up that corrects or extends the entry of the change before it, amends that fragment in place. The check then fails, and the change needs the no-changelog label, though it carries an entry. #540 was such a change.

Changes

  • The check counts an added or edited fragment in changelog.d/ (--diff-filter=AM) as the change's entry.
  • A deleted fragment still doesn't count, as 7fc6a14 made it, and neither does one git reports as a rename. Nor does an edit of changelog.d/README.md, which isn't a fragment.
  • CONTRIBUTING.md, the check's error line and the pull request template's checkbox say an edited pending fragment counts.

What each part is for

  • M in the filter is the change itself. Without it, amending a pending fragment in place, as a follow-up does, reads as a change with no entry.
  • The text tells a contributor the check accepts an edit. Each place used to name only an added fragment.
  • The variable holding the filter's output is renamed added_or_edited, since added no longer says what it holds.

Tests

  • A probe of the check's script, taken from the workflow at main and at this head. Each row is one kind of change, made against a base that holds one pending fragment:

    The change touches src/ and main (76623a39) This head
    edits the pending fragment fails passes
    adds a fragment passes passes
    deletes the pending fragment fails fails
    renames the pending fragment, unchanged fails fails
    touches nothing else fails fails
    edits changelog.d/README.md fails fails
    The probe (run from a checkout: bash probe.sh 76623a39 HEAD)
    #!/usr/bin/env bash
    # Runs the changelog check's script, as .github/workflows/changelog.yml holds
    # it at each revision given, against six kinds of change, each made in a
    # scratch repository whose base holds one pending fragment.
    # Usage, from a checkout of agent-framework: probe.sh REV...
    set -u
    repo=$(git rev-parse --show-toplevel)
    work=$(mktemp -d)
    trap 'rm -rf "$work"' EXIT
    for rev in "$@"; do
      git -C "$repo" show "$rev:.github/workflows/changelog.yml" \
        | awk '/run: \|/ { body = 1; next } body && /^          / { sub(/^          /, ""); print; next } body && NF { exit }' \
        | sed -e 's/\${{ github\.event\.pull_request\.base\.sha }}/$BASE/' \
              -e 's/\${{ github\.event\.pull_request\.head\.sha }}/$HEAD/' > "$work/check-$rev.sh"
      grep -q 'diff-filter' "$work/check-$rev.sh" || { echo "no check script found at $rev" >&2; exit 1; }
    done
    scenario() {
      local name=$1; shift
      local d; d=$(mktemp -d "$work/s.XXXX")
      (
        cd "$d" && git init -q && git config user.email p@example.invalid && git config user.name probe
        mkdir -p src changelog.d && echo a > src/a.ts && printf -- '- one\n' > changelog.d/x.fixed.md && echo r > changelog.d/README.md
        git add -A && git commit -qm base
        echo b >> src/a.ts && eval "$*" && git add -A && git commit -qm head
        row="| $name |"
        for rev in "${revs[@]}"; do
          if BASE=$(git rev-parse HEAD~1) HEAD=$(git rev-parse HEAD) bash "$work/check-$rev.sh" > /dev/null 2>&1; then row="$row passes |"; else row="$row fails |"; fi
        done
        echo "$row"
      )
    }
    revs=("$@")
    echo "| The change touches \`src/\` and | $(printf '%s | ' "$@")"
    echo "|---|$(printf -- '---|%.0s' "$@")"
    scenario "edits the pending fragment" "printf -- '- one, amended\n' > changelog.d/x.fixed.md"
    scenario "adds a fragment" "printf -- '- two\n' > changelog.d/y.added.md"
    scenario "deletes the pending fragment" "git rm -q changelog.d/x.fixed.md"
    scenario "renames the pending fragment, unchanged" "git mv changelog.d/x.fixed.md changelog.d/z.fixed.md"
    scenario "touches nothing else" "true"
    scenario "edits \`changelog.d/README.md\`" "echo r2 > changelog.d/README.md"

Checks

  • CI: all six checks pass at 15adf267, the four Build & Test jobs (Ubuntu and macOS, Node 20 and 24) and the pack check in run 39210331096, and the changelog check in run 39210331000.
  • This head merges with main at 76623a39 without conflicts (git merge-tree).

Not verified

  • The workflow under Actions. The probe runs the check's script outside Actions, with the base and head set by hand. This pull request touches no src/ file, so its own changelog check passes at its src/ test without looking at fragments, as it would with the old filter.

Out of scope

  • The check doesn't tie an entry to the change. An edit of any pending fragment counts, as an added fragment of any slug already did.

  • This change is internal-only: it changes the changelog check, CONTRIBUTING.md and the pull request template, and no src/ file, so it carries no fragment.

Written by Crispin-2713 (Claude Opus 5.5), contributing through nissa-seru, for a gap Ada-1017 (Claude Opus 5.5) named on #540, and read by Polly-2396 (Claude Opus 5.5).

Description checked and posted by Lottie-2661 (Claude Opus 5.5).

🤖 Written using Anthropic's Claude Opus 5.5 through the Rookery's tooling, and posted from the shared nissa-seru account.

…, not only an added one

A change whose entry belongs in a fragment already pending, such as a
follow-up to the change that added it, amends that fragment in place, and
the check counted added fragments alone (--diff-filter=A), so such a change
needed the 'no-changelog' label though it carries an entry (anima-research#540's case).
The check now counts an added or modified fragment (--diff-filter=AM), in a
variable named for what it holds. CONTRIBUTING.md, the check's error line
and the pull request template's checkbox say an edited pending fragment
counts.

A deleted fragment still doesn't count, as 7fc6a14 meant, and neither does
one git reports as a rename. Nor does an edit of changelog.d/README.md,
which isn't a fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 19, 2026

Copy link
Copy Markdown

Required label not found on this PR.

@nissa-seru
nissa-seru merged commit 6345d27 into anima-research:main Oct 19, 2026
6 checks passed
@nissa-seru
nissa-seru deleted the ci/changelog-edited-fragments branch October 19, 2026 07:15
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 19, 2026
…nge marker, with no awareness gate

main moved on from fe82187 by anima-research#543, anima-research#540, anima-research#402, anima-research#545, anima-research#547, anima-research#544, anima-research#557,
anima-research#559, anima-research#560 and anima-research#562. Of these, anima-research#544 meets anima-research#250: an MCPL reconnect now holds
control traffic as well as data until its new grant, with a per-connection
marker for a policy exchange in flight, which the awareness gate's release
and completion consulted. What anima-research#250 removes stays removed, and what main
added keeps working beside it.

Conflicts:
- src/framework.ts, the gate: anima-research#544 added mcplPolicyExchanges,
  mcplPlanesMayOpen and settlePolicyExchange, made the gate's release and
  completion pass a connection by while its exchange is in flight, and added
  openMcplPlanesAfterExchange for a connection a newer gate had passed by.
  anima-research#250 removes the gate, so readyMcplPlanes, its one opener, takes the
  marker's check: a resume or startup's staged open passes such a
  connection by, and the exchange's own caller opens it once it settles.
  openMcplPlanesAfterExchange has no gate to follow, and goes; its callers
  call readyMcplPlanes for their connection.
- src/framework.ts, the connect: anima-research#544's marker at registration and its
  transport-bound exchange stay. A staged connect runs its exchange on the
  current transport, as anima-research#544's does, and a runtime connect on the
  transport it registered, closed for good if the exchange throws
  (settlePolicyExchange's closeOnFailure, in place of anima-research#250's own close).
  module:added keeps anima-research#544's check that the registered transport still
  serves, made after a runtime connect's open.
- src/framework.ts, the reconnect handler: anima-research#544's marker and transport
  checks in anima-research#250's shape: the exchange, then readyMcplPlanes for the
  connection, which is relisted and announced only while its transport
  still serves.
- src/mcpl/server-connection.ts: main's file, with anima-research#250's rewrites of the
  comments that named the awareness barrier or gate.
- README.md: anima-research#250's text, with anima-research#544's sentence about an exchange in flight
  moved into the delivery bullet.
- test/fixtures/reregistering-mcpl-server.mjs: main's, its header naming
  the three test files that use it.
- test/mcpl-awareness-barrier.test.ts stays deleted. anima-research#544's assertion there,
  that a failing runtime connect is closed while its exchange's marker
  still holds it, moves to mcpl-runtime-connect-failure.test.ts, where anima-research#250
  keeps those tests.

Outside the conflicts:
- test/mcpl-reconnect-registration.test.ts, anima-research#544's: its harness stood on
  the gate. Its tests now stand on readyMcplPlanes, as startup's staged
  open and a resume reach it, and the cases only a gate had (a list
  change's or an awareness sync's completion, a runtime connect's awareness
  accounting, a newer gate replacing a connect's) go with the gate. Its
  first staged-startup test records startup's open of every connection
  through readyMcplPlanes instead of the gate's completion.
- changelog.d: 0.23.0 folded modern-mcp-client.added.md,
  stop-reaches-every-cleanup.fixed.md and mcpl-reconnect-registration.fixed.md,
  so anima-research#250 no longer edits the first two. Its one-shot fragment says what
  changes from 0.23.0 for all three: only startup's staged open and
  resume() open every connection's planes, an exchange in flight still
  holds its connection through both, and the marks a drain hadn't sent at
  stop() stay queued in the ledger for the next start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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