Skip to content

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

Python

docs(adr): Codegraff SWE A/B is not GLM-only (0047)

Cursor Agente004263f82a4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10a778af..55388940 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,9 @@ current is part of cutting a release.
still thinks; default flash effort is `low`. `-p` streams so a hung
POST dies on the 30s stall, not a 5-minute watch. SWE **5/6 in 286s**
(Pi 5/6 in 758s). Same miss (`label-sort`). Do not steal Pi's catalog.
+- Same SWE suite on other Codegraff models (ADR 0047): Gemini graff
+ **5/6 in 103s**; Kimi 4/6 in 583s; DeepSeek flash still one-shots
+ (Pi 5/6). Do not steal Pi's catalog.
- Interactive `--yolo` queues companion MCP and names the boot phase
(`mcp:` / `companion:` receipts) so first paint is not the handshake
(#664). Mid-turn stall/reconnect and `model call N` pulses stay off
diff --git a/docs/adr/0046-flash-omits-default-effort.md b/docs/adr/0046-flash-omits-default-effort.md
index 3e413386..d4832719 100644
--- a/docs/adr/0046-flash-omits-default-effort.md
+++ b/docs/adr/0046-flash-omits-default-effort.md
@@ -49,6 +49,8 @@ interactive-length essays on every `-p` turn.
call 2"; stdout stays the answer.
- Revisit if a named flash model needs default thinking — pin it in
the catalog, do not restore a global medium default.
+- Same-suite confirm on other Codegraff models is ADR 0047 (Gemini
+ graff 5/6 in 103s; DeepSeek flash still one-shots).
## Confirm (2026-08-29, after this revision)
diff --git a/docs/adr/0047-codegraff-swe-not-glm-only.md b/docs/adr/0047-codegraff-swe-not-glm-only.md
new file mode 100644
index 00000000..a6567186
--- /dev/null
+++ b/docs/adr/0047-codegraff-swe-not-glm-only.md
@@ -0,0 +1,114 @@
+# 0047. Codegraff SWE A/B is not GLM-only
+
+Status: accepted 2026-08-29
+
+## Context
+
+ADR 0044 (learn skip) and ADR 0046 (`reasoning_effort=low` + streaming
+`-p`) made SuperGrok grok-4.6 and Codegraff `glm-5.3-flash` look like
+the harness, not Pi's catalog. That could have been those two models.
+The same `--suite swe -j 6` seat (`CODEGRAFF_API_KEY` →
+`gateway.codegraff.com/v1`, `graff-dev` vs `pi-codegraff`) was re-run
+on DeepSeek flash, Gemini flash, and Kimi k2.6.
+
+Fair A/B is the same key and the same model id. Pi needs those ids in
+`~/.pi/agent/models.json` under provider `codegraff`. Keep Pi on stock
+defaults. Do not steal its 4-tool catalog or 165M heap.
+
+Graff `first_out` is the stderr `calling` line (~0.03s), not gateway
+TTFT. Pi `first` is the JSONL `session` line (~0.6s), not TUI paint.
+
+## Decision
+
+Record the 2026-08-29 runs. They do not change the keep-list, effort
+routing, or learn skip. A second full DeepSeek suite (`060536`) hit a
+burnt gateway (0-token) and is not evidence.
+
+## Confirm — `deepseek-v4-flash` (`run-20260829-055625.jsonl`)
+
+| harness | pass | wall (sum) | first | RSS | in | out | calls |
+|---|---:|---:|---:|---:|---:|---:|---:|
+| graff-dev | 2/6 | 199s | 0.03s | 91.1M | 132k | 22k | 21 |
+| pi-codegraff | **5/6** | 492s | 0.7s | 186.4M | 480k | 56k | 46 |
+
+| task | graff | pi |
+|---|---|---|
+| cookie-store | ✓ 91s / 71k / 8 | ✓ 149s / 162k / 11 |
+| config-parse | ✓ 33s / 16k / 4 | ✓ 121s / 132k / 10 |
+| label-sort | ✗ 63s / 40k / 6 | ✗ 108s / 58k / 5 |
+| map-conflict | ✗ 4s / 2k / 1 | ✓ 31s / 35k / 6 |
+| json-stream | ✗ 4s / 2k / 1 | ✓ 58s / 62k / 8 |
+| validated | ✗ 4s / 2k / 1 | ✓ 24s / 32k / 6 |
+
+Graff's three 4s misses were one-call no-edits, not 300s hangs.
+Isolated retry of those three (`run-20260829-060322.jsonl`):
+`map-conflict` ✓ 28s / 6, `json-stream` ✓ 126s / 9, `validated` still
+✗ 3s / 1. DeepSeek flash often answers without tools on graff's lean
+catalog; Pi's shorter catalog finishes. Same `label-sort` miss.
+
+## Confirm — `gemini-3.7-flash` (`run-20260829-055900.jsonl`)
+
+| harness | pass | wall (sum) | first | RSS | in | out | calls |
+|---|---:|---:|---:|---:|---:|---:|---:|
+| graff-dev | **5/6** | **103s** | 0.04s | 91.1M | 64k | 20k | 19 |
+| pi-codegraff | 0/6 | 35s | 0.6s | 166.4M | 42k | 0.5k | 18 |
+
+| task | graff | pi |
+|---|---|---|
+| map-conflict | ✓ 9s / 8k / 3 | ✗ 5s / 7k / 3 |
+| validated | ✓ 12s / 7k / 3 | ✗ 8s / 7k / 3 |
+| json-stream | ✓ 13s / 10k / 4 | ✗ 5s / 7k / 3 |
+| config-parse | ✓ 20s / 11k / 3 | ✗ 5s / 7k / 3 |
+| label-sort | ✗ 20s / 11k / 3 | ✗ 5s / 7k / 3 |
+| cookie-store | ✓ 29s / 17k / 3 | ✗ 8s / 7k / 3 |
+
+Pi's Gemini tool loop dies after the first tool (empty assistant
+`message_end`; `codegraff-gemini-echo` was installed). That column is
+not a fair A/B. Graff's 5/6 in 103s is the real flash confirm — same
+`label-sort` miss as GLM / grok / Pi.
+
+## Confirm — `kimi-k2.6` (`run-20260829-055930.jsonl`)
+
+| harness | pass | wall (sum) | first | RSS | in | out | calls |
+|---|---:|---:|---:|---:|---:|---:|---:|
+| graff-dev | **4/6** | 583s | 0.04s | 91.1M | 62k | 21k | 22 |
+| pi-codegraff | 2/6 | 346s | 0.6s | 161.4M | 73k | 13k | 17 |
+
+| task | graff | pi |
+|---|---|---|
+| validated | ✓ 31s / 9k / 4 | ✗ 1.3s / 0 tok |
+| map-conflict | ✓ 47s / 11k / 4 | ✗ 1.3s / 0 tok |
+| config-parse | ✓ 61s / 24k / 7 | ✓ 125s / 40k / 7 |
+| json-stream | ✗ 103s / 3k / 2 | ✗ 1.2s / 0 tok |
+| cookie-store | ✓ 161s / 4k / 2 | ✓ 97s / 8k / 3 |
+| label-sort | ✗ 179s / 12k / 3 | ✗ 121s / 25k / 4 |
+
+Pi's three 1.2s zeros never reached the model (retry stayed 0-token).
+Kimi thinks on a `pong` even with Pi `reasoning: false`. Graff still
+finished four tasks on ~91M RSS.
+
+## Already recorded (same suite)
+
+| model | seat | graff | pi | ADR |
+|---|---|---|---|---|
+| grok-4.6 | SuperGrok / `pi-xai` | 5/6 in 205s | 5/6 in 276s | 0044 |
+| glm-5.3-flash | Codegraff | **5/6 in 286s** | 5/6 in 758s | 0046 |
+| gemini-3.7-flash | Codegraff | **5/6 in 103s** | (tool-loop dead) | this |
+| kimi-k2.6 | Codegraff | 4/6 in 583s | 2/6 (3× API zero) | this |
+| deepseek-v4-flash | Codegraff | 2/6 in 199s* | **5/6 in 492s** | this |
+
+\*three 1-call no-edits; isolated retry recovered `map-conflict` and
+`json-stream`. Do not stitch that into the suite score.
+
+## Consequences
+
+- GLM 5/6 in 286s vs Pi 758s is not a one-off on flash: Gemini graff
+ is 5/6 in 103s on the same suite.
+- DeepSeek flash is the exception: Pi's catalog finishes; graff's lean
+ 8-tool still one-shots. Do not steal the four-tool catalog to "fix"
+ it.
+- Pi + Gemini on this gateway is not a usable A/B until Pi's tool
+ follow-up is fixed. That is not a graff TUI steal.
+- `label-sort` still fails across models. Do not chase it.
+- A burnt gateway (0-token / 1s exits) is not a model result. Re-run
+ the suite; do not average it in.
diff --git a/docs/adr/README.md b/docs/adr/README.md
index a4d6a33a..c769cac1 100644
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@ -57,6 +57,7 @@ record only when you need the evidence or the edge cases.
| [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. |
| [0046](0046-flash-omits-default-effort.md) | Flash / Gemini send `reasoning_effort=low` (omit still thinks); lean `-p` shortens tool prose; `-p` streams. |
+| [0047](0047-codegraff-swe-not-glm-only.md) | Codegraff SWE A/B is not GLM-only: Gemini graff 5/6 in 103s; DeepSeek flash still one-shots; do not steal Pi's catalog. |
## When to write one
diff --git a/docs/releases/v0.0.281.md b/docs/releases/v0.0.281.md
index 1f8836f4..f0e5b942 100644
--- a/docs/releases/v0.0.281.md
+++ b/docs/releases/v0.0.281.md
@@ -71,6 +71,22 @@ so a hung gateway dies on the 30s head-stall, not a 5-minute
`postWatched`. Same miss as Pi (`label-sort`). Do not steal Pi's
catalog or heap.
+## Same suite on DeepSeek / Gemini / Kimi (ADR 0047)
+
+Same seat (`CODEGRAFF_API_KEY`, `graff-dev` vs `pi-codegraff`,
+`--suite swe -j 6`). GLM 5/6 in 286s was not a one-off on flash:
+
+| model | graff | pi |
+|---|---|---|
+| `glm-5.3-flash` (0046) | **5/6 in 286s** | 5/6 in 758s |
+| `gemini-3.7-flash` | **5/6 in 103s** | 0/6 (tool-loop dead) |
+| `kimi-k2.6` | 4/6 in 583s | 2/6 (3× API zero) |
+| `deepseek-v4-flash` | 2/6 in 199s* | **5/6 in 492s** |
+
+\*three 1-call no-edits; an isolated retry recovered `map-conflict`
+and `json-stream`. Pi's Gemini column is not a fair A/B. Do not steal
+Pi's catalog to "fix" DeepSeek. `label-sort` still fails everywhere.
+
## TUI first paint no longer waits on companion MCP (#664)
Interactive `--yolo` queues `codedb-pro` onto `pending_starts` (same
diff --git a/graff-evals/README.md b/graff-evals/README.md
index 660aa9eb..f1707b79 100644
--- a/graff-evals/README.md
+++ b/graff-evals/README.md
@@ -29,6 +29,8 @@ harness under test spends model calls.
./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
+# same seat, other models (ADR 0047): deepseek-v4-flash, gemini-3.7-flash, kimi-k2.6
+CODEGRAFF_API_KEY=cg_sk_… ./run.py --suite swe --harness graff-dev,pi-codegraff --model deepseek-v4-flash -j 6
```
## Run it
diff --git a/src/cli.zig b/src/cli.zig
index b300a0da..8288118a 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -26,6 +26,7 @@ pub const changelog_text =
\\ • SuperGrok SWE 5/6 in 205s / 6.5s CPU (was 4/6 in 456s / 230s)
\\ • TUI claims alt-screen before boot; live markdown on the cached tail (ADR 0042)
\\ • companion MCP queues in the background; mid-turn stalls stay off the transcript
+ \\ • Codegraff SWE is not GLM-only: Gemini 5/6 in 103s; DeepSeek flash still one-shots (ADR 0047)
\\
\\0.0.280
\\ • leftover 279 work: TUI stall/resize, experiment fan-out, /tell /peek, ACP graff-login