Repository navigation
feat(workflows): pick repositories and assets on a workflow step - #53
Merged
Merged
Conversation
`mount_repositories` said a step wanted code but never said which code. The list came from the run, or from a project-wide fallback that only fired when the run carried a board task — so a workflow started on a schedule had no way to get a repository at all, and picking one per workflow was impossible. Repositories are now chosen the way tools, skills and MCP servers already are: `step.repository_ids` alongside the other step id columns, and `workflow.config["base_repository_ids"]` alongside the other `base_*_ids`. Both are editable in the builder UI and over the personal MCP server, and a trigger-started run resolves them exactly like a manual one — what a step needs does not depend on what started it. Resolution differs from tools in one way, deliberately: an explicit pick at any level is the whole answer rather than another summand. Adding the project's other repositories on top of a deliberate choice would widen it, so `inherit_all_project_resources` stays a fallback for workflows that chose nothing. The migration backfills before it drops. Over half the steps in production keep the flag off, and that is a real "no code here" decision for report builders and planners; since resolution unions the levels, a workflow-level list would reach every step and undo each of those opt-outs. Repositories are therefore written per step, and only to the steps that resolve to one today. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
`step.asset_ids` has been a real column all along — the API permits it, the resolver unions it into the step's input assets, and meta_create_step accepts it. The session panel simply never rendered a control, so the only way to fill it was the MCP server. The panel's "Data flow" section made this easy to miss: it shows input/output asset *specs*, which are documentation, not a selection. Adds the picker next to the other resources, and a controller test covering both id lists the builder PATCHes. Neither list had API-level coverage, and a missing entry in the permit list fails silently — the request still succeeds and the selection just never persists. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
alex-astafyev
pushed a commit
to alex-astafyev/flow
that referenced
this pull request
Aug 19, 2026
* origin/develop: feat(personal-mcp): add connector catalog and registry-read tools (AixleHQ#55) fix(workflows): offer company assets in the workflow asset pickers (AixleHQ#56) feat(mcp): add sub-step update, delete and reorder tools (AixleHQ#54) feat(workflows): pick repositories and assets on a workflow step (AixleHQ#53)
9 of 13 tasks
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.
Why
mount_repositoriessaid a step wanted code but never said which code. The list came from the run, or from a project-wide fallback that only fired when the run carried a board task — so a workflow started on a schedule had no way to get a repository at all, and there was no way to pick repositories per workflow.Found while debugging a live session whose
/workspace/repowas empty. The clone never failed — it never ran.inject_repositoriesreturns early on a blank list, and theworkflow_stepsession resolvedfrom_run: [],from_project_fallback: [].Repositories become a chosen resource
Chosen the way tools, skills and MCP servers already are:
step.repository_ids— new jsonb column, alongside the other step id columnsworkflow.config["base_repository_ids"]— alongside the otherbase_*_idsEditable in the builder UI and over the personal MCP server (
meta_create_step,meta_update_step,update_workflow,get_workflow,get_workflow_step). A trigger-started run resolves them exactly like a manual one.Two deliberate differences from tools/skills:
inherit_all_project_resourcesstays a fallback for workflows that chose nothing.board_triggered?is gone from repository resolution. It described where a run came from, not what a step needs. Scheduled workflows now resolve repositories like everything else.The migration backfills before it drops
Over half the steps in production (85/158) keep
mount_repositoriesoff, and that is a real "no code here" decision — report builders, planners, intake steps. Since resolution unions the levels, a workflow-level list would reach every step and silently undo each of those opt-outs.So repositories are written per step, and only to the steps that resolve to one today:
mount_repositories = truein a workflow withinherit_all_project_resources. Steps with the flag off keep the column's empty default.Second commit: assets were missing from the same panel
step.asset_idshas been a real column all along — permitted by the API, unioned by the resolver, accepted bymeta_create_step. The session panel just never rendered a control, so the only way to fill it was the MCP server. The "Data flow" section made it easy to miss: it shows input/output asset specs, which are documentation, not a selection.Adds the picker beside the other resources, plus a controller test for both id lists the builder PATCHes. Neither had API-level coverage, and a missing permit entry fails silently — the request still succeeds and the selection never persists.
Notes for the reviewer
StepResource, the resolver). During a rolling deploy old pods will 500 on step serialization. Either take a short window, or say the word and I'll splitdrop_columninto a follow-up migration so code-then-schema ships in two releases.WorkflowDuplicatorstarts a cross-project copy with an empty repository selection — repositories are project-scoped with nothing to remap onto, and carrying the ids would point the copy at another project's code.Testing
make check_allgreen on current develop: 4012 backend tests, eslint, tsc, vitest, rubocop, brakeman, system tests. Backend coverage 90.76%.New coverage for each level in isolation, the union, explicit-beats-fallback, and the case this fixes — a run with no board task still reaching the project fallback.
🤖 Generated with Claude Code