graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
docs(adr): record glm-5.3-flash SWE on the Codegraff gateway
Cursor Agent3b58b0cba264
diff --git a/docs/adr/0045-glm-flash-swe-codegraff.md b/docs/adr/0045-glm-flash-swe-codegraff.mdnew file mode 100644index 00000000..bd952341--- /dev/null+++ b/docs/adr/0045-glm-flash-swe-codegraff.md@@ -0,0 +1,50 @@+# 0045. GLM 5.3-flash SWE via the Codegraff gateway++Status: accepted 2026-08-29++## Context++After ADR 0044 (skip learn auto-init on `-p`), SuperGrok grok-4.6 was+5/6 in 205s. The same suite was re-run on the Codegraff gateway+(`CODEGRAFF_API_KEY` → `gateway.codegraff.com/v1`) with `glm-5.3-flash`+on both `graff-dev` and `pi-codegraff`. Same key, same model, same+`--suite swe -j 6`. `glm-5.3-flash` is uncatalogued in graff so it+falls through to the gateway; do not pass `glm-5.3` (that row is zai+and `MissingKey`s without `ZAI_API_KEY`).++Pi needs `~/.pi/agent/models.json` provider `codegraff` pointing at+the gateway; `apiKey` is the env var name `CODEGRAFF_API_KEY`.++## Decision++Live A/B 2026-08-29 (`graff-evals/results/run-20260829-034235.jsonl`):++| harness | pass | wall (sum) | first | RSS | in | out | calls |+|---|---:|---:|---:|---:|---:|---:|---:|+| graff-dev | 3/6 | 1353s | 6.9s | 90.5M | 96903 | 15085 | 19 |+| pi-codegraff | **5/6** | **758s** | 0.6s | 166.8M | 223771 | 27294 | 35 |++| task | graff | pi |+|---|---|---|+| map-conflict | ✓ 103s / 18k / 4 | ✓ 60s / 33k / 6 |+| validated | ✓ 164s / 46k / 10 | ✓ 26s / 21k / 5 |+| config-parse | ✓ 185s / 33k / 5 | ✓ 108s / 45k / 7 |+| json-stream | ✗ 300s timeout (no edit) | **✓ 117s / 43k / 7** |+| cookie-store | ✗ 300s timeout (no edit) | **✓ 301s / 44k / 5** |+| label-sort | ✗ 300s timeout | ✗ 146s / 37k / 5 |++Graff's three misses were SIGKILL at the 300s task cap before a+`[usage]` line. `json-stream` and `cookie-store` never wrote the+target file. Pi finished those. Both still miss `label-sort`.++This is not the 38s pin (already skipped; CPU stayed ~1–3s). GLM+flash through graff spent 3.5–7.5k output tokens on the tasks it+finished — the clock ran out on the rest. Pi's shorter catalog+completed the same model. Do not steal Pi's heap (167M vs 23–90M).++## Consequences++- Fair Codegraff A/B is `--model glm-5.3-flash` with `CODEGRAFF_API_KEY`.+- Next graff cut on this model is finishing inside 300s (fewer / shorter+ turns), not a catalog shrink to four tools.+- Rotate any `cg_sk_` pasted into a chat; do not commit it.diff --git a/docs/adr/README.md b/docs/adr/README.mdindex a838d6bc..a2e1e637 100644--- a/docs/adr/README.md+++ b/docs/adr/README.md@@ -55,6 +55,7 @@ record only when you need the evidence or the edge cases.| [0042](0042-tui-claims-screen-before-session.md) | `graff tui` / TTY `graff repl` claim the alt-screen before keys/MCP/prompt; leftover boot happens inside the pager. || [0043](0043-pi-swe-same-seat.md) | Pi SWE A/B uses `pi-xai` on the SuperGrok seat; do not steal Pi's catalog or heap from the json-stream pass. || [0044](0044-oneshot-skips-learn-auto.md) | `-p` and `--json` skip learn auto-init; the Pi SWE wall gap was a 38s `graff-pinned` copy, not their catalog. |+| [0045](0045-glm-flash-swe-codegraff.md) | Codegraff `glm-5.3-flash` SWE: Pi 5/6 in 758s, graff 3/6 with three 300s timeouts; do not steal Pi's heap. |## When to write onediff --git a/graff-evals/README.md b/graff-evals/README.mdindex dcc96a12..660aa9eb 100644--- a/graff-evals/README.md+++ b/graff-evals/README.md@@ -27,6 +27,8 @@ harness under test spends model calls../run.py --suite core,rlm,swe --harness graff-dev-old,graff-dev -j 8# Pi on the same SuperGrok seat (`npm i -g @earendil-works/pi-coding-agent`):./run.py --suite swe --harness graff-dev,pi-xai --model grok-4.6 -j 6+# same SuperGrok-shaped A/B on the Codegraff gateway (set CODEGRAFF_API_KEY):+CODEGRAFF_API_KEY=cg_sk_… ./run.py --suite swe --harness graff-dev,pi-codegraff --model glm-5.3-flash -j 6```## Run it