Skip to content

Test: add Poetry (poetry.lock) edge-case fixture for vg build #252

Closed as not planned

Description

@vibgrate-team

Context

We already seed fixtures for pnpm, Yarn Berry, Cargo workspaces, and Go workspaces. Poetry (pyproject.toml + poetry.lock) is a common Python path that still needs a small deterministic corpus so vg build / dependency graph extraction stays stable.

What to do

  • Add a minimal fixture under test/ (or the repo’s existing fixture layout) with a Poetry lock that includes at least one path/git or extras edge case if supported — keep it tiny.
  • Assert deterministic graph.json (stable IDs/sorts) for vg build on that fixture.
  • Follow CONTRIBUTING grammar/fixture patterns; no network during the test.

Acceptance

  • Fixture is checked in and builds offline
  • Test asserts stable graph output
  • No secrets, no live registry calls
  • DCO sign-off (git commit -s)

Activity

  1. added
    enhancement
    good first issue
    on Sep 22, 2026
  2. vibgrate-team commented on Oct 5, 2026

    @vibgrate-team
    ContributorAuthor

    Some scope notes from the current code, so the fixture asserts the right surfaces:

    • vg build reads pyproject.toml only (ingestPyproject in src/engine/manifests.ts): PEP 621 [project].dependencies and [tool.poetry.dependencies], minus python. It does not read poetry.lock, Poetry dependency groups ([tool.poetry.group.<name>.dependencies]), or [tool.poetry.dev-dependencies]. Names are used as written, not PEP 503-normalised, so Flask in one manifest and flask in another become two external nodes.
    • poetry.lock is read elsewhere: lockfileVersion(root, 'pypi', name) (tomlPackageLock, PEP 503 name match) gives the pinned version, and fullDependencyGraph → poetryLikeLockTree gives the component list for vg sbom export (components only, no edges).

    Suggested fixture, test/fixtures/poetry/: a pyproject.toml and matching poetry.lock with:

    • one plain dependency
    • an extras table, requests = { version = "^2.31", extras = ["socks"] }
    • a path dependency, mylib = { path = "../mylib", develop = true }
    • one [tool.poetry.group.dev.dependencies] entry
    • one mixed-case name

    Assertions:

    • graph.json edges are sorted and identical across two builds, with the group dependency pinned as currently absent
    • lockfileVersion resolves each dependency, including mixed case → PEP 503 match
    • fullDependencyGraph(...).components is exact

    Whether dependency groups should show in the graph is a behaviour question. Keep this PR to fixture + tests and raise that separately.

  3. vibgrate-team commented on Oct 29, 2026

    @vibgrate-team
    ContributorAuthor

    Folding this into #511, which covers this lockfile with the exact functions, fixtures and acceptance tests. Please pick it up there!

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

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions