UX-08 2d review: action log reachable in status JSON, engaged peak row pinned, imported keys expanded
- status_payload() also returns the action log as `events`. The page does not render it. Some entries (a dropped inverter's reason, the peak guard's projection, unplaced watts) are written nowhere else, and DOCS still points installers at the action log. - test_peakguard pins the engaged row's ordered pair (the battery's share, then the limit). - test_messages expands setting keys named by constants imported from another app module, so the shown-text 30-word scan counts them. - p1.py: 'A meter message could not be read'. DOCS glossary: control board in plain words, with the hardware in an installer note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1221,6 +1221,19 @@ rows = [r for r in c.checks() if r.get("id") == "peak_guard"]
|
||||
print(" status row: " + (rows[0]["text"] if rows else "(none)"))
|
||||
check("the status page carries exactly one peak-guard row, flagged",
|
||||
len(rows) == 1 and rows[0]["warn"])
|
||||
# UX-08 2d: the engaged row names what the battery is asked for FIRST and the
|
||||
# limit SECOND. Both are watts, so only the ordered pair tells them apart.
|
||||
from app import messages as _msg_on # noqa: E402
|
||||
_on = (f"asks the battery for {_msg_on.watts(c.peak_guard.floor_w)} to stay "
|
||||
f"under {_msg_on.watts(c.peak_guard.ceiling_w)}")
|
||||
_on_swapped = (f"asks the battery for {_msg_on.watts(c.peak_guard.ceiling_w)} "
|
||||
f"to stay under {_msg_on.watts(c.peak_guard.floor_w)}")
|
||||
check("...and it names the battery's share first and the limit second, and "
|
||||
"the two render differently so the swap is visible",
|
||||
len(rows) == 1 and _on in rows[0]["text"]
|
||||
and _on_swapped not in rows[0]["text"]
|
||||
and _msg_on.watts(c.peak_guard.floor_w)
|
||||
!= _msg_on.watts(c.peak_guard.ceiling_w))
|
||||
check("an engagement that is not saturated raises NO notification - §10.3's "
|
||||
"'clamp AND alarm' is SAFETY-03's rule about a BUG SIGNAL, and a house "
|
||||
"load bigger than the inverter is not a bug",
|
||||
|
||||
Reference in New Issue
Block a user