Skip to content

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

test(bench): grade the advisor bench's Antigravity ids by the account

Jack Rudenkoe6d830e4d2b5
diff --git a/ai-docs/benches/advisor-subscription/README.md b/ai-docs/benches/advisor-subscription/README.md
index bf06d8b5..0225fb1d 100644
--- a/ai-docs/benches/advisor-subscription/README.md
+++ b/ai-docs/benches/advisor-subscription/README.md
@@ -39,6 +39,7 @@ which madbench appends after the Bench's. claudish keeps the last `--model`;
|---|---|---|---|
| `routed-codex` (L1, L2, L4, L6) | `[email protected]`, code mode auto | `gpt-6.1-sol,[email protected],kc@k3:` | the answer carries `REF: heron-5521` (only in `plan.md`) and an `ADVICE:` line; `plan.md` was read; every record of `gpt-6.1-sol` and `[email protected]` is `upstream` and served by `openai-codex`, `servedBy.arm` `oauth`, billing `subscription`; every `kc@k3` record is `upstream`, `kimi-coding`, `subscription`; each member's notice line says `(subscription` and names the provider that served; no notice line says "never use a subscription"; every `Calling API:` goes to `chatgpt.com/backend-api/codex/` or the Kimi Coding host (`api.kimi.ai/coding/`, what the catalog's kimi-coding connection publishes; `api.kimi.com/coding/` is the built-in default), both present; no `was served by … not … as the notice said` line; code mode on from discovery and every relayed exec resumed |
| `routed-grok` (L3 grok) | `[email protected]` | `grok-4.7,[email protected]:` | the answer has an `ADVICE:` line; every record of both members is `upstream`, served by `grok-subscription`, billing `subscription`; both notice lines say `Grok Build (subscription` and name the provider that served; every `Calling API:` goes to `chatgpt.com/backend-api/codex/` or `cli-chat-proxy.grok.com`, both present, none to `api.x.ai` or OpenRouter; no served-unlike line |
+| `routed-antigravity` (fix D8) | `[email protected]` | `[email protected]` | the answer has an `ADVICE:` line; the launch was not refused (`not_refused`: the notice says `--advisor is on for this launch`, no `--advisor cannot work in this launch` line); every record is `upstream`, served by `antigravity`, billing `subscription`; the notice line says `Antigravity` and `(subscription`; `wire_id_resolved`: on every `[Antigravity] Auth refreshed, … model: <requested> -> <sent>, served: <list>` line, `<requested>` is `gemini-3.8-flash`, `<sent>` is in `<list>`, and `<sent>` is `gemini-3.8-flash` or a `gemini-3.8-flash-*` variant (the account's dynamic models catalog lists only suffixed variants, so before D8 the availability check matched the bare id exactly and dropped the `ag@` hop). No variant is pinned: which one is sent is the account's choice (2026-10-21: it listed `-high`, `-medium`, `-low` and `-tiered`, and the resolver sent `-high`); every `Calling API:` goes to `chatgpt.com/backend-api/codex/` or `daily-cloudcode-pa.googleapis.com`, both present, none to `generativelanguage.googleapis.com`, OpenRouter or `api.openai.com`; no served-unlike line |
| `rejected-sub` (L3 gemini) | `[email protected]` | `gemini-4-argon` | **an observation, not a verdict.** What an expired subscription key should do to the chain is not settled, so only two Checks grade: the answer has a `STATUS:` line (the session completed) and an `advisor_call` record exists. Readouts record the rest: `chain_observed` (hops tried in order, statuses, servedBy, stub reason, `[advisor]` warnings, the `Calling API:` sequence), `stubbed_on_401`, `hosts_subscription_only` and `notice_observed` (the earlier expectation: a stub carrying 401, no metered host). On 2026-10-21 the plan had no Zen Go hop at all (`content-use opt-in id only`), and the call was served metered by Gemini |
| `claude-login` (L7) | `claude-sonnet-5-5`, native: claudish controls the child's auth | `[email protected],sonnet:haiku` | the answer has an `ADVICE:` line; `[email protected]` served by `openai-codex` on `oauth`; `sonnet` and the collector `haiku` are `upstream`, `servedBy.arm` `oauth`, billing `subscription`, `credentialSource: claude-code-login`; the notice says `sonnet -> api.anthropic.com (subscription: your Claude Code login` and has a collector line for `haiku` on the subscription, and never the uncontrolled form `metered, billed per token: ANTHROPIC_API_KEY`; one `[advisor] Calling API: https://api.anthropic.com/v1/messages (role: panel, auth: bearer, source: claude-code-login` line and one with `role: collector`; no `auth: bearer` line to any other host; no log line matches `Bearer sk-ant`, `sk-ant-oat` or `sk-ant-api` |
| `refusal` (L5) | `[email protected]`, no advisor | none in the session | see below |
@@ -67,12 +68,17 @@ record an error, never a grade). Instead the Scenario sets `ADVISOR_REFUSAL_PROB
bun <repo>/packages/cli/dist/index.js --debug-claudish --log-level debug --advisor "<spec>" -p "hi"
```
-with a 60 s `timeout`, once for `ag@gemini-4-argon` and once for `opusplan`, each in its own
+with a 60 s `timeout`, once for `ag@gemini-0-nonexistent` and once for `opusplan`, each in its own
`refusal/<name>/` directory, recording `exit.txt`, `stdout.txt`, `stderr.txt` and its own
`logs/`. The Checks pass when the exit code is 1, stderr carries `--advisor cannot work in this
-launch` and names the member and its reason (`does not serve` / no route for Antigravity;
-`switches tier` for the `opusplan` Claude selector), and that directory's log has no `Calling
-API:` line. The mock harness never runs the shim, so under `madbench check` the files are absent
+launch` and names the member (and, for the `opusplan` Claude selector, its reason `switches tier`),
+and that directory's log has no `Calling API:` line.
+
+The Antigravity member is `ag@gemini-0-nonexistent`, a family that does not exist, so no account can ever
+serve a variant of it. It was `ag@gemini-4-argon` until 2026-10-21, when the account's Antigravity dynamic
+models catalog began listing `gemini-4-argon-high`, `-medium` and `-low`; since fix D8 the availability check
+resolves a bare family id to a served variant, so that launch was planned, not refused. A refusal member must
+not depend on what one account happens to serve today. The mock harness never runs the shim, so under `madbench check` the files are absent
and both Checks fail.
## Grok needs a live login
@@ -85,14 +91,16 @@ which can hold a stale token in memory.
When bare `gemini-4-argon` has no usable subscription candidate (the 2026-10-21 run: Antigravity
does not serve it, Zen Go is skipped as `content-use opt-in id only`), its chain is metered and
-the call bills the Google key. Skip it with `--scenario` when that must not happen.
+the call bills the Google key. Skip it with `--scenario` when that must not happen. madbench 0.53.1
+takes one `--scenario`: a repeated flag silently keeps only the last value, and a comma list
+selects nothing (exit 1). Run one madbench per Scenario, each with its own `--report-json`.
## Running it
```bash
madbench list ai-docs/benches/advisor-subscription/madbench.yaml
madbench preflight ai-docs/benches/advisor-subscription/madbench.yaml
-madbench check ai-docs/benches/advisor-subscription/madbench.yaml # 33/33 failed as required
+madbench check ai-docs/benches/advisor-subscription/madbench.yaml # 41/41 failed as required
ADVISOR_SUB_KEEP_LOGS=<dir> madbench ai-docs/benches/advisor-subscription/madbench.yaml --report-json <out.json>
```
diff --git a/ai-docs/benches/advisor-subscription/claudish-under-test b/ai-docs/benches/advisor-subscription/claudish-under-test
index 961f2e81..cb5bdb34 100755
--- a/ai-docs/benches/advisor-subscription/claudish-under-test
+++ b/ai-docs/benches/advisor-subscription/claudish-under-test
@@ -41,7 +41,7 @@ if [ "${ADVISOR_REFUSAL_PROBE:-}" = "1" ]; then
echo "$rc" > "refusal/$name/exit.txt"
echo "spec=$spec" > "refusal/$name/spec.txt"
}
- probe ag-gemini "ag@gemini-4-argon"
+ probe ag-gemini "ag@gemini-0-nonexistent"
probe opusplan "opusplan"
fi
diff --git a/ai-docs/benches/advisor-subscription/madbench.yaml b/ai-docs/benches/advisor-subscription/madbench.yaml
index be036905..a86de831 100644
--- a/ai-docs/benches/advisor-subscription/madbench.yaml
+++ b/ai-docs/benches/advisor-subscription/madbench.yaml
@@ -184,6 +184,78 @@ scenarios:
- *not_served_unlike
- *provenance
+ # ── routed-antigravity: D8 — [email protected] resolves to the served variant ──
+ # Before fix D8 the availability check matched `gemini-3.8-flash` exactly
+ # against the Antigravity account's dynamic models catalog, which lists only
+ # suffixed variants (`gemini-3.8-flash-high`, `-tiered`, …), so the ag@ hop
+ # was dropped and the launch was refused. The check now resolves the id the
+ # way the transport does.
+ - name: routed-antigravity
+ description: "main cx@; panel [email protected] planned and served by Antigravity on the subscription, sent as a gemini-3.8-flash variant the account serves"
+ testdata: ./testdata/plain
+ harness:
+ args: ["--advisor", "[email protected]"]
+ prompt: "Read question.md, then call the advisor tool exactly once with that question. Then reply with one line that starts with the word ADVICE and a colon, followed by the first sentence of the advice the advisor returned."
+ checks:
+ - type: regex
+ metric: answer
+ value: 'ADVICE:\s*\S'
+ # The launch was not refused: the notice says the advisor is on, and no
+ # startup refusal line is in the log.
+ - type: exec
+ metric: not_refused
+ cmd: 'L=$(ls logs/claudish_*.log 2>/dev/null); test -n "$L" && grep -h "\[advisor-notice\] .*--advisor is on for this launch" $L && ! grep -h -- "--advisor cannot work in this launch" $L'
+ - type: ts
+ metric: panel_served
+ value: "file://./checks/advisor-log.ts"
+ config:
+ section: records
+ members:
+ - { model: [email protected], origin: upstream, provider: antigravity, billing: subscription }
+ - type: ts
+ metric: notice_matches
+ value: "file://./checks/advisor-log.ts"
+ config:
+ section: notice
+ lines:
+ - { startsWith: "[email protected] -> ", contains: ["Antigravity", "(subscription"] }
+ forbid: ["never use a subscription"]
+ # D8 itself: the Antigravity transport resolved the requested id to a
+ # variant the account serves (`[Antigravity] Auth refreshed, … model:
+ # <requested> -> <sent>, served: <list>`). Which variant is the
+ # account's choice (2026-10-21 it listed -high/-medium/-low/-tiered and
+ # the resolver sent -high), so no variant is pinned: on every such line
+ # <requested> is gemini-3.8-flash, <sent> is in <list>, and <sent> is
+ # gemini-3.8-flash or a gemini-3.8-flash-* variant of that family.
+ - type: exec
+ metric: wire_id_resolved
+ cmd: |
+ L=$(ls logs/claudish_*.log 2>/dev/null); test -n "$L" || exit 1
+ grep -h "\[Antigravity\] Auth refreshed" $L | sed "s/, served: .*//" | head -n 3
+ grep -h "\[Antigravity\] Auth refreshed" $L | tr -d '\r' | awk '
+ { seen++
+ if (!match($0, /model: [^ ]+ -> [^,]+, served: .*$/)) { print "no model/served fields: " substr($0, 1, 200); bad++; next }
+ s = substr($0, RSTART + 7); split(s, a, " -> "); req = a[1]; rest = a[2]
+ i = index(rest, ", served: "); sent = substr(rest, 1, i - 1); list = substr(rest, i + 10)
+ n = split(list, srv, ","); inlist = 0
+ for (k = 1; k <= n; k++) { gsub(/^ +| +$/, "", srv[k]); if (srv[k] == sent) inlist = 1 }
+ fam = (sent == "gemini-3.8-flash" || index(sent, "gemini-3.8-flash-") == 1)
+ printf "requested=%s sent=%s sent_in_served=%d same_family=%d\n", req, sent, inlist, fam
+ if (req != "gemini-3.8-flash" || !inlist || !fam) bad++ }
+ END { exit (seen > 0 && bad == 0) ? 0 : 1 }'
+ # Main on the Codex backend, the panel on Antigravity's host; never the
+ # metered Gemini API, OpenRouter or OpenAI.
+ - type: ts
+ metric: hosts
+ value: "file://./checks/advisor-log.ts"
+ config:
+ section: hosts
+ allow: ['^https://chatgpt\.com/backend-api/codex/', '^https://daily-cloudcode-pa\.googleapis\.com/']
+ require: ['Calling API: https://chatgpt\.com/backend-api/codex/', 'Calling API: https://daily-cloudcode-pa\.googleapis\.com/']
+ forbid: ['generativelanguage\.googleapis\.com', 'openrouter', 'api\.openai\.com']
+ - *not_served_unlike
+ - *provenance
+
# ── rejected-sub: L3 gemini — a rejected subscription login is never moved onto a metered hop ──
- name: rejected-sub
description: "panel gemini-4-argon plans OpenCode Zen Go (subscription) first and its key is expired (401): OBSERVED, what the chain does next is recorded, not graded"
@@ -310,7 +382,7 @@ scenarios:
# must be refused (ADVISOR_REFUSAL_PROBE=1) before the session starts, from
# madbench's clean environment, and records each one under refusal/.
- name: refusal
- description: "--advisor ag@gemini-4-argon and --advisor opusplan exit 1 before spawning, naming the member and the reason"
+ description: "--advisor ag@gemini-0-nonexistent and --advisor opusplan exit 1 before spawning, naming the member"
testdata: ./testdata/plain
sandbox:
level: workspace
@@ -319,9 +391,13 @@ scenarios:
timeout: 300s
prompt: "Reply with the single word ready, in capital letters, and nothing else."
checks:
+ # ag@gemini-0-nonexistent: a family that does not exist, so no account
+ # can ever serve a variant of it. (ag@gemini-4-argon was the member
+ # until 2026-10-21, when the account began listing gemini-4-argon-high/
+ # -medium/-low and D8 resolved the bare id to one: not refused.)
- type: exec
metric: refusal_antigravity
- cmd: 'd=refusal/ag-gemini; test -f $d/exit.txt && cat $d/spec.txt && echo "exit=$(cat $d/exit.txt)" && cat $d/stderr.txt && test "$(cat $d/exit.txt)" = 1 && grep -q -- "--advisor cannot work in this launch" $d/stderr.txt && grep -q "gemini-4-argon" $d/stderr.txt && grep -Eqi "does not serve|no route|not served" $d/stderr.txt && ! grep -rqs "Calling API:" $d/logs'
+ cmd: 'd=refusal/ag-gemini; test -f $d/exit.txt && cat $d/spec.txt && echo "exit=$(cat $d/exit.txt)" && cat $d/stderr.txt && test "$(cat $d/exit.txt)" = 1 && grep -q -- "--advisor cannot work in this launch" $d/stderr.txt && grep -q "gemini-0-nonexistent" $d/stderr.txt && ! grep -rqs "Calling API:" $d/logs'
- type: exec
metric: refusal_claude_selector
cmd: 'd=refusal/opusplan; test -f $d/exit.txt && cat $d/spec.txt && echo "exit=$(cat $d/exit.txt)" && cat $d/stderr.txt && test "$(cat $d/exit.txt)" = 1 && grep -q -- "--advisor cannot work in this launch" $d/stderr.txt && grep -q "opusplan" $d/stderr.txt && grep -q "switches tier" $d/stderr.txt && ! grep -rqs "Calling API:" $d/logs'