Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Measure warm task misses instead of rejecting them

justrach5723690369c8
diff --git a/scripts/benchmark-release-cache.py b/scripts/benchmark-release-cache.py
index 8588f8c0..63797861 100644
--- a/scripts/benchmark-release-cache.py
+++ b/scripts/benchmark-release-cache.py
@@ -63,8 +63,10 @@ def main():
source.seek(offset)
hit = b"task_hit\n" in source.read()
metrics["task_hit"] = hit
- if hit != (args.phase == "warm"):
- raise RuntimeError("Expected a cold miss or a warm declared-task hit")
+ # A restored cache need not yield a task hit on a different runner.
+ # Record misses as performance outcomes; still verify artifact bytes.
+ if args.phase == "cold" and hit:
+ raise RuntimeError("Cold benchmark unexpectedly reused a task artifact")
digest = hashlib.sha256(output.read_bytes()).hexdigest()
if expected is not None and digest != expected:
raise RuntimeError("Warm artifact differs from the cold artifact")