Conversation
Assisted-by: Codex (model: GPT-5, autonomous)
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The added suite duplicates existing collected tests without providing meaningful new coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds tests intended to cover workflow condition remediation, but they duplicate existing focused unit coverage.
Changes:
- Adds 26 parameterized remediation and validation cases.
| File | Description |
|---|---|
tests/test_workflows.py |
Adds condition-remediation regression tests. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+971
to
+972
| class TestConditionRemediation: | ||
| """Regression coverage for safe condition-correction advice.""" |
This branch has not been deployed
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.

Summary
Adds regression coverage for workflow condition correction and remediation paths, including malformed delimiters, unsafe expressions, evaluator compatibility, incomplete operands, and bracket handling.
Validation
platform linux -- Python 3.13.15, pytest-9.1.1, pluggy-1.6.0 -- /workspaces/spec-kit/.venv/bin/python
cachedir: .pytest_cache
rootdir: /workspaces/spec-kit
configfile: pyproject.toml
plugins: cov-7.1.0
collecting ... collected 26 items
tests/test_workflows.py::TestConditionRemediation::test_correction_is_yaml_safe_and_removes_stray_delimiters[inputs.ready-"{{ inputs.ready }}"] PASSED [ 3%]
tests/test_workflows.py::TestConditionRemediation::test_correction_is_yaml_safe_and_removes_stray_delimiters[{{ inputs.ready-"{{ inputs.ready }}"] PASSED [ 7%]
tests/test_workflows.py::TestConditionRemediation::test_correction_is_yaml_safe_and_removes_stray_delimiters[prefix {{ inputs.ready }} suffix-"{{ prefix inputs.ready suffix }}"] PASSED [ 11%]
tests/test_workflows.py::TestConditionRemediation::test_correction_is_yaml_safe_and_removes_stray_delimiters[inputs.name == '}}'-"{{ inputs.name == '}}' }}"] PASSED [ 15%]
tests/test_workflows.py::TestConditionRemediation::test_correction_is_yaml_safe_and_removes_stray_delimiters[-"{{ }}"] PASSED [ 19%]
tests/test_workflows.py::TestConditionRemediation::test_correction_is_yaml_safe_and_removes_stray_delimiters[inputs.name == "Miyazaki"-"{{ inputs.name == \"Miyazaki\" }}"] PASSED [ 23%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_refuses_unsafe_corrections[-there is no expression here to wrap] PASSED [ 26%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_refuses_unsafe_corrections[inputs.name == 'unfinished-quote opened in it is never closed] PASSED [ 30%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_refuses_unsafe_corrections[inputs.values[0-brackets do not balance] PASSED [ 34%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_refuses_unsafe_corrections[inputs.name ==-operator in it is missing an operand] PASSED [ 38%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_refuses_unsafe_corrections[unknown.value == 'x'-not one of the namespace roots] PASSED [ 42%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_refuses_unsafe_corrections[inputs.name | unknown_filter-evaluator rejects it] PASSED [ 46%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_offers_only_evaluator_compatible_corrections[inputs.ready] PASSED [ 50%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_offers_only_evaluator_compatible_corrections[inputs.count > 0 and inputs.name == 'Ada'] PASSED [ 53%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_offers_only_evaluator_compatible_corrections[steps.emit.output.stdout | from_json] PASSED [ 57%]
tests/test_workflows.py::TestConditionRemediation::test_remediation_offers_only_evaluator_compatible_corrections[item[0] == 'first'] PASSED [ 61%]
tests/test_workflows.py::TestConditionRemediation::test_incomplete_operand_detection_covers_operator_positions[inputs.a == inputs.b ==-True] PASSED [ 65%]
tests/test_workflows.py::TestConditionRemediation::test_incomplete_operand_detection_covers_operator_positions[and inputs.ready-True] PASSED [ 69%]
tests/test_workflows.py::TestConditionRemediation::test_incomplete_operand_detection_covers_operator_positions[inputs.ready or-True] PASSED [ 73%]
tests/test_workflows.py::TestConditionRemediation::test_incomplete_operand_detection_covers_operator_positions[not inputs.ready-False] PASSED [ 76%]
tests/test_workflows.py::TestConditionRemediation::test_incomplete_operand_detection_covers_operator_positions[inputs.tags |-True] PASSED [ 80%]
tests/test_workflows.py::TestConditionRemediation::test_incomplete_operand_detection_covers_operator_positions[inputs.ready-False] PASSED [ 84%]
tests/test_workflows.py::TestConditionRemediation::test_bracket_validation_ignores_quoted_operands[inputs.f(]-True] PASSED [ 88%]
tests/test_workflows.py::TestConditionRemediation::test_bracket_validation_ignores_quoted_operands[inputs.f('[)')-False] PASSED [ 92%]
tests/test_workflows.py::TestConditionRemediation::test_bracket_validation_ignores_quoted_operands[inputs.f([0])-False] PASSED [ 96%]
tests/test_workflows.py::TestConditionRemediation::test_bracket_validation_ignores_quoted_operands[inputs.f(-True] PASSED [100%]
============================== 26 passed in 0.49s ==============================
Posted on behalf of @LahkLeKey by Codex (model: GPT-5, autonomous); PR body and change fully AI-drafted.