Guard the click-capture pipeline with an automated end-to-end check
Template tests / tests (push) Waiting to run
Template tests / tests (pull_request) Waiting to run

Add tests/checks/test_click_capture_selftest.sh: runs the real Electron
STEPFORGE_CLICK_SELFTEST session and asserts every scenario passes — 3/3
markers at 0.00% offset, 8/8 burst clicks kept on finish, the first armed
click captured (warmup click ignored), and the debounce (4/4). Picked up
automatically by tests/run_test.sh. Skips cleanly when the host has no
capture environment so it never falsely fails CI, but fails the suite on any
real regression in click->screenshot->step behavior.

Document the guard in ARCHITECTURE.md and CHANGELOG.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Iisyourdad
2026-06-12 09:25:39 -05:00
parent f2c5831315
commit aafed7eca7
3 changed files with 82 additions and 3 deletions
+7 -3
View File
@@ -156,9 +156,13 @@ Reliability rules that keep "one click → one step" true under load:
one.
`STEPFORGE_CLICK_SELFTEST=1 npm start` exercises the whole pipeline in a
real Electron session: it reports steps-per-click and marker offsets, then
runs a fast-burst-then-finish scenario that must save every click.
`STEPFORGE_CAPTURE_LOG=1` prints one diagnostic line per click decision.
real Electron session across four scenarios — marker accuracy (0.00%
offset), a fast-burst-then-finish that must save every click, the
warm-before-arm first click, and the ~200ms debounce. It runs automatically
as `tests/checks/test_click_capture_selftest.sh` (skipped only when the host
has no capture environment), so a regression in click→screenshot→step
behavior fails the suite. `STEPFORGE_CAPTURE_LOG=1` prints one diagnostic
line per click decision.
## Security Rules