Skip to content

docs(workflows): gate step docstring lists the 'retry' on_reject behaviour#3656

Merged
mnriem merged 1 commit into
github:mainfrom
jawwad-ali:docs/gate-step-retry-docstring
Jul 22, 2026
Merged

docs(workflows): gate step docstring lists the 'retry' on_reject behaviour#3656
mnriem merged 1 commit into
github:mainfrom
jawwad-ali:docs/gate-step-retry-docstring

Conversation

@jawwad-ali

Copy link
Copy Markdown
Contributor

What

The GateStep class docstring said on_reject "controls abort / skip behaviour" — listing only two behaviours. The step actually supports three:

  • validate() rejects any on_reject not in ('abort', 'skip', 'retry')
  • execute() has a dedicated retry branch (returns PAUSED so the next resume re-executes the gate), distinct from abort (FAILED) and skip (COMPLETED)

The docstring was the only place omitting retry, contradicting the same file's validate() and execute().

Fix

Docstring-only: controls abort / skip behaviour.controls abort / skip / retry behaviour.

Tests

tests/test_workflows.py::TestGateStep::test_docstring_lists_every_on_reject_behaviour — asserts all three behaviours appear in GateStep.__doc__ (fails before the fix). ruff clean.


AI-assisted: authored with Claude Code. Verified against the step's own validate() accepted set and execute() branches.

…viour

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GateStep documentation to accurately list all supported on_reject behaviors.

Changes:

  • Adds retry to the class docstring.
  • Adds a regression test covering all three behaviors.
Show a summary per file
File Description
src/specify_cli/workflows/steps/gate/__init__.py Documents abort, skip, and retry.
tests/test_workflows.py Verifies all supported behaviors remain documented.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@mnriem
mnriem merged commit 3704108 into github:main Jul 22, 2026
14 checks passed
@mnriem

mnriem commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants