fix: close code-review 330-r1 — budgets from the slowest machine, the bench in Validate, AC1 through the execution thread (#330)

H2: the benchmark budgets were calibrated on the author's sandbox with a
1.14x margin — the review runner measured tsFullCandidateMs at 169-171 ms
against a 100 ms ceiling. Budgets now keep the spec's 2-3x allowance over
the SLOWEST observed machine, and the benchmark runs as a step of the
Validate perf job on every push (it needs no browser and no bundle), not
only inside the weekly mutation gate.

M1: the promised AC1 backend test exists now and does what AC1 means: it
patches validate_junction_limits with a thread-recording wrapper inside the
real HA harness — on the event loop that would be MainThread — and proves
the verdicts survived the move (a clean write is accepted, a write adding a
spike is refused with junction_limit_angle). Spec revision 4 rewrites AC1
around this invariant instead of a fragile millisecond assertion.

M2: §4.6 equivalence is now behavioural on both sides (three boundary
fixtures each: as-is counts equal through-migration counts, TS and python),
and the parity suite gained the §7 boundary fixtures (exact 15°, exact
20 cm, the thickness-step filler run, exact 5 cm).

H1 was already closed by 7513f93d (the review ran on the previous HEAD):
check-docs is green on this tree — the screenshots and their manifest come
from one capture run.

Issue: #330
User-Visible: no
This commit is contained in:
Codex
2026-08-28 03:07:44 +03:00
parent 4e8e00fa73
commit ddfca3a865
6 changed files with 170 additions and 17 deletions
+10 -5
View File
@@ -29,12 +29,17 @@ const GRID_N = 12; // 576 contour atoms — the #330 S2 grid
const WARMUPS = 2;
const SAMPLES = 5;
// Budgets are calibrated from the SLOWEST machine observed, not the
// author's: the CI review runner measured tsFullCandidateMs at 169-171 ms
// where the dev sandbox saw 88 (code-review 330-r1 H2). Each budget keeps
// the spec's 2-3x allowance over that worst observation, so the bench turns
// red for the O(n²) class (which costs seconds), not for a slower runner.
const BUDGETS = {
tsSegmentLengthsMs: 40,
tsNodeDistancesMs: 40,
tsFullCandidateMs: 100,
pyWarmValidateMs: 250,
pyColdValidateMs: 3500,
tsSegmentLengthsMs: 60,
tsNodeDistancesMs: 80,
tsFullCandidateMs: 400,
pyWarmValidateMs: 300,
pyColdValidateMs: 5000,
};
const u = (cm) => cmToUnits(cm, CELL, GRID_STEP_N);