fix(tests): the packaging guard was inert on Python 3.10, the declared minimum - #25
Merged
Merged
Conversation
…d minimum
A second test sweep ran the layers the first one had not: the 8 iac-cdk stack tests (CI
only, never run locally — all pass via `npx ts-node`), terraform fmt/validate (clean), the
4 specialists' A2A entrypoints (all execute offline), and the suite on Python 3.10 as well
as 3.13.
3.10 reported 3686 passed / 13 skipped against 3.13's 3693 / 6. Seven of the extra skips
were `test_packaging.py` — the whole file's pyproject-reading half, because the module did
`tomllib = None` on 3.10 and the fixture skipped:
3.10 5 passed, 7 skipped
3.13 12 passed
`requires-python = ">=3.10"`, so those 7 were inert on the project's own floor version —
including `test_registry_yaml_is_declared_as_package_data`, the INV-MCP-2 wheel guard added
in round 20 for a defect that made every pip-installed MCP server fail open. CI's 3.11+ legs
kept the guard honest, so nothing was actually unprotected, but a guard that evaporates on
the minimum supported version is a guard with a hole documented in its own skip message.
`tomli` is the standard 3.10 backport with an identical API, so the fallback is a two-line
import and a marker-gated test dependency (`python_version<'3.11'`, so 3.11+ installs
nothing extra). Both versions now report 3693 / 6 — identical coverage.
Positive-controlled on 3.10 specifically: emptying `[tool.setuptools.package-data]` fails
`test_registry_yaml_is_declared_as_package_data` there now, where before it skipped and the
defect would have shipped.
Also corrected two of my own slips while editing (JS `//` comments written into a Python
file, caught immediately by reading the result back rather than by the linter).
Verification: 3693 passed on 3.10 AND 3.13; 8/8 CDK stack tests; terraform fmt -check and
validate clean; 4/4 specialists execute offline; ruff clean; both mypy gates clean; make ci
green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this sweep ran
The previous sweep covered unit, regression, property-at-5000 and the scenario E2E layer. This one ran the layers it had not:
iac-cdk/test/*.test.ts(CI-only, never run locally)npx ts-nodeterraform fmt -check -recursive+validateThe finding
3.10 reported 3686 passed / 13 skipped against 3.13's 3693 / 6. Seven of the extra skips were all of
test_packaging.py's pyproject-reading half:The module did
tomllib = Noneon 3.10 and the fixture skipped. Sincerequires-python = ">=3.10", those seven tests were inert on the project's own floor version — includingtest_registry_yaml_is_declared_as_package_data, the INV-MCP-2 wheel guard added in round 20 for a defect that made every pip-installed MCP server fail open.CI's 3.11+ legs kept the guard honest, so nothing was actually unprotected. But a guard that evaporates on the minimum supported version is a guard with a hole documented in its own skip message — and the skip reason ("tomllib requires Python 3.11+") reads like a fact of nature when
tomliis the standard backport with an identical API.The fix
A two-line import fallback plus a marker-gated test dependency (
tomli>=2.0; python_version<'3.11', so 3.11+ installs nothing extra). Both versions now report 3693 / 6 — identical coverage.Positive-controlled on 3.10 specifically: emptying
[tool.setuptools.package-data]now failstest_registry_yaml_is_declared_as_package_datathere, where before it skipped and the defect would have shipped.Verification
terraform fmt/validateclean · 4/4 specialists offlineruffclean · both mypy gates clean ·make cigreen (lint / coverage ≥88 / iac synth / secret-scan)