Skip to content

Bench: retry the heartbeat file on Windows - #34

Open
daniel-frenkel wants to merge 6 commits into
mainfrom
bench/heartbeat-retry
Open

daniel-frenkel wants to merge 6 commits into
mainfrom
bench/heartbeat-retry

Conversation

@daniel-frenkel

Copy link
Copy Markdown
Member

Bench tooling only. No firmware, workflow or release change.

What it does

  • bench_common.write_heartbeat: when Windows refuses to replace the heartbeat file (another process has it open), it retries every 10 ms for up to 0.5 s. If the replace is still refused it skips that beat and returns False; the next beat tries again. A run of skipped beats reads as stale, which still blocks or stops moves.
  • bench_common.guard_ok: when the read is refused it retries every 10 ms for up to 0.2 s, then reports not OK ("heartbeat file stayed locked").
  • tools/bench/heartbeat_check.py runs HB1-HB5, each with a sabotage.

Checks (tools/regression-gate/predictions/2026-11-bench-heartbeat-retry.md, registered before the change)

  • HB1 to HB5: 9/9 as predicted on cca0448.
  • HB5: a writer that stops mid-move still gets STOP within 2.8 s of its last beat (2.07 s measured).

Not for merge before the 2.2.0 tag; TP-1 runs from this branch until then.

🤖 Generated with Claude Code

daniel-frenkel and others added 6 commits November 12, 2026 20:12
… the change)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ill ends a move)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…redicted)

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