ABLESET switch (Restart page): hold to stop AbleSet being watched and opened

The user has an AbleSet bug and needs auto-open off for now. A bypass key can now hold off fixes
(bypass.fixes): their checks stay green and nothing runs them. The status page is full, so a Restart
page key with toggle shows the switch and its hold flips it. Switched off live 2026-10-25 07:18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 07:19:51 -04:00
co-authored by Claude Opus 5.5
parent 0f3471bf51
commit 0ecec5f112
7 changed files with 93 additions and 15 deletions
+20
View File
@@ -2634,6 +2634,26 @@ class TestSwitches(unittest.TestCase):
self.assertIsNone(res)
self.assertIn("calls in", why)
def test_ableset_key_holds_off_its_fix(self):
"""ABLESET (2026-10-25, the user had an AbleSet bug): held, AbleSet is neither watched nor opened."""
engine = sp.Engine(CONFIG)
snap = sp.Snapshot()
snap.remote["tracks\0pgrep -xq AbleSet"] = False
tiles, _ = run_steps(engine, snap, SUNDAY, 4)
msgs = lambda: [res.msg for _, res, _ in engine.items.get("apps", [])]
self.assertIn("ABLESET NOT RUNNING", msgs())
self.assertEqual(tiles["ableset"]["x"], "ABLESET\nAUTO-OPEN\nON")
self.assertIn("ableset", [w for _, k, w, _ in engine.fix_plan("apps", snap)])
engine.bypass["ableset"] = {"since": SUNDAY, "dropped": []}
tiles, _ = run_steps(engine, snap, SUNDAY + 10, 4)
self.assertNotIn("ABLESET NOT RUNNING", msgs())
self.assertEqual(tiles["ableset"]["x"], "ABLESET\nAUTO-OPEN\nOFF")
self.assertEqual(tiles["rs_ableset"]["x"], "ABLESET\nAUTO-OPEN\nOFF") # its key on the Restart page
key = make_page.restart_key(next(k for k in CONFIG["restart_page"]["keys"] if k["id"] == "rs_ableset"), CONFIG)
self.assertIn("restart ableset", json.dumps(key)) # the hold flips the switch
self.assertNotIn("ableset", [w for _, k, w, _ in engine.fix_plan("apps", snap)])
sp.bypass_apply(CONFIG, engine.tiles["ableset"], True, engine.bypass["ableset"], None, (set(), set())) # nothing to hand over
def test_a_bypass_key_needs_its_peers(self):
import schema
bad = json.loads(json.dumps(self.cfg))