fix(workflows): load custom steps before add - #4473
Open
ton-katsu wants to merge 1 commit into
Open
Conversation
Assisted-by: GitHub Copilot (model: unknown, supervised)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The targeted fix is correct, consistent with existing workflow commands, and covered by a regression test.
Pull request overview
Loads project-installed workflow steps before validating newly added workflows.
Changes:
- Loads custom steps after resolving the project root.
- Adds a regression test for the loading order and root argument.
File summaries
| File | Description |
|---|---|
src/specify_cli/workflows/_commands.py |
Loads custom steps before workflow validation. |
tests/test_workflows.py |
Verifies custom-step loading uses the resolved project root. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Assisted-by: GitHub Copilot (model: unknown, supervised)
Description
Fix the
workflow addcommand so it loads custom workflow steps beforevalidating a workflow.
Previously,
workflow adddid not callload_custom_steps(project_root).As a result, workflows containing custom steps such as
feedbackcould not bevalidated and added successfully.
A regression test was added to verify that the project root is resolved before
custom steps are loaded.
Testing
uv run specify --help.venv/bin/python -m pytest tests/test_workflows.py -quv sync && uv run pytestFocused test result:
The sample project test verified that:
feedbackstep was installed from a step catalog.feedbackstep was added successfully withspecify workflow add --dev.The full test suite was not marked as passing because running
uv sync && uv run pytestwithout thetestextra removed the test dependencies and resultedin collection errors. The focused workflow test suite passed successfully.
AI Disclosure
The code changes and regression tests were created with GitHub Copilot. The
changes were reviewed and tested by the contributor.