Stop the bead spacing check failing on one slow frame

CI task 261 at fd6af84 went red on a single check in module 18: "an
exec edge firing every frame carries an evenly spaced chain of beads"
measured a gap of 0.611 instead of 0.5 +- 0.1. The code did not
change. The tolerance was tighter than one slow frame.

- A bead leaves on the first frame at least 0.15 s of game time after
  the one before, which is 0.5 of the 0.3 s trip. The gap is therefore
  that plus up to one frame.
- One 33 ms frame right after the screenshot gives exactly 0.611.
- The check now wants a gap above 0.49 and below 0.5 plus one frame of
  up to 50 ms.

Tests:
- e2e 18 on the final build: ALL PASSED, 33 checks.
- Counter-probe with a minimum spacing of 0.1 instead of 0.15: the
  check fails with 0.333, and only this check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-09-23 16:44:15 +02:00
1 parent fd6af84474
commit 9b62d572b4
1 file changed
+3 -1
+3 -1
View File
@@ -209,9 +209,11 @@ export async function pause(t) {
(await json('__gm.graph.beads()')).filter((b) => b.edgeId === edgeId).map((b) => b.progress);
const chain = await beadsOn('p-e1');
const gaps = chain.slice(1).map((p, i) => chain[i] - p);
// A bead leaves on the first frame at least 0.15 s of game time after the one before (0.5 of a
// 0.3 s trip), so a gap is that plus up to one frame – CI task 261 had a 33 ms frame: 0.611.
check(
'an exec edge firing every frame carries an evenly spaced chain of beads',
chain.length >= 1 && chain.length <= 3 && gaps.every((g) => Math.abs(g - 0.5) < 0.1),
chain.length >= 1 && chain.length <= 3 && gaps.every((g) => g > 0.49 && g < 0.5 + 0.05 / 0.3),
JSON.stringify(chain),
);
check(