Repository navigation
Dedupe planner: a skipped group's members stay (INV-32) - #306
Merged
Merged
Conversation
The per-group rail skips a group whose members are all marked Delete, but its members could still be removed by pair fan-out from another group or by a second group that lists the same files. Members of a skipped group are now protected from direct deletes and from fan-out. Adds INV-32, fixed regressions for both routes, and a property test whose generator builds cross-group pairs and overlapping groups. Fixes #300 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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. |
Nishith
enabled auto-merge (squash)
November 29, 2026 08:49
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.
Fixes #300.
What
The dedupe planner skips a group whose members are all marked Delete, but its members could still be removed by another route:
Members of a skipped group are now protected from direct deletes (step 4) and from fan-out (step 5). Three guard lines plus the set that feeds them; nothing else in the planner changes.
New invariant: INV-32 (proposal for the wording)
"A Deduplicate plan never empties a group…" added to
AGENTS.md. Note that it is deliberately stronger than "never empties": a skipped group keeps every member, even one whose partner is deleted elsewhere. Over-keeping is the safe direction.Tests
DeduplicationPlannerGroupRailTests: fixed regressions for both routes (taggedAGENTS-INVARIANT: 32), group order both ways, and a check that ordinary fan-out still works.DeduplicationPlannerPropertyTests: new property test whose generator builds cross-group pairs and overlapping groups. Existing property tests use the unchanged generator path.Evidence (local, Swift newer than CI)
script/swift_meaningful_coverage.sh: exit 0, 2518 passed, 0 failed, 96.17% (DeduplicationPlanner.swift98.8%)git diff --check: exit 0.🤖 Generated with Claude Code