MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / _completion_audit

Function _completion_audit

core/orchestrator.py:318–338  ·  view source on GitHub ↗

After all subtasks finish, check whether the overall goal was met. Reports any deliverables from the original request that appear to be missing.

(queue)

Source from the content-addressed store, hash-verified

316
317
318def _completion_audit(queue):
319 """
320 After all subtasks finish, check whether the overall goal was met.
321 Reports any deliverables from the original request that appear to be missing.
322 """
323 original = getattr(queue, 'original_request', '')
324 if not original:
325 return
326
327 # Extract filenames the user expected to exist
328 expected_files = _FILE_RE.findall(original)
329 missing = [f for f in expected_files if not (Path.cwd() / f).exists()]
330 failed_tasks = [t for t in queue.tasks if t.status == 'failed']
331
332 if missing:
333 warning(f"[Audit] Requested file(s) not found after all steps: {', '.join(missing)}")
334 if failed_tasks:
335 warning(f"[Audit] {len(failed_tasks)} task(s) failed: " +
336 ', '.join(t.description[:50] for t in failed_tasks))
337 if not missing and not failed_tasks:
338 info("[Audit] All expected deliverables present.")
339
340
341def run_queue(queue, yolo=False):

Callers 1

run_queueFunction · 0.85

Calls 3

warningFunction · 0.90
infoFunction · 0.90
existsMethod · 0.80

Tested by

no test coverage detected