Bundle workflow package files for remote runs - #678
Draft
brynary wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces support for bundling workflow package files (scripts/, references/, assets/) into run manifests (schema v2) and materializing them into fresh remote sandboxes before hooks and setup/preparation run, enabling remote runs to access workflow-local runtime assets without relying on a git clone of uncommitted files.
Changes:
- Add
runtime_filesto the workflow manifest schema and API client models, and bump manifest schema to v2 only when runtime files are present. - Implement collection, validation, and size/count limiting of workflow package files during manifest build; validate and materialize these files into remote sandboxes during initialization.
- Add server-side manifest parsing/validation for v2 runtime files, including path safety checks, conflict detection, and limit enforcement.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/packages/fabro-api-client/src/models/run-manifest.ts | Updates manifest version documentation to note v2 runtime files. |
| lib/packages/fabro-api-client/src/models/manifest-workflow.ts | Adds runtime_files to the TS workflow model. |
| lib/components/fabro-workflow/src/workflow_bundle.rs | Adds runtime file constants, path validation helper, and runtime_files to BundledWorkflow with tests. |
| lib/components/fabro-workflow/src/pipeline/initialize.rs | Writes bundled runtime files into fresh remote sandboxes before hooks/prep; adds test coverage for write ordering. |
| lib/components/fabro-workflow/src/operations/start.rs | Updates test bundle construction to include runtime_files. |
| lib/components/fabro-workflow/src/operations/create.rs | Updates validation tests to include runtime_files. |
| lib/components/fabro-workflow/src/handler/manager_loop.rs | Updates test workflow bundle construction to include runtime_files. |
| lib/components/fabro-manifest/src/lib.rs | Scans workflow package dirs, bundles UTF-8 files into runtime_files, enforces limits, and selects manifest v2 when needed (with tests). |
| lib/components/fabro-manifest/Cargo.toml | Adds walkdir dependency for runtime file directory traversal. |
| lib/apps/fabro-server/src/server/handler/runs.rs | Raises request body limits for manifest-related endpoints. |
| lib/apps/fabro-server/src/run_manifest.rs | Accepts manifest v2, validates runtime file constraints, and converts runtime_files into the workflow bundle safely. |
| docs/public/api-reference/fabro-api.yaml | Extends OpenAPI schema with runtime_files and updates manifest version description. |
| Cargo.lock | Locks walkdir dependency addition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[cfg(any(test, feature = "test-support"))] | ||
| use crate::test_support as server_test_support; | ||
|
|
||
| const RUN_MANIFEST_BODY_LIMIT: usize = 10 * 1024 * 1024; |
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.
Summary
scripts/,references/, andassets/directories.Convention
Fabro scans only the three package directories. It preserves each path relative to the run working directory. Local runs continue to use files on disk. Fresh Docker and Daytona sandboxes receive bundled files after initialization and before workflow preparation.
Verification
cargo nextest run -p fabro-manifestcargo nextest run -p fabro-workflowcargo nextest run -p fabro-servercargo build --workspacecargo +nightly-2026-04-14 fmt --check --allcargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warningsbun run typecheckinlib/packages/fabro-api-client