Skip to content

Serialize concurrent dependency state mutations #23

Closed

Description

@LunaStev

Problem

Multiple Vex processes can currently mutate vex.lock and the same .vex/deps/<package> checkout concurrently. Concurrent fetch, update, build, or tree invocations can race Git fetch and checkout operations or overwrite a lockfile derived from stale state.

Cargo-like project tooling needs a clear project lock around shared mutable state.

Expected behavior

Commands that mutate dependency state should coordinate through a project-scoped lock, while read-only work should not observe half-finished state.

Acceptance criteria

  • Define which commands and phases require a shared or exclusive lock.
  • Serialize lockfile writes and managed Git clone, fetch, and checkout operations.
  • Display a concise waiting status when another Vex process owns the lock.
  • Recover cleanly from stale lock metadata after a crashed process.
  • Work on Linux, macOS, and Windows.
  • Add a concurrency integration test using two Vex processes.
  • Preserve --locked and --offline semantics.

Activity

  1. added
    bug
    cross-platform
    technical debt
    dependencies
    on Sep 18, 2026
  2. LunaStev commented on Oct 2, 2026

    @LunaStev
    MemberAuthor

    Verified completed against master 67797f6415f640e8c33f9a072879124b83934f84.

    Shared/exclusive project leases protect state before lockfile reads and through compilation, and are released before the user program starts. Tests cover concurrent readers/writers, cancellation, and parent-death compiler protection. The approved dry-run coordination-file policy is documented.

    Evidence: state/src/lib.rs, tests/project_state.rs, docs/release-readiness.md.

    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

No one assigned

    Labels

    bugcross-platformdependenciestechnical debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions