Skip to content

Reject dirty managed Git checkouts at locked commits #19

Closed

Description

@LunaStev

Problem

Vex accepts a managed Git dependency whenever its checkout HEAD matches the commit in vex.lock. checkout_commit returns before checking the working tree when HEAD already matches, and the dry-run path also checks only HEAD.

As a result, modified or untracked files under .vex/deps/<package> can be compiled by vex build --locked --offline even though the lockfile still claims the exact committed source. This breaks the core reproducibility guarantee.

Reproduction

Verified on master at 8c2d93a:

  1. Fetch a local Git dependency and commit vex.lock.
  2. Edit .vex/deps/dep/src/lib.wave without committing.
  3. Run vex fetch --locked --offline.
  4. The command succeeds.
  5. Run vex check --locked --offline.
  6. wavec reads the modified dependency source.

Expected behavior

Vex must refuse to use a dirty managed checkout and must never overwrite local changes automatically.

Acceptance criteria

  • Check tracked modifications and untracked files before reading a managed dependency manifest or source.
  • Apply the check to normal, --locked, --offline, and --dry-run reuse paths.
  • Report the package name, checkout path, and a safe recovery action.
  • Add integration coverage for both tracked and untracked changes.
  • Preserve the existing rule that Vex does not discard user data.

Activity

  1. added
    bug
    dependencies
    critical
    on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcriticaldependencies

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions