graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Models: retired gateway aliases leave the pickers; defaults and rungs move up a generation
justrachc41effb86ca8
diff --git a/spec/kernels/score.json b/spec/kernels/score.jsonindex 63934bcf..566e27a3 100644--- a/spec/kernels/score.json+++ b/spec/kernels/score.json@@ -13421,13 +13421,13 @@"source": "needle"},{- "id": "gpt-5.5",+ "id": "gpt-6-astra","tier": "frontier","source": "needle"},{- "id": "gpt-5.6-sol",- "tier": "frontier",+ "id": "gpt-6-sol",+ "tier": "mid","source": "needle"},{@@ -13436,7 +13436,7 @@"source": "needle"},{- "id": "gpt-5.6-luna",+ "id": "gpt-6-luna","tier": "small","source": "needle"},diff --git a/spec/ref/score.py b/spec/ref/score.pyindex 056578a5..583fc5c4 100644--- a/spec/ref/score.py+++ b/spec/ref/score.py@@ -90,7 +90,9 @@ NEEDLES: tuple[tuple[str, Tier], ...] = (("nano", "small"),("terra", "mid"),("luna", "small"),+ ("-sol", "mid"),("opus", "frontier"),+ ("gpt-6", "frontier"),("gpt-5", "frontier"),("deepseek-v4", "frontier"),("grok-4", "frontier"),@@ -106,10 +108,10 @@ NEEDLES: tuple[tuple[str, Tier], ...] = (# id, expected needle tier (unknown = price fallback, out of the cube)MODELS: tuple[tuple[str, Tier], ...] = (("claude-opus-4-8", "frontier"),- ("gpt-5.5", "frontier"),- ("gpt-5.6-sol", "frontier"),+ ("gpt-6-astra", "frontier"),+ ("gpt-6-sol", "mid"),("gpt-5.6-terra", "mid"),- ("gpt-5.6-luna", "small"),+ ("gpt-6-luna", "small"),("deepseek-v4-pro", "frontier"),("grok-4.3", "frontier"),("claude-haiku-4-5", "small"),@@ -218,6 +220,8 @@ def check_properties() -> int:raise ValueError("flash-beats-family")if class_of("gpt-5.6-terra") != "mid":raise ValueError("terra-beats-family")+ if class_of("gpt-6-sol") != "mid" or class_of("gpt-6-astra") != "frontier":+ raise ValueError("sol-beats-family")if class_of("deepseek-v4-flash") != "small":raise ValueError("deepseek-flash-small")check_diagram()diff --git a/src/catalog_price.zig b/src/catalog_price.zigindex 38e70db4..c9c3f0ed 100644--- a/src/catalog_price.zig+++ b/src/catalog_price.zig@@ -129,13 +129,13 @@ test "a gateway catalog price wins over the baked snapshot; other providers aredefer pricing.active_model_table = saved;pricing.active_model_table = &.{.{ .provider = "codegraff", .name = "gemini-3.8-flash", .context = 1_048_576, .price = .{ .in = 1, .out = 2, .cache = 0.1 } },- .{ .provider = "codegraff", .name = "gpt-5.5", .context = 1_050_000 },+ .{ .provider = "codegraff", .name = "gpt-6-sol", .context = 1_050_000 },};const live = pricing.priceForProvider("codegraff", "gemini-3.8-flash").?;try std.testing.expect(approx(live.in, 1) and approx(live.out, 2));// No catalog price: the baked gateway row still answers.- const baked = pricing.priceForProvider("codegraff", "gpt-5.5").?;- try std.testing.expect(approx(baked.in, 4));+ const baked = pricing.priceForProvider("codegraff", "gpt-6-sol").?;+ try std.testing.expect(approx(baked.in, 2.2));// A direct provider never reads the gateway's catalog.try std.testing.expect(pricing.priceForProvider("google", "gemini-3.8-flash") == null or !approx(pricing.priceForProvider("google", "gemini-3.8-flash").?.in, 1));}diff --git a/src/commands_misc.zig b/src/commands_misc.zigindex a6d90770..09e0ff6d 100644--- a/src/commands_misc.zig+++ b/src/commands_misc.zig@@ -403,7 +403,7 @@ pub fn tryHandle(root: *Agent, keys: *Keys, arena: Allocator, line: []const u8,}if (printed_header) try out.print("{s} copy an id above: /model lmstudio <id>{s}\n", .{ style.dim, style.reset });}- try out.print("{s}tip: /model <name> (fuzzy) · /model <provider> (its default) · /model <provider> <model> (pin, e.g. 'codex gpt-5.5'){s}\n", .{ style.dim, style.reset });+ try out.print("{s}tip: /model <name> (fuzzy) · /model <provider> (its default) · /model <provider> <model> (pin, e.g. 'codex gpt-6-sol'){s}\n", .{ style.dim, style.reset });try out.flush();return true;}diff --git a/src/commands_model.zig b/src/commands_model.zigindex ea94e820..b01d2120 100644--- a/src/commands_model.zig+++ b/src/commands_model.zig@@ -446,7 +446,7 @@ pub fn tryHandle(root: *Agent, keys: *Keys, arena: Allocator, line: []const u8,var mbuf: [320]u8 = undefined; // the message, or (first 16 bytes) just the sizeconst staged = stageImagePath(root, path);switch (staged) {- .no_vision => try out.print("⚠ {s} can't see images — switch to a vision model first, e.g. /model claude-opus-4-8 or /model gpt-5.5\n", .{root.provider.model}),+ .no_vision => try out.print("⚠ {s} can't see images — switch to a vision model first, e.g. /model claude-opus-4-8 or /model gpt-6-sol\n", .{root.provider.model}),.ok => |o| try out.print("📎 attached {s} ({s}) — sent with your next message\n", .{ path, vision.fmtBytes(mbuf[0..16], o.bytes) }),// Sized, distinct lines instead of "missing, or larger than 5MB" (#349)..too_large, .not_found, .read_error => try out.print("{s}\n", .{vision.stageMessage(&mbuf, staged, path)}),diff --git a/src/fleet.zig b/src/fleet.zigindex 3221871c..56c83cdd 100644--- a/src/fleet.zig+++ b/src/fleet.zig@@ -66,7 +66,7 @@ pub const AgentType = struct {// validated here — resolution happens per spawn against the live catalog// (subagent_pin.zig) so an unavailable pin degrades to the session// default instead of failing a persona load or a spawn mid-fleet.- model: ?[]const u8 = null, // frontmatter `model: gpt-5.6-terra`+ model: ?[]const u8 = null, // frontmatter `model: gpt-6-luna`tier: ?Tier = null, // frontmatter `tier: mid`effort: ?root.ReasoningEffort = null, // frontmatter `effort: max` — reasoning depth, an axis independent of model/tier (vocabulary: subagent_pin.parseEffort)};diff --git a/src/pipeline_score.zig b/src/pipeline_score.zigindex d9952f6c..04ed8986 100644--- a/src/pipeline_score.zig+++ b/src/pipeline_score.zig@@ -119,7 +119,7 @@ test "#296: a pipeline stage accrues exactly ONE fitness row, celled on its slotvar stat: StageStat = .{};for (0..5) |_| stat.noteAttempt();for (0..4) |_| stat.noteOk();- try std.testing.expect(captureStage(codex("gpt-5.6-terra"), "transform each file", "transform each file", "Apply the codemod; keep behavior identical.", &stat));+ try std.testing.expect(captureStage(codex("gpt-6-sol"), "transform each file", "transform each file", "Apply the codemod; keep behavior identical.", &stat));const rows = out.writer.buffered();try std.testing.expectEqual(@as(usize, 1), std.mem.count(u8, rows, "\"kind\":\"score\""));@@ -130,7 +130,7 @@ test "#296: a pipeline stage accrues exactly ONE fitness row, celled on its slottry std.testing.expectEqualStrings("migration", cells[0].shape);try std.testing.expectEqualStrings("transform", cells[0].role);try std.testing.expectEqualStrings("mid", cells[0].tier);- try std.testing.expectEqualStrings("gpt-5.6-terra", cells[0].model);+ try std.testing.expectEqualStrings("gpt-6-sol", cells[0].model);try std.testing.expectEqual(@as(u32, 1), cells[0].n);try std.testing.expectApproxEqAbs(@as(f64, 0.8), cells[0].mean(), 1e-9);}@@ -150,20 +150,20 @@ test "#296: rounds with no signal file nothing — unreached, all-fail, off-voca// A stage no item reached says nothing about its genome.var unreached: StageStat = .{};- try std.testing.expect(!captureStage(codex("gpt-5.6-terra"), "transform each file", "", "g", &unreached));+ try std.testing.expect(!captureStage(codex("gpt-6-sol"), "transform each file", "", "g", &unreached));// Total failure is skipped, not filed as a cell-poisoning 0.var all_fail: StageStat = .{};all_fail.noteAttempt();- try std.testing.expect(!captureStage(codex("gpt-5.6-terra"), "transform each file", "", "g", &all_fail));+ try std.testing.expect(!captureStage(codex("gpt-6-sol"), "transform each file", "", "g", &all_fail));// An off-vocabulary stage runs fine but stays uncelled, like a phase.var clean: StageStat = .{};clean.noteAttempt();clean.noteOk();- try std.testing.expect(!captureStage(codex("gpt-5.6-terra"), "polish the files", "some-persona", "g", &clean));+ try std.testing.expect(!captureStage(codex("gpt-6-sol"), "polish the files", "some-persona", "g", &clean));// The fleet master switch gates local capture the same way it gates// scoreVariants.main_mod.g_fleet = false;- try std.testing.expect(!captureStage(codex("gpt-5.6-terra"), "transform each file", "", "g", &clean));+ try std.testing.expect(!captureStage(codex("gpt-6-sol"), "transform each file", "", "g", &clean));try std.testing.expectEqual(@as(usize, 0), std.mem.count(u8, out.writer.buffered(), "\"kind\":\"score\""));}diff --git a/src/pricing_gateway.zig b/src/pricing_gateway.zigindex d52761fb..1d4187d2 100644--- a/src/pricing_gateway.zig+++ b/src/pricing_gateway.zig@@ -17,12 +17,10 @@ pub const rows = [_]ModelPrice{.{ .name = "glm-5.2", .in = 1.68, .out = 5.28, .cache = 0.312, .cache_write_multiplier = 1 },.{ .name = "glm-5.3", .in = 1.68, .out = 5.28, .cache = 0.312, .cache_write_multiplier = 1 },.{ .name = "glm-5.3-flash", .in = 0.075, .out = 0.25, .cache = 0.015, .cache_write_multiplier = 1 },- .{ .name = "gpt-5.5", .in = 4.0, .out = 20.0, .cache = 0.4, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 8.0, .high_out = 30.0, .high_cache = 0.8 },- .{ .name = "gpt-5.6", .in = 4.0, .out = 20.0, .cache = 0.4, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 8.0, .high_out = 30.0, .high_cache = 0.8 },- .{ .name = "gpt-5.6-luna", .in = 0.2, .out = 1.2, .cache = 0.02, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 0.4, .high_out = 1.7999999999999998, .high_cache = 0.04 },- .{ .name = "gpt-5.6-sol", .in = 4.0, .out = 20.0, .cache = 0.4, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 8.0, .high_out = 30.0, .high_cache = 0.8 },- .{ .name = "gpt-5.6-terra", .in = 2.0, .out = 12.0, .cache = 0.2, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 4.0, .high_out = 18.0, .high_cache = 0.4 },- .{ .name = "gpt-6-astra", .in = 10.0, .out = 50.0, .cache = 1.0, .cache_write_multiplier = 1 },+ .{ .name = "gpt-6-astra", .in = 11.0, .out = 55.0, .cache = 1.1, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 22.0, .high_out = 82.5, .high_cache = 2.2 },+ .{ .name = "gpt-6-luna", .in = 0.11, .out = 0.55, .cache = 0.011, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 0.22, .high_out = 0.825, .high_cache = 0.022 },+ .{ .name = "gpt-6-sol", .in = 2.2, .out = 11.0, .cache = 0.22, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 4.4, .high_out = 16.5, .high_cache = 0.44 },+ .{ .name = "gpt-6.1-sol", .in = 2.0, .out = 10.0, .cache = 0.1, .cache_write_multiplier = 1, .high_at = 272_000, .high_in = 4.0, .high_out = 15.0, .high_cache = 0.2 },.{ .name = "grok-4.6", .in = 2.0, .out = 6.0, .cache = 0.5, .cache_write_multiplier = 1, .high_at = 200_000, .high_in = 4.0, .high_out = 12.0, .high_cache = 1.0 },.{ .name = "grok-4.7", .in = 2.0, .out = 6.0, .cache = 0.5, .cache_write_multiplier = 1, .high_at = 200_000, .high_in = 4.0, .high_out = 12.0, .high_cache = 1.0 },.{ .name = "grok-build", .in = 1.0, .out = 2.0, .cache = 0.2, .cache_write_multiplier = 1 },diff --git a/src/pricing_models.zig b/src/pricing_models.zigindex b0954e06..a7aa875a 100644--- a/src/pricing_models.zig+++ b/src/pricing_models.zig@@ -60,6 +60,7 @@ pub const rows = [_]ModelInfo{.{ .provider = "codex", .name = "gpt-6-astra", .context = 272_000, .default_effort = "medium", .default_verbosity = "low" },.{ .provider = "codex", .name = "gpt-6-sol", .context = 272_000, .default_effort = "medium", .default_verbosity = "low" },.{ .provider = "codex", .name = "gpt-6.1-sol", .context = 272_000, .default_effort = "low", .default_verbosity = "low" },+ .{ .provider = "codex", .name = "gpt-6-luna", .context = 272_000 },.{ .provider = "codex", .name = "gpt-5.6-sol", .context = 272_000 },.{ .provider = "codex", .name = "gpt-5.6-terra", .context = 272_000 },.{ .provider = "codegraff", .name = "muse-spark-1.2", .context = 262_144 },@@ -119,11 +120,9 @@ pub const rows = [_]ModelInfo{.{ .provider = "codegraff", .name = "deepseek-v4-flash", .context = 1_000_000 },.{ .provider = "codegraff", .name = "minimax-m3", .context = 1_000_000 },.{ .provider = "codegraff", .name = "gpt-6-astra", .context = 1_050_000 },- .{ .provider = "codegraff", .name = "gpt-5.6-sol", .context = 1_050_000 },- .{ .provider = "codegraff", .name = "gpt-5.6-terra", .context = 1_050_000 },- .{ .provider = "codegraff", .name = "gpt-5.6-luna", .context = 1_050_000 },- .{ .provider = "codegraff", .name = "gpt-5.6", .context = 1_050_000 },- .{ .provider = "codegraff", .name = "gpt-5.5", .context = 1_050_000 },+ .{ .provider = "codegraff", .name = "gpt-6-sol", .context = 1_050_000 },+ .{ .provider = "codegraff", .name = "gpt-6.1-sol", .context = 1_050_000 },+ .{ .provider = "codegraff", .name = "gpt-6-luna", .context = 1_050_000 },.{ .provider = "codegraff", .name = "kimi-k2.6", .context = 262_144 },.{ .provider = "codegraff", .name = "grok-4.7", .context = 500_000 },.{ .provider = "codegraff", .name = "grok-4.6", .context = 500_000 },diff --git a/src/pricing_tests.zig b/src/pricing_tests.zigindex 3b5ef87d..a9828b2b 100644--- a/src/pricing_tests.zig+++ b/src/pricing_tests.zig@@ -324,12 +324,12 @@ test "pricing Astra has metered catalog entries and cache write premium" {}test "pricing gateway aliases do not inherit vendor rates or cache writes" {- const gateway = pricing.priceForProvider("codegraff", "gpt-5.5").?;- const direct = pricing.priceForProvider("openai", "gpt-5.5").?;- try std.testing.expectEqual(@as(f64, 4), gateway.in);- try std.testing.expectEqual(@as(f64, 5), direct.in);+ const gateway = pricing.priceForProvider("codegraff", "gpt-6-sol").?;+ const direct = pricing.priceForProvider("openai", "gpt-6-sol").?;+ try std.testing.expectApproxEqAbs(@as(f64, 2.2), gateway.in, 1e-9);+ try std.testing.expectEqual(@as(f64, 2), direct.in);const astra = pricing.priceForProvider("codegraff", "gpt-6-astra").?;- try std.testing.expectApproxEqAbs(@as(f64, 1), pricing.usdForUsage(astra, astra.name, 0, 0, 100_000, 0), 1e-9);+ try std.testing.expectApproxEqAbs(@as(f64, 1.1), pricing.usdForUsage(astra, astra.name, 0, 0, 100_000, 0), 1e-9);}test "pricing gateway tally respects priced and free rows without vendor fallback" {@@ -338,7 +338,9 @@ test "pricing gateway tally respects priced and free rows without vendor fallbactry std.testing.expectApproxEqAbs(@as(f64, 0.13086), tally.usd, 1e-9);const zero = pricing.priceForProvider("codegraff", "ling-3.0-flash-fin").?;try std.testing.expectEqual(@as(f64, 0), pricing.usdFor(zero, 100, 100, 100));- try std.testing.expect(pricing.priceForProvider("codegraff", "gpt-6-sol") == null);+ // A retired gateway alias has no gateway row and never borrows the vendor's.+ try std.testing.expect(pricing.priceFor("gpt-5.5") != null);+ try std.testing.expect(pricing.priceForProvider("codegraff", "gpt-5.5") == null);}test "pricing gateway overrides name-only runtime prices and long bands" {diff --git a/src/provider.zig b/src/provider.zigindex 676fd24c..f005762e 100644--- a/src/provider.zig+++ b/src/provider.zig@@ -79,7 +79,7 @@ pub const provider_specs = [_]ProviderSpec{.{ .id = "anthropic", .display_name = "Anthropic", .kind = .anthropic, .auth = .x_api_key, .url = "https://api.anthropic.com/v1/messages", .env_key = "ANTHROPIC_API_KEY", .default_model = "claude-opus-5-5", .catalog = .anthropic, .models_url = "https://api.anthropic.com/v1/models?limit=1000" },.{ .id = "codegraff", .display_name = "Codegraff", .kind = .openai, .auth = .bearer, .url = "https://gateway.codegraff.com/v1/chat/completions", .env_key = "CODEGRAFF_API_KEY", .default_model = "mimo-v2.6-pro", .login = .codegraff_device, .catalog = .openai, .models_url = "https://gateway.codegraff.com/v1/models", .takes_effort = true },.{ .id = "deepseek", .display_name = "DeepSeek", .kind = .openai, .auth = .bearer, .url = "https://api.deepseek.com/chat/completions", .env_key = "DEEPSEEK_API_KEY", .default_model = "deepseek-v4-pro", .takes_effort = true },- .{ .id = "openai", .display_name = "OpenAI", .kind = .responses, .auth = .bearer, .url = "https://api.openai.com/v1/responses", .env_key = "OPENAI_API_KEY", .default_model = "gpt-5.6" },+ .{ .id = "openai", .display_name = "OpenAI", .kind = .responses, .auth = .bearer, .url = "https://api.openai.com/v1/responses", .env_key = "OPENAI_API_KEY", .default_model = "gpt-6-sol" },// Google AI Studio on its first-party Interactions API — the wire Google// says every new model and agent capability launches on, not the// OpenAI-compatibility shim. A turn POSTs one Interaction and reads back@@ -135,7 +135,7 @@ pub const provider_specs = [_]ProviderSpec{// — it's the OAuth access token read from CODEX_HOME/auth.json at startup// (see loadCodexAuth), the same on-disk-credential trick used for the// codegraff gateway key in ~/forge/.credentials.json.- .{ .id = "codex", .display_name = "Codex (ChatGPT)", .kind = .responses, .auth = .bearer, .url = "https://chatgpt.com/backend-api/codex/responses", .env_key = "CODEX_DISABLED", .default_model = "gpt-5.6-sol", .login = .codex_device, .sub_login = true, .catalog = .codex },+ .{ .id = "codex", .display_name = "Codex (ChatGPT)", .kind = .responses, .auth = .bearer, .url = "https://chatgpt.com/backend-api/codex/responses", .env_key = "CODEX_DISABLED", .default_model = "gpt-6-sol", .login = .codex_device, .sub_login = true, .catalog = .codex },};/// Optional workspace-local router loaded from `.graff/.config.router`.diff --git a/src/provider_codegraff_tests.zig b/src/provider_codegraff_tests.zigindex 72fcffcd..c084e52f 100644--- a/src/provider_codegraff_tests.zig+++ b/src/provider_codegraff_tests.zig@@ -25,7 +25,7 @@ test "Codegraff selects the gateway wire and endpoint per model" {test "Codegraff-only credentials route native aliases without live discovery" {var keys: provider.Keys = .{ .values = @splat(null) };try std.testing.expect(keys.set("codegraff", "key", .environment));- for ([_][]const u8{ "gpt-5.6", "grok-4.6" }) |model| {+ for ([_][]const u8{ "gpt-6-sol", "grok-4.6" }) |model| {const got = try keys.providerFor(model);try std.testing.expectEqualStrings("codegraff", got.id);try std.testing.expectEqual(provider.Provider.Kind.responses, got.kind);@@ -256,5 +256,5 @@ test "GPT6 Sol fallback routes preserve explicit provider and existing defaults"try std.testing.expectEqualStrings("gpt-6-sol", selected.model);try std.testing.expectEqual(provider.Provider.Kind.responses, selected.kind);}- try std.testing.expect(!pricing.providerModelInTable("codegraff", "gpt-6-sol"));+ try std.testing.expect(pricing.providerModelInTable("codegraff", "gpt-6-sol"));}diff --git a/src/provider_routing_tests.zig b/src/provider_routing_tests.zigindex 77af6f2f..7016b44b 100644--- a/src/provider_routing_tests.zig+++ b/src/provider_routing_tests.zig@@ -33,7 +33,7 @@ test "providerFor (#294): a catalogued model with no keyed provider fails instea// A model served by several providers still falls through to whichever is// keyed — losing one credential must not break a model another can serve.- try std.testing.expectEqualStrings("openai", (try no_codex.providerFor("gpt-5.6-terra")).id);+ try std.testing.expectEqualStrings("openai", (try no_codex.providerFor("gpt-6-luna")).id);// The gateway fallback survives for genuinely UNCATALOGUED models, which is// all it was ever meant to cover.diff --git a/src/route_phase_tests.zig b/src/route_phase_tests.zigindex 06341d0c..23fb547b 100644--- a/src/route_phase_tests.zig+++ b/src/route_phase_tests.zig@@ -19,24 +19,24 @@ fn codex(model: []const u8) Provider {}/// The same synthetic sheet #372's demonstration uses: on the SHEET ALONE-/// terra outscores luna and is not dominated by it, so anything that moves+/// sol outscores luna and is not dominated by it, so anything that moves/// below is provably the lived evidence talking, not the priors.const demo_sheet = [_]bench.Entry{- .{ .model = "gpt-5.6-terra", .effort = "medium", .score = 0.60, .cost = 0.9 }, // effective $0.90- .{ .model = "gpt-5.6-luna", .effort = "max", .score = 0.40, .cost = 0.61 }, // effective $0.61+ .{ .model = "gpt-6-sol", .effort = "medium", .score = 0.60, .cost = 0.9 }, // effective $0.90+ .{ .model = "gpt-6-luna", .effort = "max", .score = 0.40, .cost = 0.61 }, // effective $0.61};/// Lived scores from a `research` shape's `sweep` phase: the ladder's mid rung-/// (terra) did badly there, the cheap rung (luna) did well. Exactly the rows+/// (sol) did badly there, the cheap rung (luna) did well. Exactly the rows/// route_trace.captureScore writes — no recipe rows, so bench_priors' own/// #374 sheet feedback is deliberately NOT what is being exercised here.const demo_archive =- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"};/// Install `demo_archive` + `demo_sheet` as the session's live policy, with@@ -82,26 +82,26 @@ test "role prior: search roles ride the small rung; judged roles keep the sessioconst saved = Env.install(a, "", true);defer saved.restore();- const find = phase.forPhase(codex("gpt-5.6-terra"), .review, "find the defects", &.{}, true);- try std.testing.expectEqualStrings("gpt-5.6-luna", find.provider.model);+ const find = phase.forPhase(codex("gpt-6-sol"), .review, "find the defects", &.{}, true);+ try std.testing.expectEqualStrings("gpt-6-luna", find.provider.model);try std.testing.expect(find.pin != null);try std.testing.expect(find.role_prior);// The source stays the ladder's — a hand rule must not claim evidence.try std.testing.expectEqual(policy.Source.ladder, find.sourceFor(false));- const sweep = phase.forPhase(codex("gpt-5.6-terra"), .research, "sweep the sources", &.{}, true);- try std.testing.expectEqualStrings("gpt-5.6-luna", sweep.provider.model);+ const sweep = phase.forPhase(codex("gpt-6-sol"), .research, "sweep the sources", &.{}, true);+ try std.testing.expectEqualStrings("gpt-6-luna", sweep.provider.model);- const verify = phase.forPhase(codex("gpt-5.6-terra"), .review, "verify each finding", &.{}, true);+ const verify = phase.forPhase(codex("gpt-6-sol"), .review, "verify each finding", &.{}, true);try std.testing.expect(verify.pin == null);- try std.testing.expectEqualStrings("gpt-5.6-terra", verify.provider.model);+ try std.testing.expectEqualStrings("gpt-6-sol", verify.provider.model);// A user-chosen seat is never moved by the prior, same as #372's rule.const pinned = Env.install(a, "", false);defer pinned.restore();- const kept = phase.forPhase(codex("gpt-5.6-terra"), .review, "find the defects", &.{}, true);+ const kept = phase.forPhase(codex("gpt-6-sol"), .review, "find the defects", &.{}, true);try std.testing.expect(kept.pin == null);- try std.testing.expectEqualStrings("gpt-5.6-terra", kept.provider.model);+ try std.testing.expectEqualStrings("gpt-6-sol", kept.provider.model);}test "#376 uniformRole: a phase routes only when all of its workers agree on one role" {@@ -128,19 +128,19 @@ test "#376 DEMONSTRATION: an observed phase re-seats EVERY worker; an unobservedconst env = Env.install(arena_state.allocator(), demo_archive, true);defer env.restore();- // The session descended the #291 ladder to terra; the (research, sweep)+ // The session descended the #291 ladder to sol; the (research, sweep)// cell has measured luna as strictly better value there.- const base = codex("gpt-5.6-terra");+ const base = codex("gpt-6-sol");const seat = phase.forPhase(base, .research, "sweep the repo", &sweep_niches, true);try std.testing.expect(seat.pin != null);- try std.testing.expectEqualStrings("gpt-5.6-luna", seat.provider.model);- try std.testing.expectEqualStrings("gpt-5.6-luna", seat.pin.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", seat.provider.model);+ try std.testing.expectEqualStrings("gpt-6-luna", seat.pin.?.model);// PHASE-UNIFORM: one seat, so every worker of the phase resolves to the// same model and files under the same cell — with or without a// root-authored genome. That is the property #290 needs preserved.for (sweep_niches) |niche| {- try std.testing.expectEqualStrings("gpt-5.6-luna", seat.provider.model);+ try std.testing.expectEqualStrings("gpt-6-luna", seat.provider.model);const cell = seat.cellOf(niche);try std.testing.expectEqual(policy.Shape.research, cell.shape);try std.testing.expectEqualStrings("sweep", cell.role);@@ -153,7 +153,7 @@ test "#376 DEMONSTRATION: an observed phase re-seats EVERY worker; an unobserved// including today's `source` attribution.const quiet = phase.forPhase(base, .feature, "implement the fix", &.{"implementer"}, true);try std.testing.expect(quiet.pin == null);- try std.testing.expectEqualStrings("gpt-5.6-terra", quiet.provider.model);+ try std.testing.expectEqualStrings("gpt-6-sol", quiet.provider.model);try std.testing.expectEqual(policy.Source.ladder, quiet.sourceFor(false));try std.testing.expectEqual(policy.Source.workflow_override, quiet.sourceFor(true));}@@ -170,7 +170,7 @@ test "#376: the re-seated phase's trace says learned-policy on every worker" {defer route_trace.g_test_sink = null;// Drive the exact emission workflow.zig makes, once per worker.- const seat = phase.forPhase(codex("gpt-5.6-terra"), .research, "sweep the repo", &sweep_niches, true);+ const seat = phase.forPhase(codex("gpt-6-sol"), .research, "sweep the repo", &sweep_niches, true);for (sweep_niches) |niche| {route_trace.emitSpawnProvider(std.testing.io, null, niche, seat.provider, seat.cellOf(niche), seat.sourceFor(false), null, niche);}@@ -180,7 +180,7 @@ test "#376: the re-seated phase's trace says learned-policy on every worker" {while (lines.next()) |ln| : (n += 1) {const ev = try std.json.parseFromSliceLeaky(std.json.Value, a, ln, .{});try std.testing.expectEqualStrings("agent_route", ev.object.get("type").?.string);- try std.testing.expectEqualStrings("gpt-5.6-luna", ev.object.get("resolved_model").?.string);+ try std.testing.expectEqualStrings("gpt-6-luna", ev.object.get("resolved_model").?.string);try std.testing.expectEqualStrings("learned-policy", ev.object.get("source").?.string);try std.testing.expectEqualStrings("research", ev.object.get("shape").?.string);try std.testing.expectEqualStrings("sweep", ev.object.get("role").?.string);@@ -196,7 +196,7 @@ test "#376: the re-seated phase's trace says learned-policy on every worker" {test "#376: an explicitly chosen worker model outranks the phase policy" {var arena_state = std.heap.ArenaAllocator.init(std.testing.allocator);defer arena_state.deinit();- const base = codex("gpt-5.6-terra");+ const base = codex("gpt-6-sol");// --subagent-model: the session named the worker model, so the route is// `session-default`, not the ladder's, and evidence never overrides a@@ -206,7 +206,7 @@ test "#376: an explicitly chosen worker model outranks the phase policy" {defer env.restore();const seat = phase.forPhase(base, .research, "sweep the repo", &sweep_niches, true);try std.testing.expect(seat.pin == null);- try std.testing.expectEqualStrings("gpt-5.6-terra", seat.provider.model);+ try std.testing.expectEqualStrings("gpt-6-sol", seat.provider.model);try std.testing.expectEqual(policy.Source.session_default, seat.sourceFor(false));}// A plain inherit-the-root (no worker provider at all) is the same story:@@ -225,20 +225,20 @@ test "#376: the phase seat can only trade DOWN on cost, and never leaves the prodefer arena_state.deinit();const a = arena_state.allocator();- // The mirror image of the demonstration: terra is the loved model but it+ // The mirror image of the demonstration: sol is the loved model but it// is also the DEARER one, so a phase already seated on luna can never be- // moved up to it however well terra scored in the cell.+ // moved up to it however well sol scored in the cell.const upward =- \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}+ \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"};const env = Env.install(a, upward, true);defer env.restore();- const seat = phase.forPhase(codex("gpt-5.6-luna"), .research, "sweep the repo", &sweep_niches, true);+ const seat = phase.forPhase(codex("gpt-6-luna"), .research, "sweep the repo", &sweep_niches, true);try std.testing.expect(seat.pin == null);- try std.testing.expectEqualStrings("gpt-5.6-luna", seat.provider.model);+ try std.testing.expectEqualStrings("gpt-6-luna", seat.provider.model);// And whatever it decides, the seat is provider-local by construction: the// id, the credential and the account all ride across unchanged, so no@@ -248,7 +248,7 @@ test "#376: the phase seat can only trade DOWN on cost, and never leaves the pro// explicit `tier` ask, which a phase task never makes.const env2 = Env.install(a, demo_archive, true);defer env2.restore();- const base = codex("gpt-5.6-terra");+ const base = codex("gpt-6-sol");const moved = phase.forPhase(base, .research, "sweep the repo", &sweep_niches, true);try std.testing.expect(moved.pin != null);try std.testing.expectEqualStrings(base.id, moved.provider.id);@@ -261,7 +261,7 @@ test "#376: an uncelled phase, and a bootstrap install, keep today's behavior exvar arena_state = std.heap.ArenaAllocator.init(std.testing.allocator);defer arena_state.deinit();const a = arena_state.allocator();- const base = codex("gpt-5.6-terra");+ const base = codex("gpt-6-sol");{const env = Env.install(a, demo_archive, true);defer env.restore();@@ -269,7 +269,7 @@ test "#376: an uncelled phase, and a bootstrap install, keep today's behavior ex// evidence that WOULD have moved a `sweep` phase moves nothing.const seat = phase.forPhase(base, .research, "ponder", &.{ "researcher", "review the diff" }, true);try std.testing.expect(seat.pin == null);- try std.testing.expectEqualStrings("gpt-5.6-terra", seat.provider.model);+ try std.testing.expectEqualStrings("gpt-6-sol", seat.provider.model);}{// An install with no archive at all: zero cells — the learned layer@@ -280,7 +280,7 @@ test "#376: an uncelled phase, and a bootstrap install, keep today's behavior exdefer env.restore();const seat = phase.forPhase(base, .research, "sweep the repo", &sweep_niches, true);try std.testing.expect(seat.pin != null);- try std.testing.expectEqualStrings("gpt-5.6-luna", seat.provider.model);+ try std.testing.expectEqualStrings("gpt-6-luna", seat.provider.model);try std.testing.expect(seat.role_prior);try std.testing.expectEqual(policy.Source.ladder, seat.sourceFor(false));}diff --git a/src/route_policy_tests.zig b/src/route_policy_tests.zigindex f38848f1..ca38a4bc 100644--- a/src/route_policy_tests.zig+++ b/src/route_policy_tests.zig@@ -26,28 +26,28 @@ fn codex(model: []const u8) Provider {/// (0.60 vs 0.40) and is not dominated by it, so any re-seating that happens/// is provably the lived evidence talking, not the priors.const demo_sheet = [_]bench.Entry{- .{ .model = "gpt-5.6-terra", .effort = "medium", .score = 0.60, .cost = 0.9 }, // effective $0.90- .{ .model = "gpt-5.6-luna", .effort = "max", .score = 0.40, .cost = 0.61 }, // effective $0.61+ .{ .model = "gpt-6-sol", .effort = "medium", .score = 0.60, .cost = 0.9 }, // effective $0.90+ .{ .model = "gpt-6-luna", .effort = "max", .score = 0.40, .cost = 0.61 }, // effective $0.61};/// Lived scores from a `research` shape's `sweep` phase: terra (the ladder's/// mid rung) did badly, luna did well. Written in the exact self-describing/// `kind:"score"` shape route_trace.captureScore emits.const demo_archive =- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"};test "#372 trace line: every source kind renders its own attribution, absent fields render -" {var buf: [320]u8 = undefined;// The line the issue specifies, field for field.try std.testing.expectEqualStrings(- "shape=research role=sweep tier=mid resolved_model=gpt-5.6-terra source=ladder policy_or_genome_id=ladder:codex",- policy.formatDecision(&buf, .{ .shape = .research, .role = "sweep", .tier = .mid, .resolved_model = "gpt-5.6-terra", .source = .ladder, .policy_id = "ladder:codex" }),+ "shape=research role=sweep tier=mid resolved_model=gpt-6-sol source=ladder policy_or_genome_id=ladder:codex",+ policy.formatDecision(&buf, .{ .shape = .research, .role = "sweep", .tier = .mid, .resolved_model = "gpt-6-sol", .source = .ladder, .policy_id = "ladder:codex" }),);// Each source kind is spelled with hyphens on the wire, and each is// distinguishable — that is the whole point of the field.@@ -82,14 +82,14 @@ test "#372 trace: the --json agent_route event carries the same six fields" {route_trace.g_test_sink = &sink;defer route_trace.g_test_sink = null;- route_trace.emitSpawn(std.testing.io, null, "sweep the callers", "codex", "gpt-5.6-terra", .{ .shape = .research, .role = "sweep" }, .ladder, "");+ route_trace.emitSpawn(std.testing.io, null, "sweep the callers", "codex", "gpt-6-sol", .{ .shape = .research, .role = "sweep" }, .ladder, "");const line = std.mem.trimEnd(u8, sink.writer.buffered(), "\n");try std.testing.expect(std.mem.indexOfScalar(u8, line, '\n') == null); // one complete object per lineconst ev = try std.json.parseFromSliceLeaky(std.json.Value, arena_state.allocator(), line, .{});try std.testing.expectEqualStrings("agent_route", ev.object.get("type").?.string);try std.testing.expectEqualStrings("research", ev.object.get("shape").?.string);try std.testing.expectEqualStrings("sweep", ev.object.get("role").?.string);- try std.testing.expectEqualStrings("gpt-5.6-terra", ev.object.get("resolved_model").?.string);+ try std.testing.expectEqualStrings("gpt-6-sol", ev.object.get("resolved_model").?.string);try std.testing.expectEqualStrings("ladder", ev.object.get("source").?.string);try std.testing.expectEqualStrings("sweep the callers", ev.object.get("task").?.string);// The tier is READ BACK off the resolved model, so an inherited route —@@ -127,9 +127,9 @@ test "#372: the shape is read off the phase titles the root model authored" {try std.testing.expectEqualStrings("review", policy.roleOf("do the thing", "review the diff"));try std.testing.expectEqualStrings("", policy.roleOf("do the thing", "some-persona"));// tierOf is the ladder inverse the trace needs for an unpinned worker.- try std.testing.expectEqual(tier_ladder.Tier.mid, policy.tierOf("codex", "gpt-5.6-terra").?);+ try std.testing.expectEqual(tier_ladder.Tier.mid, policy.tierOf("codex", "gpt-6-sol").?);try std.testing.expectEqual(tier_ladder.Tier.frontier, policy.tierOf("codex", "gpt-6-astra").?);- try std.testing.expect(policy.tierOf("codex", "gpt-5.6-sol") == null);+ try std.testing.expect(policy.tierOf("codex", "gpt-6.1-sol") == null);try std.testing.expect(policy.tierOf("codex", "claude-opus-4-8") == null); // off this laddertry std.testing.expectEqualStrings("", policy.tierLabelFor("xai", "grok-4.3")); // no ladder at all}@@ -139,12 +139,12 @@ test "#372 foldCells: only self-describing score rows become observations" {defer arena_state.deinit();const a = arena_state.allocator();const archive =- \\{"kind":"score","prompt_sha":"aa","score":0.5,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":0.7,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}+ \\{"kind":"score","prompt_sha":"aa","score":0.5,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":0.7,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}\\{"kind":"score","prompt_sha":"zz","score":0.9}\\{"kind":"score","prompt_sha":"zz","score":0.9,"shape":"research","role":"sweep","tier":"mid"}- \\{"kind":"score","prompt_sha":"zz","score":40,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-luna"}- \\{"kind":"recipe","prompt_sha":"aa","model":"gpt-5.6-luna","effort":"max"}+ \\{"kind":"score","prompt_sha":"zz","score":40,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-luna"}+ \\{"kind":"recipe","prompt_sha":"aa","model":"gpt-6-luna","effort":"max"}\\not json at all;const cells = policy.foldCells(a, archive);@@ -154,7 +154,7 @@ test "#372 foldCells: only self-describing score rows become observations" {try std.testing.expectEqualStrings("research", cells[0].shape);try std.testing.expectEqualStrings("sweep", cells[0].role);try std.testing.expectEqualStrings("mid", cells[0].tier);- try std.testing.expectEqualStrings("gpt-5.6-terra", cells[0].model);+ try std.testing.expectEqualStrings("gpt-6-sol", cells[0].model);try std.testing.expectEqual(@as(u32, 2), cells[0].n);try std.testing.expectApproxEqAbs(@as(f64, 0.6), cells[0].mean(), 1e-9);// An archive with nothing in it is the bootstrap case: zero cells, so@@ -166,8 +166,8 @@ test "#372 DEMONSTRATION: a dominated mid rung is re-seated, an unobserved cellvar arena_state = std.heap.ArenaAllocator.init(std.testing.allocator);defer arena_state.deinit();const cells = policy.foldCells(arena_state.allocator(), demo_archive);- const ladder_mid = tier_ladder.forProvider("codex").?.mid.?; // today's answer: gpt-5.6-terra- try std.testing.expectEqualStrings("gpt-5.6-terra", ladder_mid);+ const ladder_mid = tier_ladder.forProvider("codex").?.mid.?; // today's answer: gpt-6-sol+ try std.testing.expectEqualStrings("gpt-6-sol", ladder_mid);// BASELINE — the sheet alone, no lived evidence: terra outscores luna on// the sheet, so nothing dominates it and today's ladder answer stands.@@ -178,7 +178,7 @@ test "#372 DEMONSTRATION: a dominated mid rung is re-seated, an unobserved cell// luna now matches-and-beats terra's quality for $0.61 against $0.90, so// it DOMINATES it and the (research, sweep) mid rung is re-seated.const reseated = policy.learnedRungIn(cells, &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, ladder_mid);- try std.testing.expectEqualStrings("gpt-5.6-luna", reseated.?);+ try std.testing.expectEqualStrings("gpt-6-luna", reseated.?);// SPARSE — a cell nobody has ever scored has no basis to move anything,// so it falls through the whole hierarchy to today's ladder answer.@@ -197,30 +197,30 @@ test "#372 hierarchy: exact cell decides, a silent cell borrows its shape, a sil// A DIFFERENT role in the same shape has no rows of its own, so it// borrows the shape-level pool (`sweep`'s evidence) — rung two.const cells = policy.foldCells(a, demo_archive);- try std.testing.expectEqualStrings("gpt-5.6-luna", policy.learnedRungIn(cells, &demo_sheet, "codex", .{ .shape = .research, .role = "synthesize" }, ladder_mid).?);+ try std.testing.expectEqualStrings("gpt-6-luna", policy.learnedRungIn(cells, &demo_sheet, "codex", .{ .shape = .research, .role = "synthesize" }, ladder_mid).?);// But an exact cell that HAS evidence decides for itself, including// deciding to keep the ladder's answer — it must not fall through to a// shape-level pool that would have overridden it. Here `synthesize` says// terra is excellent and luna is poor, so terra survives.const keeps =- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"cc","score":1,"shape":"research","role":"synthesize","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"cc","score":1,"shape":"research","role":"synthesize","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"dd","score":0,"shape":"research","role":"synthesize","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"dd","score":0,"shape":"research","role":"synthesize","tier":"small","model":"gpt-5.6-luna"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":0.2,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0.95,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"cc","score":1,"shape":"research","role":"synthesize","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"cc","score":1,"shape":"research","role":"synthesize","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"dd","score":0,"shape":"research","role":"synthesize","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"dd","score":0,"shape":"research","role":"synthesize","tier":"small","model":"gpt-6-luna"};const split = policy.foldCells(a, keeps);try std.testing.expect(policy.learnedRungIn(split, &demo_sheet, "codex", .{ .shape = .research, .role = "synthesize" }, ladder_mid) == null);- try std.testing.expectEqualStrings("gpt-5.6-luna", policy.learnedRungIn(split, &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, ladder_mid).?);+ try std.testing.expectEqualStrings("gpt-6-luna", policy.learnedRungIn(split, &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, ladder_mid).?);// A single lucky run is SPARSE (min_model_obs) and moves nothing.const one_run =- \\{"kind":"score","prompt_sha":"aa","score":0.1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"bb","score":1,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}+ \\{"kind":"score","prompt_sha":"aa","score":0.1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"bb","score":1,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"};try std.testing.expect(policy.learnedRungIn(policy.foldCells(a, one_run), &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, ladder_mid) == null);}@@ -232,14 +232,14 @@ test "#372: the learned policy can only ever trade DOWN on cost, never up" {// is also the CHEAP one, so asking about the `small` rung can never be// answered with the pricier terra however well terra scored.const archive =- \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-5.6-terra"}- \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}- \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-5.6-luna"}+ \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"aa","score":1,"shape":"research","role":"sweep","tier":"mid","model":"gpt-6-sol"}+ \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"}+ \\{"kind":"score","prompt_sha":"bb","score":0,"shape":"research","role":"sweep","tier":"small","model":"gpt-6-luna"};const cells = policy.foldCells(arena_state.allocator(), archive);const small = tier_ladder.forProvider("codex").?.small.?;- try std.testing.expectEqualStrings("gpt-5.6-luna", small);+ try std.testing.expectEqualStrings("gpt-6-luna", small);try std.testing.expect(policy.learnedRungIn(cells, &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, small) == null);}@@ -260,34 +260,34 @@ test "#372: a learned cell reroutes a TIER pin, and an explicit model pin stillbench.g_entries = &demo_sheet;policy.g_cells = policy.foldCells(arena_state.allocator(), demo_archive);- const root = codex("gpt-5.6-sol");+ const root = codex("gpt-6-astra");const cell: Cell = .{ .shape = .research, .role = "sweep" };// A `tier: mid` ask in this cell now resolves to the model the cell// measured as strictly better value, and says so.const learned = pin_mod.resolveIn(root, .{ .tier = .mid }, cell);- try std.testing.expectEqualStrings("gpt-5.6-luna", learned.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", learned.provider.?.model);try std.testing.expectEqual(pin_mod.Source.learned_policy, learned.source);try std.testing.expectEqualStrings("codex", learned.provider.?.id); // provider-local, always// The SAME ask in an unmeasured cell keeps today's ladder answer.const unmeasured = pin_mod.resolveIn(root, .{ .tier = .mid }, .{ .shape = .feature, .role = "implement" });- try std.testing.expectEqualStrings("gpt-5.6-terra", unmeasured.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-sol", unmeasured.provider.?.model);try std.testing.expectEqual(pin_mod.Source.ladder, unmeasured.source);// AN EXPLICIT USER PIN OUTRANKS EVERYTHING LEARNED. Same cell, same// session, but the call named a model: the learned layer is never even// consulted, and the trace attributes the choice to the human.- const explicit = pin_mod.resolveIn(root, .{ .model = "gpt-5.6-terra" }, cell);- try std.testing.expectEqualStrings("gpt-5.6-terra", explicit.provider.?.model);+ const explicit = pin_mod.resolveIn(root, .{ .model = "gpt-6-sol" }, cell);+ try std.testing.expectEqualStrings("gpt-6-sol", explicit.provider.?.model);try std.testing.expectEqual(pin_mod.Source.explicit_pin, explicit.source);// A persona's exact `model:` frontmatter pin likewise wins, and is// attributed to the persona rather than to the user's call.- const persona = pin_mod.resolveIn(root, .{ .model = "gpt-5.6-terra", .from_persona = true }, cell);- try std.testing.expectEqualStrings("gpt-5.6-terra", persona.provider.?.model);+ const persona = pin_mod.resolveIn(root, .{ .model = "gpt-6-sol", .from_persona = true }, cell);+ try std.testing.expectEqualStrings("gpt-6-sol", persona.provider.?.model);try std.testing.expectEqual(pin_mod.Source.persona, persona.source);// And the cell-less entry point (every pre-#372 caller) is unchanged.- try std.testing.expectEqualStrings("gpt-5.6-terra", pin_mod.resolve(root, .{ .tier = .mid }).provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-sol", pin_mod.resolve(root, .{ .tier = .mid }).provider.?.model);}test "#372 round trip: what captureVariant writes is exactly what foldCells learns from" {@@ -305,8 +305,8 @@ test "#372 round trip: what captureVariant writes is exactly what foldCells lear// Three judged `sweep` variants on the mid rung, three on the small one —// the capture the scoring path makes, with no hand-written JSON anywhere.- for (0..3) |_| route_trace.captureVariant(codex("gpt-5.6-terra"), .research, "sweep the repo", "sweep", "aa", 0.2);- for (0..3) |_| route_trace.captureVariant(codex("gpt-5.6-luna"), .research, "sweep the repo", "sweep", "bb", 0.95);+ for (0..3) |_| route_trace.captureVariant(codex("gpt-6-sol"), .research, "sweep the repo", "sweep", "aa", 0.2);+ for (0..3) |_| route_trace.captureVariant(codex("gpt-6-luna"), .research, "sweep the repo", "sweep", "bb", 0.95);const cells = policy.foldCells(a, out.writer.buffered());try std.testing.expectEqual(@as(usize, 2), cells.len);@@ -315,12 +315,12 @@ test "#372 round trip: what captureVariant writes is exactly what foldCells leartry std.testing.expectEqualStrings("research", c.shape);try std.testing.expectEqualStrings("sweep", c.role);try std.testing.expectEqual(@as(u32, 3), c.n);- try std.testing.expectEqualStrings(if (std.mem.eql(u8, c.model, "gpt-5.6-terra")) "mid" else "small", c.tier);+ try std.testing.expectEqualStrings(if (std.mem.eql(u8, c.model, "gpt-6-sol")) "mid" else "small", c.tier);}// ...and the policy reaches the same verdict as the hand-written archive.try std.testing.expectEqualStrings(- "gpt-5.6-luna",- policy.learnedRungIn(cells, &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, "gpt-5.6-terra").?,+ "gpt-6-luna",+ policy.learnedRungIn(cells, &demo_sheet, "codex", .{ .shape = .research, .role = "sweep" }, "gpt-6-sol").?,);}diff --git a/src/router_catalog_tests.zig b/src/router_catalog_tests.zigindex 85423252..c192531c 100644--- a/src/router_catalog_tests.zig+++ b/src/router_catalog_tests.zig@@ -424,7 +424,7 @@ test "router discovery replaces only its provider slice" {try std.testing.expect(pricing.providerModelInTable("codegraff", "kimi-k3"));try std.testing.expect(!pricing.providerModelInTable("codegraff", "claude-opus-4.8"));try std.testing.expect(pricing.providerModelInTable("anthropic", "claude-opus-4-8"));- try std.testing.expect(pricing.providerModelInTable("codex", "gpt-5.6-sol"));+ try std.testing.expect(pricing.providerModelInTable("codex", "gpt-6-sol"));}test "startup catalog loads fan out concurrently with Kimi" {@@ -450,7 +450,7 @@ test "providerFor (#377): family-prefixed spelling routes to the direct providertry std.testing.expectEqualStrings("kimi", p.id);try std.testing.expectEqualStrings("k3", p.model);// Exact catalog names keep absolute priority over the family alias.- try std.testing.expectEqualStrings("gpt-5.6-sol", (try all.providerFor("gpt-5.6-sol")).model);+ try std.testing.expectEqualStrings("gpt-6-sol", (try all.providerFor("gpt-6-sol")).model);// Without the kimi credential, Moonshot's platform id `kimi-k3` is an// exact catalog row — not the gateway.var values: [provider.provider_specs.len]?[]const u8 = @splat("k");@@ -499,11 +499,11 @@ test "xAI defaults to the Responses wire; GRAFF_XAI_WIRE=chat opts out (#502)" {try std.testing.expectEqual(Provider.Kind.responses, moved.kind);try std.testing.expectEqualStrings(provider.xai_responses_url, moved.url);// codex keeps in-stream compaction — never the explicit endpoint.- const codex = try all.providerById("codex", "gpt-5.6-sol");+ const codex = try all.providerById("codex", "gpt-6-sol");try std.testing.expect(codex.serverCompactUrl() == null);// every other provider is untouched by the knob: openai keeps its native// Responses wire (default since v0.0.250) and its own endpoint.- const oai = try all.providerById("openai", "gpt-5.6");+ const oai = try all.providerById("openai", "gpt-6-sol");try std.testing.expectEqual(Provider.Kind.responses, oai.kind);try std.testing.expect(std.mem.indexOf(u8, oai.url, "api.openai.com") != null);}diff --git a/src/schema_agents.zig b/src/schema_agents.zigindex 8ba417a2..7d48bebf 100644--- a/src/schema_agents.zig+++ b/src/schema_agents.zig@@ -5,7 +5,7 @@ pub const subagent_spec = ToolSpec{.name = "subagent",.desc = "Delegate a sidecar task; children have file, shell, codedb and skill tools, no parent context, and cannot spawn children. Brief once with context, prompt, established_facts, scope and deliverable. Keep critical-path work local; use disjoint write sets for parallel tasks. Do not set model without a user request or task-specific reason. agent selects a persona; system_prompt overrides it. retained=true preserves history and workspace for follow-up; otherwise the worker is ephemeral. Interactive calls run in background by default; run_in_background=false waits for the child's report on every surface. Headless calls wait by default. agent_message queues feedback without starting a turn; subagent_resume continues a completed worker. agent_output fetches background results; wait_ms>0 waits in headless mode. Do not poll.",.schema =- \\{"type": "object", "properties": {"description": {"type": "string", "description": "Short label for logs, 3-5 words"}, "prompt": {"type": "string", "description": "Numbered steps and search hints; the complete task. Optional context/established_facts/scope/deliverable render as headed sections around this"}, "context": {"type": "string", "description": "Optional: repo and hard constraints the child must not re-derive"}, "established_facts": {"type": "string", "description": "Optional: observed facts, paths, and line numbers the child must treat as given"}, "scope": {"type": "string", "description": "Optional: what not to touch or broaden into"}, "deliverable": {"type": "string", "description": "Optional: required report shape; default is files changed, verified, skipped, open questions"}, "agent": {"type": "string", "description": "Optional: a named agent type (reviewer, researcher, implementer, skeptic, or a .harness/agents/ name) whose persona the child runs with"}, "system_prompt": {"type": "string", "description": "Optional: replace the child's system prompt with a custom one (overrides agent)"}, "model": {"type": "string", "description": "Optional: run THIS child on an exact model name available on the current provider (e.g. \"gpt-5.6-luna\"). Highest precedence — beats the persona's own pin and the session default. Ignored (spawn still runs on the session default, with a trace note) if the name is unknown, ambiguous, or not served by this provider — except that a logged-in flat-rate subscription serving the exact name honors it (sub-first routing; the login is the standing consent). For a portable 'cheapest seat' ask, tier is still the better lever."}, "tier": {"type": "string", "enum": ["frontier", "mid", "small"], "description": "Optional: run THIS child on a rung of the current provider's model ladder instead of an exact name — frontier (planner/judge class), mid (reviewers, implementers, researchers), small (mechanical transform/extract/label). Prefer this over model: it stays correct when the root model changes. If the provider has no ladder or no model at that rung, sub-first routing seats the child on a logged-in flat-rate subscription's rung when one exists (no login → the pin is ignored); model wins if both are given."}, "effort": {"type": "string", "enum": ["low", "medium", "high", "xhigh", "max", "none"], "description": "Optional: reasoning effort for THIS child — beats the persona's effort: frontmatter; unpinned children run at medium. An axis independent of model/tier: an effort-only override keeps the persona's model pin. none disables thinking only on supported binary-thinking routes and is rejected before child inference elsewhere. An off-vocabulary value is ignored with a trace note."}, "isolation": {"type": "string", "enum": ["shared_cwd", "worktree"], "description": "Optional: independent / fan-out children default to \"worktree\" (own branch + checkout; clean unchanged trees are removed unless retained=true; dirty or uniquely committed trees are kept + reported). Use \"shared_cwd\" only for same-branch collaboration (review + fix, a pipeline). isolation_fallback:true is the only way a failed git worktree add may share the caller tree."}, "isolation_fallback": {"type": "boolean", "description": "Optional: if isolation:\"worktree\" fails to set up (not a git repo, git error), run in the shared working tree instead of failing the spawn. Default false (fails the spawn on setup failure)."}, "retained": {"type": "boolean", "description": "Optional: persist conversation and workspace for subagent_resume (default false)."}, "run_in_background": {"type": "boolean", "description": "Optional: true starts asynchronously and immediately returns an agent id; false explicitly waits for the child report on every surface. Defaults to true in interactive sessions and false in headless sessions. Do not poll; agent_output(wait_ms>0) blocks until it finishes. A spawn at the live concurrency cap is refused; do not spawn a child to clean up a finished worktree."}}, "required": ["description", "prompt"]}+ \\{"type": "object", "properties": {"description": {"type": "string", "description": "Short label for logs, 3-5 words"}, "prompt": {"type": "string", "description": "Numbered steps and search hints; the complete task. Optional context/established_facts/scope/deliverable render as headed sections around this"}, "context": {"type": "string", "description": "Optional: repo and hard constraints the child must not re-derive"}, "established_facts": {"type": "string", "description": "Optional: observed facts, paths, and line numbers the child must treat as given"}, "scope": {"type": "string", "description": "Optional: what not to touch or broaden into"}, "deliverable": {"type": "string", "description": "Optional: required report shape; default is files changed, verified, skipped, open questions"}, "agent": {"type": "string", "description": "Optional: a named agent type (reviewer, researcher, implementer, skeptic, or a .harness/agents/ name) whose persona the child runs with"}, "system_prompt": {"type": "string", "description": "Optional: replace the child's system prompt with a custom one (overrides agent)"}, "model": {"type": "string", "description": "Optional: run THIS child on an exact model name available on the current provider (e.g. \"gpt-6-luna\"). Highest precedence — beats the persona's own pin and the session default. Ignored (spawn still runs on the session default, with a trace note) if the name is unknown, ambiguous, or not served by this provider — except that a logged-in flat-rate subscription serving the exact name honors it (sub-first routing; the login is the standing consent). For a portable 'cheapest seat' ask, tier is still the better lever."}, "tier": {"type": "string", "enum": ["frontier", "mid", "small"], "description": "Optional: run THIS child on a rung of the current provider's model ladder instead of an exact name — frontier (planner/judge class), mid (reviewers, implementers, researchers), small (mechanical transform/extract/label). Prefer this over model: it stays correct when the root model changes. If the provider has no ladder or no model at that rung, sub-first routing seats the child on a logged-in flat-rate subscription's rung when one exists (no login → the pin is ignored); model wins if both are given."}, "effort": {"type": "string", "enum": ["low", "medium", "high", "xhigh", "max", "none"], "description": "Optional: reasoning effort for THIS child — beats the persona's effort: frontmatter; unpinned children run at medium. An axis independent of model/tier: an effort-only override keeps the persona's model pin. none disables thinking only on supported binary-thinking routes and is rejected before child inference elsewhere. An off-vocabulary value is ignored with a trace note."}, "isolation": {"type": "string", "enum": ["shared_cwd", "worktree"], "description": "Optional: independent / fan-out children default to \"worktree\" (own branch + checkout; clean unchanged trees are removed unless retained=true; dirty or uniquely committed trees are kept + reported). Use \"shared_cwd\" only for same-branch collaboration (review + fix, a pipeline). isolation_fallback:true is the only way a failed git worktree add may share the caller tree."}, "isolation_fallback": {"type": "boolean", "description": "Optional: if isolation:\"worktree\" fails to set up (not a git repo, git error), run in the shared working tree instead of failing the spawn. Default false (fails the spawn on setup failure)."}, "retained": {"type": "boolean", "description": "Optional: persist conversation and workspace for subagent_resume (default false)."}, "run_in_background": {"type": "boolean", "description": "Optional: true starts asynchronously and immediately returns an agent id; false explicitly waits for the child report on every surface. Defaults to true in interactive sessions and false in headless sessions. Do not poll; agent_output(wait_ms>0) blocks until it finishes. A spawn at the live concurrency cap is refused; do not spawn a child to clean up a finished worktree."}}, "required": ["description", "prompt"]},};diff --git a/src/schema_protocol.zig b/src/schema_protocol.zigindex eb822f7a..f5d37177 100644--- a/src/schema_protocol.zig+++ b/src/schema_protocol.zig@@ -37,7 +37,7 @@ pub const flags =pub const json =\\{\\ "transport": "newline-delimited JSON over stdin/stdout (--json)",- \\ "request": "one JSON object per line: {\"type\":\"user\",\"text\":\"...\",\"images\":[{\"type\":\"image_url\",\"url\":\"https://...\"},{\"type\":\"image_base64\",\"media_type\":\"image/png\",\"data\":\"...\"}]} sends a native multimodal user turn (images optional, max 16). Only user input may set this field; {\"type\":\"review\",\"text\":\"target or instructions\"} runs one isolated read-only review turn with fresh model-visible history and no edits, delegation, workflows, or web access; {\"type\":\"answer\",\"text\":\"...\",\"cancelled\":false,\"call_id\":\"optional\"} answers an active ask_user event; {\"type\":\"cancel\"} interrupts an active turn; {\"type\":\"set_system_prompt\",\"text\":\"...\",\"append\":false} replaces (or with append=true extends) the system prompt between turns and acks with a system_prompt event; {\"type\":\"set_model\",\"model\":\"gpt-5.5\",\"provider\":\"codex\"}, {\"type\":\"compact\"}, {\"type\":\"set_mode\",\"mode\":\"plan|normal\"}, and {\"type\":\"set_agent\",\"id\":\"reviewer\"}, {\"type\":\"set_effort\",\"level\":\"low|medium|high|xhigh|max|ultra\"}, {\"type\":\"set_fast\",\"on\":true}, and {\"type\":\"set_ultracode\",\"on\":true} are live control requests acked by model/compact/mode/agent/effort/fast/ultracode events. For compatibility, set_model also accepts legacy {\"name\":\"provider model|model\"}. NOTE: the system prompt heads the KV-cached prefix, so any mutation invalidates the cache for the whole conversation (per Manus context-engineering lessons) — set it at spawn when possible and mutate only at task boundaries",+ \\ "request": "one JSON object per line: {\"type\":\"user\",\"text\":\"...\",\"images\":[{\"type\":\"image_url\",\"url\":\"https://...\"},{\"type\":\"image_base64\",\"media_type\":\"image/png\",\"data\":\"...\"}]} sends a native multimodal user turn (images optional, max 16). Only user input may set this field; {\"type\":\"review\",\"text\":\"target or instructions\"} runs one isolated read-only review turn with fresh model-visible history and no edits, delegation, workflows, or web access; {\"type\":\"answer\",\"text\":\"...\",\"cancelled\":false,\"call_id\":\"optional\"} answers an active ask_user event; {\"type\":\"cancel\"} interrupts an active turn; {\"type\":\"set_system_prompt\",\"text\":\"...\",\"append\":false} replaces (or with append=true extends) the system prompt between turns and acks with a system_prompt event; {\"type\":\"set_model\",\"model\":\"gpt-6-sol\",\"provider\":\"codex\"}, {\"type\":\"compact\"}, {\"type\":\"set_mode\",\"mode\":\"plan|normal\"}, and {\"type\":\"set_agent\",\"id\":\"reviewer\"}, {\"type\":\"set_effort\",\"level\":\"low|medium|high|xhigh|max|ultra\"}, {\"type\":\"set_fast\",\"on\":true}, and {\"type\":\"set_ultracode\",\"on\":true} are live control requests acked by model/compact/mode/agent/effort/fast/ultracode events. For compatibility, set_model also accepts legacy {\"name\":\"provider model|model\"}. NOTE: the system prompt heads the KV-cached prefix, so any mutation invalidates the cache for the whole conversation (per Manus context-engineering lessons) — set it at spawn when possible and mutate only at task boundaries",\\ "score_request": "{\"type\":\"score\",\"prompt_sha\":\"<16 hex>\",\"score\":0.7,\"notes\":\"...\",\"parent_sha\":\"<16 hex, optional>\"} appends an evaluation record for an agent/prompt variant to this run's file under .graff/trajectories (the aggregate append-only DGM-style archive; prompt_sha = first 8 bytes of SHA-256 of the system prompt, hex; parent_sha records which prompt this variant was mutated from — the lineage edge DGM parent selection counts children with) and acks with a score event",\\ "sequencing": "every event object below carries a monotonic per-session \"seq\" as its FIRST field: 1-based, gap-free, one id per emitted line. It survives a resume - the counter is persisted with the conversation as event_seq and restored by --resume, so a REPLACEMENT process continues the numbering instead of reissuing ids a consumer already saw. `graff serve` forwards the child's seq unchanged and uses it for ?from=N replay",\\ "events": [diff --git a/src/scoring.zig b/src/scoring.zigindex 3ca4c9f1..68a3babd 100644--- a/src/scoring.zig+++ b/src/scoring.zig@@ -39,10 +39,12 @@ pub fn providerClass(model: []const u8) []const u8 {.{ .needle = "-mini", .tier = "small" }, // -mini suffix, not "minimax"/"gemini".{ .needle = "lite", .tier = "small" },.{ .needle = "nano", .tier = "small" },- // gpt-5.x rungs (#291): family-agnostic like "haiku"/"flash" so a- // future gpt-5.7-terra keeps its tier; must precede "gpt-5".+ // GPT rungs (#291): family-agnostic like "haiku"/"flash" so a later+ // generation keeps its tier; must precede "gpt-6"/"gpt-5". Sol is the+ // mid rung under Astra on the GPT-6 ladder..{ .needle = "terra", .tier = "mid" },.{ .needle = "luna", .tier = "small" },+ .{ .needle = "-sol", .tier = "mid" },.{ .needle = "opus", .tier = "frontier" },.{ .needle = "gpt-6", .tier = "frontier" }, // astra and later GPT-6 flagships.{ .needle = "gpt-5", .tier = "frontier" }, // sol and bare gpt-5.x stay frontier@@ -261,10 +263,10 @@ test "score signing message is canonical and cross-language stable" {test "providerClass buckets models by capability tier" {try std.testing.expectEqualStrings("frontier", providerClass("claude-opus-4-8"));try std.testing.expectEqualStrings("frontier", providerClass("gpt-5.5"));- try std.testing.expectEqualStrings("frontier", providerClass("gpt-5.6-sol"));try std.testing.expectEqualStrings("frontier", providerClass("gpt-6-astra"));- try std.testing.expectEqualStrings("mid", providerClass("gpt-5.6-terra")); // rung needle beats "gpt-5"- try std.testing.expectEqualStrings("small", providerClass("gpt-5.6-luna"));+ try std.testing.expectEqualStrings("mid", providerClass("gpt-6-sol")); // rung needle beats "gpt-6"+ try std.testing.expectEqualStrings("mid", providerClass("gpt-6.1-sol"));+ try std.testing.expectEqualStrings("small", providerClass("gpt-6-luna"));try std.testing.expectEqualStrings("frontier", providerClass("deepseek-v4-pro"));try std.testing.expectEqualStrings("frontier", providerClass("grok-4.3"));try std.testing.expectEqualStrings("small", providerClass("claude-haiku-4-5"));diff --git a/src/subagent_mimo_tests.zig b/src/subagent_mimo_tests.zigindex b3b5bfdd..eb23b326 100644--- a/src/subagent_mimo_tests.zig+++ b/src/subagent_mimo_tests.zig@@ -35,8 +35,8 @@ test "MiMo small workers stay on Flash despite a Luna subscription" {const inherited = selection.resolveSubagentProvider(keys, base, null, null, false, false).?;try std.testing.expectEqualStrings("mimo-v2.6-flash", inherited.model);// An exact human pin still wins; this is a default, not a model ban.- const exact = pin.forSpawn(base, request(arena.allocator(), "{\"model\":\"gpt-5.6-luna\"}"), true);- try std.testing.expectEqualStrings("gpt-5.6-luna", exact.provider.?.model);+ const exact = pin.forSpawn(base, request(arena.allocator(), "{\"model\":\"gpt-6-luna\"}"), true);+ try std.testing.expectEqualStrings("gpt-6-luna", exact.provider.?.model);try std.testing.expect(selection.resolveSubagentProvider(keys, base.withModel("mimo-v2.6-flash"), null, null, false, false) == null);}@@ -120,7 +120,7 @@ test "MiMo routing does not cross to a metered provider without an explicit requdefer bench.g_keys = saved_keys;var keys: provider.Keys = .{ .values = @splat("test-key") };bench.g_keys = &keys;- const base = try keys.providerById("codex", "gpt-5.6-sol");+ const base = try keys.providerById("codex", "gpt-6-sol");try std.testing.expectError(error.CrossProviderConsentRequired, selection.subagentProvider(keys, base, "xiaomi", "mimo-v2.6-flash", false));const selected = try selection.subagentProvider(keys, base, "xiaomi", "mimo-v2.6-flash", true);try std.testing.expectEqualStrings("xiaomi", selected.id);diff --git a/src/subagent_pin_tests.zig b/src/subagent_pin_tests.zigindex b222e02f..5c1801f3 100644--- a/src/subagent_pin_tests.zig+++ b/src/subagent_pin_tests.zig@@ -21,7 +21,7 @@ fn obj(a: Allocator, s: []const u8) std.json.ObjectMap {/// credentials; withModel only ever reads `id`/`api_key`/`account`/`source`/// off it.fn codexBase() Provider {- return .{ .id = "codex", .kind = .responses, .auth = .bearer, .url = "https://example.invalid", .api_key = "k", .model = "gpt-5.6-sol", .context = 272_000 };+ return .{ .id = "codex", .kind = .responses, .auth = .bearer, .url = "https://example.invalid", .api_key = "k", .model = "gpt-6-astra", .context = 272_000 };}test "persona frontmatter parse: model/tier land on AgentType, a bad tier is dropped" {@@ -37,14 +37,14 @@ test "persona frontmatter parse: model/tier land on AgentType, a bad tier is drodefer fleet.g_agent_types = saved;fleet.g_agent_types = &.{.{ .name = "implementer", .desc = "", .prompt = "x", .tier = Tier.parse("mid") },- .{ .name = "reviewer", .desc = "", .prompt = "x", .model = "gpt-5.6-terra" },+ .{ .name = "reviewer", .desc = "", .prompt = "x", .model = "gpt-6-sol" },.{ .name = "typo", .desc = "", .prompt = "x", .tier = Tier.parse("cheap") }, // off-vocabulary.{ .name = "plain", .desc = "", .prompt = "x" },};try std.testing.expectEqual(Tier.mid, pin_mod.personaPin("implementer").tier.?);try std.testing.expect(pin_mod.personaPin("implementer").model == null);- try std.testing.expectEqualStrings("gpt-5.6-terra", pin_mod.personaPin("reviewer").model.?);+ try std.testing.expectEqualStrings("gpt-6-sol", pin_mod.personaPin("reviewer").model.?);// A persona whose `tier:` did not parse contributes nothing at all — the// spawn keeps the session default rather than inheriting a guess.try std.testing.expect(pin_mod.personaPin("typo").isNone());@@ -54,8 +54,8 @@ test "persona frontmatter parse: model/tier land on AgentType, a bad tier is drotry std.testing.expect(pin_mod.personaPin("").isNone());// …and the pin reaches a spawn that only names the persona.- try std.testing.expectEqualStrings("gpt-5.6-terra", pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"implementer\"}"), true).provider.?.model);- try std.testing.expectEqualStrings("gpt-5.6-terra", pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"reviewer\"}"), true).provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-sol", pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"implementer\"}"), true).provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-sol", pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"reviewer\"}"), true).provider.?.model);try std.testing.expect(pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"typo\"}"), true).provider == null);try std.testing.expect(pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"plain\"}"), true).provider == null);}@@ -72,12 +72,12 @@ test "researcher is the small/luna search seat on Codex, including Astra roots"try std.testing.expectEqual(Tier.small, pin_mod.personaPin("researcher").tier.?);const sol = pin_mod.forSpawn(codexBase(), obj(a, "{\"agent\":\"researcher\"}"), true);- try std.testing.expectEqualStrings("gpt-5.6-luna", sol.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", sol.provider.?.model);var astra = codexBase();astra.model = "gpt-6-astra";const from_astra = pin_mod.forSpawn(astra, obj(a, "{\"agent\":\"researcher\"}"), true);- try std.testing.expectEqualStrings("gpt-5.6-luna", from_astra.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", from_astra.provider.?.model);}test "spawn override resolution: exact name, alias, ladder rung, and no-op" {@@ -87,29 +87,29 @@ test "spawn override resolution: exact name, alias, ladder rung, and no-op" {const base = codexBase();// Exact catalog name.- const exact = pin_mod.forSpawn(base, obj(a, "{\"model\":\"gpt-5.6-luna\"}"), true);+ const exact = pin_mod.forSpawn(base, obj(a, "{\"model\":\"gpt-6-luna\"}"), true);try std.testing.expectEqual(pin_mod.Outcome.pinned, exact.outcome);- try std.testing.expectEqualStrings("gpt-5.6-luna", exact.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", exact.provider.?.model);try std.testing.expectEqualStrings("codex", exact.provider.?.id); // provider-local, alwaystry std.testing.expectEqualStrings("k", exact.provider.?.api_key); // same credential// The context window is re-derived for the new model, not inherited.try std.testing.expect(exact.provider.?.context != 0);// Abbreviation: the same resolver --subagent-model uses (unique substring).- const alias = pin_mod.forSpawn(base, obj(a, "{\"model\":\" 5.6-terra \"}"), true); // whitespace trimmed- try std.testing.expectEqualStrings("gpt-5.6-terra", alias.provider.?.model);+ const alias = pin_mod.forSpawn(base, obj(a, "{\"model\":\" 6.1-sol \"}"), true); // whitespace trimmed+ try std.testing.expectEqualStrings("gpt-6.1-sol", alias.provider.?.model);// Ladder rung instead of a name.const rung = pin_mod.forSpawn(base, obj(a, "{\"tier\":\"small\"}"), true);try std.testing.expectEqual(pin_mod.Outcome.pinned, rung.outcome);- try std.testing.expectEqualStrings("gpt-5.6-luna", rung.provider.?.model);- try std.testing.expectEqualStrings("gpt-5.6-terra", pin_mod.forSpawn(base, obj(a, "{\"tier\":\"mid\"}"), true).provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", rung.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-sol", pin_mod.forSpawn(base, obj(a, "{\"tier\":\"mid\"}"), true).provider.?.model);- // Codex frontier is Astra; a Sol child asking for frontier is a real pin.+ // Codex frontier is Astra: an Astra root asking for frontier, or naming+ // its own model, is a no-op.const flagship = pin_mod.forSpawn(base, obj(a, "{\"tier\":\"frontier\"}"), true);- try std.testing.expectEqual(pin_mod.Outcome.pinned, flagship.outcome);- try std.testing.expectEqualStrings("gpt-6-astra", flagship.provider.?.model);- const same = pin_mod.forSpawn(base, obj(a, "{\"model\":\"gpt-5.6-sol\"}"), true);+ try std.testing.expectEqual(pin_mod.Outcome.same, flagship.outcome);+ const same = pin_mod.forSpawn(base, obj(a, "{\"model\":\"gpt-6-astra\"}"), true);try std.testing.expectEqual(pin_mod.Outcome.same, same.outcome);try std.testing.expect(same.provider == null);@@ -127,36 +127,36 @@ test "precedence: spawn param > persona pin > session default" {const saved = fleet.g_agent_types;defer fleet.g_agent_types = saved;fleet.g_agent_types = &.{- .{ .name = "pinned-frontier", .desc = "", .prompt = "x", .model = "gpt-5.6-sol" },+ .{ .name = "pinned-frontier", .desc = "", .prompt = "x", .model = "gpt-6-astra" },.{ .name = "pinned-mid", .desc = "", .prompt = "x", .tier = .mid },- .{ .name = "both", .desc = "", .prompt = "x", .model = "gpt-5.6-terra", .tier = .small },+ .{ .name = "both", .desc = "", .prompt = "x", .model = "gpt-6-sol", .tier = .small },};// The session default is whatever the caller already resolved — here the// #291 ladder's answer for a sol root, i.e. terra.- const session_default: Provider = .{ .id = "codex", .kind = .responses, .auth = .bearer, .url = "", .api_key = "k", .model = "gpt-5.6-terra", .context = 272_000 };+ const session_default: Provider = .{ .id = "codex", .kind = .responses, .auth = .bearer, .url = "", .api_key = "k", .model = "gpt-6-sol", .context = 272_000 };// 1. An explicit spawn param beats the persona, in BOTH directions —// including lowering a persona that pinned itself to the flagship,// which is the case a merge-instead-of-replace rule would break.try std.testing.expectEqualStrings(- "gpt-5.6-luna",+ "gpt-6-luna",pin_mod.forSpawn(session_default, obj(a, "{\"agent\":\"pinned-frontier\",\"tier\":\"small\"}"), true).provider.?.model,);try std.testing.expectEqualStrings(- "gpt-5.6-sol",- pin_mod.forSpawn(session_default, obj(a, "{\"agent\":\"pinned-mid\",\"model\":\"gpt-5.6-sol\"}"), true).provider.?.model,+ "gpt-6-astra",+ pin_mod.forSpawn(session_default, obj(a, "{\"agent\":\"pinned-mid\",\"model\":\"gpt-6-astra\"}"), true).provider.?.model,);// 2. No spawn param → the persona's pin applies over the session default.try std.testing.expectEqualStrings(- "gpt-5.6-sol",+ "gpt-6-astra",pin_mod.forSpawn(session_default, obj(a, "{\"agent\":\"pinned-frontier\"}"), true).provider.?.model,);// 3. Neither → the session default is kept untouched.try std.testing.expect(pin_mod.forSpawn(session_default, obj(a, "{\"prompt\":\"y\"}"), true).provider == null);// Within one level, an exact model beats a tier (both on the call…try std.testing.expectEqualStrings(- "gpt-5.6-sol",- pin_mod.forSpawn(session_default, obj(a, "{\"model\":\"gpt-5.6-sol\",\"tier\":\"small\"}"), true).provider.?.model,+ "gpt-6-astra",+ pin_mod.forSpawn(session_default, obj(a, "{\"model\":\"gpt-6-astra\",\"tier\":\"small\"}"), true).provider.?.model,);// …and both on the persona).try std.testing.expectEqual(pin_mod.Outcome.same, pin_mod.forSpawn(session_default, obj(a, "{\"agent\":\"both\"}"), true).outcome);@@ -254,14 +254,14 @@ test "sub-first routing: a logged-in flat-rate sub outranks metered for explicit// does not serve falls through to a logged-in sub that serves it exactly// — the same standing consent as the tier path, rescuing a pin that used// to silently no-op.- const mrouted = pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"gpt-5.6-luna\"}"), true);+ const mrouted = pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"gpt-6-luna\"}"), true);try std.testing.expectEqual(pin_mod.Outcome.model_sub_routed, mrouted.outcome);try std.testing.expectEqualStrings("codex", mrouted.provider.?.id);- try std.testing.expectEqualStrings("gpt-5.6-luna", mrouted.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", mrouted.provider.?.model);try std.testing.expect(mrouted.outcome.describe().len > 0);// …under the identical gates: an explicit --subagent-provider// (sub_ok=false) forbids the hop…- try std.testing.expectEqual(pin_mod.Outcome.unknown_model, pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"gpt-5.6-luna\"}"), false).outcome);+ try std.testing.expectEqual(pin_mod.Outcome.unknown_model, pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"gpt-6-luna\"}"), false).outcome);// …and the match is strictly exact/alias — a substring must NOT cross a// provider boundary to find a model the pin did not name.try std.testing.expectEqual(pin_mod.Outcome.unknown_model, pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"luna\"}"), true).outcome);@@ -271,7 +271,7 @@ test "sub-first routing: a logged-in flat-rate sub outranks metered for explicitconst nologin = pin_mod.forSpawn(dsv, obj(a, "{\"tier\":\"small\"}"), true);try std.testing.expectEqual(pin_mod.Outcome.pinned, nologin.outcome);try std.testing.expectEqualStrings("deepseek-v4-flash", nologin.provider.?.model);- try std.testing.expectEqual(pin_mod.Outcome.unknown_model, pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"gpt-5.6-luna\"}"), true).outcome);+ try std.testing.expectEqual(pin_mod.Outcome.unknown_model, pin_mod.forSpawn(dsv, obj(a, "{\"model\":\"gpt-6-luna\"}"), true).outcome);// Same family through a codegraff login: stay on gateway flash, not luna.bench.g_keys = &keys;@@ -294,14 +294,14 @@ test "exact pin: the child's own provider wins over a logged-in sub serving theif (std.mem.eql(u8, spec.id, "codex")) keys.values[i] = "tok";}bench.g_keys = &keys;- // openai's own catalog serves gpt-5.6-luna — the pin resolves locally+ // openai's own catalog serves gpt-6-luna — the pin resolves locally// (.pinned), never hopping to the codex sub that serves the same name:// a locally-served pin crosses no boundary and moves no billing.- const oai: Provider = .{ .id = "openai", .kind = .openai, .auth = .bearer, .url = "", .api_key = "k", .model = "gpt-5.6", .context = 1_050_000 };- const got = pin_mod.forSpawn(oai, obj(a, "{\"model\":\"gpt-5.6-luna\"}"), true);+ const oai: Provider = .{ .id = "openai", .kind = .openai, .auth = .bearer, .url = "", .api_key = "k", .model = "gpt-6-astra", .context = 1_050_000 };+ const got = pin_mod.forSpawn(oai, obj(a, "{\"model\":\"gpt-6-luna\"}"), true);try std.testing.expectEqual(pin_mod.Outcome.pinned, got.outcome);try std.testing.expectEqualStrings("openai", got.provider.?.id);- try std.testing.expectEqualStrings("gpt-5.6-luna", got.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", got.provider.?.model);}test "two logins split the tiers: k3 is mid, luna is the mechanical rung (#471)" {@@ -328,7 +328,7 @@ test "two logins split the tiers: k3 is mid, luna is the mechanical rung (#471)"const want = [_]struct { tier: []const u8, pid: []const u8, model: []const u8 }{.{ .tier = "frontier", .pid = "codex", .model = "gpt-6-astra" },.{ .tier = "mid", .pid = "kimi", .model = "k3" },- .{ .tier = "small", .pid = "codex", .model = "gpt-5.6-luna" },+ .{ .tier = "small", .pid = "codex", .model = "gpt-6-luna" },};for (want) |w| {const body = std.fmt.allocPrint(a, "{{\"tier\":\"{s}\"}}", .{w.tier}) catch unreachable;@@ -427,7 +427,7 @@ test "without a login, a pin never crosses a provider boundary" {.{ .id = "deepseek", .kind = .openai, .auth = .bearer, .url = "", .api_key = "k", .model = "deepseek-v4-pro", .context = 128_000 },};for (bases) |base| {- for ([_][]const u8{ "{\"tier\":\"mid\"}", "{\"tier\":\"small\"}", "{\"model\":\"gpt-5.6-luna\"}", "{\"model\":\"claude-haiku-4-5\"}" }) |args| {+ for ([_][]const u8{ "{\"tier\":\"mid\"}", "{\"tier\":\"small\"}", "{\"model\":\"gpt-6-luna\"}", "{\"model\":\"claude-haiku-4-5\"}" }) |args| {const got = pin_mod.forSpawn(base, obj(a, args), true);const p = got.provider orelse continue;try std.testing.expectEqualStrings(base.id, p.id);@@ -445,8 +445,8 @@ test "promotion carries a persona's model/tier policy, and it round-trips" {defer fleet.g_agent_types = saved;fleet.g_agent_types = &.{.{ .name = "worker", .desc = "", .prompt = "old genome", .isolation = .worktree, .tier = .mid },- .{ .name = "exact", .desc = "", .prompt = "old genome", .model = "gpt-5.6-luna" },- .{ .name = "luna-max", .desc = "", .prompt = "old genome", .model = "gpt-5.6-luna", .effort = .max },+ .{ .name = "exact", .desc = "", .prompt = "old genome", .model = "gpt-6-luna" },+ .{ .name = "luna-max", .desc = "", .prompt = "old genome", .model = "gpt-6-luna", .effort = .max },.{ .name = "bare", .desc = "", .prompt = "old genome" },};@@ -457,10 +457,10 @@ test "promotion carries a persona's model/tier policy, and it round-trips" {const policy = pin_mod.personaPolicyFrontmatter(a, "worker");try std.testing.expectEqualStrings("isolation: worktree\ntier: mid\n", policy);- try std.testing.expectEqualStrings("model: gpt-5.6-luna\n", pin_mod.personaPolicyFrontmatter(a, "exact"));+ try std.testing.expectEqualStrings("model: gpt-6-luna\n", pin_mod.personaPolicyFrontmatter(a, "exact"));// #292 follow-up: the effort pin is policy too — promote must not un-pin// it, and the emitted line round-trips through the loader's parse.- try std.testing.expectEqualStrings("model: gpt-5.6-luna\neffort: max\n", pin_mod.personaPolicyFrontmatter(a, "luna-max"));+ try std.testing.expectEqualStrings("model: gpt-6-luna\neffort: max\n", pin_mod.personaPolicyFrontmatter(a, "luna-max"));var round_eff: ?pin_mod.Effort = null;var eff_lines = std.mem.tokenizeScalar(u8, pin_mod.personaPolicyFrontmatter(a, "luna-max"), '\n');while (eff_lines.next()) |ln| {@@ -489,8 +489,8 @@ test "promotion carries a persona's model/tier policy, and it round-trips" {test "withModel: rebuilds the model-derived fields, keeps the credential (#292)" {const base = codexBase();- const luna = base.withModel("gpt-5.6-luna");- try std.testing.expectEqualStrings("gpt-5.6-luna", luna.model);+ const luna = base.withModel("gpt-6-luna");+ try std.testing.expectEqualStrings("gpt-6-luna", luna.model);try std.testing.expectEqualStrings("codex", luna.id);try std.testing.expectEqualStrings("k", luna.api_key);try std.testing.expectEqual(base.kind, luna.kind);@@ -521,14 +521,14 @@ test "effort pin: spawn param, persona frontmatter, and axis independence (#292defer fleet.g_agent_types = saved;fleet.g_agent_types = &.{// The tweet-shaped persona: an exact model AND a depth — "Luna Max".- .{ .name = "luna-worker", .desc = "", .prompt = "x", .model = "gpt-5.6-luna", .effort = .max },+ .{ .name = "luna-worker", .desc = "", .prompt = "x", .model = "gpt-6-luna", .effort = .max },.{ .name = "thinker", .desc = "", .prompt = "x", .effort = .xhigh },};// Persona effort reaches a spawn that only names the persona, riding// alongside the persona's model pin.const luna = pin_mod.forSpawn(base, obj(a, "{\"agent\":\"luna-worker\"}"), true);- try std.testing.expectEqualStrings("gpt-5.6-luna", luna.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", luna.provider.?.model);try std.testing.expectEqual(pin_mod.Effort.max, luna.effort.?);try std.testing.expectEqual(pin_mod.EffortOutcome.pinned, luna.effort_outcome);@@ -538,11 +538,11 @@ test "effort pin: spawn param, persona frontmatter, and axis independence (#292// AXIS INDEPENDENCE — an effort-only call keeps the persona's model pin…const eff_only = pin_mod.forSpawn(base, obj(a, "{\"agent\":\"luna-worker\",\"effort\":\"high\"}"), true);- try std.testing.expectEqualStrings("gpt-5.6-luna", eff_only.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", eff_only.provider.?.model);try std.testing.expectEqual(pin_mod.Effort.high, eff_only.effort.?);// …and a model-only call keeps the persona's effort.- const mdl_only = pin_mod.forSpawn(base, obj(a, "{\"agent\":\"luna-worker\",\"model\":\"gpt-5.6-terra\"}"), true);- try std.testing.expectEqualStrings("gpt-5.6-terra", mdl_only.provider.?.model);+ const mdl_only = pin_mod.forSpawn(base, obj(a, "{\"agent\":\"luna-worker\",\"model\":\"gpt-6-sol\"}"), true);+ try std.testing.expectEqualStrings("gpt-6-sol", mdl_only.provider.?.model);try std.testing.expectEqual(pin_mod.Effort.max, mdl_only.effort.?);// An effort pin alone never touches the model: provider stays null.diff --git a/src/subagent_selection.zig b/src/subagent_selection.zigindex 501922c7..ade30e91 100644--- a/src/subagent_selection.zig+++ b/src/subagent_selection.zig@@ -63,10 +63,9 @@ pub fn modelForProvider(provider_id: []const u8, query: []const u8) ?[]const u8/// for this provider's ladder — an off-ladder or unrecognized root model/// returns null rather than guessing at the nearest rung.///-/// GPT-6 Astra stays on Astra. Demoting it onto gpt-5.6-sol/terra is a-/// SWE-bench regression (Astra-low beats Sol-high). Unpinned workers inherit;-/// `tier: small` still seats luna for cheap search. A Sol root still drops-/// one rung onto terra.+/// GPT-6 roots keep their model: demoting Astra onto Sol is a SWE-bench+/// regression (Astra-low beats Sol-high). Unpinned workers inherit;+/// `tier: mid` / `tier: small` still seat Sol / Luna when asked.fn defaultLadderModel(root: provider_mod.Provider) ?[]const u8 {const ladder = tier_ladder.forModel(root.id, root.model) orelse return null;if (std.mem.startsWith(u8, root.model, "gpt-6")) return null;@@ -76,8 +75,7 @@ fn defaultLadderModel(root: provider_mod.Provider) ?[]const u8 {return null;}}- if (std.mem.eql(u8, root.model, ladder.frontier) or std.mem.eql(u8, root.model, "gpt-5.6-sol"))- return ladder.mid orelse ladder.small;+ if (std.mem.eql(u8, root.model, ladder.frontier)) return ladder.mid orelse ladder.small;if (ladder.mid) |mid| {if (std.mem.eql(u8, root.model, mid)) return ladder.small;}@@ -163,10 +161,10 @@ test "worker selection stays provider-local unless explicitly allowed" {if (std.mem.eql(u8, spec.id, "codex") orstd.mem.eql(u8, spec.id, "kimi")) value.* = "test-token";}- const root = try keys.providerById("codex", "gpt-5.6-sol");- const terra = try subagentProvider(keys, root, null, "5.6-terra", false);- try std.testing.expectEqualStrings("codex", terra.id);- try std.testing.expectEqualStrings("gpt-5.6-terra", terra.model);+ const root = try keys.providerById("codex", "gpt-6-astra");+ const luna = try subagentProvider(keys, root, null, "gpt-6-luna", false);+ try std.testing.expectEqualStrings("codex", luna.id);+ try std.testing.expectEqualStrings("gpt-6-luna", luna.model);try std.testing.expectError(error.CrossProviderConsentRequired,subagentProvider(keys, root, "kimi", "k3", false),@@ -176,7 +174,7 @@ test "worker selection stays provider-local unless explicitly allowed" {try std.testing.expectEqualStrings("k3", kimi.model);try std.testing.expectError(error.ModelNotOnProvider,- subagentProvider(keys, root, null, "gpt-5.6", false),+ subagentProvider(keys, root, null, "deepseek-v4-pro", false),);try std.testing.expectError(error.UnknownModel,@@ -194,14 +192,12 @@ test "defaultLadderModel: descends one rung per provider, bottom rung inherits"return .{ .id = id, .kind = .openai, .auth = .bearer, .url = "", .api_key = "", .model = model, .context = 0 };}}.p;- // codex: sol -> terra -> luna -> (bottom, inherit)- try std.testing.expectEqualStrings("gpt-5.6-terra", defaultLadderModel(mk("codex", "gpt-5.6-sol")).?);- try std.testing.expect(defaultLadderModel(mk("codex", "gpt-6-astra")) == null);- try std.testing.expectEqualStrings("gpt-5.6-luna", defaultLadderModel(mk("codex", "gpt-5.6-terra")).?);- try std.testing.expect(defaultLadderModel(mk("codex", "gpt-5.6-luna")) == null);- // openai: same shape, sibling names- try std.testing.expectEqualStrings("gpt-5.6-terra", defaultLadderModel(mk("openai", "gpt-5.6")).?);- try std.testing.expect(defaultLadderModel(mk("openai", "gpt-6-astra")) == null);+ // codex / openai: GPT-6 roots keep their model (Astra-low beats Sol-high);+ // tier pins still reach Sol and Luna.+ for ([_][]const u8{ "codex", "openai" }) |id| {+ for ([_][]const u8{ "gpt-6-astra", "gpt-6-sol", "gpt-6-luna" }) |model|+ try std.testing.expect(defaultLadderModel(mk(id, model)) == null);+ }// anthropic: opus-5-5 -> sonnet-5-5 -> (bottom) (ADR 0219). #471: a rung// must be a cheaper seat, so older opus generations are not rungs, and a// root still on one is off-ladder and inherits.@@ -227,11 +223,6 @@ test "default ladder: resolves the mid sibling when no flags are given" {if (std.mem.eql(u8, spec.id, "codex") or std.mem.eql(u8, spec.id, "anthropic"))value.* = "test-token";}- const codex_root = try keys.providerById("codex", "gpt-5.6-sol");- const worker = resolveSubagentProvider(keys, codex_root, null, null, false, false).?;- try std.testing.expectEqualStrings("codex", worker.id); // provider-local, unpinned- try std.testing.expectEqualStrings("gpt-5.6-terra", worker.model);-const astra_root = try keys.providerById("codex", "gpt-6-astra");try std.testing.expect(resolveSubagentProvider(keys, astra_root, null, null, false, false) == null);@@ -247,7 +238,7 @@ test "default ladder: bottom-rung and off-ladder roots inherit (resolve to null)if (std.mem.eql(u8, spec.id, "codex") or std.mem.eql(u8, spec.id, "xai"))value.* = "test-token";}- const luna_root = try keys.providerById("codex", "gpt-5.6-luna");+ const luna_root = try keys.providerById("codex", "gpt-6-luna");try std.testing.expect(resolveSubagentProvider(keys, luna_root, null, null, false, false) == null);const xai_root = try keys.providerById("xai", "grok-4.3"); // unlisted family, never guess@@ -257,9 +248,10 @@ test "default ladder: bottom-rung and off-ladder roots inherit (resolve to null)test "--no-subagent-tier opts out of the default ladder back to plain inherit" {var keys: provider_mod.Keys = .{ .values = @splat(null) };for (provider_mod.provider_specs, &keys.values) |spec, *value| {- if (std.mem.eql(u8, spec.id, "codex")) value.* = "test-token";+ if (std.mem.eql(u8, spec.id, "anthropic")) value.* = "test-token";}- const root = try keys.providerById("codex", "gpt-5.6-sol");+ const root = try keys.providerById("anthropic", "claude-opus-5-5");+ try std.testing.expect(resolveSubagentProvider(keys, root, null, null, false, false) != null);try std.testing.expect(resolveSubagentProvider(keys, root, null, null, false, true) == null);}@@ -268,10 +260,10 @@ test "explicit --subagent-model still wins over the default ladder" {for (provider_mod.provider_specs, &keys.values) |spec, *value| {if (std.mem.eql(u8, spec.id, "codex")) value.* = "test-token";}- const root = try keys.providerById("codex", "gpt-5.6-sol");- // The ladder default would be terra; an explicit pin to luna wins.- const pinned = resolveSubagentProvider(keys, root, null, "gpt-5.6-luna", false, false).?;- try std.testing.expectEqualStrings("gpt-5.6-luna", pinned.model);+ const root = try keys.providerById("codex", "gpt-6-astra");+ // The ladder default would inherit Astra; an explicit pin to luna wins.+ const pinned = resolveSubagentProvider(keys, root, null, "gpt-6-luna", false, false).?;+ try std.testing.expectEqualStrings("gpt-6-luna", pinned.model);}test "default ladder never crosses a provider boundary implicitly" {@@ -283,8 +275,8 @@ test "default ladder never crosses a provider boundary implicitly" {}const Case = struct { id: []const u8, model: []const u8 };for ([_]Case{- .{ .id = "codex", .model = "gpt-5.6-sol" },- .{ .id = "openai", .model = "gpt-5.6" },+ .{ .id = "codex", .model = "gpt-6-sol" },+ .{ .id = "openai", .model = "gpt-6-astra" },.{ .id = "anthropic", .model = "claude-opus-4-8" },.{ .id = "deepseek", .model = "deepseek-v4-pro" },}) |case| {@@ -298,13 +290,13 @@ test "ladder rungs vs providerClass: documented, intentional disagreement (#291)// #291 requires ladder tier labels to match scoring.providerClass()// output for the same models, "or report the discrepancy rather than// papering over it." The gpt family now agrees end-to-end with the- // ladder, like claude: "terra"/"luna" are tier-distinct needles in+ // ladder, like claude: "sol"/"luna" are tier-distinct needles in// providerClass (as opus/sonnet/haiku are), so pullElites and fleet- // propose events keyed on the class are no longer rung-blind — a terra- // root pulls "mid" elites, not elites grown on sol.- try std.testing.expectEqualStrings("frontier", @import("scoring.zig").providerClass("gpt-5.6-sol"));- try std.testing.expectEqualStrings("mid", @import("scoring.zig").providerClass("gpt-5.6-terra")); // ladder rung: mid- try std.testing.expectEqualStrings("small", @import("scoring.zig").providerClass("gpt-5.6-luna")); // ladder rung: small+ // propose events keyed on the class are no longer rung-blind — a sol+ // root pulls "mid" elites, not elites grown on astra.+ try std.testing.expectEqualStrings("frontier", @import("scoring.zig").providerClass("gpt-6-astra"));+ try std.testing.expectEqualStrings("mid", @import("scoring.zig").providerClass("gpt-6-sol")); // ladder rung: mid+ try std.testing.expectEqualStrings("small", @import("scoring.zig").providerClass("gpt-6-luna")); // ladder rung: smalltry std.testing.expectEqualStrings("frontier", @import("scoring.zig").providerClass("deepseek-v4-pro"));try std.testing.expectEqualStrings("small", @import("scoring.zig").providerClass("deepseek-v4-flash")); // ladder rung: small// Claude agrees end-to-end (opus/sonnet/haiku are tier-distinct needlesdiff --git a/src/subagent_tier_ladder.zig b/src/subagent_tier_ladder.zigindex 26abba01..9410a5cf 100644--- a/src/subagent_tier_ladder.zig+++ b/src/subagent_tier_ladder.zig@@ -12,7 +12,7 @@//! `frontier`/`mid`/`small` here are the ladder's OWN rung labels; they are//! NOT guaranteed to equal scoring.providerClass(name) for that literal//! model string — see the "ladder rungs vs providerClass" pinned test in-//! subagent_selection.zig: the gpt-5.6 family and DeepSeek flash now agree+//! subagent_selection.zig: the GPT-6 family and DeepSeek flash now agree//! end-to-end with providerClass.const std = @import("std");@@ -62,8 +62,8 @@ pub const TierLadder = struct {};pub const ladders = [_]TierLadder{- .{ .provider = "codex", .frontier = "gpt-6-astra", .mid = "gpt-5.6-terra", .small = "gpt-5.6-luna" },- .{ .provider = "openai", .frontier = "gpt-5.6", .mid = "gpt-5.6-terra", .small = "gpt-5.6-luna" },+ .{ .provider = "codex", .frontier = "gpt-6-astra", .mid = "gpt-6-sol", .small = "gpt-6-luna" },+ .{ .provider = "openai", .frontier = "gpt-6-astra", .mid = "gpt-6-sol", .small = "gpt-6-luna" },// #471: the rungs below frontier must be cheaper SEATS. opus-5-5 ($4/$20)// and sonnet-5-5 ($2/$10) are the current lineup (ADR 0219); descending to// an older opus saves nothing, and sonnet-5-5 halves both halves of the bill.@@ -87,7 +87,7 @@ pub const ladders = [_]TierLadder{/// Is `rung` a genuinely cheaper SEAT than `frontier` — strictly less $/MTok/// on the real price sheet? Unknown on either side answers true: an unpriced-/// model cannot be disproved (codex's `gpt-5.6-sol` has no row at all), and+/// model cannot be disproved (a model with no price row at all), and/// #291's descent must keep working there.////// #471: the bench sheet ranks by $/TASK, which folds the seat's rate together@@ -196,8 +196,8 @@ test "Tier.parse/modelFor: the rung vocabulary #292 pins against (#291 names)" {const codex = forProvider("codex").?;try std.testing.expectEqualStrings("gpt-6-astra", codex.modelFor(.frontier).?);- try std.testing.expectEqualStrings("gpt-5.6-terra", codex.modelFor(.mid).?);- try std.testing.expectEqualStrings("gpt-5.6-luna", codex.modelFor(.small).?);+ try std.testing.expectEqualStrings("gpt-6-sol", codex.modelFor(.mid).?);+ try std.testing.expectEqualStrings("gpt-6-luna", codex.modelFor(.small).?);// A family with no such rung answers null rather than the nearest rung.try std.testing.expectEqualStrings("deepseek-v4-flash", forProvider("deepseek").?.modelFor(.small).?);try std.testing.expectEqualStrings("deepseek-v4-flash", forProvider("codegraff").?.modelFor(.small).?);@@ -213,10 +213,10 @@ test "#471 a rung must be a cheaper SEAT, not merely a terser one" {try std.testing.expect(!cheaperSeat("claude-opus-5", "claude-fable-5"));// sonnet-5 is the real thing: $2/$10 against $5/$25, cheaper on both halves.try std.testing.expect(cheaperSeat("claude-opus-5", "claude-sonnet-5"));- // Unknown on either side cannot be disproved, and #291's descent has to- // keep working on providers whose models carry no price row at all- // (codex's gpt-5.6-sol is the live example).- try std.testing.expect(cheaperSeat("gpt-5.6-sol", "gpt-5.6-luna"));+ // The GPT-6 rungs are real descents; unknown on either side cannot be+ // disproved, so #291's descent keeps working on unpriced models.+ try std.testing.expect(cheaperSeat("gpt-6-astra", "gpt-6-sol"));+ try std.testing.expect(cheaperSeat("gpt-6-sol", "gpt-6-luna"));try std.testing.expect(cheaperSeat("claude-opus-5", "no-such-model"));}diff --git a/src/vision_ask_tests.zig b/src/vision_ask_tests.zigindex 7e3647d9..609b842e 100644--- a/src/vision_ask_tests.zig+++ b/src/vision_ask_tests.zig@@ -25,7 +25,7 @@ fn deepseek() Provider {}fn codex() Provider {- return .{ .id = "codex", .kind = .responses, .auth = .bearer, .url = "", .api_key = "k", .model = "gpt-5.6-sol", .context = 270_000 };+ return .{ .id = "codex", .kind = .responses, .auth = .bearer, .url = "", .api_key = "k", .model = "gpt-6-astra", .context = 270_000 };}/// A Keys table with `logged_in` providers holding a token, installed as the@@ -89,7 +89,7 @@ test "#380 re-route: an automatic seat that cannot see images moves to one thattry std.testing.expectEqual(policy.Source.vision_ask, ask.source);// Sub-first: the logged-in flat-rate codex subscription, cheapest rung.try std.testing.expectEqualStrings("codex", ask.pin.provider.?.id);- try std.testing.expectEqualStrings("gpt-5.6-luna", ask.pin.provider.?.model);+ try std.testing.expectEqualStrings("gpt-6-luna", ask.pin.provider.?.model);try std.testing.expectEqualStrings("vision-ask", ask.source.label());try std.testing.expect(ask.note() != null);@@ -202,7 +202,7 @@ test "#380 fast fail: no vision-capable model anywhere refuses the spawn, actiontest "#380 candidate search: sub-first, then provider-local under the cost ceiling" {// Ladder rungs bottom-up, so a re-route descends price rather than seizing// the frontier model.- try std.testing.expectEqualStrings("gpt-5.6-luna", va.visionModelFor("codex").?);+ try std.testing.expectEqualStrings("gpt-6-luna", va.visionModelFor("codex").?);try std.testing.expectEqualStrings("claude-sonnet-5-5", va.visionModelFor("anthropic").?);try std.testing.expect(va.visionModelFor("deepseek") == null); // no vision model at any rung@@ -219,7 +219,7 @@ test "#380 candidate search: sub-first, then provider-local under the cost ceiliwithKeys(&keys, &.{"codex"});const seat = va.visionSeat(deepseek()).?;try std.testing.expectEqualStrings("codex", seat.id);- try std.testing.expectEqualStrings("gpt-5.6-luna", seat.model);+ try std.testing.expectEqualStrings("gpt-6-luna", seat.model);// An anthropic base with no sub logged in resolves provider-locally, and// only because sonnet-5-5 is CHEAPER than the opus it replaces.@@ -328,8 +328,8 @@ test "#380 phase seat: a whole phase moves at once, and only an automatic one" {// uniformly, and reported as vision-ask rather than learned-policy.const moved = va.phaseSeat(ladder_seat, &image_tasks, false);try std.testing.expect(moved.vision);- try std.testing.expectEqualStrings("gpt-5.6-luna", moved.provider.model);- try std.testing.expectEqualStrings("gpt-5.6-luna", moved.pin.?.model); // every worker gets it+ try std.testing.expectEqualStrings("gpt-6-luna", moved.provider.model);+ try std.testing.expectEqualStrings("gpt-6-luna", moved.pin.?.model); // every worker gets ittry std.testing.expectEqual(policy.Source.vision_ask, moved.sourceFor(false));try std.testing.expectEqual(policy.Source.vision_ask, moved.sourceFor(true)); // even with a genome override@@ -351,8 +351,8 @@ test "#380 phase seat: a whole phase moves at once, and only an automatic one" {test "#380 trace: the routing line carries source=vision-ask in #372's own format" {var buf: [320]u8 = undefined;try std.testing.expectEqualStrings(- "shape=adhoc role=- tier=small resolved_model=gpt-5.6-luna source=vision-ask policy_or_genome_id=-",- policy.formatDecision(&buf, .{ .tier = .small, .resolved_model = "gpt-5.6-luna", .source = .vision_ask }),+ "shape=adhoc role=- tier=small resolved_model=gpt-6-luna source=vision-ask policy_or_genome_id=-",+ policy.formatDecision(&buf, .{ .tier = .small, .resolved_model = "gpt-6-luna", .source = .vision_ask }),);// The spelling is hyphenated like every other source, and distinct.try std.testing.expectEqualStrings("vision-ask", policy.Source.vision_ask.label());