mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-28 01:01:12 -07:00
The ceiling at its off end stands with the default critical line
forgectrl pin 368fd0c: the critical-line cross-check binds only while the ceiling is a gate. cooling.critical-tier pins that a POST setting the ceiling to its off end is accepted with the default line (the unit fake mirrors the exemption); CAMPAIGN-LOG records the gate-off failure on dev image 20260822165832 that found it, and the critical-tier pass.
This commit is contained in:
@@ -422,6 +422,14 @@ def critical_tier(ctx):
|
||||
after = fc.settings()
|
||||
ctx.check(all(after.get(k, "") == orig[k] for k in CRIT_KEYS),
|
||||
"the refused POST changed a setting: %s", {k: after.get(k) for k in CRIT_KEYS})
|
||||
# A ceiling at its off end is no ceiling: the default line stands
|
||||
# alone, and the POST that turns the ceiling off is accepted.
|
||||
st, body = fc.post("/settings", params={"cool_temp_max": str(ceil.get("hi"))})
|
||||
ev["ceiling_off_accepted"] = st
|
||||
if st == 200:
|
||||
fc.post("/settings", params=orig)
|
||||
ctx.check(st == 200, "the ceiling at its off end %s was refused against the critical line: %s %s",
|
||||
ceil.get("hi"), st, body)
|
||||
|
||||
restored = False
|
||||
with ctx.grbl() as grbl:
|
||||
|
||||
@@ -448,7 +448,8 @@ class CriticalTierTests(unittest.TestCase):
|
||||
merged.update(form)
|
||||
tmax = float(merged.get("cool_temp_max") or 33.0)
|
||||
tcrit = float(merged.get("cool_temp_critical_c") or 38.0)
|
||||
if tcrit <= tmax:
|
||||
ceiling_off = tmax >= self.ROWS["cool_temp_max"][3]
|
||||
if not ceiling_off and tcrit <= tmax:
|
||||
return (400, {"error": "cool_temp_critical_c must be above cool_temp_max"})
|
||||
self.fc.state["settings"].update(form)
|
||||
self._describe()
|
||||
@@ -508,8 +509,11 @@ class CriticalTierTests(unittest.TestCase):
|
||||
self.assertEqual(run.evidence["critical_after"]["verdict"], "OVERTEMP")
|
||||
self.assertEqual(run.evidence["critical_off"]["gates_off"], ["coolant_critical"])
|
||||
self.assertEqual(run.evidence["restored"]["verdict"], "OK")
|
||||
self.assertEqual(run.evidence["ceiling_off_accepted"], 200)
|
||||
posts = self.settings_posts()
|
||||
self.assertEqual(posts[1], {"cool_temp_max": "6.0", "cool_temp_resume": "5.0",
|
||||
# refused cross-check, the ceiling at its off end (accepted), its undo, then the low leg
|
||||
self.assertEqual(posts[1], {"cool_temp_max": "60.0"})
|
||||
self.assertEqual(posts[3], {"cool_temp_max": "6.0", "cool_temp_resume": "5.0",
|
||||
"cool_temp_critical_c": "7.0"})
|
||||
self.assertEqual(posts[-1], {"cool_temp_max": "", "cool_temp_resume": "", "cool_temp_critical_c": ""})
|
||||
self.assertEqual(self.grbl.commands.count("M8"), 3)
|
||||
|
||||
Reference in New Issue
Block a user