feat(work): add pre-flight health gate for Hatch, Restore, and Git Config

This commit is contained in:
operator
2026-10-09 19:01:40 -04:00
parent 35c59bfcb2
commit b7a73234fc
2 changed files with 215 additions and 1 deletions
+15
View File
@@ -43,5 +43,20 @@ class TestBoxWork(unittest.TestCase):
res = box_work.get_recent_done_tasks(limit=5)
self.assertIsInstance(res, list)
def test_check_agent_preflight_structure(self):
res = box_work.check_agent_preflight("opm")
self.assertIn("hatch", res)
self.assertIn("restore", res)
self.assertIn("git", res)
self.assertIn("status", res["hatch"])
self.assertIn("status", res["restore"])
self.assertIn("status", res["git"])
self.assertIn("ready", res)
def test_check_agent_preflight_unknown_fails(self):
res = box_work.check_agent_preflight("nonexistent_agent_xyz")
self.assertFalse(res["ready"])
self.assertEqual(res["overall"], "FAIL")
if __name__ == "__main__":
unittest.main()