Skip to content

Avoid staging copies and retained backups for unchanged Git checkout reuse #146

Closed

Description

@LunaStev

Problem

The project transaction introduced in #145 stages a complete copy of each reused Git checkout and publishes it through a backup even when the checkout already has the correct detached HEAD and the resolved graph has not changed. Repeated ordinary build/check/fetch/tree commands can therefore perform repository-sized copies and retain additional backups without a dependency update.

This is a source-derived finding at master 0f29f5e53df27f7fb60eeb084897d89763a01a0f, not a recorded performance benchmark:

Expected behavior

Reuse an already valid, correctly detached checkout without creating a replacement copy or retained backup solely for reuse. Actual checkout/ref/graph changes must continue to use validated transactional publication.

Acceptance criteria

  • Reproduce repeated unchanged resolution with a local Git fixture and measure checkout copies, publication operations, retained transaction directories and disk growth.
  • For a valid unchanged checkout, avoid repository-sized staging copies and retained backups during repeated ordinary build/check/fetch/tree commands, including locked/offline reuse.
  • Keep declared-origin, exact commit, detached HEAD, dirty-tree and managed-path validation. A checkout needing repair must not be mistaken for an unchanged checkout.
  • Retain project coordination through compilation and preserve parent-death child protection.
  • Preserve rollback/recovery guarantees for actual updates, selector/ref changes and newly missing checkouts.
  • Retain dry-run side-effect limits and exact locked-file preservation.
  • Add deterministic local integration coverage and a bounded performance/disk-growth check on supported platforms.
  • Do not solve the growth by deleting existing backups, user data or run generations automatically.

Boundaries

This is distinct from #43 (redundant initial network fetch), #59 (compiler freshness), and #29 (shared cross-project Git object cache). Coordinate with #44 and #81 for transaction correctness, and #88 for separately designed explicit cleanup. Per-run output generations and the no-automatic-GC policy remain unchanged.

Activity

  1. added
    performance
    dependencies
    stability
    on Sep 25, 2026
  2. self-assigned this
    on Oct 1, 2026
  3. LunaStev commented on Oct 2, 2026

    @LunaStev
    MemberAuthor

    Verified completed against master 67797f6415f640e8c33f9a072879124b83934f84.

    Valid unchanged detached checkouts avoid staging copies and retained backups. Bounded tests measure repeated reuse, transaction/backup counts, index timestamps, and disk usage, including locked/offline and legacy layouts. Actual mutations retain transactional publication and compiler leases.

    Evidence: resolver/src/lib.rs, resolver/src/transaction.rs, tests/git_lock_reproducibility.rs, tests/project_state.rs.

    Master CI run 36963423149 passed all eight jobs, including native Windows, macOS, and Linux tests. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependenciesperformancestability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions