fix(bundler): pass explicit workflow_add options from bundle install - #4284
Open
chelsealong wants to merge 1 commit into
Open
fix(bundler): pass explicit workflow_add options from bundle install#4284chelsealong wants to merge 1 commit into
chelsealong wants to merge 1 commit into
Conversation
workflow_add's dev/from_url parameters are declared as typer.Option defaults, which only bind when Typer invokes the command. Calling workflow_add directly from the bundler leaves dev bound to the truthy OptionInfo default, so every bundle-installed workflow is mistaken for a local path and fails to resolve from the catalog. Fixes github#4282
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
Fixes #4282
specify bundle installfailed to install any workflow from a catalog. Theroot cause is in
_WorkflowKindManager.install(src/specify_cli/bundler/services/primitives.py):it calls the Typer command
workflow_adddirectly as a plain Python function,workflow_add(component.id). Typer only bindsdev/from_urlto theirdeclared defaults (
False/None) when it invokes the command itself —calling the function directly leaves
devbound to the raw (truthy)typer.OptionInfoobject. That makes the local-path branch trigger, so theworkflow's catalog ID is treated as a filesystem path and installation fails
with:
This passes
dev=False, from_url=Noneexplicitly at the call site, matchingthe fix suggested in the issue.
Testing
uv run specify --helpuv sync --extra test && uv run pytest -q— 7308 passed, 10 skippeduvx ruff@0.15.0 check src tests— all checks passedtests/unit/test_bundler_primitives.py::test_offline_workflow_allows_bundledthat captures thedev/from_urlvaluesworkflow_addis actually called withVerified the added assertion fails without the fix:
AI Disclosure
Implemented autonomously by Claude Code (Sonnet 5) under automated direction. The regression test was written and confirmed to fail before the fix, then the full test suite and lint were run locally as shown above.