Repository navigation
Closed
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnersscope/cliCore CLI framework, Typer subcommands, options, and tablestype/testType test: a new or changed test
Milestone
Description
Problem
The move (#1313) is decided as a pure git mv of whole files into mirror directories, with no content edits. Today's tests break at any other depth, and the package items that follow it have no shared test data or snapshot library to adopt:
- The repository root is found by depth. 48 test modules resolve the repository root from their own location with
Path(__file__).parents[1]or.parent.parent, and so does the root conftest's tripwire [code: tests/conftest.py:884] [measured: grep at 5c45b1e; 47 at 36cfbbb, plustests/test_k8s_argocd_overrides.pyfrom fix(k8s): argo cd takes homelab values from deploy-time overrides, and the repository holds no private or placeholder config #1290]. One directory deeper, each would gettests/instead. - Fixtures are found by depth. 7 modules read
tests/fixturesortests/goldenfrom the directory they sit in [code: tests/test_executable_criteria.py:723, :751; tests/test_review_regression_harness.py:46; tests/test_roadmap_board_read.py:44; tests/test_roadmap_github_store.py:58; tests/test_review_taxonomy_and_severity.py:31; tests/test_security_sarif.py:1325; tests/test_telemetry_semconv.py:33]. - Tests import conftest and each other.
tests.conftestis imported bytests/test_analyze.py:24(fail_the_github_lookup),tests/test_k8s_push_secrets.py:44(PINNED_GITHUB_TOKEN) andtests/test_isolation_tripwire.py:13(the tripwire helpers).tests/test_roadmap_dry_runs.py:47imports_fields_reply,_rest_pages,board_ofandissues_offromtest_roadmap_board_read.py.- After the split, conftest is no longer one module, and a test module's import path changes with its directory.
devops testsees only the flat tree.find_changed_test_files[code: commands/test_cmd.py:41] liststests/with a non-recursiveglob("test_*.py")[code: commands/test_cmd.py:72]. It maps a changed module only totest_<stem>.py,test_<stem>_cmd.pyortest_commands_<stem>.py[code: :87-90].- After the move it would map no changed source module to a test.
devops ci's selector already searches recursively [code: core/test_selection.py:103].
- There is no
tests/support/. Shared helpers sit at the top oftests/. The tripwire readsCONST_FORBIDDEN_PROJECT_TEST_PATHS[code: config/constants.py:436], a constant in src that nothing but the tests uses. - There are no shared builders and no snapshot library.
- 14 test files define their own
_finding(...)helper, building four different types: the reviewFinding[code: tests/test_review_reply_caps.py:59], its stored subclassSavedFinding[code: tests/test_review_adjudication.py:56], a plain dict [code: tests/test_ui_reactive.py:767] and a docsCommandReferenceFinding[code: tests/test_docs_command_resolver.py:20]. - Six package items adopt shared builders (Q20):
make_finding(test(ai): devops review, devops analyze and the devops ai commands are thin adapters tested over the model seam and edge fakes #1326, test(review): ai/review and review/ are tested through one public interface over the model, tool-executor and process fakes, with no mock detection in src #1328, test(security): scanner, secret and crypto tests run on the executor, process, http and keyring fakes, and scanners stop looking for mocks #1332, test(telemetry): telemetry, server, ui, output and docs tests run on edge fakes, and the dashboard suite splits by behaviour #1334),make_verdict(test(review): ai/review and review/ are tested through one public interface over the model, tool-executor and process fakes, with no mock detection in src #1328),make_itemandmake_release(test(cli): devops pr, gh and repos are thin adapters tested over edge fakes, and merge readiness is tested in its package #1324, test(infra): infrastructure tests run on edge fakes #1335),make_changelog_fragment(test(cli): devops pr, gh and repos are thin adapters tested over edge fakes, and merge readiness is tested in its package #1324) andmake_candidate(test(infra): infrastructure tests run on edge fakes #1335). The E items have no order among themselves, so whichever lands first would have to createtests/support/builders.py, and two could each define the same builder. - Most E items adopt syrupy snapshots (Q18), but the
devdependency group has no syrupy [code: pyproject.toml:70-83]. Parallel E items would each add it and race onpyproject.tomlanduv.lock. - Two example-data modules sit at the top of
tests/:release_notes_examples.py(a synthetic release section, used bytests/test_release.py:42andtests/test_release_notes_compaction.py:10) andmarkdown_examples.py(used bytests/test_docs_review_loop.py:24).
- 14 test files define their own
Acceptance criteria
Paths and imports
-
tests/support/is a package that the root conftest registers once, so fixtures added there later are available everywhere. It provides the repository root,tests/fixturesandtests/goldenas paths anchored at its own location. - The 48 modules, the root conftest and the 7 fixture readers use those paths. No test module resolves a path from its own
__file__. - Nothing imports
tests.conftestor anothertests.test_*module.PINNED_GITHUB_TOKEN,fail_the_github_lookup, the tripwire helpers and the four board-reply helpers move totests/support/.CONST_FORBIDDEN_PROJECT_TEST_PATHSmoves with the tripwire and leaves src.
- An invariant test fails, naming
path:line, in two cases: a test module outsidetests/support/that builds a path from its own__file__, and an import statement oftests.conftestor of another test module. It joins the source-tree invariants:tests/invariants/test_source_tree.pyif test(cli): ratchets hold internal patches, private imports and test accommodations in src at today's counts and name each site that would raise one #1309 has created it, otherwisetests/test_architectural_invariants.py.
Builders and snapshots
-
tests/support/builders.pyholds the builders the package items use (Q20): one plain function per CONTEXT.md term, named after it, that builds a valid object from defaults through the type's public constructor or parser, so whatever validation the type has runs, and takes keyword overrides:make_finding: a reviewFinding[code: ai/review_schema.py:673];make_verdict: aVerdict[code: ai/review/adjudication.py:94];make_item,make_releaseandmake_candidate: the roadmap'sItem,ReleaseandCandidate[code: roadmap/store.py:238, :206, :226];make_changelog_fragment: aChangelogFragment[code: release/changelog_fragments.py:50] whose text goes throughparse_changelog_categories[code: release/changelog_fragments.py:99], so a fragment thatchangelog.d/would refuse is refused here too.
- A test per builder shows that its defaults build a valid object and that an override reaches the object; for the pydantic types, an override the type rejects raises the type's own
ValidationError. The local_finding(...)helpers are not converted here; each package item adopts the builders in its own files. -
release_notes_examples.pyandmarkdown_examples.pymove intotests/support/besidebuilders.py, and their three importers import them from there. - syrupy joins the
devdependency group, pinned assyrupy==6.1.1, with itsuv.lockentry.uv run pytest --helplists--snapshot-file-lock, the flag Q18 prescribes for snapshot updates. No test uses syrupy yet.
devops test
-
devops testfinds test modules at any depth undertests/. A changedsrc/devops_cli/<path>/<module>.pyselects every test module directly intests/<path>/when that directory exists, plus today's name candidates found at any depth. - Tests over a temporary git repository show three cases: a changed nested test module is selected; a changed source module selects its mirror directory; a flat tree maps as it does today.
Proof and housekeeping
- (person-run) In a scratch copy, move three test files from different packages into nested mirror directories with
git mv, adding__init__.py.uv run pytestthen passes with no other change. - If test(cli): ratchets hold internal patches, private imports and test accommodations in src at today's counts and name each site that would raise one #1309 has landed, the ceiling rows of the helper modules this PR moves follow them.
-
changelog.d/<n>.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses.
Key questions
- What does the prep cover? Decided 2026-10-07:
- tests find the repository root and
tests/fixturesthrough atests/supporthelper instead of__file__depth; - the
tests.conftestimports and the cross-test imports move totests/support; devops testmaps a changed source file to its mirror directory and searches recursively.
It lands before the move, which is pure renames.
- tests find the repository root and
- Why do the builders and syrupy land here? (proposed) This item lands before test(cli): every test file sits in the directory mirroring the package it tests or in tests/invariants/, and the root conftest holds only the hermetic floor #1313 and so before every package item. Creating
tests/support/builders.pyand pinning syrupy once here gives the E items one builder per type to adopt and one pin, instead of a race over who creates the file and editspyproject.toml. refactor(cli): tests control time: time-machine fakes wall-clock reads, and retry and rate-limit waits return at once and are recorded #1320 adds time-machine to the same group for the clock. - Which
Findingdoesmake_findingbuild? (proposed) The review schema'sFinding, which the scanner tests and 4 of the 14 local helpers build. Asaved=Trueoverride builds its subclassSavedFinding[code: ai/review_schema.py:1293], which 7 of them build. The admittedFindingof the review redesign [code: review/finding.py:16] is made only byadmit(); if it becomes the one finding type, the builder follows it throughadmit(). - Do the other top-level helper modules (
llm_stream_fakes.py,web_fakes.py,k8s_fakes.py,cluster_secret_fakes.py,roadmap_board_fake.py,roadmap_faults.py,mock_provider.py) move intotests/support/here? (proposed) No. They stay importable astests.<name>from any depth. Each fake moves totests/support/fakes/<edge>.pywhen its edge item promotes it with a contract suite (refactor(cli): Unify HTTP and DNS seams with shared fakes #1314–refactor(telemetry): OTLP export goes through one exporter seam, and tests read exported spans and metrics from a shared fake #1319, refactor(cli): one process runner owns execution, process groups and dry-run #775, refactor(github): the github session owns transport, ledger, error classes and link pagination #983, refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001, feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772).mock_provider.pyis deleted with the legacy providers (test(ai): the remaining ai modules are tested through their public interfaces on edge fakes, and the legacy provider layer leaves src #1331). - Is the path anchored at its own file or at pytest's rootdir? (proposed) At its own file. Module-level constants need the path at import, before any fixture runs, and
tests/support/never moves. - Mirror directory only, or its subdirectories too? (proposed) Only the files directly in it. Each package tests its own public interface, so a change in
ai/review/selectstests/ai/review/and nottests/ai/review/stages/. - What does
devops testselect for a changed conftest ortests/support/file? (proposed) A changed conftest selects its directory. A changedtests/support/file selects the whole suite.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Depends on: none. Blocks: test(cli): every test file sits in the directory mirroring the package it tests or in tests/invariants/, and the root conftest holds only the hermetic floor #1313, refactor(cli): Unify HTTP and DNS seams with shared fakes #1314, refactor(k8s): KubernetesService is the Kubernetes API seam, with a shared fake cluster and its contract suite #1315, refactor(infra): DockerEngineService is the Docker engine seam, with a shared in-memory engine fake and its contract suite #1316, refactor(ai): Valkey, Qdrant and the embedder each have one seam, with shared fakes and contract suites #1317, refactor(security): one keyring seam owns the keyring and the Secret Service lock check, with a shared keyring fake and its contract suite #1318, refactor(telemetry): OTLP export goes through one exporter seam, and tests read exported spans and metrics from a shared fake #1319, refactor(cli): tests control time: time-machine fakes wall-clock reads, and retry and rate-limit waits return at once and are recorded #1320, refactor(cli): one process runner owns execution, process groups and dry-run #775, refactor(github): the github session owns transport, ledger, error classes and link pagination #983, refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001, feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772. Related: test(cli): the hermetic floor fails a test that reaches an edge without a fake and resets all process-wide state after every test #1310 (deletes
_check_test_paths_isolated, whichtests/test_isolation_tripwire.pyalso imports), docs(cli): docs/TESTING.md holds the test conventions, ADR 0005 records that tests double only process edges, and AGENTS.md and the contributor docs point to them #1308 (documents builders and snapshots indocs/TESTING.md), test(cli): ratchets hold internal patches, private imports and test accommodations in src at today's counts and name each site that would raise one #1309 (its ceiling table is keyed by path), test(cli): devops pr, gh and repos are thin adapters tested over edge fakes, and merge readiness is tested in its package #1324, test(ai): devops review, devops analyze and the devops ai commands are thin adapters tested over the model seam and edge fakes #1326, test(review): ai/review and review/ are tested through one public interface over the model, tool-executor and process fakes, with no mock detection in src #1328, test(security): scanner, secret and crypto tests run on the executor, process, http and keyring fakes, and scanners stop looking for mocks #1332, test(telemetry): telemetry, server, ui, output and docs tests run on edge fakes, and the dashboard suite splits by behaviour #1334 and test(infra): infrastructure tests run on edge fakes #1335 (adopt the builders). - Parent: test(cli): tests double only process edges and mirror the source tree #1307 (phase B).
Metadata
Metadata
Assignees
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnersscope/cliCore CLI framework, Typer subcommands, options, and tablestype/testType test: a new or changed test
Type
Projects
- StatusShow more project fieldsDone
Activity
7 remaining items
test(cli): test modules read the repository root and their test data …
dan-petty commentedon Oct 19, 2026
Decision (owner, 2026-10-19): where PR 5's ban runs
The ban (
test_no_test_module_finds_a_path_from_its_own_file_or_imports_a_test_module) runs only in the full gate:uv run devops ciand the pre-push hook. It never runs in a commit's narroweddevops ci testselection. It parses every test file, which takes about 1 s idle and 4.3 s at load 31, and CI gate speed is P0.PR 5 picks the mechanism the selector already supports, and adds a test showing that a narrowed selection over any staged source never includes the ban, while the full run always does. The plan's Decisions section carries this line.
dan-petty commentedon Oct 19, 2026
Amendment (2026-10-19): decide a
tests/support/change precisely before PR 4PR 2 sends every change under
tests/support/to the whole suite, as this item's plan decided. A replay of the last 40 commits (scratch measurement on PR 2) showed what that costs:tests/support/paths.pyis imported by 66 test files (2,521 test IDs, 55-78 s at-n 0).tests.support.Selecting only the modules that import a support file is not sound on its own:
Proposed for PR 3 or PR 4, before PR 4 adds fakes and builders: classify the changed support module with
ast.pytest_pluginsor by-p, defines apytest.fixtureor apytest_*hook, or is imported, directly or transitively, by such a module or by any conftest.tests/.That stays sound and keeps a paths, fake or builder edit from paying for a full run on every commit.
feat(test): devops test and devops ci test choose tests through one s…
docs(cli): docs/TESTING.md holds the test conventions, ADR 0007 recor…
feat(test): every tests/support module registers as a plugin, and a c…
feat(test): every tests/support module registers as a plugin, and a c…
test(cli): shared builders, example modules and borrowed test data li…
test(cli): no test module reads a path from its own file or imports a…
dan-petty commentedon Oct 20, 2026
What changed
#1711, merged into
release/v0.2.37as 0d27928.11 file(s) changed.
How it was verified
Check runs at 84302ca:
Acceptance Criteria of
docs/agent/tasks/task-1312-tests-find-paths-from-any-depth.md:tests/test_architectural_invariants.py::test_the_support_paths_are_the_repository_root_and_its_test_data_directories(REPO_ROOT / "pyproject.toml"names projectdevops-cli,TESTS_ROOT == REPO_ROOT / "tests", andFIXTURESandGOLDENare directories).tests/support/,rg -n 'Path\(__file__\)' testsprinted only the 8 lines in 6 files left for PR 5:tests/test_github_session.py:54,tests/test_k8s_agents_manifests.py:13,tests/test_k8s_argocd_apps.py:16,tests/test_k8s_devops_stack.py:69,:100and:123,tests/test_roadmap_config.py:125andtests/test_roadmap_github_store.py:90(:91at PR 5's base). PR 3 removed the root conftest's 3 sites, and feat(agent): read-only agent identity under GitOps (Closes #1154) #1684 addedtests/test_k8s_agents_manifests.py:13after PR 1. PR 5 converted the 8, and the check now prints nothing (the PR 5 criterion below).uv run python -m tests.test_swallowed_failures_ratchetprintsUsage: uv run python -m tests.test_swallowed_failures_ratchet --lower, exits 1 and writes nothing, andtest_ratchet_fails_when_file_under_ceiling_and_prints_lower_commandchecks that the under-ceiling message holds that command. Run as a script,uv run python tests/test_swallowed_failures_ratchet.py --lowerprints the same usage line and exits 1, with no traceback (test_run_as_a_script_it_names_the_module_command_and_exits_1).uv run pytest --collect-only -qcollects 10703 tests; with PR 1 it collects 10704, the same IDs plus the new paths test. The full run under-n 8at a153042 gave 10692 passed, 2 failed, 1 skipped and 8 xfailed; the two failures,tests/test_cli_startup_imports.py::test_cli_startup_import_budget_command_help[argv1]and[argv2], are refactor(ai): startup import budget invariants and dry-run isolation tests (#1002) #1680's 1.0 s wall-clock import budget exceeded at load average 13 and passed on a rerun at load average 3. With PR 1, under the same options: 10695 passed, 1 skipped and 8 xfailed, nothing failed, the base's outcomes plus the new test.devops test run --changedmaps changes as decided, in real repositories undertmp_pathread through--dry-run's JSON (tests/test_test_runner.py): a nested test module selects itself;src/devops_cli/ai/review/pipeline.pyselectstests/ai/review/test_pipeline.py, named for it, and nottest_a.pyandtest_b.pybeside it; a source module in the flat tree selects the test module named for it and one that imports it; a conftest of fixtures selects its directory and one with a hook selectstests; a support module selectstests(since PR 3, one that defines a fixture, is deleted or is renamed, whose old path is listed as deleted; one that registers nothing selects the test modules importing it, and a support subpackage's__init__.pythe test modules importing its modules, not its directory); a stagedgit mvselects by the new path and, since PR 3, the old one; a deleted test module is not passed to pytest; an unmapped source is named while the mapped tests run; an untracked test package's module runs and its__init__.pyselects its directory, neither named as unmapped; and no change runstests.__init__.pytoo, selects no test module only for sitting in the directory that mirrors its package, and a nested conftest selectstestswhen it binds a hook, defined, imported or star-imported, or cannot be read, and its own directory when it holds fixtures only (tests/test_test_selection.py:test_a_module_selects_no_test_module_only_for_sitting_in_its_package_directory,test_a_nested_conftest_selects_the_whole_suite_when_it_binds_a_hook).testswith no test module listed or read, fortests/conftest.py,conftest.py,pyproject.toml,uv.lockand.python-versionbeside a changed source (test_a_change_that_forces_a_full_run_selects_the_suite_without_reading_the_tests); PR 3 tooktests/support/paths.pyout of that list, since a support module is now classified by what it defines and who imports it.CONST_FULL_RUN_TRIGGER_NAMES, as given or after./, exits 1 under--no-fallbackand runs the full suite under--fallback(test_cli_test_every_trigger_name_forces_a_full_run_as_given_or_after_a_dot_slash), and a path loses only a leading./(test_a_relative_path_loses_only_a_leading_dot_slash).devops citreats a support module that defines a fixture like a conftest:test_cli_test_a_support_module_that_registers_a_fixture_forces_full_run(full suite with and without an index, exit 1 naming the file under--no-fallback) andtest_a_support_module_that_defines_a_fixture_forces_a_full_run(tests/test_coverage_index.py), as PR 3 renamed them; until PR 3 every support module did.--no-fallback, and the warning names the file (test_cli_test_a_trigger_changed_since_the_index_was_built_selects_by_text, for a support module that defines a fixture, since PR 3, andpyproject.toml).# noqa: C901markers insrc/devops_cli/commands/test_cmd.pyare gone andDEFAULT_C901_SUPPRESSION_CEILINGis 47.tests/test_isolation_tripwire.py, first):test_support_fixtures_reach_a_nested_test_and_load_after_home_is_isolatedruns one pytester subprocess over a project whose conftest holds onlypytest_plugins = ("tests.support.bootstrap",), wherea/b/test_x.pygetsno_github_identityand devops-cli'sCONST_CONFIG_DIRlies under the isolated HOME; loadingtests.support.github_identityfirst, throughpytest_pluginsor-p, fails the second test, becauseCONST_CONFIG_DIRthen lies under the HOME pytester sets, its project directory, and not under the HOME bootstrap isolates.test_devops_cli_binds_its_config_directory_under_the_home_bootstrap_isolatedchecks the same in this suite's own run, under the real root conftest, and fails when that conftest'spytest_pluginsnamestests.support.github_identitybeforetests.support.bootstrap.test_a_support_package_that_fails_to_import_fails_the_registration_naming_itregisters, with a realpytest.PytestPluginManager(), a package undertmp_pathwhose subpackage imports but whosebroken/inner.pyraisesImportError, and the error namesbroken.inner, which only a walk into subpackages reaches (withpkgutil.iter_modulesin place ofwalk_packagesit fails).test_registration_fails_naming_a_fixture_the_test_selector_cannot_seefails the registration withpytest.UsageErrornaming the module and the attribute, for a fixture made by a decorator factory, one made throughgetattr(pytest, "fixture"), one re-exported under a new name and one handed out by a module-level__getattr__and__dir__, and passes none when the check is removed; the last also passed while the check readvars(module).test_a_test_module_or_conftest_under_the_support_package_fails_the_registrationfails it naminginner.test_hiddenorinner.conftest, and failed before the registration refused them.test_a_support_module_that_defines_its_fixture_with_the_decorator_registersregisters one defined withpytest.fixture.test_session_hooks_lifecyclechecks that the tripwire snapshotsrootpath, and fails when it snapshots the checkout. The other tripwire tests pass with their imports and call-site names changed.pytest_pluginsentry, namingtests.support.bootstrap, and nopytest_configure,pytest_sessionstart,pytest_sessionfinishorpytest_terminal_summary;pyproject.tomlhas the oneerror::pytest.PytestAssertRewriteWarningfilter;rg -n 'CONST_ISOLATED_TEST_ENV_KEYS|verify_test_paths_isolated|_check_test_paths_isolated' src testsprints nothing;rg -l CONST_FORBIDDEN_PROJECT_TEST_PATHS src testsprintssrc/devops_cli/config/constants.pyandtests/support/workspace_tripwire.py.ast(PR 3,test_a_support_module_reaches_every_test_by_what_it_registers_who_imports_it_or_when_unreadintests/test_test_selection.py): a plain helper, whose docstring names a fixture, selects the test module importing it; one that defines a fixture withpytest.fixtureor withfixtureimported from pytest, one that defines a hook, one a fixture module imports, one a fixture module imports through another helper, one a nested conftest imports at its top and one it imports inside a fixture selecttests; a test module importing it through another support module is selected, and two helpers that import each other end the walk; a deleted one selectstests. Each case fails when the classifier's clause for it is removed: the fixture clause, thefrom pytest import fixtureclause, the hook clause, the closure from the roots (cut to one hop), the conftest as a root, imports inside functions, an unreadable module, and the transitive walk; without the walk's guard against modules already reached, the import cycle never ends (still running after 60 s).test_a_package_init_selects_the_test_modules_importing_its_modules_not_its_empty_directoryandtest_the_tests_package_init_reaches_every_test_through_the_conftestfail without the package edges, and the former when a package directory with no test module is handed to pytest.devops test run --changedselects the importers of a changed plain support module, those of a support subpackage's modules for its__init__.py, andtestsfor one that defines a fixture, is deleted beside a mapped change, or is renamed, staged or committed (tests/test_test_runner.py; the rename cases also check that_changed_pathslists both the old and the new path and noold -> newline, and each fails when its--no-renamesis removed);uv run devops ci test tests/support/paths.py --no-fallbackexits 0 running the test modules that import it (test_cli_test_a_plain_support_module_runs_the_test_modules_importing_it), where the plan, written before the amendment, had it exit 1, and a helper deleted since the coverage index was built forces the full suite, or exits 1 naming it under--no-fallback, with its own warning (MESSAGES.ci.coverage_index_helper_removed) in place of the stale index's "selected by name and import" (test_cli_test_a_helper_deleted_since_the_index_was_built_forces_a_full_run).tests/test_architectural_invariants.py):test_no_helper_module_under_tests_acts_on_importfailed at first ontests/cluster_secret_fakes.py:31andtests/roadmap_faults.py:35, and passes now;test_only_bootstrap_imports_the_support_package_itselffails whenbootstrapis not exempt. Their seeded-tree tests report each refused form aspath:lineand none of the allowed ones: the side-effect test's three class-body forms (an attribute assignment, an import, and a call in a nested class) went unreported before the check read class bodies, and a class-body assignment added totests/support/paths.pyfails the real-tree test; the package test's alias, dotted-attribute, subpackage, relative subpackage and dynamic-import forms went unreported before the check covered them.-pguard againstghchildren,uv run pytest -n logical -p no_gh_child -q, gave 10898 passed, 1 skipped and 8 xfailed, of 10907 collected; with PR 3, 10930 passed, 1 skipped and 8 xfailed, of 10939. Two tests oftests/test_server_service.py, which PR 3 does not touch, each timed out once on a queue in a run under load, one at 3b70671 at a load average of 48 and one in the commit hook at 24, and each passed in three runs of its own. Of the base IDs,test_check_test_paths_isolated_rejects_project_diris deleted;test_a_change_that_forces_a_full_run_selects_the_suite_without_reading_the_tests[tests/support/paths.py]is dropped;test_cli_test_support_module_forces_full_run,test_a_changed_support_module_selects_the_whole_suiteandtest_a_support_module_change_forces_a_full_runare renamed for a support module that defines a fixture;test_cli_test_a_trigger_changed_since_the_index_was_built_selects_by_text[tests/support/paths.py]is now[tests/support/identity.py]; andtest_a_renamed_source_module_selects_by_its_new_pathis nowtest_a_renamed_source_module_selects_by_its_new_path_and_its_old_one, which also expects the test modules named for or importing the old module. The 39 added IDs are those 5 renamed or re-parametrized tests, the 10 registration and HOME tests, the 4 invariant tests, the 11 classification cases, the 2 package__init__.pytests, the 5 runner tests for a plain, subpackage, renamed (staged and committed) and deleted support module, and the 2 CLI tests for a plain support module and a helper deleted since the index was built.uv run pytest -n 0 -q tests/test_support_builders.py tests/test_release_changelog_fragments.pypasses. Each builder's defaults build a valid object of exactly its type, a finding one its ownis_emptykeeps, and an override reaches the built object, an Item's and a candidate's URL following the number (test_each_builder_builds_a_valid_object_from_its_defaults,test_an_override_reaches_the_built_object, over the six builders andmake_finding(saved=True)). A key that is no field of the model,file=among them, raisesTypeErrornaming it (test_an_override_the_model_has_no_field_for_raises_a_type_error_naming_it). A value the model refuses raises pydantic'sValidationErrorforFinding,SavedFinding,Item,ReleaseandCandidate(test_an_override_the_model_rejects_raises_its_validation_error). Text outside a category and a heading with no entry raise the reader'sValidationErrorfor each,changelog.d/7.md:1 is outside a categoryandchangelog.d/7.md holds no changelog entry(test_a_fragment_the_reader_refuses_is_refused_by_the_builder_naming_its_file).parse_changelog_fragmentrefuseschangelog.d/notes.mdby name, and the reader refuses a misnamed file holding bytes that are no UTF-8 by name, not withUnicodeDecodeError; the reader's other tests pass unchanged.tests/support/:ls tests/release_notes_examples.py tests/markdown_examples.pyfails, andrg -n '^\s*from tests\.test_\w+ import' testsprints nothing (3 lines at 8ff09c5).rg -n '"syrupy==6.1.1"' pyproject.tomlprints one line inside thedevgroup,uv.lockpins syrupy 6.1.1,uv run pytest --help | rg -- '--snapshot-file-lock'prints the option, andfind tests -name __snapshots__prints nothing.uv run pytest --collect-only -qcollects 10954 tests; with PR 4 it collects 10983, the same IDs plus the 27 intests/test_support_builders.pyand the two new reader tests intests/test_release_changelog_fragments.py. The full run under the scratch-pguard againstghchildren gave 10945 passed, 1 skipped and 8 xfailed at 8ff09c5, and 10974 passed, 1 skipped and 8 xfailed with PR 4.uv run pytest --collect-only -q -p no_gh_childcollects 10815 tests at a9b25c9 and 10852 at 83939e6. PR 2 deletes 3 IDs:tests/test_test_runner.py::test_find_changed_test_filesand::test_test_run_changed_flag, which the eleven runner tests replace, andtests/test_test_selection.py::test_cli_test_trigger_file_modified_since_build_forces_full_run, whichtest_cli_test_a_trigger_changed_since_the_index_was_built_selects_by_text(2 IDs) replaces. It adds 40: the 11 runner tests intests/test_test_runner.py; intests/test_test_selection.py, that replacement,test_a_change_that_forces_a_full_run_selects_the_suite_without_reading_the_tests(6),test_a_module_selects_no_test_module_only_for_sitting_in_its_package_directory(1),test_a_nested_conftest_selects_the_whole_suite_when_it_binds_a_hook(6),test_a_relative_path_loses_only_a_leading_dot_slash(3),test_cli_test_every_trigger_name_forces_a_full_run_as_given_or_after_a_dot_slash(8) andtest_cli_test_support_module_forces_full_run(1);tests/test_coverage_index.py::test_a_support_module_change_forces_a_full_run; andtests/test_swallowed_failures_ratchet.py::test_run_as_a_script_it_names_the_module_command_and_exits_1. The full run under the scratch-pguard againstghchildren gives 10805 passed, 1 failed, 1 skipped and 8 xfailed at a9b25c9, and 10842 passed, the same 1 failed, 1 skipped and 8 xfailed at 83939e6, 37 more passed for 40 added and 3 deleted. The failure at both istests/test_ci_maintain.py::test_ci_maintain_live, whose liveuv auditnow finds three advisories against aiohttp 3.14.3; fix(deps): aiohttp 3.14.5 clears three advisories that failed every devops ci audit, and the maintain test runs no real uv audit #1698 later bumped aiohttp and took that test offline.devops test run --changedlisting against the branch's own base, a--baseoption, instead ofmain: perf(ci): the structural-invariants hook runs the stdlib metric once per commit, with no uv sync #1667.uv run pytest -n 0 -q tests/test_test_module_independence.py -k own_filepasses both ban tests, the plan's command run on the module the owner's decision gave them in place oftests/test_architectural_invariants.py, and the seeded-tree test reports each planted form aspath:lineand none of the allowed ones. The real-tree test parses each of the 526 Python files undertests/once.test_no_narrowed_selection_over_a_changed_source_or_helper_runs_the_test_module_banandtest_the_full_gate_collects_the_test_module_banpass, anduv run devops ci test <path> --no-fallback --dry-runlists the ban's module for that module itself and not forsrc/devops_cli/__init__.py,src/devops_cli/commands/test_cmd.py,src/devops_cli/core/test_selection.pyortests/support/paths.py, for which its pytest line names 73 test modules, the 73 whose import statements nametests.support.paths(a text search finds one more,tests/test_test_runner.py, whose match is a seeded string).rg -n 'Path\(__file__\)' tests -g '!tests/support/**'prints nothing (100 lines at a17b56b, 8 at PR 5's base).rg -n '^\s*from tests\.test_\w+ import' testsprints nothing (3 lines at a17b56b).rg -n 'tests\.conftest' tests(6 lines at a17b56b) prints one,tests/test_openblas_worker_threads.py:18, a string holding the source a child process runs to import the root conftest (Description, PR 5), not an import in a module undertests/.tests/support/is complete:ls tests/support tests/support/fakeslists the twelve files the plan names, besidewaits.py(test(cli): tests wait for a background thread with one generous bound, not a 1-second deadline, so they pass under load #1664) andfakes/model.py(refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001), andls tests/release_notes_examples.py tests/markdown_examples.pyfails.uv run pytest -n 0 -q tests/test_isolation_tripwire.pypasses;rg -n '^pytest_plugins' tests/conftest.pyprints the one entry, namingtests.support.bootstrap;rg -n 'def pytest_(configure|sessionstart|sessionfinish|terminal_summary)' tests/conftest.pyprints nothing;rg -n 'error::pytest.PytestAssertRewriteWarning' pyproject.tomlprints one line;rg -n 'CONST_ISOLATED_TEST_ENV_KEYS|verify_test_paths_isolated|_check_test_paths_isolated' src testsprints nothing;rg -l CONST_FORBIDDEN_PROJECT_TEST_PATHS src testsprintssrc/devops_cli/config/constants.pyandtests/support/workspace_tripwire.py;uv run pytest -n 0 -q tests/test_support_builders.py tests/test_release_changelog_fragments.pypasses;rg -n '"syrupy==6.1.1"' pyproject.tomlprints the one line in thedevgroup,uv.lockpins syrupy 6.1.1,uv run pytest --helplists--snapshot-file-lockandfind tests -name __snapshots__prints nothing.devops test run --changedmaps changes as decided:uv run pytest -n 0 -q tests/test_test_runner.py tests/test_test_selection.py tests/test_coverage_index.pypasses at PR 5's tip.uv run devops ci test tests/support/paths.py --no-fallbackexits 1 and names the file is superseded by PR 3, under the issue's amendment of 2026-10-19: a support module that defines no fixture or hook, and that no conftest or such module imports, reaches only the test modules importing it, so the command exits 0 and runs them (test_cli_test_a_plain_support_module_runs_the_test_modules_importing_it), where sending everytests/support/change to the whole suite ran all 483 test modules for apaths.pychange against 67 at PR 3. A support module that defines a fixture still forces the full run, and--no-fallbackrefuses it by name (test_cli_test_a_support_module_that_registers_a_fixture_forces_full_run).uv run python -m tests.test_swallowed_failures_ratchetprintsUsage: uv run python -m tests.test_swallowed_failures_ratchet --lower, exits 1 and writes nothing.DEFAULT_C901_SUPPRESSION_CEILINGis 47, 2 below its value before PR 2, which removed the two markers, and no PR of the item raises a suppression ceiling.uv run pytest --collect-only -q -p no_gh_childcollects 10991 tests and the full run under the guard gives 10982 passed, 1 skipped and 8 xfailed; with PR 5 it collects 10995, the same IDs plus the two ban tests and the two selection tests, and gives 10986 passed, 1 skipped and 8 xfailed. Both runs report the same 30 warnings, from third-party packages and devops-cli's Logfire bridge.**Status**line anduv run pytest -n 0 -q tests/test_agent_task_files.pypasses;docs/TESTING.mdmarks none oftests/support/, the shared paths, the registration, the builders, syrupy or the ban as (target); each PR updated the task files that named what it moved, as its section says, anddocs/agent/tasks/task-1308-test-conventions.mdrecords which marks docs(cli): docs/TESTING.md holds the test conventions, ADR 0005 records that tests double only process edges, and AGENTS.md and the contributor docs point to them #1308 left for this item.changelog.d/1312.md, and no PR of the item editsCHANGELOG.mdordocs/ROADMAP.md:git show --stat 0ae4ea4 83939e6 9d290cc 16b1314 -- CHANGELOG.md docs/ROADMAP.md changelog.d/names no file.uv run devops cithrough the pre-push hook, and on PR 5's tree it passes with every check green, in 4 min 45 s. No test PR 5 adds opens a socket or starts a process: the ban reads the files undertests/, and the selection tests copy files undertmp_path, linksrc/there, read the gate's command and pytest's configuration, and parse the conftests and support modules. Run alone at a load average of 4 to 10, each runs in under 1 s but the real-tree ban: the narrowed-selection test in 0.4 to 0.7 s, though 1.2 s inside the full run at a load average of 11 to 21, the full-gate test in 0.02 s and the seeded-tree test in 0.01 s. The real-tree ban takes 2.0 to 2.4 s alone and 5.6 s inside the full run, and parses each file once.feat(release): v0.2.37 (#1720)