Skip to content

test: native config collision matrix for all 4 tools#52

Open
0xjgv wants to merge 2 commits into
mainfrom
unit2-native-config
Open

test: native config collision matrix for all 4 tools#52
0xjgv wants to merge 2 commits into
mainfrom
unit2-native-config

Conversation

@0xjgv

@0xjgv 0xjgv commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Parametrised tool_config_source matrix: all 4 tools (ruff, basedpyright, coverage, import-linter) report bundled in bare project, project: when their [tool.*] section is present
  • 12-pair cross-tool isolation test: each [tool.<X>] section must never suppress bundled config for any other tool
  • .importlinter sidecar detection test for arch task (previously untested path; [tool.importlinter] was covered, sidecar was not)
  • Task-level cross-tool FP spot-checks in lint, typecheck, coverage, format, format-check verifying suppression decision wires through to actual CLI flags
  • Hoist _BARE constant above all callers in test_defaults_path.py; eliminate duplicate definition

Test 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

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/tasks/test_arch.py Outdated
version = "0.0.0"

[tool.importlinter]
root_package = archpin

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
root_package = archpin
root_package = "archpin"

Unquoted bare word caused tomllib.TOMLDecodeError when test parsed
the inline pyproject.toml fixture. Addresses Gemini review comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant