Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(fence-repair): drop the unreachable Fable entry from the measured default list (Fable is smoke-test only)
garrytan680ade78883b
diff --git a/docs/guides/repair.md b/docs/guides/repair.mdindex 707e76495e..d9073bb92d 100644--- a/docs/guides/repair.md+++ b/docs/guides/repair.md@@ -858,8 +858,7 @@ sent again until the file, the model or the rules change.The repair model is `models.fence_repair` when set. Unset, it is the firstmodel the fence-repair eval measured as accurate enough whose provider key thebrain has: `openai:gpt-6.1-sol` with an OpenAI key, else-`anthropic:claude-opus-5-5` with an Anthropic key (`anthropic:claude-fable-5-1`-also met the bar). With neither key, model-tier fences wait as+`anthropic:claude-opus-5-5` with an Anthropic key. With neither key, model-tier fences wait as`no_measured_model` until the user picks a model.The gates check that no text is lost or rewritten; they cannot tell which of twodiff --git a/evals/fence-repair-tier3/README.md b/evals/fence-repair-tier3/README.mdindex f5cccfa7ae..6ca5458ea0 100644--- a/evals/fence-repair-tier3/README.md+++ b/evals/fence-repair-tier3/README.md@@ -14,7 +14,7 @@ Round 2, measured 2026-10-06 at gbrain `7d75e08c` (prompt version 2: a model may| `anthropic:claude-opus-4-7` | 96/99 (97.0%) | 0/99 | 162/165 (98.2%) | 3/165 (1.8%) | $0.0077 | 1.8 s / 4.5 s | no || `anthropic:claude-sonnet-5-5` | 96/99 (97.0%) | 3/99 (3.0%) | 144/165 (87.3%) | 3/165 (1.8%) | $0.0031 | 1.7 s / 3.0 s | no |-Held-out USD and latency shown. So `FENCE_REPAIR_MEASURED_MODELS` (`src/core/fence-repair/measured.ts`) is `openai:gpt-6.1-sol`, `anthropic:claude-opus-5-5`, `anthropic:claude-fable-5-1`: with `models.fence_repair` unset, an OpenAI key gets `gpt-6.1-sol` and an Anthropic key `claude-opus-5-5` (it ties `gpt-6.1-sol` on held-out gate-pass and beats Fable 5.1 on gate-pass, cost and speed). Every held repairable attempt of the three qualifying models was a HOLD; every false accept was a free-text cell in the wrong column. The free tiers repaired every stray-empty-cell fence exactly (18 held-out and 30 round 1 attempts per model). No answer ran out of output tokens and no re-ask ran.+Held-out USD and latency shown. So `FENCE_REPAIR_MEASURED_MODELS` (`src/core/fence-repair/measured.ts`) is `openai:gpt-6.1-sol`, `anthropic:claude-opus-5-5` (Fable 5.1 also qualified but is left out: Fable runs only in smoke tests, never as a counted or default model): with `models.fence_repair` unset, an OpenAI key gets `gpt-6.1-sol` and an Anthropic key `claude-opus-5-5` (it ties `gpt-6.1-sol` on held-out gate-pass and beats Fable 5.1 on gate-pass, cost and speed). Every held repairable attempt of the three qualifying models was a HOLD; every false accept was a free-text cell in the wrong column. The free tiers repaired every stray-empty-cell fence exactly (18 held-out and 30 round 1 attempts per model). No answer ran out of output tokens and no re-ask ran.Round 1 (prompt v1, 2026-10-06 at `171a7e24`) found the default then, `claude-opus-4-7`, writing a wrong cell in 8 of 198 repairs (4.0%); its findings led to the round 2 code.diff --git a/llms-full.txt b/llms-full.txtindex ec8f341b17..564f92578e 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -11858,8 +11858,7 @@ sent again until the file, the model or the rules change.The repair model is `models.fence_repair` when set. Unset, it is the firstmodel the fence-repair eval measured as accurate enough whose provider key thebrain has: `openai:gpt-6.1-sol` with an OpenAI key, else-`anthropic:claude-opus-5-5` with an Anthropic key (`anthropic:claude-fable-5-1`-also met the bar). With neither key, model-tier fences wait as+`anthropic:claude-opus-5-5` with an Anthropic key. With neither key, model-tier fences wait as`no_measured_model` until the user picks a model.The gates check that no text is lost or rewritten; they cannot tell which of twodiff --git a/src/core/fence-repair/measured.ts b/src/core/fence-repair/measured.tsindex 638f386d69..afc70cc51f 100644--- a/src/core/fence-repair/measured.ts+++ b/src/core/fence-repair/measured.ts@@ -6,7 +6,10 @@* `FENCE_REPAIR_MEASURED_MODELS`: the models that met the preregistered* rule (gate-pass at least 80%, false accepts at most 1%) on both the round 1* fixtures and the held-out set (round 2, prompt v2), best first by held-out- * gate-pass with ties to the cheaper model. With+ * gate-pass with ties to the cheaper model. `anthropic:claude-fable-5-1` also+ * met the rule but is left out: Fable runs only in smoke tests, never as a+ * counted or default model, and it came after `claude-opus-5-5` on the same+ * key, so it was never chosen. With* `models.fence_repair` unset, model repair uses the first one the brain has* a provider key for; with none, model repair stays off by default* (`no_measured_model`). An explicit `models.fence_repair` always runs.@@ -15,6 +18,6 @@* about how often the model's rewrites are accepted. HTTP clients see it too,* so it names no model or provider (`gbrain models` names the model).*/-export const FENCE_REPAIR_MEASURED_MODELS: readonly string[] = ['openai:gpt-6.1-sol', 'anthropic:claude-opus-5-5', 'anthropic:claude-fable-5-1'];+export const FENCE_REPAIR_MEASURED_MODELS: readonly string[] = ['openai:gpt-6.1-sol', 'anthropic:claude-opus-5-5'];export const FENCE_REPAIR_MEASURED = 'On 40 held-out synthetic malformed fences over three runs, each measured default model repaired 95 of 99 attempts with no cell in the wrong column and declined the other 4.';diff --git a/test/repair-fences.test.ts b/test/repair-fences.test.tsindex e34ced58cf..5d910eb9e1 100644--- a/test/repair-fences.test.ts+++ b/test/repair-fences.test.ts@@ -55,6 +55,7 @@ import { readUncommittedFenceRepairs } from '../src/core/fence-repair/uncommitteimport { parseRepairArgs, runRepairCommand } from '../src/commands/repair.ts';import { runModels } from '../src/commands/models.ts';import { resolveFenceRepairModel } from '../src/core/fence-repair/model.ts';+import { FENCE_REPAIR_MEASURED_MODELS } from '../src/core/fence-repair/measured.ts';import { _resetCliExitVerdictForTests, currentExitCode } from '../src/core/cli-force-exit.ts';import { isolatedPersistencePostgres } from './helpers/persistence-postgres.ts';import { testBackends } from './helpers/test-backends.ts';@@ -483,6 +484,8 @@ test('models.fence_repair: unset, the first measured model with a key (else nonetry { await runModels(engine, ['--json']); } finally { process.stdout.write = write; }return JSON.parse(chunks.join('')) as { per_task: Array<{ key: string; tier: string; resolved: string; source: string }> };};+ expect(FENCE_REPAIR_MEASURED_MODELS).toEqual(['openai:gpt-6.1-sol', 'anthropic:claude-opus-5-5']);+ expect(FENCE_REPAIR_MEASURED_MODELS.some(model => model.includes('fable'))).toBe(false);expect(await resolveFenceRepairModel(engine, { ANTHROPIC_API_KEY: 'k' })).toBe('anthropic:claude-opus-5-5');expect(await resolveFenceRepairModel(engine, { ANTHROPIC_API_KEY: 'k', OPENAI_API_KEY: 'k' })).toBe('openai:gpt-6.1-sol');expect(await resolveFenceRepairModel(engine, { GEMINI_API_KEY: 'k' })).toBeNull();