MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / classify

Function classify

eval/_clear_infra_errors.py:20–35  ·  view source on GitHub ↗
(log_text: str)

Source from the content-addressed store, hash-verified

18
19
20def classify(log_text: str) -> str:
21 if "ImageNotFound" in log_text or "No such image" in log_text:
22 return "docker-image-404"
23 if "patch unexpectedly ends in middle of line" in log_text:
24 return "patch-missing-newline"
25 if "Reversed (or previously applied) patch" in log_text:
26 return "patch-reversed"
27 if re.search(r"Hunk #\d+ FAILED at", log_text):
28 return "patch-context-mismatch"
29 if "Only garbage was found in the patch" in log_text:
30 return "patch-garbage"
31 if "Timeout" in log_text or "timed out" in log_text:
32 return "docker-timeout"
33 if "docker.errors" in log_text:
34 return "docker-other"
35 return "other"
36
37
38def main(run_id: str) -> None:

Callers 1

mainFunction · 0.85

Calls 1

searchMethod · 0.80

Tested by

no test coverage detected