fix(workflows): load custom steps before update - #4768
Open
WOLIKIMCHENG wants to merge 1 commit into
Open
WOLIKIMCHENG wants to merge 1 commit into
WOLIKIMCHENG wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Process-global custom steps can leak across projects and incorrectly validate an update.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Loads custom workflow steps before validating workflow updates.
Changes:
- Registers project custom steps during
workflow update. - Adds success and transactional rejection regressions.
| File | Description |
|---|---|
src/specify_cli/workflows/command_update.py |
Loads custom steps before update validation. |
tests/specify_cli/workflows/test_command_update.py |
Tests custom and unknown step updates. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| from .catalog import WorkflowCatalog, WorkflowCatalogError | ||
|
|
||
| project_root = cli._require_specify_project() | ||
| load_custom_steps(project_root) |
Collaborator
|
Please address Copilot feedback |
This branch has not been deployed
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.

Description
Load project-installed custom workflow steps before
workflow updatevalidates a downloaded candidate.
This aligns update with add, run, and resume. Updates that reference an
installed custom step can now succeed, while unrelated unknown step types
remain rejected without changing the installed workflow or registry.
Testing
tests/specify_cli/workflows/test_command_update.py: 21 passedtests/specify_cli/workflows: 359 passed, 1 skippedgit diff --check: passedAI Disclosure
AI disclosure: OpenAI Codex (GPT-5.6 Sol, Terra, and Luna;
human-supervised) assisted with code and tests.