fix(ci): scope history-scan to PR-incoming commits - #275
Merged
Conversation
The history-scan job ran 'git log --all --remotes' against every branch the remote knew about. Once a commit landed on main containing strings that SCAN_RULES_B64 patterns matched (e.g. legitimate feature identifiers shipped in #253), every subsequent PR's history-scan picked them up via the new main commit and failed with 'pattern hit in history' regardless of what the PR itself contained. Discretion is a property of incoming changes, not of code that already shipped. Scope the scan to commits the PR adds on top of the merge base (`merge-base..HEAD`), so once an identifier is in main it cannot retroactively block PRs branched off it. Closes #272
Owner
Author
|
Closing per user decision (option 1 over option 2 for #272). Reasoning: scoping history-scan to PR diff trades away the 'history is clean forever' property — once a leaked pattern lands on main, future PRs no longer retro-catch it. Preferred fix is to update SCAN_RULES_B64 to drop the legitimate Anthropic-SDK-name patterns that are causing the false positives, leaving the rest of the discretion ban list intact. #272 stays open until the secret is updated and a previously-failing PR re-runs green. |
This was referenced Apr 29, 2026
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.
Summary
history-scanwas usinggit log --all --remotes='origin/*', so any pattern that landed inmainwould block every subsequent PR.merge-base(origin/<base>, HEAD)..HEAD— only commits this PR adds.mainno longer cause cross-PR spillover.Test plan
history-scanstep on this PR and passes.Closes #272