Merge pull request #3712 from ruvnet/loop/metaharness-perf-ceiling

fix(ci): MetaHarness parse bench — realistic 30 µs median ceiling (CI p50 is 6 µs, the 5 µs ceiling failed on speed alone)
This commit is contained in:
rUv authored and GitHub committed 2026-10-04 18:29:29 -07:00
commit d3fc7e279d
1 file changed
+2 -2
+2 -2
View File
@@ -1066,11 +1066,11 @@ done
grep -q "from './_harness.mjs'" "$F" 2>/dev/null || miss="$miss not-using-production-parser"
# Gate flag exposed
grep -q -- "--max-mean-us" "$F" 2>/dev/null || miss="$miss no-gate-flag"
# Runtime: bench produces sub-5μs results across all categories
# Runtime: the parse bench stays an order of magnitude inside its regression ceiling. 30us on the MEDIAN: the CI runner measured p50 6.05us for the 5-finding payload (local 1us), so the old 5us ceiling failed there on speed alone; 30us is 5x the CI median and still trips on a 10x regression.
# The median, not the mean: a scheduler pause on a loaded CI runner moves the mean and flaked this step in the fleet smoke.
grep -q -- "--gate-stat" "$F" 2>/dev/null || miss="$miss no-gate-stat-flag"
# On failure keep the bench's own output on stderr (the fleet JSON report captures stderrTail): the reason was invisible in CI before.
bench_out=$(node "$F" --iters 10000 --max-mean-us 5 --gate-stat p50 2>&1) || { miss="$miss runtime-fails-or-perf-blew-5us"; printf '%s\n' "$bench_out" | tail -15 >&2; }
bench_out=$(node "$F" --iters 10000 --max-mean-us 30 --gate-stat p50 2>&1) || { miss="$miss runtime-fails-or-perf-blew-30us"; printf '%s\n' "$bench_out" | tail -15 >&2; }
# Runtime: gate trips on absurd ceiling
if node "$F" --iters 10000 --max-mean-us 0.0001 --gate-stat p50 >/dev/null 2>&1; then
miss="$miss gate-failed-to-trip"