Skip to content

A lockless uv project with a Poetry plugin table loses its UV_PROJECT_ENVIRONMENT packages: "is this Poetry" is read three ways #1916

Closed

Description

[agent] Filed by the scheduled architecture audit (audit-core). Register: A47.

Kind: bug. Register ID: A47.

Problem

Three rules decide whether a pyproject.toml declares [tool.poetry], and they disagree:

  • python_crawler::declares_tool_poetry parses the TOML and says a plugin table such as [tool.poetry-dynamic-versioning] alone does not make a project Poetry's (python_crawler.rs L2280-L2289).``
  • python_crawler::claimed_by_non_uv_manager uses text.contains("[tool.poetry"), which matches the plugin table, and also matches a comment (L1049-L1065).```
  • utils::toml_edit_ext::has_table is a third table probe (L25-L42).````

claimed_by_non_uv_manager gates the lockless-uv branch at L1038,````` so a uv project without uv.lock that uses `poetry-dynamic-versioning` (a common plugin used with non-Poetry backends too) is treated as Poetry's, and its `UV_PROJECT_ENVIRONMENT` env is never crawled.

Executed on main @ cbbbdb9 (probe binary calling find_local_venv_site_packages, UV_PROJECT_ENVIRONMENT=env, env/lib/python3.12/site-packages present, no uv.lock):

  • [tool.poetry-dynamic-versioning] → the env/…/site-packages path is missing;
  • [tool.other-plugin] → it is returned.

With a uv.lock both return it, so the drift only bites lockless projects.

Proposed change

claimed_by_non_uv_manager calls declares_tool_poetry (or one shared pyproject_declares_tool(text, "poetry") helper beside toml_edit_ext::has_table) instead of the substring test. Delete the substring copy.

Size

1 file, ~10 lines plus one unit test.

Acceptance criteria

  • A unit test: lockless pyproject with only [tool.poetry-dynamic-versioning] and UV_PROJECT_ENVIRONMENT set yields the env's site-packages; [tool.poetry] still does not.
  • Existing python crawler tests and tests/crawler_python_e2e.rs pass unchanged.

Activity

  1. added
    bugSomething isn't working
    arch-auditFiled by a scheduled architecture audit routine (see the architecture review discussion)
    on Nov 1, 2026
  2. mikolalysenko commented on Nov 1, 2026

    @mikolalysenko
    CollaboratorAuthor

    [agent] Triage: priority:p1 (uv/PyPI). Confirmed on main @ cbbbdb9: claimed_by_non_uv_manager uses text.contains("[tool.poetry") (python_crawler.rs L1064) while declares_tool_poetry (L2283) excludes plugin tables. Not a duplicate; #1529 fixed product detection tables elsewhere.


    Generated by Claude Code

  3. mikolalysenko commented on Nov 1, 2026

    @mikolalysenko
    CollaboratorAuthor

    [agent] Claiming this issue (shared root cause: lockless-uv gate tests [tool.poetry by substring instead of the parsed-table rule). Branch: agent/fix-uv-poetry-plugin-table. Claim-ID: 2026-11-01T08:21:09Z-7bd62c


    Generated by Claude Code

  4. mikolalysenko commented on Nov 1, 2026

    @mikolalysenko
    CollaboratorAuthor

    [agent] Draft PR: #1922


    Generated by Claude Code

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

    agent:triagedarch-auditFiled by a scheduled architecture audit routine (see the architecture review discussion)bugSomething isn't workingpriority:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions