Skip to content

fix(presets): attribute core templates with overrides-prefixed names correctly - #5129

Merged
mnriem merged 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5086
Oct 26, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5086

Conversation

@chelsealong

Copy link
Copy Markdown
Contributor

Description

Fixes #5086. resolve_with_source now uses path containment to identify project overrides, so a core file such as overrides-report.md is reported as core.

Testing

  • Tested locally with uv run specify --help
  • Ran the full test suite
  • Tested manually with a sample project

The new regression test failed before the fix (project override instead of core). After the fix, the resolver and nearby preset tests passed: 155 tests. git diff --check passed. Ruff reported 24 findings, identical with the source fix temporarily removed.

AI Disclosure

  • I did use AI assistance

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.

@chelsealong
chelsealong requested a review from mnriem as a code owner October 26, 2026 14:51
@mnriem mnriem added the triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate label Oct 26, 2026
@mnriem
mnriem requested a max review from Copilot October 26, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@mnriem
mnriem merged commit cf3f877 into github:main Oct 26, 2026
16 checks passed
@mnriem

mnriem commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: resolve_with_source reports a core template whose name starts with "overrides" as a project override

3 participants