Repository navigation
fix(workflows): reject non-standard JSON in shell output - #5330
Merged
Merged
Conversation
Assisted-by: Codex CLI (model: gpt-6.1-sol, autonomous)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the shell-step JSON validation changes.
No open issues 🎉
What changed in this PR
This PR tightens JSON validation for Spec Kit shell workflow steps while preserving raw output and existing failure diagnostics.
Changes:
- Reject bare
NaN,Infinity, and-Infinitywhenoutput_format: jsonis enabled. - Add regression coverage for invalid constants, valid JSON, failure persistence, and workflow resume behavior.
- Document JSON parsing behavior and raw-output preservation.
| File | Description |
|---|---|
tests/workflows/test_shell_step.py |
Adds JSON validation, output preservation, and workflow resume tests. |
src/specify_cli/workflows/step/shell/__init__.py |
Rejects non-standard JSON constants and handles parsing ValueErrors. |
docs/workflow-steps/types.md |
Clarifies JSON output validation and default raw-text behavior. |
Review effort: Balanced (auto)
Collaborator
|
Thank you! |
kevinnguyenhoang91
pushed a commit
to kevinnguyenhoang91/spec-kit
that referenced
this pull request
Nov 10, 2026
Assisted-by: Codex CLI (model: gpt-6.1-sol, 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
NaN,Infinity, and-Infinitywhen a shell step declaresoutput_format: json, preserving raw output and the existing failed-step diagnostic.Testing
.venv/bin/specify --help.venv/bin/python -m pytestusing affected test paths: 311 focused and 267 lifecycle tests passed on Linux/Python 3.11.continue_on_errorbehaved as expected.AI Disclosure
AI disclosure: AI-assisted tools were used to implement the fix and develop tests.