Extract workflow bundling from manifest assembly - #726
Open
swerner wants to merge 5 commits into
Open
Conversation
Apply cleanup review findings on the collector extraction: - Deduplicate the lexical path-normalization loop: normalize_absolute_path now delegates to lexically_normalize_access_path, and it plus manifest_path_from_absolute live in working_tree.rs so the module dependency points one way (projection -> collector). Drop the redundant re-normalization in collect_bundled_file. - Extract collect_bundled_template_includes to replace the copy-pasted goal/prompt template-closure sequence, seed_config_document for the duplicated config seeding, and read_source_input for the duplicated config reader closures (with the user-settings is_file check hoisted). - Replace ~100 lines of trivial getters on the Collected* output structs with pub(super) fields; keep the CollectedPath newtype encapsulated. - Assemble the manifest by value, moving collected sources into the wire types instead of deep-copying every file a second time; drop two full DraftDocument clones that only satisfied the borrow checker; stop recomputing manifest paths per file in template-dependency verification. - Resolve the root workflow once in assemble_current_manifest, removing an unreachable duplicate error path; flatten single-use CollectionNamespace into a finalize_documents free function. No behavior change; fabro-manifest tests, clippy, and fmt pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
Ran a cleanup review (reuse / simplification / efficiency / altitude) over this PR and applied the contained fixes in 0e703a7 (net −123 lines). No behavior change intended; fabro-manifest tests (including the legacy-projection characterization test), clippy AppliedReuse / duplication
Simplification
Efficiency
Noted but not applied
🤖 Generated with Claude Code |
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
WorkflowBundlerthat produces a validatedCollectedWorkflowBundlefor the current manifest builder.CollectedWorkflowowns its graph, optional config, and associated files.Compatibility
This change does not add workflow-definition or run-intent types, APIs, stores, or producer migration. Server admission and lifecycle behavior are independent and untouched.
Tests
cargo test -p fabro-manifestcargo +nightly-2026-04-14 fmt --check --allcargo +nightly-2026-04-14 clippy -p fabro-manifest --all-targets -- -D warnings