MAINT-21 round 2: keep the move pure - revert the added DECISIONS text, restore cut comments
Router T241: the comments commit had put new rationale into MAIN-orchestration.md and cut comment lines that the note at56fc41fdid not hold. - DECISIONS/MAIN-orchestration.md is the56fc41ftext plus the one sentence that the Controller is split into app/main.py and app/ctl_*.py. - Comments whose content is not in a DECISIONS note at56fc41fare back in the code verbatim: MAINT-05 one config, the SAFETY-02, SAFETY-42/34, SAFETY-30 site half, SAFETY-31 and SAFETY-18 latch blocks in __init__, the _grade_store_migration docstring and comment, the trade_power_w docstring, the rows.py docstrings. - Kept: cuts of text already in the note, the SMA-10 / SAFETY-137 / SMA-2 pointers, the SAFETY-32 line fix. No code change: maint21_same_ast OK, maint20_same_code -OO same. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
902da3f723
commit
58b6fa35f5
@@ -82,10 +82,14 @@ MAINT_CHARGING_W = 50.0
|
||||
|
||||
class TradeMixin:
|
||||
def trade_power_w(self, floor_pct, ceiling_pct) -> tuple:
|
||||
"""OPT-09. `(charge_w, discharge_w)`: how hard a trade may be SIZED,
|
||||
on arbitrage's own SoC bounds, not the BMS cut-out. A pack whose SoC
|
||||
did not read counts on neither side; neither side may be zero on a
|
||||
trading tick (`IDLE_NO_SIZE`). DECISIONS/MAIN-orchestration.md."""
|
||||
"""OPT-09. `(charge_w, discharge_w)`: how hard a trade may be SIZED:
|
||||
what the site can push AND STILL HAVE SOMEWHERE TO PUT. The bounds are
|
||||
arbitrage's own (`arbitrage_soc_floor` / `_ceiling`), NOT the BMS
|
||||
cut-out that `packshare.envelope()` uses (SAFETY-25): different
|
||||
questions. It sizes the ask, it does not route it. A pack whose SoC did
|
||||
not read counts on neither side. Neither side may be zero on a trading
|
||||
tick (`arbitrage.decide()` refuses `IDLE_NO_SIZE`: a 0 W claim is a
|
||||
park order). DECISIONS/MAIN-orchestration.md."""
|
||||
# The reduction lives in `packshare`; `test_packshare.py` part 9 calls
|
||||
# the SAME function (a transcription in a check is a copy that drifts).
|
||||
return packshare.trade_power_w(self.pack_energy, floor_pct, ceiling_pct)
|
||||
|
||||
Reference in New Issue
Block a user