From 79b80c319c7ab6ea1e3537e72f30aec0951f9cfd Mon Sep 17 00:00:00 2001 From: jawwad-ali Date: Wed, 22 Jul 2026 21:14:51 +0500 Subject: [PATCH] docs(workflows): gate step docstring lists the 'retry' on_reject behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/specify_cli/workflows/steps/gate/__init__.py | 2 +- tests/test_workflows.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/specify_cli/workflows/steps/gate/__init__.py b/src/specify_cli/workflows/steps/gate/__init__.py index e686a6a247..d32efdaaf4 100644 --- a/src/specify_cli/workflows/steps/gate/__init__.py +++ b/src/specify_cli/workflows/steps/gate/__init__.py @@ -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" diff --git a/tests/test_workflows.py b/tests/test_workflows.py index af5584d633..5347a36887 100644 --- a/tests/test_workflows.py +++ b/tests/test_workflows.py @@ -2100,6 +2100,15 @@ def test_validate_accepts_valid(self): 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