Repository navigation
fix(5076): escape Rich markup in workflow output - #5112
mikamikasuki wants to merge 2 commits into
Conversation
Escape user-controlled search queries, catalog errors, and workflow banner fields before rendering them through Rich. Add regressions for malformed square-bracket input and literal query text. Assisted-by: OpenAI Codex (model: GPT-6, autonomous; reasoning/settings unavailable)
There was a problem hiding this comment.
🟡 Changes recommended
The new search regression tests depend on live catalogs and can fail before exercising the rendering fix.
1 open issue
What changed in this PR
This PR protects Specify CLI workflow output from Rich markup parsing, so bracketed input is displayed literally rather than hidden or causing rendering errors.
Changes:
- Escape step-search queries and catalog validation errors.
- Escape workflow names, IDs, and versions in run banners.
- Add regression tests for bracketed queries, invalid URLs, and workflow names.
AI-generated review for the requester by GitHub Copilot (model: unknown; autonomous mode). Verification was limited to source inspection; reported test results were not rerun.
| File | Description |
|---|---|
tests/specify_cli/workflows/test_command_run.py |
Tests literal workflow-name rendering. |
tests/specify_cli/workflows/step/test_command_search.py |
Tests bracketed queries and catalog errors. |
tests/specify_cli/workflows/step/catalog/test_command_add.py |
Tests bracketed URLs in step-catalog errors. |
tests/specify_cli/workflows/catalog/test_command_add.py |
Tests bracketed URLs in workflow-catalog errors. |
src/specify_cli/workflows/step/command_search.py |
Escapes queries and catalog errors. |
src/specify_cli/workflows/step/catalog/command_add.py |
Escapes step-catalog validation errors. |
src/specify_cli/workflows/command_run.py |
Escapes workflow banner fields. |
src/specify_cli/workflows/catalog/command_add.py |
Escapes workflow-catalog validation errors. |
Review effort: Max
|
Please address Copilot feedback |
Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
|
Review follow-up by @mikamikasuki with OpenAI Codex (GPT-6, autonomous). AI authored the test isolation change and this summary. Stubbed Validation: |

Description
Fixes #5076.
Escape search queries, catalog validation errors, and workflow banner fields before rendering them through Rich. Inputs containing square brackets are now shown literally instead of being parsed as markup or raising
MarkupError.Testing
maincheckout and passed with this fix.git diff --checkpassed.ruff format --checkstill reports pre-existing formatting deviations on unchanged lines in four files.[/x].AI Disclosure
I used OpenAI Codex (GPT-6; reasoning settings not exposed) in autonomous mode for issue triage, reproduction, code and test generation, and validation. I have not performed a human line-by-line review of the patch.