Repository navigation
Description
What happened
#1307 splits the test migration into one child per package, and each child names the test files it owns. Files added after the census of 2026-10-07 have no owner. The test-suite audit of 2026-10-24 at df8e2ee found 49 test files that no child of #1307 names and that patch a devops_cli name or import a private one: 146 internal patch sites in 33 files and 50 private-name imports in 28 files.
| File | Internal patch sites | Private-name imports |
|---|---|---|
tests/test_k8s_ipv6_and_proxy_boundaries.py |
15 | 9 |
tests/test_k8s_volume_reclaim.py |
12 | 0 |
tests/test_k8s_gpu_placement.py |
11 | 0 |
tests/ai/review/test_runner.py |
6 | 4 |
tests/test_telemetry_llm_content.py |
9 | 0 |
tests/test_ai_research_socratic.py |
6 | 2 |
tests/test_rag_kb_sync.py |
8 | 0 |
tests/test_review_group_analysis.py |
7 | 1 |
tests/test_review_pipeline_go.py |
3 | 5 |
tests/test_pr_hardening_report.py |
7 | 0 |
tests/test_review_canary.py |
6 | 0 |
tests/test_security_zizmor.py |
6 | 0 |
tests/ai/review/test_pipeline.py |
3 | 2 |
tests/commands/test_review_removed_options.py |
5 | 0 |
tests/test_k8s_tempo.py |
4 | 1 |
tests/llm_stream_fakes.py |
4 | 0 |
tests/test_ai_research_mental_model.py |
4 | 0 |
tests/test_fail_to_pass.py |
4 | 0 |
tests/test_osv_scanner.py |
2 | 2 |
tests/ci/test_cache_fuzzing.py |
2 | 1 |
tests/core/test_cleanup_fuzzing.py |
2 | 1 |
tests/test_ci_repeat.py |
3 | 0 |
tests/test_config_field_validation.py |
1 | 2 |
tests/test_golangci_lint_scanner.py |
3 | 0 |
tests/test_review_rules_pack.py |
2 | 1 |
tests/commands/test_pr.py |
0 | 2 |
tests/test_ai_research_analogies.py |
2 | 0 |
tests/test_architectural_invariants.py |
0 | 2 |
tests/test_review_syntax_masking.py |
0 | 2 |
tests/test_roadmap_return.py |
2 | 0 |
tests/test_url_credential_masking.py |
2 | 0 |
tests/ai/review/test_cited_code.py |
1 | 0 |
tests/argo/test_gitops_fuzzing.py |
0 | 1 |
tests/core/test_clock_contract.py |
1 | 0 |
tests/test_ai_research_forage.py |
0 | 1 |
tests/test_all_commands_help_dryrun.py |
0 | 1 |
tests/test_ci_mutate.py |
1 | 0 |
tests/test_cli_format_adoption.py |
0 | 1 |
tests/test_cli_startup_imports.py |
0 | 1 |
tests/test_codebase_hygiene_and_shims.py |
0 | 1 |
tests/test_core_repo.py |
1 | 0 |
tests/test_k8s_agents_manifests.py |
0 | 1 |
tests/test_k8s_monitoring_alerting.py |
0 | 1 |
tests/test_kb_manuals_metadata.py |
0 | 1 |
tests/test_review_ruff_mypy_evidence.py |
0 | 1 |
tests/test_review_tool_runs.py |
0 | 1 |
tests/test_review_tool_sandbox.py |
0 | 1 |
tests/test_stack_dashboards.py |
0 | 1 |
tests/test_survey_cmd.py |
1 | 0 |
Most of these files are new since 2026-10-07: for example tests/test_k8s_gpu_placement.py (2026-10-21), tests/test_telemetry_llm_content.py and tests/test_review_pipeline_go.py (2026-10-24). So the coupling that #1307 retires keeps growing in files that no item will migrate.
What should happen
Each file in the table tests through the public interface over the shared fakes, as docs/TESTING.md and ADR 0007 require. It patches no devops_cli name and imports no private name.
Evidence
.data/agent/scratch/audit/full_list.txtof the 2026-10-24 audit, sections 3.internal-patch, 3.private-import (rows markedno-child-issue), 3.new-coupling and 5 ("test files that no child issue of test(cli): tests double only process edges and mirror the source tree #1307 names").- Every file in the table exists at b170358.
Acceptance criteria
- No test in the files above patches a
devops_climodule, class, function or attribute, or imports a name that starts with_fromdevops_cli. - Each double is a shared fake from
tests/support/fakes/, installed through its seam or fixture. - Product code that a test needed only for a patch goes, as test(cli): tests double only process edges and mirror the source tree #1307's Q27 says.
- 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, its ceilings go down by the sites that this item removes.
- Each test still checks the behaviour that it checked before. The pull request names each test it deletes and why.
-
uv run devops cipasses.
This item is a child of #1307 for the files that no other child names. A file that #1313 moves keeps its owner here. Follows ADR 0007 as #2143 amends it.
Source: #1307
Proposed design
Problem statement
49 test files added after the 2026-10-07 census patch devops_cli internal names or import private names. No child of #1307 owns them. They must test through public interfaces over shared fakes, as ADR 0007 and docs/TESTING.md require.
Acceptance criteria
- Criterion 1: No test in the 49 files patches a devops_cli module, class, function, or attribute, or imports a name that starts with an underscore from devops_cli.
Verification: Run a grep or static analysis over the 49 files for patch( calls targeting devops_cli names and for imports of names starting with _. The result is zero matches. - Criterion 2: Each test double is a shared fake from tests/support/fakes/, installed through its seam or fixture.
Verification: Inspect the 49 files. Every mock or fake object comes from tests/support/fakes/ or a conftest fixture that installs one. No inline MagicMock replaces a devops_cli dependency. - Criterion 3: Product code that a test needed only for a patch is removed or made public, as test(cli): tests double only process edges and mirror the source tree #1307 Q27 specifies.
Verification: For each removed patch site, confirm the product code it targeted is either deleted or exposed through a public seam. The pull request description names each such site. - Criterion 4: 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, its ceilings are reduced by the number of sites this item removes.
Verification: Check the 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 ceiling values in the repository. They are lower by the count of sites removed in this pull request. - Criterion 5: Each test still checks the behaviour it checked before. The pull request names each test it deletes and why.
Verification: Diff the test function names before and after. Every deleted test is named in the pull request description with a reason. - Criterion 6: uv run devops ci passes.
Verification: Run uv run devops ci in the pull request branch. All checks complete with a passing status.
Key questions
- What is the public interface that these 49 test files must use instead of internal patches and private imports?: The public interface is the CLI (typer app) and public module-level functions. Tests install shared fakes from tests/support/fakes/ through seams or fixtures. They do not patch devops_cli names or import names that start with an underscore. [sources: tests/test_k8s_volume_reclaim.py, tests/test_k8s_gpu_placement.py]
- What shared fakes exist in tests/support/fakes/ that cover the domains in the 49 files?: The repository has tests/k8s_fakes.py (FakeCoreV1, client, pod) and tests/support/fakes/ for LLM clients and other services. The 49 files span k8s, AI review, telemetry, RAG, and CLI domains. Each domain needs its shared fake installed through a seam. [sources: tests/test_k8s_volume_reclaim.py, tests/ai/review/test_runner.py, tests/test_telemetry_llm_content.py]
- What does test(cli): tests double only process edges and mirror the source tree #1307 Q27 specify for product code that a test needed only for a patch?: The acceptance criteria state that such product code goes, as test(cli): tests double only process edges and mirror the source tree #1307 Q27 says. The exact wording of Q27 is not in the context provided. The implementer must read test(cli): tests double only process edges and mirror the source tree #1307 to confirm the rule. [sources: tests/test_k8s_ipv6_and_proxy_boundaries.py]
- Does docs(testing): adr 0007 and docs/testing.md say that a test of src starts no program, and real processes stay in the process runner's contract suite #2143 change ADR 0007 in a way that affects the requirements of this item?: The body states this item follows ADR 0007 as docs(testing): adr 0007 and docs/testing.md say that a test of src starts no program, and real processes stay in the process runner's contract suite #2143 amends it. The content of docs(testing): adr 0007 and docs/testing.md say that a test of src starts no program, and real processes stay in the process runner's contract suite #2143 is not in the context. The implementer must confirm the amended requirements before starting. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 24, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate is about updating tests to use public interfaces and shared fakes.This change improves test quality and maintainability but does not block other work.Improving test quality reduces coupling and makes the codebase easier to maintain.Updating 49 test files to use public interfaces requires significant refactoring work.Both items relate to test file updates, but #1323 focuses on k8s commands and edge fakes, while this candidate addresses general test file coupling issues.dan-petty commentedon Oct 28, 2026
Status set to Ready at bb46660 (see proposed design in issue body).
devops-cli-service commentedon Nov 1, 2026
Staged: branch
test/2167-the-49-test-files-that-no, draft pull request #2982. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
These paths of the plan are no file on the default branch, and no group creates them:
tests/test_review_pipeline_go.py,tests/test_review_group_analysis.py,tests/test_review_canary.py,tests/test_review_rules_pack.py,tests/test_review_syntax_masking.py,tests/test_review_ruff_mypy_evidence.py,tests/test_review_tool_runs.py,tests/test_review_tool_sandbox.py,tests/test_k8s_ipv6_and_proxy_boundaries.py,tests/test_k8s_volume_reclaim.py,tests/test_k8s_gpu_placement.py,tests/test_k8s_tempo.py,tests/test_k8s_agents_manifests.py,tests/test_k8s_monitoring_alerting.py,tests/test_telemetry_llm_content.py,tests/test_rag_kb_sync.py,tests/test_security_zizmor.py,tests/test_osv_scanner.py,tests/test_golangci_lint_scanner.py,tests/test_ci_repeat.py,tests/test_ci_mutate.py,tests/test_core_repo.py,tests/test_ai_research_socratic.py,tests/test_ai_research_mental_model.py,tests/test_ai_research_analogies.py,tests/test_ai_research_forage.py,tests/test_fail_to_pass.py,tests/test_config_field_validation.py,tests/test_pr_hardening_report.py,tests/test_architectural_invariants.py,tests/test_roadmap_return.py,tests/test_url_credential_masking.py,tests/test_all_commands_help_dryrun.py,tests/test_cli_format_adoption.py,tests/test_cli_startup_imports.py,tests/test_codebase_hygiene_and_shims.py,tests/test_kb_manuals_metadata.py,tests/test_stack_dashboards.py,tests/test_survey_cmd.py. A person checks that the plan names them right.docs(openspec): plan #2167 migrate 49 tests to public interfaces (#2982)
docs(openspec): fix plan #2167 test seams (#3033)
[-]test(cli): the 49 test files that no child of #1307 names test through public interfaces over the shared fakes, with no internal patches or private imports[/-][+]test(cli): migrate 49 tests to public interfaces[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 144 characters, and the limit is 60. The type and the scope stay.
test(cli): the 49 test files that no child of #1307 names test through public interfaces over the shared fakes, with no internal patches or private importstest(cli): migrate 49 tests to public interfaces