Skip to content

Python default test runner pollutes source with generated egg-info metadata #167

Description

@AntoineToussaint

Production evidence

Mind consumed Core v0.2.71 and CLI v0.1.71, then ran the real in-process Codefly runtime against the committed polyglot Python code unit. The formula-less default test path passed, but left this untracked project artifact:

pkg/codefly/testdata/polyglot-runtime/backend/mind_gateway_polyglot_backend.egg-info/

A focused real-uv regression also reproduces the mutation in both newly qualified v0.2.71 paths:

  • a local package declared only through requirements.txt leaves supportdep/codefly_declared_probe_dependency.egg-info/
  • an isolated pyproject dependency-group run leaves codefly_declared_group_probe.egg-info/

This happens because uv invokes the packaging backend against the original source tree. The runner already keeps JUnit, bytecode, coverage, uv.lock, .venv, and pytest cache outside the checkout, so package metadata is a contract hole in the same read-only guarantee.

Required generic outcome

  • default Python test validation must materialize the project and all declared dependencies through the production uv adapter without writing any generated package/build/test artifact into the source checkout
  • keep requirements, dependency groups, extras, interpreter pins, and the project package available
  • preserve typed zero-case provisioning/collection failures
  • prove with real uv; no mocks, stubs, project-name cleanup, or Mind-side workaround
  • do not delete pre-existing user metadata and do not rely on post-run cleanup races

This was discovered while accepting Mind roadmap #307 after Core #164/#165.

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