MAINT-21: comments only - trim restated notes, add DECISIONS pointers
No code change: tools/maint21_same_ast.py and tools/maint20_same_code.py HEAD~ both print OK, and the -OO code objects are the same. - Trims 56 comment and docstring lines (2088 -> 2032) in app/main.py and the new files that only restated their MAIN-orchestration.md bullet, each cut to its first sentence and a pointer. What the cut comments said and the bullet did not is now in the bullet: why a SAFETY-02 latch is restored, why the SAFETY-30 site check is not armed at one inverter, the SAFETY-18 re-derive, the MAINT-05 one-config rule, the OPT-09 sizing rules, the "no plan" row, the 5 400 s age bound, and the guard being the only latch repair. - Adds the missing DECISIONS pointers on the SMA-10, SAFETY-137 and SMA-2 comments (FALLBACK_BUDGET_S, write_setpoint, _await_inflight, _release_last, the retry wait, the failed-release branch, release_zero_sent, the in-flight write, the stop_event hand-back, the SMA-2 read and driver). - DECISIONS/SAFETY-32: the stale `main.py:932-936` now names Controller.pack_floor_soc. - main.py's docstring and import block say where the Controller's parts are. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
27a867f34b
commit
902da3f723
@@ -40,11 +40,8 @@ def why_key(winner: str, claims) -> str:
|
||||
def tariff_plan_row(plan, tick_words: str, *, age_s, horizon_h: float,
|
||||
provider: bool, max_age_s: float) -> str:
|
||||
"""The *Tariff* status row: the 30 s tick's sentence AND the provider plan
|
||||
(TARIFF-11): two sources, two clocks, and the row says so. The plan is
|
||||
stamped with its own age from `tariff_at` (not moved on a kept plan,
|
||||
TARIFF-12), up to TARIFF_MAX_AGE_S (5400 s); `age_s` is the caller's
|
||||
measurement. "No plan" is said aloud on a site that configured a provider.
|
||||
DECISIONS/MAIN-orchestration.md."""
|
||||
(TARIFF-11), each with its own clock. "No plan" is said aloud on a site
|
||||
that configured a provider. DECISIONS/MAIN-orchestration.md."""
|
||||
# UX-08: plain words, every figure kept. The tick's sentence is "now"; the
|
||||
# plan carries its own age.
|
||||
if plan is None:
|
||||
@@ -58,12 +55,9 @@ def tariff_plan_row(plan, tick_words: str, *, age_s, horizon_h: float,
|
||||
|
||||
def arbitrage_row(*, on: bool, decision, decided_at, cycle_at, now,
|
||||
why: str) -> str:
|
||||
"""The *Arbitrage* status row: three states (TARIFF-11): off (not armed),
|
||||
armed with no decision this cycle (`why` is the loop's reason), or a
|
||||
decision with its age.
|
||||
`on` is read from the options, never inferred from `decision is None`:
|
||||
`cycle()` returns at the input hold before `self.arb = None`, so the old
|
||||
row named an option that was ON. The age is always printed, even 0.
|
||||
"""The *Arbitrage* status row: off, armed with no decision this cycle
|
||||
(`why` is the loop's reason), or a decision with its age (TARIFF-11).
|
||||
`on` is read from the options, never inferred from `decision is None`.
|
||||
DECISIONS/MAIN-orchestration.md."""
|
||||
# UX-08: plain words; the setting is named by its label.
|
||||
if not on:
|
||||
|
||||
Reference in New Issue
Block a user