Skip to content

test: give three ramped CPU checks headroom on a slow host - #37853

Merged
bolichen97 merged 1 commit into
mainfrom
crew/LinuxFlackyGuard/image-path-ramp-headroom
Nov 16, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
crew/LinuxFlackyGuard/image-path-ramp-headroom

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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_time in test_image_refs_replay_strip.py (4/10) and test_acp_prompt_blocks.py (3/10 and 2/10), and test_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

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 Plant Result
test_acp_prompt_blocks.py image paths _PATH_RE bounded body → +? red: 99x per 10x
test_image_refs_replay_strip.py image paths {1,_MAX_PATH_SCAN_CHARS}? → +? red: 99x per 10x
push gate regex-engine \s.*\s.*zz per call red: 2.75 s over the 2 s budget
push gate Python O(n²) rescan red: instructions not linear

The 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:

Condition #37782 head this branch
clock 6x + busy, 10 runs 5/10 10/10
coverage + busy + clock 6x, 10 runs 0/10 10/10

Manual verification

N/A — test-only change; the plants and forced-condition runs above are the check.

Related Issues

Follows #37782 (no issue).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

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.
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 16, 2026 06:39
@bolichen97
bolichen97 requested a review from buluoray November 16, 2026 06:39
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The growth check now reads pumps of 50, 500 and 5 000 fragments. At those sizes the REDOS_SCALING_FLOOR_SECONDS floor takes over the 50→500 comparison, so only the top step really tests the ratio. That is enough for the quadratic class, but the reason is worth a line in the comment.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 8f6cede

Verdict parsed from the review's SHA-scoped output markers for commit 8f6cede219eb8b32829cf2fb29d4b5b437c201e4.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8f6cede

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 8f6cede219eb8b32829cf2fb29d4b5b437c201e4 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 16, 2026 07:19
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 16, 2026
@bolichen97
bolichen97 merged commit 2746478 into main Nov 16, 2026
95 checks passed
@bolichen97
bolichen97 deleted the crew/LinuxFlackyGuard/image-path-ramp-headroom branch November 16, 2026 07:33
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant