Skip to content

Commit 3704108

Browse files
jawwad-aliclaude
andauthored
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>
1 parent 3a7a875 commit 3704108

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/specify_cli/workflows/steps/gate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class GateStep(StepBase):
2626
later with ``specify workflow resume``.
2727
2828
The user's choice is stored in ``output.choice``. ``on_reject``
29-
controls abort / skip behaviour.
29+
controls abort / skip / retry behaviour.
3030
"""
3131

3232
type_key = "gate"

tests/test_workflows.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,6 +2108,15 @@ def test_validate_accepts_valid(self):
21082108
class TestGateStep:
21092109
"""Test the gate step type."""
21102110

2111+
def test_docstring_lists_every_on_reject_behaviour(self):
2112+
# The docstring must not contradict validate()/execute(): on_reject
2113+
# accepts 'abort', 'skip', AND 'retry' (execute() has a dedicated
2114+
# retry -> PAUSED branch), but the summary omitted 'retry'.
2115+
from specify_cli.workflows.steps.gate import GateStep
2116+
2117+
for behaviour in ("abort", "skip", "retry"):
2118+
assert behaviour in GateStep.__doc__
2119+
21112120
@pytest.fixture(autouse=True)
21122121
def _non_tty_stdin_by_default(self, monkeypatch):
21132122
# Default every gate test to a non-TTY stdin so none can drop into

0 commit comments

Comments
 (0)