EV-69 review r1: Manual T10, cap-end T17 (i), 0 A guard row, fuzz floors per writer and bound end
checks / unit (pull_request) Successful in 54m11s
infra-pin / fresh (pull_request) Successful in 1s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-12-04 02:29:30 +01:00
parent 9b09158ef8
commit 0f3d5d75e5
2 changed files with 194 additions and 28 deletions
+50
View File
@@ -516,6 +516,56 @@ check(f"T9: Manual, foreign 16 A at E+5: mismatch at E+5 ({r.first_ms(E)}), "
E + 36)
and n_some() == 1 and not r.calls_from(E + 1, 10 ** 9, True))
# Manual version of T10 (formal Dev note 3: Manual's adopt ends the carry)
r0 = mw(300)
E = r0.ended
r = mw(E + 200, hook2=lambda t, w, d, s: setattr(
d, "cur", 8.0 if t == E + 3 else 12.0 if t == E + 20 else d.cur))
check(f"T10 (Manual): the charger takes the target 8 A at E+3 (Manual's adopt "
f"ends the carry: {r.carry[E + 4]}), then shows the old close 12 A at "
f"E+20: mismatch at E+20 ({r.first_ms(E)}), hold at E+50 "
f"({r.first_hold(E)}), 1 INFO line ({n_some()})",
r.carry[E + 4] == [] and near(r.first_ms(E), E + 20, E + 21)
and near(r.first_hold(E), E + 50, E + 51) and n_some() == 1)
# T17 (i) in the cap-end shape (M14): the 0 A after a return is blocked by
# the used-up cut tries, so only the return itself can end the carry.
def ce_gone(cls, lo, hi, show_at, show_a):
w, drv = mk_ce(cls)
st = {"cap": False}
def h(t, w_, d, s):
nz = [1 for tt, a in d.calls if a > 0]
if nz and not s["cap"]:
s["cap"] = True
set_cap(w_, 6.0)
if t == show_at:
d.cur = show_a
return Run(w, drv, st=st).go(130, 600, hook=h,
gone=lambda t: lo <= t <= hi)
E = ce_gone(None, -1, -1, 10 ** 6, 0.0).ended
rn = ce_gone(None, E + 3, E + 8, E + 9, 10.0)
rbs = ce_gone(Base69, E + 3, E + 8, E + 9, 10.0)
same = all((rn.ms[t], rn.hold[t], rn.ncalls[t]) ==
(rbs.ms[t], rbs.hold[t], rbs.ncalls[t]) for t in range(E + 9, 601))
check(f"T17 (i, cap end): the charger gone E+3..E+8 and back at E+9 showing "
f"10 A, the cut tries used up: the carry stands while it is gone "
f"({rn.carry[E + 8]}) and ends with the return ({rn.carry[E + 9]}); no "
f"mismatch ({rn.first_ms(E + 9)}) and every cycle equals de733f4",
E is not None and rn.carry[E + 8] != [] and rn.carry[E + 9] == []
and rn.clean(E + 9, 600) and same)
# R-MB: the standing 0 A is no take (the cur > TOL_A guard in `_watch`)
r = s1(400, press_at=None, show_at=None)
check(f"T4 (0 A guard): S1-np-nt, the charger stands at the carried 0 A: "
f"gave_up stays True 142-400 and nothing non-zero is written "
f"({r.calls_from(143, 400, True)})",
all(r.gu[t] for t in range(142, 401))
and not r.calls_from(143, 400, True))
# =========================================================================== #
print("Rules the code keeps (Dev notes)")
# =========================================================================== #