fix(github-releaser): accept no-op manifest bumps in release-commit file-set gate#63
Merged
Conversation
There was a problem hiding this comment.
{
"verdict": "approve",
"summary": "The fix correctly replaces the symmetric `sameStringSet` equality check with the asymmetric `isSubsetIncludingChangelog` subset check across both the execution guard and AI-review call sites. The new helper enforces committed ⊆ allowed AND CHANGELOG.md present, correctly allowing no-op manifest commits (manifest was already at target version → absent from commit) while preserving fail-closed rejection of any file outside {CHANGELOG.md} ∪ detected_manifests. Four execution test cases and one AI-review test case cover the no-op, mixed, out-of-set, and missing-changelog paths. No issues found.",
"comments": [],
"concerns_addressed": [
"correctness: isSubsetIncludingChangelog implemented in steps_execution.go:660-174 — checks committed ⊆ allowed AND CHANGELOG.md in committed; both call sites (guardCommittedFiles and checkUnexpectedFileChange) updated to use new helper",
"correctness: both layers (execution + ai_review) now use identical relaxed rule via shared isSubsetIncludingChangelog; the no-op manifest path works correctly",
"correctness: SameStringSetForTest replaced with IsSubsetIncludingChangelogForTest in export_test.go; sameStringSet fully removed — no remaining callers anywhere",
"correctness: trust surface preserved — out-of-set files (README.md) still hard-fail with unexpected_diff; commits missing CHANGELOG.md still fail closed"
]
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The github-releaser runs the same file-set gate at two layers on the release commit — the pre-push guard
guardCommittedFiles(steps_execution.go) and the AI-review checkcheckUnexpectedFileChange(steps_ai_review.go) — both via a sharedsameStringSetrequiring exact set-equality with{CHANGELOG.md} ∪ detected_manifests.When a plugin manifest already holds the target version (byte-identical rewrite — e.g. a feature PR pre-set it), the manifest produces no diff and is absent from the commit. Both layers then reject the otherwise-valid release: the guard hard-fails with
unexpected_diff, and ai_review routes it tohuman_review.Live incident:
bborbe/agentv0.71.0 stalled because PR #26 pre-setplugin.jsonto0.71.0(released manually asv0.71.0/581c766; this PR fixes the root cause so it doesn't recur).Fix
isSubsetIncludingChangelog(committed, allowed): committed ⊆ allowed ANDCHANGELOG.md∈ committed.human_review.sameStringSetremoved (no remaining caller);SameStringSetForTest→IsSubsetIncludingChangelogForTest.diffStringSetretained.{CHANGELOG.md} ∪ detected_manifestsstill hard-failsunexpected_diff, and a commit missingCHANGELOG.mdstill fails.Tests
UnexpectedFileChange=false, not inFailedChecks.isSubsetIncludingChangelogDescribeTablecovers the asymmetric semantics.make precommitgreen (golangci-lint 0, gosec/osv/trivy clean, all specs pass).