Repository navigation
Admission engine owns conflict detection: claims by rule id replace the wrapped detector - #1322
Merged
Merged
Conversation
…he wrapped detector Phase 3 wrapped RuleCollectionDeduplicator.detectConflicts, which reported display names, and mapped names back to ids — so two rules titled alike were both blamed for one collision. The engine now computes every conflict from claims (what each owner puts on which slot): key slots with the leader key, activator-vs-mapping, activator-vs-activator, chord groups within an owner, and alias-name collisions. Reason.conflict carries the details (hold action, activator target, alias origin) the presenter and the save gate's MappingConflictInfo both render. The old detector is deleted; the save gate and the CLI call AdmissionEngine.mappingConflicts, and the detector's test corpus runs against the engine unchanged. See docs/architecture/rules-admission-review.md §4.4g. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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. |
|
Review of PR #1322 (the diff was truncated at 60 KB, so I only saw part of the test changes). 1. Chord-group conflicts now have no fixes (
2. Doc comment typo (
3. Minor
|
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.
Replace, not wrap (review §4.4g).
What
AdmissionEngine.conflicts(in:leaderKey:)computes every conflict from claims — what each owner puts on which slot — attributed by rule id. Five kinds of collision in one pass: key slot (with the leader key's base slot, fix: detect leader key vs collection activator conflicts #463), activator shadowing a mapping (fix: make momentary activator dedup detect-and-explain instead of silent #466), two activators disagreeing on a target layer, chord groups within one owner (fix: detect duplicate chord group names #464), and alias-name collisions (fix: detect alias name collisions from key sanitization #462).Reason.conflictgainsdetails(hold action, "activates X", alias origin); the presenter and the save gate'sMappingConflictInforender the same text.RuleCollectionDeduplicator.detectConflictsis deleted. The save gate (ConfigurationService.generateConfiguration) and the CLI (RulesFacade) callAdmissionEngine.mappingConflicts(in:leaderKey:), thenonisolatedbridge to the error type. The deduplicator keeps onlydedupe.Tests
RuleCollectionDeduplicatorTests,MultiCollectionConflictTests,AliasDeduplicationTests,DeduplicatorEdgeCaseTests,ChordGroupsIntegrationTests, CLI and save-pipeline tests) now runs against the engine, unchanged in its assertions — the proof the replacement preserves behaviour.testSameTitledRulesAreToldApart,testConflictDetailsNameTheHoldAndTheActivator.KEYPATH_TEST_ENFORCE_CLEAN_SUMMARY=1 Scripts/run-tests-safe.sh: 5,786 passed, 0 app warnings/errors, 0 build warnings.check-accessibility.pyclean.🤖 Generated with Claude Code