Skip to content

Spec: python.profile.detect does not describe a virtual uv workspace root #1778

Description

@ptr727

python.profile.detect in spec/project-types.json defines the build profile as a root pyproject.toml carrying [project] (or [build-system]), and the lint-only profile as tool config only with no uv.lock.

A virtual uv workspace root matches neither shape. Its root pyproject.toml carries [tool.uv.workspace], [dependency-groups], and [tool.*], but no [project] or [build-system], and it commits a uv.lock. The [project] tables live in the workspace members under subtrees. ESPHome-Config now has this layout (registry change in #1777).

spec/audit.py does not implement this check mechanically, so no automated finding fires today. A manual or agent audit that reads the assert literally would still flag a declared build profile as a mismatch.

The assert, and canonicalPlacement if it needs it, should cover a workspace root whose members carry [project], and count it as the build shape.

Found by the local strict review of #1777.

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions