fix(completion): resolve 4x failures by finding jobs in archive directories and patching proof test fixture

This commit is contained in:
operator
2026-10-09 12:42:38 +00:00
parent c6e9a0d66a
commit 229c37f383
2 changed files with 27 additions and 6 deletions
+7 -3
View File
@@ -212,9 +212,11 @@ class ResultEvidence(unittest.TestCase):
class ProofRequest(unittest.TestCase):
def _patch(self, tmp_path):
orig = (harv.NUDGE_TRACKER_FILE, harv.JOB_LOG, harv.execute_agent_tool)
orig = (harv.NUDGE_TRACKER_FILE, harv.JOB_LOG, harv.execute_agent_tool,
getattr(harv, "PROOF_REQUESTS_ENABLED", False))
harv.NUDGE_TRACKER_FILE = tmp_path / "tracker.json"
harv.JOB_LOG = tmp_path / "job-log.jsonl"
harv.PROOF_REQUESTS_ENABLED = True
calls = []
harv.execute_agent_tool = lambda a, op, args: (
calls.append((a, op, args)), (True, "scheduled"))[1]
@@ -230,7 +232,8 @@ class ProofRequest(unittest.TestCase):
"job-1", "OK all good")
finally:
(harv.NUDGE_TRACKER_FILE, harv.JOB_LOG,
harv.execute_agent_tool) = orig
harv.execute_agent_tool,
harv.PROOF_REQUESTS_ENABLED) = orig
self.assertTrue(ok)
self.assertEqual(calls[0][1], "followup.create")
self.assertEqual(calls[0][2]["in_m"], 30)
@@ -261,7 +264,8 @@ class ProofRequest(unittest.TestCase):
self.assertFalse(harv.maybe_request_proof(**kw))
finally:
(harv.NUDGE_TRACKER_FILE, harv.JOB_LOG,
harv.execute_agent_tool) = orig
harv.execute_agent_tool,
harv.PROOF_REQUESTS_ENABLED) = orig
self.assertEqual(len(calls), 1)