Skip to content

fix(presets): report preset layers hidden by project overrides - #5560

Merged
mnriem merged 1 commit into
github:mainfrom
dleontev:fix/5337-preset-override-diagnostic
Nov 25, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
dleontev:fix/5337-preset-override-diagnostic

Conversation

@dleontev

Copy link
Copy Markdown
Contributor

Description

When a project override wins template resolution, specify preset resolve now prints the hidden enabled presets and their composition strategies on stderr. The selected template path and source stay on stdout. This helps someone who has installed a preset understand why its content is missing from the selected template.

Fixes #5337.

Testing

Codex ran the following checks on 22cdab3.

  • Ran the installed CLI with specify --help.
  • Ran the full pytest suite on Linux (Python 3.14.10, 17,151 passed and 711 skipped) and native Windows (Python 3.15.2, 16,632 passed and 1,230 skipped). Both runs had zero failures. Ruff also passed.
  • Tested a sample project where a project override hid an append preset and checked that a template with no matching preset produced no diagnostic.

The new regression test failed on upstream f61648d because stderr was empty and passed with the fix. All 21 separately run Windows Git Bash workflow checks passed. Earlier runs with Git Bash enabled across the Windows suite reproduced failures on both clean upstream and the candidate.

Contributor verification

I observed that the command shows the file it picked, names the hidden preset layer, and describes what that layer would have done. This makes it clear which preset contribution the project override hides.

AI Disclosure

  • I did use AI assistance.

AI disclosure: OpenAI Codex (GPT-6, autonomous mode with default collaboration settings) investigated the issue, wrote the fix, regression tests, and documentation, authored the attributed commit and resolved its rebase, ran the automated checks, and drafted this PR. Codex lightly copyedited the contributor’s verification note.

List the hidden preset IDs and their strategies on stderr when a project override wins resolution.

Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
@dleontev
dleontev requested a review from mnriem as a code owner November 24, 2026 23:05
Copilot AI adaptive review requested due to automatic review settings November 24, 2026 23:05

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

There are no active review issues for the change making project overrides visible in preset-resolution diagnostics.

No open issues 🎉

What changed in this PR

Makes project overrides visible in Spec Kit’s preset resolution diagnostics, addressing #5337 without changing template selection or stdout output.

Changes:

  • Reports hidden enabled presets and their composition strategies on stderr.
  • Includes preset identifiers on all collected preset layers.
  • Documents the diagnostic and adds regression coverage for hidden, disabled, and non-matching presets.
File Description
tests/​specify_cli/​presets/​test_command_resolve.py Tests hidden-preset diagnostics and cases that should remain silent.
src/​specify_cli/​presets/​command_resolve.py Prints hidden preset names and strategies on stderr.
src/​specify_cli/​presets/​_resolver.py Adds preset identifiers to every preset layer.
docs/​presets/​cli.md Explains override precedence and the new diagnostic.

Review effort: Balanced (adaptive)

@mnriem mnriem added the triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate label Nov 25, 2026
@mnriem
mnriem requested a balanced review from Copilot November 25, 2026 14:55

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

No active review issues are reported for the change that surfaces preset layers hidden by project overrides.

No open issues 🎉

Review effort: Balanced

@mnriem
mnriem merged commit 22ee443 into github:main Nov 25, 2026
14 checks passed
@mnriem

mnriem commented Nov 25, 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.

A project override silently turns off presets for that template

3 participants