Repository navigation
Closed
Description
Problem
The final local strict review of #1914 found no real failure path for any repo shape the fleet holds today. It did list these edge cases, deferred rather than fixed on that PR by the maintainer's call, most likely first:
- BOM in pyproject.toml.
python_directories.pyreads it asutf-8, and tomllib rejects a leading BOM. So an undeclared root whosepyproject.tomlcarries one now fails, where ruff and mypy accepted it before. Reading withutf-8-sigcloses this. - mypy on a declared pip directory. The command-line
--python-versionoverrides apython_versionpinned in the repo's own mypy config. And mypy running under uvx cannot import a plugin installed only in.venv. - A subdirectory with type-checker config only at the root. The checker lookup reads only the declared directory, so a monorepo whose
[tool.mypy]or[tool.pyright]lives in the rootpyproject.tomlfails with "configures neither". - unittest discovery.
discover -s testsexits 5 on pytest-style plain functions, with no coverage-specific message, and it silently skips nested test directories that have no__init__.py. - Name-matched test modules. With the lint-only exclusion gone, a python-typed lint-only repo holding a script merely named
test_*.pynow owes a Codecov claim. - Prose: detection. AUDIT.md's classification line and
spec/project-types.json's pythondetectgive no carve-out for the carriedhub-fetch-run.py, which the resolver and audit now skip. - Prose: WORKFLOW.md D1.2. It no longer says the undeclared root's test leg also needs
tests/plus auv.lockorrequirements*.txt. - Prose: the python-codestyle profiles. In
references/profiles.md, "A script that carries a gate still earns tests" is conditional, while a declared directory owes tests unconditionally.python.profile.detectalso does not listrequirements*.txtamong what a lint-only subtree must not carry. - The audit's caller check. It reads only a job keyed
validate, so a renamed job, or a flow-mappingwith: { python-directories: X }, is skipped or misread.
Items 1 and 6 are the ones worth doing first. 1 is the only departure from "an undeclared root keeps the old gate exactly", and 6 contradicts behavior that has already shipped.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ptr727 commentedon Sep 27, 2026
Two more from the local strict review of the promotion fix, both edge cases:
python_directories.pyreadspyproject.tomla second time to decide whether to name a byte-order mark in its TOML error. A file deleted between the two reads raises an uncaughtFileNotFoundErrorinstead of::error::. Detecting the mark from the text already read closes this.spec/secrets.json'smechanisms.codecov.notestill says a csharp or python repo listsCODECOV_TOKENunconditionally, while the top-level note now says only a repo with tests for that language owes it.Let the Unit-Test Job's uv Setup Find Nothing to Cache (#1919)
ptr727 commentedon Sep 27, 2026
Three more, from the local review of the registry
typesgate, all edge cases:spec/validate.pyemptiesrepo_typeswhen the shape check fails. So a mixed list such as["pythn", 3]hides the unknown-type error forpythnuntil a second run, and a declared profile then also draws a false "not one of the repo's types" error. Keeping the list's string elements, asdeclared_types()does in the audit, closes both.scripts/carry.pystill readsentry.get("types", [])unguarded, inselector_setand two prints.resolve_repoaccepts an entry of any status, while the new shape check runs only for cataloged entries, so a backlog entry with a stringtypesstill reaches it.declared_types()through two of its callers only. The other guarded readers have no case with a malformed value.ptr727 commentedon Sep 27, 2026
declared_types()inspec/audit.pysays it returns "none" for a non-listtypes, which can read as PythonNone, while it returns[]. Andspec/validate.pynow answers an explicit"types": nullon a cataloged entry with the shape error rather than "cataloged repo has no types (add types or mark it backlog)", dropping that remedy. Both are wording only.Refuse a Non-List Types Value at the Registry Gate (#1920)
Promote develop to main: Gate Each Declared Python Directory on Its C…
ptr727 commentedon Sep 27, 2026
Item 1 (BOM) is settled in a5bdc15 (#1919), but not by stripping the mark. tomllib, mypy, and the workflow's editable-install probe all reject a byte-order mark, so the resolver now fails with an error naming it rather than letting the file past to be misread later. The undeclared root's old gate accepted a BOM file only because nothing parsed it, and mypy silently dropped its config there.
Close the Python Gate's Clear-Fix Edge Cases From #1917 (#1937)
Promote develop to main: Close the Python Gate's Clear-Fix Edge Cases (…