Repository navigation
Description
Context (2026-10-14 CI audit, measured from origin/main .test_durations refreshed by #5151): the full suite (smoke-test.yml parts, required check full-suite) is the largest PR-path CI cost, 27.7% of runner time 21:00–24:00Z (squid-bot dashboard / #5164 table). Its time is concentrated:
| Tests | Serial time | Share | |
|---|---|---|---|
Full suite (minus test_evidence_components.py, now Ground Truth's per #5163) |
17,463 | 56.9 min | 100% |
Extraction ReDoS / contract sweeps (tests/extraction/**, *_redos_immune, *_redos_sweep, contract rules) |
1,386 | 18.0 min | 32% |
| Tests over 10 s | 32 | 10.7 min | 19% |
| Tests under 0.1 s | 15,845 | ~1.2 min | 2% |
Heaviest sweep functions (summed over params): test_ownership_contract_rules_are_redos_immune 3.3 min, test_high_risk_execution_contract_rules_are_redos_immune 3.0, globals 1.8, branch 1.6, import 1.5, state_mutation 0.9, safety 0.6, cleanup_contract_redos_sweep 0.6.
Already handled elsewhere (don't redo): evidence tests and the duplicate test_evidence_components run (#5162/#5163), part balancing and durations weight (#5133/#5162), Ground Truth (#5164).
Rule for every part: coverage never drops. Main pushes, nightly and dispatch keep running every test. Only when a test runs on a PR, or how fast, may change. When in doubt, run.
A. Run the extraction ReDoS/contract sweeps on PRs only when their inputs change
- Mark the sweep tests (one pytest marker, e.g.
redos_sweep) and define their input set: the extraction rule/regex files and contract specs they read, the sweep harness, and pyproject/requirements. In doubt, include the file. (docs/ci.md: record measured redos_sweep coverage (Part of #5166) #6133) - On
pull_request, the full-suite parts deselect the marker when the PR changes no input. The decision comes from the PR's changed files, computed the same way as Det Sweep's (CI v2: required checks + merge queue, generated data off main (one writer), prove only what moved, one PR workflow #4825), and the required check still always reports. Push to main, nightly and dispatch run them always. (sweep_plan: --replay measures how many merged PRs skip the ReDoS sweeps (Part of #5166) #6342) - Tests for the classifier in both directions. PR body: the share of the last ~50 merged PRs that would have skipped, and the minutes saved. (test_sweep_plan: PR-skip classifier edge cases; re-measured skip share (Part of #5166) #6517)
B. Test-time ratchet: the suite must not get slower over time (owner, 2026-10-14)
Register it as a Ratchet in tests/tools/pr_gates.py (check command, update command, committed baseline), like the existing ratchets. CI runner timings vary ±20–30%, so it has two levels and only the robust one gates PRs:
- Per-test gate (hard, every PR): a test whose CI duration exceeds 10 s fails unless it carries an explicit
slowmarker with a reason, or is listed intests/test_time_baseline.json. Seed the baseline with today's 32 tests over 10 s and their times. A baseline test fails if it exceeds 2× its recorded time (wide enough for runner noise). The baseline only shrinks or gets faster: the update command lowers entries and drops ones under 10 s, and never raises one. - Whole-suite budget (hard on nightly main, report-only on PRs): total serial test seconds of the full suite, measured by the nightly run on main from its own junit/
--durations(not the contended durations cache, see Siblings of #5133: CI critical-path wall time (duplicate evidence_components run, evidence_report tail, durations weight) #5162). Nightly fails, and files or refreshes one issue, when the total exceeds the committed budget by >10%. When the suite gets faster, the update command lowers the budget to the new level (shrink-only). PRs print their suite total and the delta against the budget in the job summary, without gating. - Tests for the ratchet logic (threshold, 2× rule, shrink-only update, budget delta). Document it in
.claude/rules/(test-writing) anddocs/ci.md.
C. Speed up the top 10 by hand (4.9 min, 8.6%), keeping the same assertions
Profile each and fix the cause (fixture scope, repeated scans, sampling size), or split it so -n auto can parallelise it. Don't weaken the check:
-
cultural_gauntlet::test_the_sampled_plan_passes_its_ratchet60.8 s -
test_unicode_gauntlet::test_the_oracle_is_sound_on_the_mainframe_seed46.4 s -
test_scan_path_independence_4058::test_the_same_tree_scans_the_same_under_any_parent[tmp]42.2 s -
test_cleanup_contract_2888::test_cleanup_contract_redos_sweep33.2 s (or covered by A) -
cobol_mainframe/test_tool_regex_redos::test_no_new_offenders21.9 s -
test_immutability_locks_contract_2772::test_immutability_locks_redos_sweep21.0 s (or covered by A) -
test_galaxyscope(3 tests: typosquat 19.5 s, z-score backfill 14.8 s, sarif purge 14.1 s): likely a shared expensive fixture -
test_inline_extraction::test_a_spawned_pool_is_the_forked_pools_output18.1 s
Acceptance: before/after full-suite part wall times on a typical ready PR (code-only and docs-only), and the runner-minutes per run, in each PR body. Test count on main and nightly unchanged.
Activity
squid-protocol commentedon Oct 15, 2026
Sibling gaps from PR #5171 (part C, same mechanism; class: test time spent re-spawning/re-scanning per case):
assert_redos_immuneonce per payload; switch each toassert_redos_immune_all(one child per sweep) from tests: speed up the slow-test top 10 without weakening a check (Part of #5166) #5171test_galaxyscopepipeline tests still use root"."(~1.9 s each); use the_empty_root()helper from tests: speed up the slow-test top 10 without weakening a check (Part of #5166) #5171cultural_gauntlet::test_the_sampled_plan_passes_its_ratchetstays open in the C checklist: needs a cheaper per-cell scan or fewer cells, without weakening itCI: suite-time job skips drafts; fleet test expects the time ratchet …
tests: decode the spawned scan's stderr through source_text, not erro…
CI: time-ratchet baseline seeded from the failing CI run (Part of #5166)
CI: test-time ratchet, per-test gate and suite budget (Part of #5166) (…
tests: speed up the slow-test top 10 without weakening a check (Part of
squid-protocol commentedon Oct 15, 2026
Seen from PR #5175's fix run (churn):
test_refraction_differentialand thetest_ownership_contract_2882ReDoS tests run 10-13 s with noslowmark or time-baseline entry, and fail the time ratchet on main's latest Smoke Tests run too (shepherd labelled #5175 waiting-on-main). Belongs to this issue's slow-test budget.test_sweep_plan: one collection for the marker test, under the 10 s p…
squid-protocol commentedon Oct 15, 2026
Seen on PR #5185 (run 38728687965): after a
gh run rerun --failedand then a full rerun, thesuite time budget (#5166)job found 0test-times-part-*artifacts ("find: 'times': No such file or directory", "expected 3 parts' test times") and went red. The header comment says it never fails on PRs. Also seen:test_nfc_paths.py::test_a_delta_rescan_of_an_nfd_checkout_sees_no_renametook 10.2 s once against the 10 s per-test limit (usually ~4 s), probably from runner load.🤖 Generated with Claude Code
squid-protocol commentedon Oct 15, 2026
Owner decision (2026-10-15): soften the per-test time gate. A single timing on a shared runner (±20-30% noise) at a hard 10 s edge gave ~15 false reds today and blocked 6 approved PRs. PRs fail only on an unmarked test > 15 s or a baselined test > 2.5x; 10-15 s warns in the summary; the nightly on main tracks tests over 10 s in one issue.
CI: soften the per-test time ratchet; drop slow marks that only dodge…
20 remaining items
docs/ci.md: re-measured ReDoS sweep skip share, 23 of 50 (Part of #5166)
test_sweep_plan: PR-skip classifier edge cases; re-measured skip shar…
test-writing rule: per-test gate is 15 s and baselined tests fail at …
squid-protocol commentedon Oct 25, 2026
#6674 merged: a partial slice of [c:6881f547] "Per-test gate (hard, every PR): a test whose CI duration exceeds 10 s fails unless it carries an explicit
slowmarker with a reason, or is listed intests/test_time_baseline.json. Seed the"; left: gate, baseline and docs already on main; this PR only corrects the rule text (15 s fail / 10-15 s warn, owner 2026-10-15, not a hard 10 s) (promoter-bot)squid-protocol commentedon Oct 25, 2026
#6674 merged: a partial slice of [c:a9db9d08] "Tests for the ratchet logic (threshold, 2× rule, shrink-only update, budget delta). Document it in
.claude/rules/(test-writing) anddocs/ci.md."; left: ratchet tests and ci.md exist on main; budget-delta coverage not re-verified here (promoter-bot)squid-protocol commentedon Oct 28, 2026
Claimed by promoter-bot host
nyx, lease renewed 2026-10-28T14:51Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:nyxlabel.squid-protocol commentedon Oct 28, 2026
Closing: churn run 5166-20261028T1630Z verified against main 4a9791d that every checklist item has landed. A: #6133/#6342/#6517. B (per-test gate, suite budget, tests+docs): #5169 (limits since set to 15 s / 2.5x by owner decision 2026-10-15). C: #5171, #5179, #5256, #5374, #5389. Boxes lagged the merged PRs. Further speedups go in a new issue.
squid-protocol commentedon Oct 28, 2026
Churn run
5166-20261028T1630Z(host nyx) ended without a PR. all items already on main (#5169, #5171/#5179/#5256/#5374/#5389); issue closed