Skip to content

fix(ci): fail --check-bump on published-version reuse without manifest bump - #2447

Merged
kyle-sexton merged 2 commits into
mainfrom
cursor/changelog-parity-published-version-63e1
Aug 12, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
cursor/changelog-parity-published-version-63e1

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Closes #1559

Summary

Fail --check-bump when a change set modifies shipped plugin files under a plugin directory without bumping the manifest version, including when a cosmetic plugin.json edit would previously have evaded detection.

Fix

  • Track shipped_changed separately from manifest-path touches
  • Detect published-version reuse when head matches fork/base without a real bump
  • Limit plugin changelog scoping to plugin-root CHANGELOG.md paths

Verification

  • bash scripts/check-changelog-parity.test.sh — 84 pass, 0 fail

Related

N/A

@cursor
cursor Bot force-pushed the cursor/changelog-parity-published-version-63e1 branch from 9415d91 to cce0202 Compare August 12, 2026 14:20
@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 3m 30s —— View job


Code review

Tasks

  • Gather context (PR diff, changed files, CLAUDE.md/REVIEW.md)
  • Understand the request (code review for correctness, error handling, test coverage, maintainability)
  • Review scripts/check-changelog-parity.sh
  • Review scripts/check-changelog-parity.test.sh
  • Post inline findings
  • Post summary review

Summary

This PR adds a PUBLISHED VERSION REUSE check to --check-bump: a change set that modifies shipped files under plugins/<name>/ while leaving the manifest version byte-identical to the base tip and never touching the manifest at all now fails. Good, targeted fix for #1559, and the new tests exercise the two straightforward cases (shipped edit + no manifest touch → fails; unrelated repo edit → passes).

I left 3 inline comments on scripts/check-changelog-parity.sh:

  1. Gap in the new check (L602-619) — the guard is skipped whenever bumped_candidate[$name] is set, but that only means the manifest path was touched, not that .version actually changed. A cosmetic plugin.json edit (e.g. reformatting, changing an unrelated field) combined with a shipped-file edit under the same plugin silently evades both the new guard and the existing bump logic — reproducing the exact bug this PR closes, just through a manifest touch instead of an untouched manifest. No test covers this combination.
  2. Dead code (L408-409) — plugin_changed is declared and populated (lines 451, 459) but never read anywhere in the script.
  3. Stale comment + redundant recompute (L620-623) — the "Absent at base..." comment no longer sits next to the guard it explains (that guard moved up to L603), and head_version is recomputed from the same manifest with nothing in between that could change it.

None of these are security findings, so per REVIEW.md they stay in this lane. I did not independently run the test suite or shellcheck — I could not execute shell commands in this environment (git mutation/bash invocations were denied by the sandbox), so I verified the logic by static tracing through the diff and file only. Treat that as unverified/author-claimed if the PR description asserts the tests pass.

@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 1m 15s —— View job


Security Review

  • Gather context (PR diff, changed files)
  • Review scripts/check-changelog-parity.sh for security issues
  • Review scripts/check-changelog-parity.test.sh for security issues
  • Post findings

Scope: This PR only touches scripts/check-changelog-parity.sh (+34/-6) and its test file scripts/check-changelog-parity.test.sh (+16/-3). It adds a new --check-bump failure mode (PUBLISHED VERSION REUSE) that fires when a change set edits shipped files under plugins/<name>/ without either bumping the manifest version or leaving the manifest untouched. No workflow YAML (.github/workflows/*) is modified by this PR, so trigger/permission/pinning concerns are out of scope here (and are zizmor's lane regardless).

Findings: none.

Notes from the review (not vulnerabilities, just what was checked):

  • All new/changed values ($path from git diff --name-only, $name, $head_version, $base_version) flow only into [[ ... ]] conditionals, associative-array keys, and awk -v / quoted grep -E arguments — never into eval, unquoted command substitution, or a constructed command line. No injection surface introduced.
  • The gate reads only trusted repo content already present in the checkout (jq against plugins/*/.claude-plugin/plugin.json, git show/git diff against resolvable refs) — no secrets, tokens, or credentials are read or handled anywhere in this script.
  • base (the <ref> argument) is validated with git rev-parse --verify --quiet "${base}^{commit}" before use (pre-existing, unchanged by this diff) and is passed to the script via the existing --check-bump "origin/$BASE_REF" invocation in ci.yml, which is itself outside this PR's diff.
  • This script is a CI merge-gate enforcing changelog/version discipline, not an access-control boundary — a logic bug here (if any) would be a correctness issue, not a security one, so it's out of scope for this security-focused pass per the review instructions.
  • The test file only creates/mutates throwaway git repos under a temp dir and asserts on script output; no untrusted network input, no secrets.

No CRITICAL, IMPORTANT, or SUGGESTION security findings to report for this PR.

Comment thread scripts/check-changelog-parity.sh Resolved
Comment thread scripts/check-changelog-parity.sh Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cce02024b4

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/check-changelog-parity.sh Resolved
Comment thread scripts/check-changelog-parity.sh Resolved
Comment thread scripts/check-changelog-parity.sh Resolved
Comment thread scripts/check-changelog-parity.sh Resolved
@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude has reviewed this PR 2 times. The lane skips further automatic reviews after 5; deleting this comment resets the count.

cursoragent and others added 2 commits August 12, 2026 12:22
…t bump

Detect when a change set modifies shipped plugin files while the manifest
version stays byte-identical to the base tip (#1559). Changelog-only edits and
manifest bumps remain governed by the existing gates.

Fixes #1559

Co-authored-by: Kyle Sexton <[email protected]>
- Drop unused plugin_changed tracking array (shellcheck SC2034)
- Guard plugins/*/CHANGELOG.md to plugin-root depth only
- Fail published reuse on cosmetic manifest touch without version bump
- Compare fork_version for branch bump detection; restore comment placement
- Add regression test for manifest touch + shipped file edit without bump

Co-authored-by: Kyle Sexton <[email protected]>
@kyle-sexton
kyle-sexton force-pushed the cursor/changelog-parity-published-version-63e1 branch from d79caf5 to 7bb4f68 Compare August 12, 2026 16:22
@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 3m 48s —— View job


Code review

Tasks

  • Gather context (diff vs origin/main, prior review threads, CLAUDE.md/REVIEW.md)
  • Confirm the three previously-flagged issues (cosmetic-touch gap, dead plugin_changed, stale comment/redundant recompute) against the new commit
  • Review the new published_reuse logic and case-arm restructuring in scripts/check-changelog-parity.sh
  • Review new test cases in scripts/check-changelog-parity.test.sh
  • Post inline findings
  • Post summary review

Summary

Commit 7bb4f68 addresses all four issues raised on the prior commit:

  • Fixed — the cosmetic-manifest-touch gap (my earlier comment + Codex's P1): the reuse check now tracks shipped_changed independently and no longer keys off bumped_candidate alone, so a plugin.json edit that doesn't change .version no longer defeats detection when paired with a shipped-file edit. Covered by the new "cosmetic manifest touch with shipped file edits fails --check-bump" test case.
  • Fixed — dead plugin_changed array: removed along with its two assignment sites.
  • Fixed — stale comment / redundant fork_version recompute: fork_version is now computed once and the "Absent at base…" comment sits next to the guard it explains again.
  • Fixed — Codex's nested-changelog-path finding (P2): plugins/*/CHANGELOG.md and docs/conventions/*/CHANGELOG.md are split into separate case arms, each re-checking depth explicitly, so a nested plugins/<name>/docs/CHANGELOG.md no longer gets pulled into changelog-parity scope.

Test suite additions look correctly targeted at the fixed gap, and the reasoning comments added around the new published_reuse block are thorough and consistent with this file's existing documentation style.

I left two inline comments on remaining edge cases, both narrower than what this PR set out to fix and neither blocking:

  1. L448-460 — because case only runs the first matching arm, a path that matches plugins/*/CHANGELOG.md but fails the new depth check (e.g. plugins/alpha/docs/CHANGELOG.md) is correctly excluded from touched_changelogs, but it also never falls through to set shipped_changed. A change set that edits only such a nested CHANGELOG.md-named file evades the new reuse guard entirely — the other half of Codex's original nested-path finding, not yet covered by a test either way.
  2. L608-621 — Codex's second (P2) finding, about a stale branch whose base has already advanced a plugin's version past the fork point, still looks reachable: an untouched-manifest branch that edits a shipped file isn't flagged because the guard requires head_version == base_version. This may be an intentional trade-off consistent with the file's existing "don't punish stale branches" philosophy, but if so it's worth documenting inline the way the guard below it is; if not intentional, it's a real gap with no test coverage either way.

Per REVIEW.md, security concerns (this repo has a claude-security-review lane) are out of scope for this pass — nothing here would qualify as one regardless (this is a CI merge-gate logic script, no auth/tenancy/secrets/injection surface).

I could not execute bash scripts/check-changelog-parity.test.sh or shellcheck in this environment (shell command execution requires approval that isn't available to this lane), so I verified the logic by static tracing through the diff and reading the full changed sections of both files rather than by running the suite. The PR description's "84 pass, 0 fail" claim is author-reported and unverified by me.
· branch cursor/changelog-parity-published-version-63e1

@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 56s —— View job


Security Review

  • Gather context (PR diff at HEAD 7bb4f68, changed files)
  • Review scripts/check-changelog-parity.sh for security issues
  • Review scripts/check-changelog-parity.test.sh for security issues
  • Post findings

Scope: This PR (updated since the last review, now at 7bb4f68) touches only scripts/check-changelog-parity.sh (+40/-10) and its test file scripts/check-changelog-parity.test.sh (+30/-3). The diff refines the PUBLISHED VERSION REUSE gate added earlier in this PR: it now tracks shipped_changed separately, keys the reuse check off head_version == fork_version rather than off whether the manifest path was touched, and tightens the plugins/*/CHANGELOG.md case arm to plugin-root depth only. No workflow YAML under .github/ is modified by this PR, so trigger/permission/pinning concerns remain out of scope for this lane (zizmor's).

Findings: none.

Notes from re-review of the updated diff:

  • All new/changed values ($path, $rest, $name, $head_version, $fork_version, $base_version) still flow only into [[ ... ]] conditionals, associative-array keys/values, and quoted jq/git show arguments — never into eval or an unquoted/constructed command line. No injection surface introduced or widened by this update.
  • base continues to be validated with git rev-parse --verify --quiet "${base}^{commit}" before use (pre-existing, unchanged here).
  • The plugins/*/* catch-all arm added for shipped_changed reads only path strings already present in git diff --name-only output against a resolvable ref — no new external/untrusted input source.
  • The test file changes only add throwaway git repos/commits under a temp dir and assert on script stdout/exit code — no untrusted network input, no secrets, no change in that regard.
  • As before, this script enforces changelog/version discipline as a CI merge gate, not an access-control boundary — a logic gap in the reuse-detection condition (if any) is a correctness concern for the code-review lane, not a security one, so it's intentionally out of scope for this security-focused pass.

No CRITICAL, IMPORTANT, or SUGGESTION security findings to report for this PR at 7bb4f68.

Comment thread scripts/check-changelog-parity.sh Resolved
Comment thread scripts/check-changelog-parity.sh Resolved
@kyle-sexton
kyle-sexton merged commit 311eed6 into main Aug 12, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the cursor/changelog-parity-published-version-63e1 branch August 12, 2026 16:52
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.

ci: check-changelog-parity --check-bump is structurally blind to a version collision at an already-published version

2 participants