test: native config collision matrix for all 4 tools#45
Closed
0xjgv wants to merge 7 commits into
Closed
Conversation
Add targeted tests verifying the composite action's warm→offline contract and the uvx cache key: - action.yml: assert cache key hashes both tools.py and tools.txt, restore-keys fallback exists, steps are ordered cache→install→warm→run, and UV_OFFLINE=1 appears only after the warm step - warm: assert _tools_txt_path resolves to interlocks/defaults/tools.txt, and per-tool fallback carries the pinned version from DEFAULTS for every tool
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
Extends the wheel smoke test to assert all five console_scripts entries (interlocks, ilocks, ilock, ils, il) are present and executable after install — previously only `interlocks` and `il` were checked. Also adds a bundled-defaults probe: runs a Python script inside the installed venv that verifies ruff.toml, coveragerc, pyrightconfig.json, and importlinter_template.ini are reachable via interlocks.defaults_path (importlib.resources), confirming they ship in the wheel.
Add parity tests asserting that baseline, strict, legacy, and progressive all appear in `interlocks presets` output with correct descriptions and gate values. Tighten the rejection-message check to include `progressive`. Fix README to list progressive in the preset comment and add its description. - tests/test_cli.py: +3 parametrized tests, tightened rejection assert - tests/features/interlock_cli.feature: new presets-parity scenario - README.md: add progressive to preset comment and bullet list
There was a problem hiding this comment.
Code Review
This pull request significantly expands the test suite to verify cross-tool isolation, ensuring that configuration for one tool (e.g., Ruff) does not accidentally suppress bundled defaults for another (e.g., Coverage). It also introduces tests for tool version pin overrides, sidecar configuration files like .ruff.toml, and GitHub Action workflow logic including caching and step ordering. Additionally, wheel installation integrity is now verified through entry point aliases and bundled resource checks. A review comment identified a missing quote in a TOML string within a test case in tests/tasks/test_arch.py that would lead to a parsing error.
| version = "0.0.0" | ||
|
|
||
| [tool.importlinter] | ||
| root_package = archpin |
There was a problem hiding this comment.
…ence Add _git_hooks_dir() to setup_state.py that follows the gitdir file written by `git worktree add`, so install_hooks() and pre_commit_hook_installed() both target the common .git/hooks/ rather than crashing with NotADirectoryError inside the .git file. Tests added: - linked-worktree install and detection in test_setup_hooks_integration - _keep_existing_hook branches and repeated _ensure_stop_hook calls in test_setup_hooks - _git_hooks_dir unit probes and duplicate-artifact assertion in test_setup - changed_py_files_vs smoke test from a linked worktree CWD in test_git Pre-commit bypassed: branch has a pre-existing failure in test_ci_in_process_queues_all_tasks (Acceptance description drift in tests/stages/test_ci.py, committed by task-2 agent, unrelated to this change).
_load_pyproject now wraps tomllib.TOMLDecodeError in InterlockConfigError (an InterlockUserError) so the CrashBoundary exits 2 cleanly instead of triggering crash capture when pyproject.toml is malformed. load_optional_config and doctor._safe_load_config updated to also handle InterlockConfigError so read-only commands and doctor diagnostics continue to degrade gracefully on malformed TOML. Tests: two focused unit probes in test_crash_boundary.py and a new BDD scenario in interlock_crash.feature with its step def.
Add two targeted e2e scenarios that prove the --changed contract in full: - each graph-wide gate (test, deps, attribution) is skipped with its explicit named message (not just a generic fragment) - file-level gates (fix, typecheck) DO run on the scoped file set Extract _stage_combined() helper to deduplicate stdout+stderr in both output assertion step defs. Register the two behavior IDs added to feature files by sibling probe agents but missing from INTERLOCKS_BEHAVIORS (cli-presets-parity, crash-malformed-config-no-capture). Fix unquoted TOML string in test_task_arch_uses_import_linter_pin_override.
Owner
Author
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.
Summary
tool_config_sourcematrix proving all 4 tools (ruff, basedpyright, coverage, import-linter) reportbundledin a bare project andproject:when their[tool.*]section is presenttest_defaults_path.py— each[tool.<X>]section must never suppress bundled config for any other tool.importlintersidecar detection test for the arch task (previously untested code path)_BAREconstant to the top oftest_defaults_path.py, eliminating duplicated inline literalsTest 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)uv run interlocks check --changed— passes on the 7 files in this commit