Skip to content

fix(test): scaling-ratio form for the wide-flat linearity guard#934

Merged
DeusData merged 1 commit into
mainfrom
fix/wide-flat-ratio
Jul 7, 2026
Merged

fix(test): scaling-ratio form for the wide-flat linearity guard#934
DeusData merged 1 commit into
mainfrom
fix/wide-flat-ratio

Conversation

@DeusData

@DeusData DeusData commented Jul 7, 2026

Copy link
Copy Markdown
Owner

The wide-flat guard's absolute 30s wall-clock bound failed on ubuntu-24.04-arm — that leg's gcc-13 ASan build runs extraction ~200x slower than clang at measured-perfectly-linear complexity (container-verified: 27.1/54.2/108.3/214.8s for 50k/100k/200k/400k siblings; the leg took 71min in the last fully-green run too — pre-existing).

Replaced with a scaling-ratio assertion (complexity class, machine-independent): same fixture at 20k and 400k lines, growth ratio bounded at 40x. Parameters calibrated from measurement — linear code measures ~20x on both toolchains, the known-quadratic pre-merge walk measures 64.4x (verified RED against it; smaller growth factors let it slip under the bound). Timings now print unconditionally for triage.

An absolute wall-clock bound conflates machine speed with complexity
class: the gcc-13-ARM ASan CI leg runs this extraction ~200x slower
than clang at measured-perfectly-linear complexity (27.1/54.2/108.3/
214.8s for 50k/100k/200k/400k siblings) and flunked a 30s bound on
LINEAR code — the leg has always been the slow one (71min in the last
fully green run, unchanged since).

Assert the complexity class instead: extract the same comment-sibling
fixture at 20k and 400k lines and bound the growth ratio at 40x.
Calibrated from measurement, not models — the ASan builds carry a large
linear per-line baseline that dilutes small-growth ratios (at 8x growth
the known-quadratic pre-merge walk measured 22.4x and slipped under a
24x bound), while at 20x growth linear code measures ~20x on both
toolchains and the quadratic walk measures 64x. Verified RED (64.4x,
fails) against the pre-merge walk_defs and GREEN (19x) on the fix; the
test now prints both timings unconditionally for future triage.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData DeusData merged commit 4630d2a into main Jul 7, 2026
16 checks passed
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