Skip to content

Validate lockfile graph edges before using a locked graph #119

Closed

Description

@LunaStev

Evidence

src/lockfile.rs normalizes package edge lists by sorting and deduplicating them, but it does not validate referenced package names, self-edges, or cycles when parsing. This makes malformed lockfile content less clearly diagnosed and can hide duplicate entries.

Acceptance criteria

  • Reject duplicate graph edges instead of silently removing them on read.
  • Diagnose missing package references, self-dependencies, and cycles with a path through the graph.
  • Reject malformed graph data before any Git or filesystem mutation.
  • Keep write-time ordering deterministic for valid graphs.
  • Add malformed v2 fixtures and --locked --offline process-level tests.
  • Coordinate fixture coverage with Add lockfile compatibility and migration fixtures #79.

Activity

  1. added
    bug
    dependencies
    stability
    on Sep 22, 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

    bugdependenciesstability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions