Repository navigation
test: give three ramped CPU checks headroom on a slow host - #37853
Conversation
The image-path scans in test_acp_prompt_blocks and test_image_refs_replay_strip, and the push gate's pathological-flags check, go through the shared ramped thread-CPU check. Their 20 000-unit long pumps cost a third of the 2 s budget (the push gate's Python walk far more under coverage), so with every clock 6x fast and the CPU busy they went red on a correct tree: 4, 3 and 10 times in 10. The long pumps now carry a quarter (image paths) or a twentieth (push gate) of the units; the one-unit ramp and the 10x step between long pumps are unchanged, and every plant that failed them still does.
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. This is a test-only change: the ramp and the 10x growth step are unchanged, and the planted regressions still go red. Notes
[DESIGN-REVIEWED] 8f6cede Description read[DESCRIPTION-READ] 94cd8f46f8940048379f2ef38ea0c2f6969ad94075766a779da7220bd8b1d3fa That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: Three ramped CPU complexity checks added in #37782 stop going red on a correct tree when the host is slow, and each still fails on the regression it guards.
The forced-condition runs for #37782 (8-core DevSpace, every clock 6x fast plus 8 busy loops, with and without coverage) finished after it merged. Two image-path checks and the push gate's pathological-flags check went red on a correct tree:
test_a_long_message_of_path_fragments_scans_in_linear_timeintest_image_refs_replay_strip.py(4/10) andtest_acp_prompt_blocks.py(3/10 and 2/10), andtest_redos_safe_on_pathological_input(10/10 with coverage). Each reads "handling a 20000-unit pump cost 2.05-5.44s of CPU": a linear scan of the 20 000-unit long pump already costs about a third of the shared 2 s budget on an idle host, and the push gate's own Python walk far more under coverage.Why it matters
A check that reds on a slow or coverage-instrumented runner is the shape #37782 exists to remove; left alone, these three would be the next tests that block unrelated PRs.
Not a goal
src/.assert_rejected_without_backtrackinghelper or its budgets.What changed (motivation → approach → change)
The long pumps (200, 2 000, 20 000) now carry a quarter of the path fragments (image paths) or a twentieth of the flags (push gate); the one-unit ramp below 200 keeps every unit. The growth check reads the 10x step between long pumps, which is unchanged, so a superlinear scan still fails it, while the absolute cost of a linear scan at the top pump drops to well under the budget.
Backwards compatibility
Compatible: test files only; no product behaviour changes.
Removes nothing: the three tests keep their names, their claims and the shared helper's budgets.
Tests
Proof: not provable -- test-only change
Planted regressions (in-memory monkeypatches,
src/untouched), on this branch:test_acp_prompt_blocks.pyimage paths_PATH_REbounded body →+?test_image_refs_replay_strip.pyimage paths{1,_MAX_PATH_SCAN_CHARS}?→+?\s.*\s.*zzper callThe push gate with coverage, 3 runs: 3/3 pass.
The two forced conditions that went red on #37782, on this branch (
53ce9137b7, same tree as the head before its rebase), all 39 tests #37782 converted,-n0, 8-core DevSpace:Manual verification
N/A — test-only change; the plants and forced-condition runs above are the check.
Related Issues
Follows #37782 (no issue).
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.