Repository navigation
Description
Problem or Motivation
12 test files call rglob('*.py') and raw ast.parse. They do not use the cache of tests/support/trees.py:53-61 or the session fixture parsed_source_trees (tests/support/trees.py:91-94).
test_every_import_of_a_roadmap_module_names_a_module_that_exists (tests/invariants/test_source_tree.py:548-557) parses 2,127 files and takes 10.65 s in CI (measured). mypy proves the imports of src, and a broken import in a test fails when that test runs.
Saving: 20-30 s of CI worker time (estimated).
Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.
Proposed Solution & Architectural Design
- Route the 12 files through
parse_python_fileorparsed_source_trees. - Delete the import-check test, because mypy and the test run already prove the same thing.
Risk: Low.
Target Subsystem
SDLC, Git & PR Governance (tests/invariants/, tests/telemetry/test_telemetry_instruments.py, tests/support/trees.py).
Existing Tool Considered
The existing parse cache of tests/support/trees.py and mypy. No new tool. Cost: about 20,000 tokens and 1 hour.
Acceptance Criteria
- No test file outside
tests/supportcallsast.parseon anrglobresult (git grep). - The 4 heaviest files run in 15 s or less with
-n 4and no coverage (from 26.5 s, measured).
Dependencies
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
perfprefix of the title gives the type.(tests)scope of the title gives the scope.Saves 20-30 s of CI worker time per run but does not block delivery or fix a defect.Reduces CI queue time for all pull requests by 20-30 s per job.The body estimates about 1 hour and 20,000 tokens to route 12 files through an existing cache.Both share the goal of reusing one parse of the source tree in tests, but the candidate extends the fix to 12 files across invariants and telemetry and adds a test deletion.devops-cli-service commentedon Nov 11, 2026
Released in v0.114.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.114.1
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 23:31 UTC
dan-petty commentedon Nov 12, 2026
Acceptance criterion 2: measurement after the merge
Command:
uv run pytest -n 4 -p no:cov -q --durations=20 tests/invariants/test_source_tree.py tests/telemetry/test_telemetry_instruments.py tests/invariants/test_hermetic_floor.py tests/invariants/test_architectural_invariants.py. The time is the pytestpassed invalue.On 2026-11-12, in the devcontainer, with a load average of 34 to 44 on 16 CPUs. "Before" is
66c9ef5a(the parent of the merge), "after" is7a163a72(the merge of #4850). The runs alternate in ABBA order.The mean goes from 506.4 s to 354.0 s (ratio 0.699). The CPU time goes from 1,026.0 s to 774.9 s (ratio 0.755). The builder of #4850 measured the ratio 0.719 (229.0 s to 164.6 s). With these ratios, the baseline of 26.5 s becomes 18.5 s to 20.0 s. That is more than the target of 15 s. The host was loaded, so the absolute values are not valid; only the ratio is.
No quiet host was available, and the CI logs give no time for each test file. So this comment cannot prove the absolute value. The ratio shows that the criterion "15 s or less" is not met. The costs that stay are in #4890, which is a sub-issue of this issue.