Repository navigation
Closed
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnerstype/bugType bug: the code does not do what it must
Milestone
Description
Context & Rationale
devops ci is the pre-push hook (.pre-commit-config.yaml:70-77), so every push waits for it. Its budget is 5 minutes; it now takes about 8. The gate runs its checks concurrently (commands/ci.py, _run_all_checks_async), so its time is the pytest-and-coverage step (pytest -n auto --maxprocesses=8 --cov=src). The per-check durations cached in .data/cache/ci_cache*.json show that step at 130s and 278s on 2026-09-25 for the same change, then 470s and 485s on 2026-09-30. No other check takes more than 42s.
Scope & Deliverables
- Deliverable: find the cause from a timed per-test measurement (
pytest --durations), fix it, and add a guard that stops the test step regressing past the budget unnoticed. - Acceptance:
devops cifinishes in under 5 minutes in the devcontainer (16 cores, 8 pytest workers) without dropping tests. - Constraint: out of scope here: skipping the test step when a push changes no Python, which overlaps feat(cli):
devops ci testselects tests from a coverage index built on demand bydevops ci coverage --build-index#406.
Findings
- The checkout's filesystem (the main cause): the workspace is a 9p share of a Windows folder (
C:\Users\...\devops-clithrough WSL drvfs), where astattakes about 400µs against 0.8µs on ext4. The same code and command ran the test step in 518s there and in 158s on an ext4 clone. Fix: move the checkout into the WSL filesystem and reopen the container from there.devops cinow warns when its root is on such a share. - Secops dry-run tests ran the real scanners:
test_trivy_dry_run,test_kubelinter_dry_runandtest_pluto_dry_runnever enabled dry-run mode, so they scanned the whole workspace until their 120s and 60s timeouts. - Tests still made DNS lookups: the network guard blocked
connectbut notgetaddrinfo, so blocked HTTP retries and the reference extractor resolved names on every xdist worker. 15 tests relied on real DNS and now declare apublic_dnsfixture. - Split out: the reference extractor's per-token disk checks (fix(review): reference extraction checks the disk once per directory, not once per token #750) and tests writing to the project's config and data (fix(test): tests never write to the project config, data or tracked files #749).
- Result: the full gate passes in 2m 4s on an ext4 clone.
Strategic Alignment
- Milestone: v0.2.24 (critical fix, admitted after the release started)
- Priority: P0, set by the maintainer: a slow gate delays every change.
Metadata
Metadata
Assignees
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnerstype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(ci): keep the quality gate within its five-minute budget (#748) (#…
dan-petty commentedon Sep 30, 2026
Closed by #751, merged into
release/v0.2.24.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.24 (#905)