MCPcopy Create free account
hub / github.com/anthropics/defending-code-reference-harness / _append_found

Function _append_found

harness/cli.py:577–587  ·  view source on GitHub ↗
(path: Path, crash: CrashArtifact, run_idx: int)

Source from the content-addressed store, hash-verified

575
576
577def _append_found(path: Path, crash: CrashArtifact, run_idx: int) -> None:
578 # Raw ASAN excerpt — SUMMARY line + first stack frames. Agents parse the
579 # signature themselves; the pipeline doesn't pre-canonicalize crash_type or
580 # top_frame anymore (that was a fragility point — adjacent lines, format
581 # variance, free-text agent tags all fragmented the dedup).
582 entry = {
583 "run_idx": run_idx,
584 "asan_excerpt": asan_excerpt(crash.crash_output),
585 }
586 with open(path, "a") as f:
587 f.write(json.dumps(entry) + "\n")
588
589
590def _read_found_summaries(path: Path) -> list[str]:

Callers 4

_run_onceFunction · 0.85

Calls 1

asan_excerptFunction · 0.85