Skip to main content

Module migration

Module migration 

Source
Expand description

Migration Wave 1 — Rust equivalents of shell logic.

This module provides consolidated Rust implementations of the read-heavy shell logic from update_helper.sh and update_stack.sh:

  • Version lookup — up_get_version() equivalent (VAL-MIGR-001, VAL-MIGR-002)
  • Selection plan — update_stack.sh menu logic (VAL-MIGR-003, VAL-MIGR-004)
  • Manifest freshness — TTL and offline tolerance (VAL-MIGR-005, VAL-MIGR-006)
  • Consolidated detection — up_detect_installed() equivalent (VAL-MIGR-007)
  • Partial installation — recognition of partially installed state (VAL-MIGR-008)

§Shell Parity

Each function in this module is designed to produce identical output to its shell counterpart. The tests in tests/migration_wave1.rs verify this parity.

Re-exports§

pub use crate::orchestrator::planner::PlannerItem;

Structs§

DetectionResult
Detection result for a single component.
FreshnessResult
Result of a manifest freshness check.

Enums§

ComponentInstallStatus
Installation status of a component, with partial installation recognition.

Functions§

build_plan_from_system
Build a selection plan with automatic system detection.
check_manifest_freshness
Check manifest freshness and resolve using the fallback chain.
detect_component_status
Detect a single component’s installation status.
detect_component_status_with_home
Detect a single component’s status with explicit home directory.
migrated_build_selection_plan
Rust equivalent of the update_stack.sh menu construction logic.
migrated_detect_all
Rust equivalent of up_detect_installed() from update_helper.sh.
migrated_detect_all_with_home
Detect all installed components with explicit home directory (testable).
migrated_get_version
Rust equivalent of up_get_version() from update_helper.sh.
migrated_get_version_with_home
Rust equivalent of up_get_version() with explicit home directory.
migrated_get_versions_batch
Rust equivalent of up_get_versions_batch() from update_helper.sh.
resolve_with_freshness
Resolve manifest with freshness checking.