Repository navigation
fix(presets): attribute core templates with overrides-prefixed names correctly - #5129
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped fix corrects the reported attribution error, with regression coverage and existing tests for genuine overrides.
No open issues 🎉
What changed in this PR
Fixes #5086 in Spec Kit’s preset resolver so core templates with overrides-prefixed filenames are correctly attributed to core.
Changes:
- Replaces substring matching with directory containment for project-override detection.
- Adds a regression test for
overrides-report.md, complementing existing coverage for genuine overrides.
Tests were not rerun during this review; the PR reports that the regression test failed before the fix and passed afterward.
| File | Description |
|---|---|
| tests/specify_cli/presets/test_resolver.py | Adds regression coverage for an overrides-prefixed core filename. |
| src/specify_cli/presets/_resolver.py | Uses path containment to identify project overrides correctly. |
Review effort: Max
Collaborator
|
Thank you! |
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.
Description
Fixes #5086.
resolve_with_sourcenow uses path containment to identify project overrides, so a core file such asoverrides-report.mdis reported ascore.Testing
uv run specify --helpThe new regression test failed before the fix (
project overrideinstead ofcore). After the fix, the resolver and nearby preset tests passed: 155 tests.git diff --checkpassed. Ruff reported 24 findings, identical with the source fix temporarily removed.AI Disclosure
AI disclosure: Implemented and tested by Codex (GPT-6, autonomous; reasoning setting unavailable). Codex generated the code and regression test. No human review or testing is claimed.