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:
Ali jawwad
2026-07-23 01:50:58 +05:00
committed by GitHub
parent 3a7a8758f7
commit 37041087dd
2 changed files with 10 additions and 1 deletions

View File

@@ -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"

View File

@@ -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