Skip to content

Bench: guard reconnect and interlock; prompts on screen and spoken; Child Lock during sittings - #30

Merged
daniel-frenkel merged 2 commits into
mainfrom
bench/guard-prompts
Nov 11, 2026
Merged

daniel-frenkel merged 2 commits into
mainfrom
bench/guard-prompts

Conversation

@daniel-frenkel

Copy link
Copy Markdown
Member

Bench tools only; nothing under firmware/ changes. Predictions: tools/regression-gate/predictions/2026-11-bench-guard-prompts.md (registered before the code). Lands before the TP-1 sitting and session 1a.

What

  • Guard reconnect (open_guard.py): when its connection drops (a flash, a power cut, a reboot) the guard records it, alerts Daniel, keeps trying, checks the MAC again and resumes watching.
  • Interlock (bench_common.py): the guard writes a heartbeat about twice a second. No bench script sends a move (Open, Close, Set position, Auto-Calibrate, the bench presses that start motion) unless the heartbeat is under 2 s old and says connected and watching; if it goes stale mid-move, the script sends STOP itself. tp1_run.py uses it now; pc_run.py (Firmware 2.3.0: the limit switches decide the ends; position after a power cut #27) will when Firmware 2.3.0: the limit switches decide the ends; position after a power cut #27 merges.
  • Prompts Daniel sees and hears (bench_prompt.py): prompts that ask him to act, and the guard's alerts, open in a window that stays on top of his screen and are spoken by Windows' built-in voice; the countdown helper speaks "three, two, one" and the call.
  • Child Lock during sittings (bench_session.py start/end): records the sitting (carriage, window) and Child Lock's setting, turns Child Lock on, and restores it at the end. tp1_run.py turns it off just before its Button 1 step and on right after. The guard doesn't start if its carriage flag disagrees with the sitting.

Checks

Check Result
B1 the #29 checks (TP-1 dry run, window, carriage) still pass
R1 a dropped connection is recorded and alerted, the heartbeat says disconnected within 2 s, the guard reconnects (MAC checked) and still stops a later unlearned open at 97.08 mm. Sabotage: without the reconnect the same open runs to the old carriage's hard stop, unrecorded
I1 no heartbeat, a stale one or a disconnected one: the move isn't sent and the refusal is recorded; the TP-1 dry run without a guard sends no move and reports INCOMPLETE. Sabotage: with the gate bypassed the move is sent
I2 heartbeat stale mid-move: STOP sent at once and recorded. Sabotage: without the in-move check, no STOP
P1 TP-1's Button 1 request and the guard's alerts go through the prompter; the countdown speaks three, two, one and the call a second apart. Sabotage: a prompt that only prints is missing from the record
C1 start turns Child Lock on and records the original; TP-1 turns it off just before the Button 1 step and on right after; end restores it. Sabotage: an end that doesn't restore is caught
C2 a sitting recorded as trimmed with the guard started without the flag (and the reverse): the guard doesn't start
P2 at the start of the next sitting: Daniel sees and hears a test prompt (bench)
Wording the push gate passes

🤖 Generated with Claude Code

daniel-frenkel and others added 2 commits November 11, 2026 12:25
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hild Lock during sittings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@daniel-frenkel
daniel-frenkel merged commit 96674ca into main Nov 11, 2026
1 check passed
daniel-frenkel added a commit that referenced this pull request Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant