Commit Graph
3 Commits
Author SHA1 Message Date
Claude 5bd2b1ec97 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>
2026-12-02 05:48:20 +01:00
Claude 009393a5ee EV-59: Manual gives one value at most MAX_TRIES tries per user change
A refused phase-change close ended its sequence with one `_failed`, so the
same value got 5 tries (3 closes, then 2 on the normal path). Manual now
counts the not-taken closes of the value owed since the last user change
(`_close_k`); at the capped close end `fails` = that count, so `gave_up` and
CHARGER_REFUSED come at the 3rd refused close, and a value changed during the
retries still gets 3 tries. SolarWriter overrides the end hook and is
unchanged (EV-60).

Tests: new test_ev59.py; test_ev56 T5, T5b and the T20 T5 [R] golden,
test_ev28 T15 and the test_ev13 T13 text per the brief rulings.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-12-01 02:40:49 +01:00
ems-agentandClaude 3682b0754b EV-56: a charger write that raises counts as a not-taken try
checks / unit (pull_request) Successful in 57m33s
infra-pin / fresh (pull_request) Successful in 2s
ManualWriter._write catches an Exception from drv.write_current (not CancelledError) and returns False, so every caller in Manual and Solar counts it as a refused try: RETRY_S spacing, MAX_TRIES, CHARGER_REFUSED. The tracker is not told (Q2). One ERROR record per raised value, armed again by another value, a taken write, a user change or the charger's return (Q1, G2). Shutdown writes (abandon, release) pass strict and keep base's behaviour (F3, H1, G3); the peak cut path keeps EV-54's (G1). test_ev13 T13: fails is 1 now (Q2). New test_ev56.py.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-30 18:52:11 +01:00