Skip to content

Commit 79b80c3

Browse files
jawwad-aliclaude
andcommitted
docs(workflows): gate step docstring lists the 'retry' on_reject behaviour
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 8db7228 commit 79b80c3

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
@@ -2100,6 +2100,15 @@ def test_validate_accepts_valid(self):
21002100
class TestGateStep:
21012101
"""Test the gate step type."""
21022102

2103+
def test_docstring_lists_every_on_reject_behaviour(self):
2104+
# The docstring must not contradict validate()/execute(): on_reject
2105+
# accepts 'abort', 'skip', AND 'retry' (execute() has a dedicated
2106+
# retry -> PAUSED branch), but the summary omitted 'retry'.
2107+
from specify_cli.workflows.steps.gate import GateStep
2108+
2109+
for behaviour in ("abort", "skip", "retry"):
2110+
assert behaviour in GateStep.__doc__
2111+
21032112
@pytest.fixture(autouse=True)
21042113
def _non_tty_stdin_by_default(self, monkeypatch):
21052114
# Default every gate test to a non-TTY stdin so none can drop into

0 commit comments

Comments
 (0)