mirror of
https://github.com/github/spec-kit.git
synced 2026-08-03 06:26:30 +08:00
docs(workflows): gate step docstring lists the 'retry' on_reject behaviour (#3656)
The GateStep docstring said on_reject "controls abort / skip behaviour", omitting the third value. validate() accepts 'abort', 'skip', or 'retry', and execute() has a dedicated retry branch (returns PAUSED so the next resume re-runs the gate) distinct from abort (FAILED) and skip (COMPLETED). Add 'retry' to the docstring so it matches the same file's validate() and execute() authority. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ class GateStep(StepBase):
|
||||
later with ``specify workflow resume``.
|
||||
|
||||
The user's choice is stored in ``output.choice``. ``on_reject``
|
||||
controls abort / skip behaviour.
|
||||
controls abort / skip / retry behaviour.
|
||||
"""
|
||||
|
||||
type_key = "gate"
|
||||
|
||||
@@ -2108,6 +2108,15 @@ class TestInitStep:
|
||||
class TestGateStep:
|
||||
"""Test the gate step type."""
|
||||
|
||||
def test_docstring_lists_every_on_reject_behaviour(self):
|
||||
# The docstring must not contradict validate()/execute(): on_reject
|
||||
# accepts 'abort', 'skip', AND 'retry' (execute() has a dedicated
|
||||
# retry -> PAUSED branch), but the summary omitted 'retry'.
|
||||
from specify_cli.workflows.steps.gate import GateStep
|
||||
|
||||
for behaviour in ("abort", "skip", "retry"):
|
||||
assert behaviour in GateStep.__doc__
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _non_tty_stdin_by_default(self, monkeypatch):
|
||||
# Default every gate test to a non-TTY stdin so none can drop into
|
||||
|
||||
Reference in New Issue
Block a user