test: native config collision matrix for all 4 tools#52
Conversation
Prove that project-owned pyproject.toml [tool.*] sections and sidecar configs suppress bundled flags for ruff, basedpyright, coverage, and import-linter, and that no tool's config silently suppresses another's. - Parametrised tool_config_source matrix: bundled→all 4 tools in bare project; project-owned→all 4 tools with full pyproject - 12-pair cross-tool isolation test: each [tool.<X>] section must never suppress bundled config for any other tool - .importlinter sidecar test for arch task (previously untested path) - Cross-tool FP spot-checks at task level (ruff, typecheck, coverage, format, format-check) verifying the suppression decision wires through to actual CLI flags - Hoist _BARE constant above all callers; eliminate duplicate definition
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive suite of tests to ensure cross-tool isolation and correct configuration handling across various tasks like linting, formatting, type-checking, and coverage. It specifically verifies that the presence of configuration for one tool does not suppress the bundled defaults for others and validates the propagation of tool version pins. A syntax error was identified in a test setup where a TOML string value was missing quotes, which would lead to a decoding error.
| version = "0.0.0" | ||
|
|
||
| [tool.importlinter] | ||
| root_package = archpin |
There was a problem hiding this comment.
The root_package value in the pyproject.toml string is missing quotes. Since pyproject.toml is a TOML file, string values must be quoted to be valid. This will cause a tomllib.TOMLDecodeError when the configuration is loaded during the test execution.
| root_package = archpin | |
| root_package = "archpin" |
Unquoted bare word caused tomllib.TOMLDecodeError when test parsed the inline pyproject.toml fixture. Addresses Gemini review comment.
Summary
tool_config_sourcematrix: all 4 tools (ruff, basedpyright, coverage, import-linter) reportbundledin bare project,project:when their[tool.*]section is present[tool.<X>]section must never suppress bundled config for any other tool.importlintersidecar detection test for arch task (previously untested path;[tool.importlinter]was covered, sidecar was not)_BAREconstant above all callers intest_defaults_path.py; eliminate duplicate definitionTest plan
uv run pytest -q tests/test_defaults_path.py tests/tasks/test_lint.py tests/tasks/test_format.py tests/tasks/test_format_check.py tests/tasks/test_typecheck.py tests/tasks/test_coverage.py tests/tasks/test_arch.py— 82 pass (up from 50 baseline)uv run interlocks check --changed— clean on the 7 files in this commit