From 3e99480b55742575588a756f0dfa0ec90a9c3fa9 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 13 Sep 2026 12:32:34 +0200 Subject: [PATCH] Actor smoke: measure the stop with two samples after key-up, not against a pre-screenshot probe The check compared the position after key-up with a sample taken before shot(); the player keeps walking during the screenshot, so the check measured screenshot duration on the runner (22/30/40 px on CI runs 11-13) and failed at exactly 40. Co-Authored-By: Claude Fable 5.1 --- tools/smoke-actor.mjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/smoke-actor.mjs b/tools/smoke-actor.mjs index 00caa6ae..5608eb95 100644 --- a/tools/smoke-actor.mjs +++ b/tools/smoke-actor.mjs @@ -104,20 +104,24 @@ await runChecks({ projectId, baseUrl, port: 9341, shotPrefix: 'gm-actor' }, asyn // 5. Walking right, and stopping on the standing frame of the way he faces. await keyDown('d'); await sleep(400); - const walking = await entity('oplayer'); await shot('03-walk-right'); + const walking = await entity('oplayer'); await keyUp('d'); await sleep(250); const stopped = await entity('oplayer'); + await sleep(150); + const still = await entity('oplayer'); check( 'holding D walks right and plays the right walk animation', walking.x > 30 && walking.props.texture === 'walk-right', JSON.stringify({ x: Math.round(walking.x), texture: walking.props.texture }), ); + // Two samples after the release: he must not move between them. Comparing against the walking + // sample measured how long the screenshot took (22 to 40 px on the CI runner), not the stop. check( 'letting go stops him on the standing frame of the way he faces', - stopped.props.texture === IDLE.right && Math.abs(stopped.x - walking.x) < 40, - JSON.stringify({ x: Math.round(stopped.x), texture: stopped.props.texture }), + stopped.props.texture === IDLE.right && Math.abs(still.x - stopped.x) < 1 && stopped.x > walking.x - 1, + JSON.stringify({ x: Math.round(stopped.x), later: Math.round(still.x), texture: stopped.props.texture }), ); // 6. Walking up is −y.