EV-59: Manual gives one value at most MAX_TRIES tries per user change #282

Merged
ems-agent merged 4 commits from EV-59 into release/1.0 2026-12-01 10:10:12 +01:00
Collaborator

EV-59: Manual gives one value at most MAX_TRIES tries per user change, the phase-change closes included.

  • Cause: a refused close sequence ended with one _failed, so the normal path gave the same value 2 more tries (5 in all).
  • Fix (carmode.py): Manual counts the not-taken closes of the value owed (_close_k); at the capped close end fails is that count, so the give-up and CHARGER_REFUSED come at the 3rd refused close. A value changed mid-retries gets exactly 3 tries. SolarWriter overrides the new _close_end hook with its old _failed: Solar unchanged (EV-60).
  • Tests: new test_ev59.py; test_ev56 T5, T5b and golden "T20 T5 [R]"; test_ev28 T15; test_ev13 T13 text and T26 goldens (PM rulings).

Dev report: reports/EV-59-dev-report.md

🤖 Generated with Claude Code

https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w

EV-59: Manual gives one value at most MAX_TRIES tries per user change, the phase-change closes included. - Cause: a refused close sequence ended with one `_failed`, so the normal path gave the same value 2 more tries (5 in all). - Fix (carmode.py): Manual counts the not-taken closes of the value owed (`_close_k`); at the capped close end `fails` is that count, so the give-up and CHARGER_REFUSED come at the 3rd refused close. A value changed mid-retries gets exactly 3 tries. SolarWriter overrides the new `_close_end` hook with its old `_failed`: Solar unchanged (EV-60). - Tests: new test_ev59.py; test_ev56 T5, T5b and golden "T20 T5 [R]"; test_ev28 T15; test_ev13 T13 text and T26 goldens (PM rulings). Dev report: reports/EV-59-dev-report.md 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
ems-agent added 2 commits 2026-12-01 02:50:58 +01:00
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>
EV-59: test_ev13 T26 goldens, N4/N8/N10 tests, stronger T12b/T11a
infra-pin / fresh (pull_request) Successful in 2s
checks / unit (pull_request) Failing after 1h13m10s
e83b2e315b
PM ruling: drop the 4th and 5th tries (1095, 1155) from the test_ev13 T26
goldens T20-beside and T20-inside. test_ev59 gains T13e (a give-up never
blocks _undo, abandon or _begin), N8 and N10, and the fails-at-select and
fails-at-timeout asserts that kill mutant M12.

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-12-01 05:32:36 +01:00
EV-59: test_ev59 gains T14c, T17, T18, T11c, N3, N7, N11, N12; docstring
infra-pin / fresh (pull_request) Successful in 2s
checks / unit (pull_request) Successful in 51m36s
e522e6ffbb
T14c drives SolarWriter._advance with a moving close value (pinned to the
base result). T17, T18, T11c and N11 are source checks on the edited test
files. N3 is asserted in every run, N7 with an answering charger, N12 on the
tracker notes. The docstring now says which row is here, which is carried by
another suite, and which existing tests are edited.

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-12-01 09:19:42 +01:00
EV-59 review: CHANGELOG line; T21 power-unknown check exact
checks / unit (pull_request) Successful in 50m12s
infra-pin / fresh (pull_request) Successful in 1s
7628cacdb7
Reviewer fixes, Minor only, no implementation change:
- CHANGELOG.md: the user-visible change under "Not in a release yet".
- test_ev59 T21 (power unknown): assert the 3 restore tries at 20, 25, 30,
  the give-up and one REF, instead of "at most 3" (which passed with 0).
  Red on 1b909fb (20, 25, 30, 90, 150).

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent merged commit 2e09622fe1 into release/1.0 2026-12-01 10:10:12 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/goodwe-addon#282