Skip to content

fix(scripts): read a renamed plugin's changelog headings from its old path - #15560

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/changelog-parity-plugin-rename
Nov 12, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/changelog-parity-plugin-rename

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #15552

Summary

scripts/check-changelog-parity.sh --check-bump fails every plugin rename in fragment mode. It compares the moved CHANGELOG.md with nothing at the fork point, so every released heading reads as one the PR added. The spelling rename (#15552) needs this fixed on main first: the pre-push check runs main's copy of the tooling, so the rename branch cannot carry the fix itself.

Fix

  • --check-bump now builds a map from each renamed changelog to the path it came from, using git diff --name-status -M --diff-filter=R <fork> <head> -- '*CHANGELOG.md', and reads the fork-point headings from that old path. A failed rename diff exits 2, so the check fails closed.
  • A heading the rename adds still fails as FRAGMENT-MODE RELEASE. Only the headings the file already carried are exempt.
  • This matches --check-preserved, which already treats a directory rename as no deletion.

Verification

  • scripts/check-changelog-parity.test.sh: 127 passed, 0 failed. It adds two cases. A renamed fragment-mode plugin with its released headings passes. A rename that also adds a heading fails on that heading alone.
  • shellcheck on both files: clean.
  • On the spelling rename branch, the patched check passes the moved plugins/spelling/CHANGELOG.md (detected as R099), and main's copy fails it.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr

… path

check-changelog-parity --check-bump compared a moved CHANGELOG.md with
nothing at the fork point, so a fragment-mode plugin rename read as a
release adding every heading. It now compares a renamed changelog with
the file it was renamed from; a heading the rename adds still fails.

Refs: #15552

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T06:21:29.364037Z e4f7bba PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed e4f7bba384a413e54c5a842df9f2a73feaf8de16: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15560

No security issues found.

Scope: I read every hunk of both changed files, scripts/check-changelog-parity.sh and scripts/check-changelog-parity.test.sh. Neither one matches a trusted-path glob. Neither is a trust control either: they don't touch the trusted-actor list, the lane token scope, the kill switch, the token broker or a merge-hold script.

What changed: --check-bump now runs git diff --name-status -M --diff-filter=R to build a map from each renamed CHANGELOG.md back to its old path. When the new path doesn't exist at the merge base, it reads the base headings from the old path (check-changelog-parity.sh#L725-L762).

Checks:

  • Fails closed: if the rename diff fails, the script exits 2. A failed git show on the old path also exits 2, as it did before.
  • Shell injection: none. Paths come from git output and are only used quoted, as an associative-array key or as a git cat-file / git show argument. Nothing is interpolated unquoted or eval'd.
  • Old-path fallback: it only applies when the new path is missing at the merge base. A rename onto a changelog that already exists keeps comparing against that path's own base file.
  • What the PR could exempt: at most, a renamed plugin keeps its old changelog's version headings without a release. That is a release-parity matter, not a leak, a compromise or a charge.
  • Instructions: the diff deletes, narrows or softens no standing instruction.
  • Embedded text: the PR context has no embedded directives aimed at the lane.

The review was not blocking only. The lane has reviewed no earlier head of this PR.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed e4f7bba384a413e54c5a842df9f2a73feaf8de16: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #15560: read a renamed plugin's changelog headings from its old path

I read every hunk of both changed files (scripts/check-changelog-parity.sh and scripts/check-changelog-parity.test.sh). I also read the --check-bump loop around the change, plus head_has / head_show, how head_commit and merge_base are set, and the --check-preserved path. I found no blocking or advisory issues.

What the change does. --check-bump now builds a map from each renamed changelog's new path to its old path, using git diff --name-status -M --diff-filter=R <fork> <head> -- '*CHANGELOG.md'. When a changelog doesn't exist at the fork point, the check reads its base headings from the old path.

  • Fails closed: if the rename diff fails, the script exits 2, the same as its other git reads.
  • Only applies to new paths: the lookup runs only when git cat-file -e finds nothing at the new path. A changelog that wasn't moved is checked exactly as before.
  • Added headings still fail: a heading added during the rename is still reported as FRAGMENT-MODE RELEASE, because the base set comes from the old file's headings.
  • Pathspec: git's default pathspec * matches across /, so '*CHANGELOG.md' matches plugins/<name>/CHANGELOG.md. Both sides of the rename match the pathspec, so rename pairing still works.

Tests. The two new cases cover what the PR description promises:

  • a renamed fragment-mode plugin with only its released headings passes (rc 0);
  • a rename that also adds 1.1.0 fails and names that heading alone. The != *"1.1.0 1.0.0"* guard proves 1.0.0 was read from the old path.

I couldn't run anything in this lane. The author says the suite passes 127/0, shellcheck is clean, and the check passes on the real spelling-rename branch; none of that is verified here.

Notes (not counted as findings):

  • The new git diff --name-status call has no -z. scripts/lib/changed-files.sh uses -z on purpose, because git C-quotes non-ASCII paths. A plugin directory with a non-ASCII name would not match its map entry. The check would then treat all of its headings as new and fail, so it fails closed, and plugin directory names are kebab-case ASCII in practice.
  • Rename detection could pair one plugin's deleted changelog with an unrelated new plugin's changelog if the two are at least 50% similar. That would exempt the new file's matching headings. It needs a delete and an add in the same change set, so it is very unlikely.

Closing issue. The PR body says Refs: #15552, not a closing keyword, so the context file has no closing-issue section and there are no acceptance criteria to check.

No plugin manifests changed. No settled threads or prior findings apply.

Spend: none. The change only alters a local or CI shell check.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit b1d3fb5 Nov 12, 2026
47 checks passed
@kyle-sexton
kyle-sexton deleted the fix/changelog-parity-plugin-rename branch November 12, 2026 06:38
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant