fix(work): import hashlib and wire heal subparser into main CLI

This commit is contained in:
operator
2026-10-09 23:13:43 +00:00
parent c3b4b1cd28
commit f75977ca6e
202 changed files with 4185 additions and 4142 deletions
+17
View File
@@ -245,6 +245,23 @@ class CanonicalToolPattern(unittest.TestCase):
class EnvelopeRoundTrip(unittest.TestCase):
def setUp(self):
# Stub the kpi module: wrap() calls get_live_advisory_block()
# (live network I/O: usage API + route probes) on the include_kpi
# path. An empty advisory keeps the path exercised -- import, call,
# and falsy branch all still run -- without the network wait.
import types
self._saved_kpi = sys.modules.get("kpi")
stub = types.ModuleType("kpi")
stub.get_live_advisory_block = lambda agent: ""
sys.modules["kpi"] = stub
def tearDown(self):
if self._saved_kpi is None:
sys.modules.pop("kpi", None)
else:
sys.modules["kpi"] = self._saved_kpi
def test_wrap_advertises_new_verbs(self):
body = env.wrap("work-finder", "work-finder-1", "646",
"646 tasks", "Do the thing.")