Repository navigation
Closed
Description
Problem
The hub defines how Python should be set up (the python-codestyle Skill's build and lint-only profiles), but every mechanism that enforces it switches on config presence rather than code presence, so a repository's Python is gated only if it happens to carry the right file in the right place.
| Mechanism | Trigger | Blind to |
|---|---|---|
python type, spec/project-types.json detect |
pyproject.toml or setup.py |
a repository with .py files and neither |
validate-task.yml lint and type check |
a root pyproject.toml |
Python in a subdirectory, and a repository with no config |
validate-task.yml unit test and coverage |
root pyproject.toml + root tests/ + uv.lock or requirements*.txt |
the lint-only profile, whose unittest suite sits in <scripts-dir>/tests/ with no lockfile |
| audit | registry types | untyped repositories carrying Python |
Measured on each repository's default branch, 2026-09-24:
- Python nothing gates: Blog and KiCadLibrary each carry
.pyfiles andtest_*.pyfiles, with nopyproject.tomland nopythontype. - Nested Python the root-keyed steps miss: HomeAutomation-Config (a build-shaped
CloudInit/and a lint-onlyNotify/, and nopythontype), PlexCleaner (RegressionTests/only), and ESPHome-Config (a uv workspace root whose project sits undereasystart/python/). - Partially gated: homeassistant-purpleair keeps its tool config outside
pyproject.toml, has no lockfile, and uploads no coverage.
Proposed contract
- Tracked
.pyfiles make a repository Python. Detect from**/*.pyrather than from config, and have the audit report Python present without thepythontype. - Every Python repository owes the same gates, whatever it ships: ruff lint and format, a type check, a test suite, and a coverage report to Codecov.
- The profile is only the dependency shape. build (third-party dependencies,
uv.lock) versus lint-only (stdlib-only, runs under barepython3). The shape decides how the tools are installed, not what is owed. - The shared validate task serves both shapes. The unit-test job runs a lint-only
unittestsuite undercoverageas well, and finds Python projects in declared subdirectories rather than assuming the root. - Where tool config lives stays repo-local. The audit checks that the gates run, not which file holds the settings.
The pyproject.toml row in spec/divergences.json stays accepted under this contract, since it records whether a repository carries a copy of the hub's own file, which this does not change.
Open decisions
- How a subdirectory project is declared, a registry field or a spec convention.
- Whether a repository with only a handful of helper scripts owes a test suite, or only lint and a type check.
- The adoption order for the five repositories above.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Accept the pyproject.toml Divergence as a Path Collision (#1802)
ptr727 commentedon Sep 26, 2026
Two of the three open decisions are settled. The maintainer answered them on 2026-09-25, from #1134.
validate-task.yml, for examplepython-directories, mirrored in the registry so the audit can catch a caller that fails to pass it. Auto-discovery was rejected because a stray or vendored.pyfile would silently change what gets gated. An input with no registry mirror was rejected because the audit could not see a missing declaration.This issue now also owns #1134's gap 2 (root-anchored
hashFilesin both thelintandunit-testjobs). #1848 ships #1134's other two gaps on their own.Known adoption cost, reported by PlexCleaner's session:
RegressionTests/holds a lint-only, stdlib-onlypyproject.toml(ruff and mypy config) and 9.pyfiles, with notests/, lockfile, or requirements file. Under decision 2 it will need a test suite with coverage. PlexCleaner is holding its adoption of the hub validator until this issue is promoted.Fail the C# Unit Test Step When No Coverage Report Was Written (#1848)
Promote the C# Coverage Report Check, Archived-Repository Exemption, …
ptr727 commentedon Sep 27, 2026
The third decision is settled. The maintainer answered it on 2026-09-26.
All three open decisions are now settled.
Gate Each Declared Python Directory on Its Code (#1914)
Promote develop to main: Gate Each Declared Python Directory on Its C…