docs(workflows): gate step docstring lists the 'retry' on_reject behaviour#3656
Merged
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates GateStep documentation to accurately list all supported on_reject behaviors.
Changes:
- Adds
retryto 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
Collaborator
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
GateStepclass docstring saidon_reject"controls abort / skip behaviour" — listing only two behaviours. The step actually supports three:validate()rejects anyon_rejectnot in('abort', 'skip', 'retry')execute()has a dedicatedretrybranch (returnsPAUSEDso the nextresumere-executes the gate), distinct fromabort(FAILED) andskip(COMPLETED)The docstring was the only place omitting
retry, contradicting the same file'svalidate()andexecute().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 inGateStep.__doc__(fails before the fix).ruffclean.AI-assisted: authored with Claude Code. Verified against the step's own
validate()accepted set andexecute()branches.