Skip to content

refactor(install): split pipeline modules#702

Merged
jdx merged 1 commit into
mainfrom
codex/refactor-install-pipeline
May 15, 2026
Merged

refactor(install): split pipeline modules#702
jdx merged 1 commit into
mainfrom
codex/refactor-install-pipeline

Conversation

@jdx

@jdx jdx commented May 15, 2026

Copy link
Copy Markdown
Owner

What changed

  • Split the install materializer pipeline into commands/install/materialize.rs.
  • Split the native-build critical-path fetch heuristic into commands/install/critical_path.rs.
  • Split workspace graph filtering, lifecycle ordering, and per-project lockfile helpers into commands/install/workspace.rs.
  • Moved the related unit tests with their modules.

Why

This follows PR #698 with a larger mechanical refactor. commands/install/mod.rs still owned several unrelated install subdomains after the first helper split; moving these chunks gives materialization, workspace handling, and critical-path ordering narrower homes while preserving the existing install flow.

Validation

  • cargo fmt --check
  • cargo check -p aube
  • cargo clippy -p aube --all-targets -- -D warnings
  • cargo test -p aube commands::install

Note

Low Risk
Mostly a mechanical refactor that moves install helper logic (materialization, workspace helpers, native-build heuristic) into new modules, with minimal behavioral change expected. Risk is limited to potential wiring/visibility mistakes during the move affecting install flow or error reporting.

Overview
Refactors install by extracting three previously inlined chunks from commands/install/mod.rs into dedicated modules: materialize.rs (materializer channel/task + error-combining helper), critical_path.rs (native-build heuristic used for fetch reordering), and workspace.rs (workspace graph filtering, lifecycle manifest ordering, and per-project lockfile writing helpers).

Updates install/mod.rs to import these helpers from the new modules and relocates the associated unit tests alongside each module.

Reviewed by Cursor Bugbot for commit d968f6a. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Pure mechanical split of commands/install/mod.rs into three new sibling modules — no logic changes, no behavioral differences. All moved code is byte-for-byte identical to what was in mod.rs, and the unit tests travel with their modules.

  • critical_path.rs extracts is_likely_native_build (heuristic + 4 tests); materialize.rs holds the GVS-prewarm and per-project materializer pipelines along with channel helpers and combine_install_pipeline_errors; workspace.rs owns graph filtering, lifecycle ordering, and per-project lockfile writing.
  • Visibility on previously-private helpers (combine_install_pipeline_errors, filter_graph_to_workspace_selection, etc.) is correctly widened to pub(super) so mod.rs can import them; the use import lists in mod.rs match exactly the call sites that remain there.

Confidence Score: 5/5

Safe to merge — this is a purely mechanical code move with no logic changes.

Every function, type, constant, and test block is moved verbatim from mod.rs into the new sibling files. The only changes are visibility upgrades (private to pub(super)) required to let mod.rs import the moved items, and those upgrades are all scoped to within the install module boundary. Module wiring in mod.rs is minimal and correct. No callers outside install are affected.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube/src/commands/install/critical_path.rs New file containing is_likely_native_build heuristic and its four unit tests, moved verbatim from mod.rs with visibility upgraded to pub(super)
crates/aube/src/commands/install/materialize.rs New file holding GVS-prewarm and per-project materializer pipelines, channel/type aliases, and combine_install_pipeline_errors; combine_install_pipeline_errors gets pub(super) (was private in mod.rs) so it can be re-exported — correct and necessary change
crates/aube/src/commands/install/mod.rs Three new submodule declarations and corresponding use imports added; ~1100 lines of moved code removed — module wiring is correct and imports match exactly what callers inside mod.rs need
crates/aube/src/commands/install/workspace.rs New file with workspace graph filtering, importer_project_dir, lifecycle ordering, and write_per_project_lockfiles; all moved verbatim from mod.rs; uses workspace_importer_path via use crate::commands::workspace_importer_path which correctly resolves the cross-module reference

Reviews (1): Last reviewed commit: "refactor(install): split pipeline module..." | Re-trigger Greptile

@jdx jdx enabled auto-merge (squash) May 15, 2026 02:40
@jdx jdx merged commit 82801e4 into main May 15, 2026
18 checks passed
@jdx jdx deleted the codex/refactor-install-pipeline branch May 15, 2026 02:42
@jdx jdx restored the codex/refactor-install-pipeline branch May 15, 2026 02:45
This was referenced May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant