Skip to content

Lockfile: add agr.lock for reproducible installs #497

@kasperjunge

Description

@kasperjunge

Summary

Introduce agr.lock that pins exact git commit SHAs for every resolved dependency. When a lockfile exists, agr sync should produce byte-identical results across machines and over time.

Why

Without a lockfile, teams cannot guarantee reproducibility. The existing .agr.json content hash is a step toward integrity checking, but it does not pin resolved versions. This is a core package manager feature (npm has package-lock.json, pip has requirements.txt, cargo has Cargo.lock).

Scope

  • Define lockfile format (TOML or YAML) storing: handle, resolved commit SHA, content hash, source
  • Generate/update lockfile on agr add and agr update
  • Read lockfile in agr sync to install exact pinned versions
  • Add agr sync --frozen mode that fails if lockfile is out of date (for CI)
  • Depends on: version refs (#ref syntax in handles)

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions