SAFETY-83: a refiled peak floor stays under a safety SET, graded directly
Kills M5 (refiled at P_SAFETY) on its own sentence, not only through the per-cycle claim check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,8 @@ logging.disable(logging.WARNING)
|
||||
import opt11_identity as rig # noqa: E402
|
||||
import safety78_identity as s78 # noqa: E402
|
||||
import safety79_identity as s79 # noqa: E402
|
||||
from app.arbiter import Claim, P_MAINTENANCE, P_PEAK # noqa: E402
|
||||
from app.arbiter import (Claim, P_MAINTENANCE, P_PEAK, P_SAFETY, # noqa
|
||||
resolve)
|
||||
from app.main import Controller # noqa: E402
|
||||
from app.maintenance import CHARGE, DRAIN, MaintResult # noqa: E402
|
||||
|
||||
@@ -229,6 +230,15 @@ check("at the boundary: a floor at or below the 2000 W drain stays at P_PEAK, "
|
||||
"a floor 0.5 W above it is refiled at P_MAINTENANCE",
|
||||
_edge == {1999.5: P_PEAK, 2000.0: P_PEAK, 2000.5: P_MAINTENANCE})
|
||||
|
||||
_stop = [Claim.set("maintenance", P_MAINTENANCE, 2000.0, DRAIN),
|
||||
Claim.limit("peak", P_PEAK, lo=4000.0, reason="quarter peak"),
|
||||
Claim.set("safety", P_SAFETY, 0.0, "inputs missing")]
|
||||
Controller._peak_over_drain(_one, _stop, [MaintResult(DRAIN, True, 2000.0,
|
||||
False, [])])
|
||||
check("⭐ and a refiled floor stays under a safety SET: the site resolves "
|
||||
"to 0 W", _stop[1].priority == P_MAINTENANCE
|
||||
and resolve(_stop).target_w == 0.0)
|
||||
|
||||
|
||||
def store_hold():
|
||||
st = rig._Store()
|
||||
|
||||
Reference in New Issue
Block a user