Repository navigation
fix(presets): render missing preset IDs as literal text - #5314
Merged
mnriem merged 1 commit intoNov 9, 2026
Merged
Conversation
Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies no active issues, and regression coverage confirms markup-containing unknown preset IDs render literally while preserving the expected failure exit code.
No open issues 🎉
What changed in this PR
This pull request fixes specify preset info so unknown preset IDs containing Rich markup are rendered as literal text instead of raising MarkupError, while preserving the original ID for lookups.
Changes:
- Uses the escaped preset ID when rendering missing-preset errors.
- Adds regression coverage for IDs containing a Rich closing tag.
- Verifies the command reports the literal ID and exits with code 1.
| File | Description |
|---|---|
tests/specify_cli/presets/test_command_info.py |
Verifies markup-containing missing IDs render literally and return exit code 1. |
src/specify_cli/presets/command_info.py |
Renders escaped preset IDs in missing-preset errors. |
Review effort: Lite (auto)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation escapes unknown preset IDs only for Rich rendering while preserving the original lookup value, and regression coverage verifies literal output with the existing exit code.
No open issues 🎉
Review effort: Lite (auto)
Collaborator
|
Thank you! |
kevinnguyenhoang91
pushed a commit
to kevinnguyenhoang91/spec-kit
that referenced
this pull request
Nov 10, 2026
Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
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
If an unknown preset ID contains a Rich closing tag,
specify preset inforaisesMarkupErrorwhile trying to report the missing preset. Use the command's existing escaped ID when rendering that error. Lookups still use the literal ID.Testing
MarkupErrorand passes after the fix.specifyentry point passed--helpand a sample-project check. A known cached preset rendered successfully and[/bold]missingreturned exit code 1 with its literal ID in the error.AI Disclosure
AI disclosure: OpenAI Codex (GPT-6, autonomous, reasoning setting not exposed to the agent) reproduced the issue, wrote and verified the fix and regression, and drafted this PR on behalf of @xunguangzlj-cloud.