Skip to content

refactor(install): split fetch pipeline#704

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

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

Conversation

@jdx

@jdx jdx commented May 15, 2026

Copy link
Copy Markdown
Owner

What changed

  • Split the package fetch pipeline out of commands/install/mod.rs into commands/install/fetch.rs.
  • Moved local source import, lockfile fetch wrapper, store-index classification, tarball fetch/import, and contextualized-index remapping into the new module.
  • Kept install::fetch_packages available for the sibling aube fetch command through the install module re-export.

Why

This is a stacked follow-up to #702. After moving materialization, workspace, and critical-path helpers, the fetch/import pipeline was the next largest coherent chunk left in install/mod.rs.

Stacking

Base branch is codex/refactor-install-pipeline so this PR shows only the fetch extraction. Once #702 merges, this branch can be rebased or retargeted onto main.

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
Pure refactor that moves fetch/import logic into a new module and adjusts imports/re-exports; runtime behavior should be unchanged aside from potential integration regressions due to wiring changes.

Overview
Extracts the install fetch/import pipeline from commands/install/mod.rs into a new commands/install/fetch.rs module, including local source imports (file/link/git/remote tarball), store index classification/caching, tarball download+integrity verification, and contextualized index remapping.

Updates install/mod.rs to declare mod fetch, re-export fetch_packages for aube fetch, and route existing install paths to the moved helpers, reducing the size of mod.rs without changing the install feature set.

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

@jdx jdx changed the base branch from codex/refactor-install-pipeline to main May 15, 2026 02:46
@jdx jdx force-pushed the codex/refactor-install-fetch branch from 517ac2e to 57b0c95 Compare May 15, 2026 02:46
@greptile-apps

greptile-apps Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Pure structural refactor that extracts the package fetch/import pipeline (~930 lines) from commands/install/mod.rs into a new commands/install/fetch.rs module. No logic is changed — functions are moved verbatim and the public API surface is preserved via re-exports.

  • fetch.rs hosts import_local_source, fetch_packages, fetch_packages_with_root, remap_indices_to_contextualized, and version_from_dep_path with the same visibility rules they had in mod.rs (pub(super) for internal helpers, pub(in crate::commands) for the aube fetch-facing entry point).
  • mod.rs drops the now-redundant local imports (rayon, dep_path_to_filename, is_likely_native_build, git_prepare helpers) and re-exports fetch_packages at pub(super) so sibling commands can still reach it through install::fetch_packages.

Confidence Score: 5/5

Safe to merge — the code is moved byte-for-byte; the PR's own validation (fmt, check, clippy, tests) covers the changed paths.

Every function body in fetch.rs is a verbatim copy of what was in mod.rs; the only changes are module boundaries and import adjustments. The re-export visibility (pub(super) for fetch_packages) is semantically equivalent to pub(in crate::commands) from the sub-module's perspective, so no callers lose access.

No files require special attention; both files are straightforward module restructuring with no logic edits.

Important Files Changed

Filename Overview
crates/aube/src/commands/install/fetch.rs New 933-line module extracted from install/mod.rs containing the full fetch pipeline (local source import, store-index check, tarball download, progress reporting, index remapping); logic is identical to the original
crates/aube/src/commands/install/mod.rs Declares the new fetch submodule, re-exports fetch_packages at pub(super) for the sibling aube fetch command, removes now-unnecessary local imports (dep_path_to_filename, rayon, is_likely_native_build, git_prepare helpers)

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

@jdx jdx enabled auto-merge (squash) May 15, 2026 02:50
@jdx jdx merged commit c9460d9 into main May 15, 2026
20 checks passed
@jdx jdx deleted the codex/refactor-install-fetch branch May 15, 2026 02:53
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