Repository navigation
fix(devtools): trust every merge parent's pattern baseline - #5755
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Sinity
enabled auto-merge (squash)
September 28, 2026 21:18
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 257711bc94
ℹ️ 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".
…e nothing Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
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
The patterns gate trusts an exemption that any parent of
HEADalready carried, so a PR whose tip mergesmasterno longer fails formaster's own baseline additions.Problem
_trusted_baselineread the committed baseline fromHEAD^only. On a PR whose head is a merge ofmaster,HEAD^is the PR's previous tip, so every exemptionmasteradded since the PR last merged it counts as growth. The quick-gate of #5739 (a one-line hook change merged withmasterat f2562c3) failed withpatterns: committed baseline grewover dozens ofmaster's own entries (diagnosis=gate_input_error); #5643, #5696 and #5704 fail the same way.Solution
Read the baseline at every parent (
git rev-parse HEAD^@) and trust each entry at the largest count any parent carried. A merge resolution that adds an entry present in neither parent is still growth.Verification
devtools test tests/unit/devtools/test_verify_patterns.pyon a checkout of origin/master 82e84ec with this change: 9 passed, 1 failed. The newtest_merging_the_base_branch_does_not_count_its_exemptions_as_growthpasses; it fails with first-parent-only trust. The failingtest_displacing_a_baselined_match_does_not_trip_the_gatefails the same way on unpatched master (IndentationError in its synthetic file) and is recorded in polylogue-rb7tx.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg