perf: use a custom trie for path conflict validation#302
Open
letFunny wants to merge 6 commits into
Open
Conversation
letFunny
commented
Jun 10, 2026
Collaborator
- Have you signed the CLA?
d4113ef to
b8da2e8
Compare
b8da2e8 to
2191ba1
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces a trie-based conflict detector for slice path collisions and expands tests to cover more glob/double-glob conflict cases.
Changes:
- Replaced the O(n²) glob/generate conflict scan in
Release.validate()with apathConflictTree-based detector. - Added extensive regression tests for glob conflicts and new focused unit tests for the conflict tree/segmenter.
- Exposed internal conflict-tree types/helpers to external tests via
export_test.go.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/setup/setup.go | Switches validation to the new conflict-tree implementation. |
| internal/setup/conflict.go | Adds trie-based conflict detection and path segmentation logic. |
| internal/setup/setup_test.go | Adds multiple new test cases for glob/double-glob conflicts. |
| internal/setup/conflict_test.go | Adds unit tests for pathToSegments and the conflict tree structure. |
| internal/setup/export_test.go | Exports internal symbols to support setup_test package tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
After some very light work on performance to improve the algorithm without added complexity (basically caching some data to avoid map lookups, iteration order, etc. *) the performance is: *: All verified to reduce the number of cache misses using |
This was referenced Jun 12, 2026
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.