EV-71: Solar and Manual keep their own untaken non-zero write as their own #286

Merged
ems-agent merged 3 commits from EV-71 into release/1.0 2026-12-05 06:55:53 +01:00
Collaborator

EV-71: Solar and Manual hold their own untaken non-zero write as another writer's after a press (false CHARGER_OTHER, peak cut blocked).

  • New kept value _kept in ManualWriter (one shared rule for Solar and Manual), part of _own_values(). Set by a refused non-zero write; a 0 A never sets or ends it; ends at a fresh own take, a different non-zero write, a press that lifts a count or hold, a hold, Solar's charger return.
  • A press that lifts nothing ends nothing (P1).
  • A held read never adopts in Solar _put; the owed 0 A is written and _carry is left alone.
  • New test_ev71.py (T1-T19, T24-T39, T37b, N rows). Existing tests edited only as the brief allows (test_ev69 T12 press alone and T24 setup; test_ev69_fuzz N4, N1b user cause, I1, I2).
  • Known limits: T31 (EV-67); after an own 0 A take a late take of an earlier refused non-zero value is counted as foreign (T37b, card EV-73).

Co-Authored-By: Claude noreply@anthropic.com

🤖 Generated with Claude Code

https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w

EV-71: Solar and Manual hold their own untaken non-zero write as another writer's after a press (false CHARGER_OTHER, peak cut blocked). - New kept value `_kept` in `ManualWriter` (one shared rule for Solar and Manual), part of `_own_values()`. Set by a refused non-zero write; a 0 A never sets or ends it; ends at a fresh own take, a different non-zero write, a press that lifts a count or hold, a hold, Solar's charger return. - A press that lifts nothing ends nothing (P1). - A held read never adopts in Solar `_put`; the owed 0 A is written and `_carry` is left alone. - New `test_ev71.py` (T1-T19, T24-T39, T37b, N rows). Existing tests edited only as the brief allows (test_ev69 T12 press alone and T24 setup; test_ev69_fuzz N4, N1b user cause, I1, I2). - Known limits: T31 (EV-67); after an own 0 A take a late take of an earlier refused non-zero value is counted as foreign (T37b, card EV-73). Co-Authored-By: Claude <noreply@anthropic.com> 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
ems-agent added 1 commit 2026-12-05 00:22:10 +01:00
EV-71: Solar and Manual keep their own untaken non-zero write as their own
checks / unit (pull_request) Successful in 58m47s
infra-pin / fresh (pull_request) Successful in 2s
0eb332d93f
A press that lifts nothing no longer clears attempted_a, prior_a, the EV-69
carry or the new kept value; a held read no longer adopts (no taken, carry
untouched, the owed 0 A is written); a refused 0 A no longer loses the
untaken non-zero value. The kept value ends at a fresh own take, a different
non-zero write, a lifting press, a hold or Solar's charger return.

Existing tests edited only as the brief allows: test_ev69.py T12 (press
alone) and T24 setup, test_ev69_fuzz.py N4, N1b user cause, I1, I2.

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-12-05 02:47:40 +01:00
EV-71: review fixes (T24 label, whitespace, N10)
checks / unit (pull_request) Successful in 54m59s
infra-pin / fresh (pull_request) Successful in 2s
1886a9f1ba
- test_ev69.py T24: label text restored; only the R1 flip and its comment.
- test_ev69_fuzz.py: revert an accidental whitespace change.
- test_ev71.py: drop the N10 check that could not fail (T17 ii carries N10).

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-12-05 06:10:45 +01:00
EV-71 review: T17 (ii) scans other modules for any _kept mention (getattr form too)
checks / unit (pull_request) Successful in 44m52s
infra-pin / fresh (pull_request) Successful in 2s
3a883fc9ae
Test-only. The N10 scan matched only the dot form ._kept, so a store write via getattr(w, "_kept") survived (review mutant M11g). Word-boundary match; was_kept and fc.kept do not match.

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent merged commit 831c33c96b into release/1.0 2026-12-05 06:55:53 +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#286