SAFETY-96 review: keep the refusal count over a refused write; test a fast board
checks / unit (pull_request) Successful in 31m53s
infra-pin / fresh (pull_request) Successful in 2s

F1: resetting the count on each refused write hid a battery that really
refuses behind a link refusing 1 write in 3 (never learned; learned at
358 s with the count kept). F2: a board at 0 W before its link is stale
learned no refusal untested (mutation R7 survived); now a 1 s-lag case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-10-06 05:46:32 +02:00
co-authored by Claude Opus 5.5
parent 88b9cd470a
commit 956711b801
3 changed files with 46 additions and 5 deletions
+2 -1
View File
@@ -1402,7 +1402,8 @@ class Controller:
if inv.rejected_since is not None:
# SAFETY-96: its writes are refused, so its board may have
# gone to 0 W on its own; that is no refusal by the battery.
inv.ref_count = 0
# The count is kept, as across a gap, so a link that refuses
# now and then does not hide a battery that does refuse.
continue
sign = self._gave_nothing(inv)
if sign: