EV-60: Solar never passes the cut cap of 3 refused tries per quarter key
checks / unit (pull_request) Successful in 57m13s
infra-pin / fresh (pull_request) Successful in 2s

Solar's phase change 0 A and its capped close are cut tries. They now pass
the same gates as `_put`: none at cut_fails >= MAX_TRIES, none within RETRY_S
of the last refused cut try (the sequence's first cut close waits at 0 A, the
rest keep the 5 s spacing). A gated 0 A waits for the next quarter key and
never gives up; a capped close with no tries left ends the change at 0 A
(end_switch(False), reapply, no write). Solar's close end adds no extra
_failed (EV-56 F1 on the cut path, EV-59 finding 2 on the non-cut path), so
a press during the close retries gives the value MAX_TRIES tries.

Solar only (override in SolarWriter); Manual is byte for byte as before.
Edited tests as ruled (Q3, Q4): test_ev59 T25/T14, T25 press, T14c and the
N11 digest list; test_ev56 T19b [a]/[b], T12 and golden "T20 T12 [R]".

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-12-02 05:48:20 +01:00
parent 2e09622fe1
commit 5bd2b1ec97
4 changed files with 969 additions and 23 deletions
+15 -11
View File
@@ -617,12 +617,15 @@ def sp3(press, cls=solar_writer):
S_NONE = sp3(False)
S_PRESS = sp3(True)
check(f"T25/T14 (N14): Solar equals base. No press: 8 A at 12, 17, 22, fails "
f"4, gave_up, REF at 22 ({S_NONE})",
S_NONE == ([12, 17, 22], 4, True, [22], None))
check(f"T25 (resetSuper trap): a Solar press at 13 does not reset Solar's "
f"tries: 8 A at 12, 17, 22, fails 3, gave_up, REF at 22 ({S_PRESS})",
S_PRESS == ([12, 17, 22], 3, True, [22], 13))
check(f"T25/T14 (N14, EV-60): Solar has no extra _failed at its close end. "
f"No press: 8 A at 12, 17, 22, fails 3, gave_up, REF at 22 "
f"({S_NONE})",
S_NONE == ([12, 17, 22], 3, True, [22], None))
check(f"T25 (resetSuper trap, EV-60): a Solar press at 13 does not reset "
f"Solar's close tries, and the value gets MAX_TRIES tries since the "
f"press: 8 A at 12, 17, 22, 82, fails 3, gave_up, REF at 82 "
f"({S_PRESS})",
S_PRESS == ([12, 17, 22, 82], 3, True, [82], 13))
def t14c():
"""T14c: Solar's close value changes between the tries (the spare falls
@@ -650,10 +653,10 @@ def t14c():
S14C = t14c()
check(f"T14c (N14): Solar's close value moves between tries: 8, 7, 6 A at "
f"10, 15, 20, then `fails` 4, gave_up, REF at 20, seq None, as base "
f"({S14C})",
S14C == ([(10, 8.0), (15, 7.0), (20, 6.0)], 4, True, [20], None))
check(f"T14c (N14, EV-60): Solar's close value moves between tries: 8, 7, 6 A "
f"at 10, 15, 20, then `fails` 3 (no extra _failed), gave_up, REF at "
f"20, seq None ({S14C})",
S14C == ([(10, 8.0), (15, 7.0), (20, 6.0)], 3, True, [20], None))
print("\n6. THE CAP, RESTART, UNKNOWN, NO CHARGER (T15-T22)")
UCS.clear()
@@ -737,7 +740,8 @@ s56, s13, s28 = tsrc("test_ev56.py"), tsrc("test_ev13.py"), tsrc("test_ev28.py")
BASE_DIGESTS = ("905c0b8ba89bb307", "343ea01aacfa1019", "ff6306ce56b35c64",
"f1fb141275839562", "369069be9187ab3c", "2cd78dee7ee93aaa",
"f0adb058a5bbefba", "6d7bcb747d1dc5a3", "2be1a760b699b28c",
"a5888e4557b4ee8f", "2fd24ddbb18f14cc", "1ad97e089468d71b",
# EV-60 (Q4): "T20 T12 [R]" re-taken, was 2fd24ddbb18f14cc
"a5888e4557b4ee8f", "25a205989dc44204", "1ad97e089468d71b",
"7baf8981ab382e05", "54701b140ec6f30b", "0cfd3ccd334f378d",
"1d85595302dc032a", "5fc65dbdc730e539")
check("T17 (Q1, Q2): test_ev56 has the re-taken golden 'T20 T5 [R]' "