feat(work): add pre-flight health gate for Hatch, Restore, and Git Config
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user