Skip to main content

Release eval hardening: stress and adversarial testing

Status: In progress. Section 6’s tiering shipped: RC smoke, a full sweep on the nominated RC, a final-tag check, a weekly backlog lane and Qwen3.6 scoring (#5535), real Claude usage per scenario (#5525) and quota stop-and-resume (#5533). Sections 5 and 7 are still proposed, and sections 2 to 4 describe the tree before those landed. Priority: P1 Related: Eval design and hillclimbing (judge calibration and noise, #4473–#4477), Nightly benchmarks, #5169 (where escapes were caught), #5197 (release eval never compares), #2983 (no flagship release gate), #883 (Playwright E2E)

1. The finding

GAIA’s release evals check whether a healthy model on a healthy machine gives good answers. Most of the bugs that reached users this cycle needed something unhealthy to happen first. Examples are a second GAIA process, a dead child process, a laptop going to sleep, a busy or failing model server, or a new major version of a dependency. No release-time tier causes any of these on purpose. And no eval result can stop a release: publish.yml says so directly (“No eval gates this workflow”). What the last two tags show:
  • v0.25.0 shipped with 14 of 27 baselined categories flagged as regressed against the flagship baseline (a worse status or score, or more than twice the time). The baseline is one run, so some flags may be noise, but nobody re-ran them to find out. The run passed 221 of 343 scenarios. Because the eval runs in report mode, those flags were only warnings, the run was green, and its “file an issue” job was skipped. gaia_git and gaia_resilience have no baseline, so they were never compared.
  • The RAG retrieval benchmark had been failing since 2026-10-12 (#5490). Three RCs tagged [skip eval] (v0.25.0-rc17 to rc19) recorded “success” without running it. v0.25.0 then shipped with it red, and both v0.25.1 RCs published with it red.
  • The task suites’ gate has nothing to compare against. eval/tasks/expectations/ was never committed, so every tag run prints “Not gated yet”, including for the adversarial traps.
  • Automated tests found 8% of the 523 bugs that reached main between Sep 15 and Oct 16 (#5169). Unit tests cover 81% of lines, but they run that code against fakes. A bug that needs two processes, a second OS or a fresh machine never shows up in them.
The fix is mostly cheap. Build the fault injectors once: a fake model server you can script to fail, a harness that kills processes, a clock that can simulate sleep, and a nightly install with unpinned dependencies. Run them on hosted runners on every PR or every night. Keep the Strix Halo pool for the few checks that need a real model, and turn the final-tag eval into a verdict instead of a report.

2. What exists today

Every row below was checked against the workflow or the code, not the docs. Runtimes come from the v0.25.0 and v0.25.1-rc1 tag runs. Two structural facts matter more than any single row:
  • Every self-hosted result is advisory, and [skip eval] RC tags record “success”. A red benchmark looks the same as a skipped one unless someone opens the run.
  • The model layer is never broken on purpose. The scenario eval’s fakes (fixture web server, fake gh, MCP stub) break the tools. The model is always a healthy local Lemonade. Only one unit file (tests/unit/test_lemonade_retry_fake_server.py) has a server that fails on a script, and nothing else uses it.

3. The escapes, and which tier should have caught each

By class: 7 of 17 are lifecycle or multi-process, 4 are provider or model faults, 2 are resource or eval-integrity, 1 each is drift, honesty, test isolation and a false positive. The flagship scenario eval, the most expensive tier, could plausibly have caught 2 of them (#5415 and the context overflow), and it caught neither.

4. Gap matrix

Yes = a test that can fail on this exists and runs automatically. Partial = narrow, hand-run, or added only after an escape. No = nothing. “Hosted” means automated tiers on GitHub-hosted runners; “Strix Halo” means the scenario eval plus hardware CI.

5. Recommendations, by bugs caught per unit of cost

Each item names its tier and trigger. “Hosted” means GitHub-hosted runners. New Strix Halo time goes only to items 8 and 9; item 3 adds a few targeted re-runs to the existing release eval.

1. A fault-injecting fake model server: per PR, seconds

Promote FakeServer from tests/unit/test_lemonade_retry_fake_server.py into gaia.testing.fault_server: an OpenAI- and Lemonade-compatible server driven by a script. It validates requests against recorded real payloads, so a request the real server would reject fails here too (#5169 item 3). Faults to support: any status code, a stall before the first token or mid-stream, a dropped connection, malformed or never-ending tool calls, parallel batches, “model not loaded”, context-size errors, and text claiming tests passed. Point the agent loop, the Agent UI backend, the TUI (through the sidecar) and the messaging bridges at it.
  • The stream stalls after the first tool call. The turn ends failed, lists what ran, the UI’s run status is failed, and the TUI exits non-zero.
  • A 401 arrives after write_file succeeded. Each surface names its own fix (Settings > Model, /provider, both in the CLI) and lists the saved file.
  • The model sends four parallel out-of-range read_file calls, then corrects them. The turn finishes with an answer.
Would have caught #5432, #5440, #5413 and #5101, and the open #5061 and #5064.

2. A multi-process and kill -9 chaos suite: nightly on hosted Linux, macOS and Windows; seeded short run on PRs that touch those paths

Start a real daemon, Agent UI backend, headless TUI and sidecar on a temp GAIA_HOME, backed by the fault server. Kill a random process at a random, seeded point, restart, and check invariants: no reply lost without an “interrupted” notice, no orphan processes, no corrupted file in ~/.gaia, locks released, connectors kept, port reacquired.
  • Four processes run config set, connector refreshes and index writes for 60 s, including a folder this user can’t write to on Windows. The final state matches a serial replay, and no “credentials are no longer valid” appears.
  • SIGKILL the UI backend at a random point in the stream, then restart. The reply shows the interrupted notice, and a document caught mid-index shows Failed.
  • Kill a sidecar between health pings. The desktop app stays up, and quitting leaves zero descendant processes.
Would have caught #5469, #5467, #5472, #5438, #5386, #5282, #5378 and #5377. About 15 minutes per OS per night.

3. Make the final-tag eval a verdict: config plus a little code

  • #5197 is fixed: the subset compares against gaia-flagship. Commit gaia_git and gaia_resilience baselines and the task expectations from a real run. Remove the #3016 exception (that issue is closed).
  • Add a release-verdict job that approve-publish waits on for final tags only. It fails on missing or unmeasured scenarios, and on confirmed regressions in a short must-not-regress set: gaia_honesty, gaia_resilience, adversarial, error_recovery, and the security and injection scenarios. Anything else that regresses needs a waiver naming the approver in the tag annotation.
  • Confirm before failing: re-run only the scenarios that flipped from PASS to FAIL, two more times, and count a regression only if most runs fail (#4473). Compare scores against a measured noise floor: re-grade the same transcripts twice and ignore differences smaller than that spread.
  • Retry rule: re-run a scenario that produced no work (an infra error) up to twice and record every attempt. Never re-run one that produced work.
  • A final tag can’t inherit a [skip eval] pass. It needs a measured run on its own commit, or on an RC whose diff touches no LLM-affecting path. The final tag’s verify-final job reports a missing full sweep in its job summary. It no longer files an issue (#5535 did; that was reversed so issues mean a measured regression), and it still doesn’t block publish.
  • Make the benchmarks self-contained: vendor the code-retrieval repositories as cached archives, so a red result means the product broke, not someone else’s network.
Would have stopped v0.25.0’s 14 unexamined regression flags and the three-RC retrieval hole (#5490).

4. Clock, standby and network shims: nightly, hosted

Replace the awake clock with a fake that can jump forward (suspend) or freeze the process for N seconds with a display-off event. Put a TCP fault proxy between GAIA and the fault server that adds latency, resets connections and black-holes traffic.
  • Freeze the process for 10 minutes mid-stream with the display off. On wake, no stall error appears and the turn finishes.
  • Black-hole the connection for 30 s mid-turn. The UI shows “reconnecting”, then either completes or fails with a cause. It never hangs.
  • A sleep that crosses a schedule window shows the missed run once.
Targets #5387, #5464, #5316, #5384 and #5391.

5. A dependency-drift canary: nightly, hosted, about 8 runners for 10 minutes

Matrix: Linux x64, Windows x64, macOS arm64 and macOS x64 (Intel) × the oldest and newest supported Python. Install from source with no lock: --pre --upgrade, latest of everything. Then import every module, run the gaia init --profile chat offline journey and a unit smoke subset. On the first failure, file an issue that diffs resolved versions against the last green night. This catches the next pymupdf, httpx or APScheduler days before an RC, not at publish.

6. Clean-state install and N-1 upgrade journeys: reduced at merge, full on RC (#5169 top-five item 2)

Start from an empty GAIA_HOME and a clean image. Install the wheel and the frozen binary on each OS, run the daemon with the fault server (or a tiny CPU model where a real one matters), and walk the TUI control API and the Agent UI MCP. For upgrades, install the last release, create sessions, memory, connectors and schedules, upgrade to the candidate, and assert everything survives and no stale sidecar keeps running.

7. A soak suite: nightly, hosted

Run a 200-turn tool-heavy session against the fault server, and an 8-hour daemon with schedules firing. Sample RSS, handles, threads, open files and DB size every 30 s, and fail on growth that doesn’t level off.
  • 200 turns with 3 MB tool results stay under the context window, and memory levels off.
  • A daemon that has run for 8 hours answers /health within its SLO, and its log and DB rotate.

8. A gaia_chaos scenario category on Strix Halo: release tags, one lane, about 45 minutes

Only for faults that need a real model’s behavior under them. A scenario-level setup.faults block points the agent at a fault proxy in front of the real Lemonade.
  • Unload the model mid-turn. The turn recovers or fails honestly, and no deliverable is claimed that doesn’t exist.
  • A second front-end opens the same session mid-stream. Both show one consistent transcript.
  • Overflow the context with a VLM loaded alongside. The trim-and-retry path answers from the evidence.
Add two checks to every scenario: compare the workspace before and after, and fail on unrequested writes or deletes; and search deliverables for planted secret markers. Also validate every deterministic success criterion: it must pass a known-good reference transcript and fail an untouched one and a plausible wrong one.

9. A hardware chaos lane: release tags, one Strix Halo machine

Wire the existing hand-run pieces into one job: util/lemonade_restart_harness.py repro and stress --sessions 16, the allowlisted live Lemonade contract tests (test_lemonade_predownload_checks, test_lemonade_tokenize, test_lemonade_model_residency, test_daemon_broker_lemonade, test_gateway_lemonade), and the Linux Strix Halo user-issue suite. Add a 1-hour real-model soak. All of this code already exists; it just never runs.

10. Housekeeping

  • Port tests/stress/stress_agent_ui.py into item 2’s suite as pytest, or delete it. A hand-run script nobody runs gives a false sense of coverage.
  • Add hosted, fault-server-backed Playwright journeys for #883 (reload mid-stream, two tabs, backend killed, Esc versus Stop). They don’t need Strix Halo.
  • Give Slack and Telegram adapters a fake platform API that rate-limits and drops the socket.
  • Add the #5169 test-value rule to REVIEW.md: a fix’s test covers the class of bug at the layer where it lived.

Strix Halo budget

Today a tag costs about 26 machine-hours of scenario lanes, plus ~1.5 h of task outcomes, plus code retrieval and Linux Halo. Twelve machines sit busy for 3.3 h. Section 6 measures where that time goes and replaces this paragraph’s tiering: a one-hour smoke on every RC, and the full flagship run once per cycle, on the RC that will be promoted. Items 1, 2, 4, 5, 6, 7 and 10 run on hosted runners at no Strix Halo cost. The net effect is fewer Strix Halo hours per cycle than today, with more failure modes covered.

6. Cost and tiering

A full flagship sweep costs about 28 Strix Halo machine-hours and an estimated 130M Claude tokens, and most of its per-scenario verdicts can’t be told apart from noise. Between two runs of nearly the same code, about one scenario in five flips between PASS and FAIL. That is enough to flag about half the categories when nothing changed. Only 141 of 343 scenarios pass reliably enough for one FAIL to mean something. The plan keeps every scenario in the suite. Every RC gets a one-hour smoke run of the reliable scenarios plus a protected set. The RC you intend to promote gets the full sweep, once per cycle. Noise gets measured before any gate. Claude spend comes down inside the harness, not by dropping scenarios.

6.1 The data

  • Source: 16 runs of eval_flagship.yml from 2026-10-06 to 2026-10-21. 15 ran every lane to the end, including v0.25.0-rc16, v0.25.0 and v0.25.1-rc2; the 16th is the cancelled v0.25.1-rc1.
  • Same setup in every run: Gemma-4-E4B-it-GGUF as the model under test, claude-sonnet-4-6 as driver and judge, and the devlab Strix Halo pool.
  • Per-scenario results: eval/analysis/flagship_scenarios_2026-10.csv (pass rate, flip rate, time split, class, protected, smoke candidate).
  • Definition used below: “Mixed” means a pass rate above 10% and below 90%, over at least 10 judged runs.

6.2 Where a sweep’s time goes

v0.25.0, 13 jobs, 28.4 machine-hours:
  • Models aren’t re-downloaded or reloaded.
    • Across 191 lane jobs, starting and warming Lemonade took a median 0.5 min (max 1.4). The outcomes model’s download step took a median 0.1 min.
    • Every scenario uses one model at one context size, and the backend’s model check takes 0.3 s.
    • A lab-side model cache or a pre-baked image would save under 0.6 machine-hours per sweep.
  • Timeouts used to be the biggest waste, and they’re fixed. Through rc16, about 12 scenarios per run timed out, burning 5.5 machine-hours (18% of the run). Most were permission prompts that nothing answered (#5296, fixed by #5309 and #5358). v0.25.0 had 3 timeouts and rc2 had none.
  • The longest lane sets the wall time. Lane medians run from 13 to 203 minutes, so most machines finish early and sit idle. gaia-signal is the longest lane, with 46 scenarios and 61% of its time spent in Claude.
  • The top time sinks today are the agent’s own tool loops. Averages over v0.25.0 and rc2:

6.3 What one run can tell you

Noise is about 18% of scenarios per run, at most.
  • Same base: four runs on 2026-10-14 started from one main commit, each with one small PR on top (one of them docs-only). Any two of them disagree on 16–24% of judged scenarios, with a median of 18%.
  • All pairs: across all 105 pairs of the 15 complete sweeps, the median is also 18%. Two weeks of code changes add nothing visible above that.
  • Why it’s an upper bound: these pairs still differ in code, so 18% is the most pure noise could be. The study in 6.6 measures the real figure.
  • Model: all 16 runs scored Gemma, so none of these pairs includes a change of the model under test.
What that means today:
  • Flags from one run say nothing. --compare flags a category on any single PASS→FAIL. Between the same-base runs, that flagged a median of 16 of 29 categories (range 12–23). v0.25.0’s 14 flagged categories sit inside that range.
  • A third of the suite has no baseline. The baseline is one run of 218 scenarios from 2026-10-03, so 126 of today’s 343 scenarios are never compared.
  • The noisiest scenarios flip on most runs (flip rate between consecutive runs, then pass rate):
    • skills_hub_search: 0.86, 53%
    • capture_lesson_applies: 0.79, 53%
    • task_feed_injection: 0.79, 47%
    • memory_stress_long_conversation: 0.79, 47%
    • select_skill_tool_vs_builtin: 0.77, 50%
    • res_truncated_export_partial: 0.71, 33%
  • Confirming flips is cheap. #5076 replayed earlier runs: re-running each PASS→FAIL twice left about 5% of runs red with nothing behind them, at about 4 re-runs per sweep.
The eval finds defects when a scenario is new or the model changes.
  • Fixes: since 2026-09-15, 13 merged product fixes cite a failing flagship scenario (#4642, #4643, #4645, #4647, #4648, #4650, #4708, #4725, #4728, #4745, #4878, #5307, #5308). Together they cover about 25 scenarios. About 8 more fixes went to the harness itself.
  • Regressions: two of the 13 fixed something that used to pass (#4708, #4878). Both came from switching the model under test to Qwen3.6, not from a code change.
  • Tag runs: none of the flags on the rc16, v0.25.0 or rc2 tag runs led to a fix.
  • Caveat: the sample is small and was found by searching PR text for scenario names. Read it as a pattern, not a verdict.
The scenario lanes didn’t cover the large default model. They score Gemma-4-E4B, the default on most PCs. Qwen3.6-35B-A3B is what gaia init installs on a 64 GB+ Strix Halo, the pool’s own hardware, yet it ran only in the outcomes lane’s two task suites. Both regressions above were Qwen3.6-only. #5535 now scores Qwen3.6 on the Strix Halo lanes against its own baseline.

6.4 Claude spend

  • Real usage wasn’t recorded until #5525, so the figures below are estimates.
    • On success, the runner keeps only the judge’s structured output and discards the usage and cost that claude -p reports.
    • The trace’s cost_estimate is the model’s own guess.
    • One session plays the user and judges every turn, so driver and judge spend can’t be separated.
  • What survives. Six rc2 scenarios cut off by the quota kept their usage records.
    • Each wrote 30–38K tokens to the prompt cache before its first reply. That’s a 1-hour cache write, about $0.19 at list price.
    • Each then re-read that cache on every API round, for 13K–331K cache reads in total.
    • Nothing is shared between scenarios, because the fixed simulator and judge rubric (about 25K characters) sits inside each scenario’s own user message.
  • Estimate per sweep. The model behind it is fitted to those six records: 33K tokens written per scenario, and two API rounds per turn at about 35K context plus 2.5K per turn, over 1,078 turns.
    • Totals: about 11M tokens written to the cache, 120M read from it, and 0.9M output.
    • That’s about $118 at Sonnet 4.6 list price, and 57% of it is cache writes.
    • memory and gaia_memory cost the most, at about 125 turns and $10 each. Next come gaia_skills_tasks, real_world, gaia_files, gaia_core and gaia_rag.
    • Replace these figures with measured ones from runs after #5525.
  • Capacity: a full sweep doesn’t fit the accounts it runs on.
    • rc2 judged 274 scenarios (about 107M tokens by the same estimate) before both Claude accounts in use ran out, between 14:13 and 14:23 UTC.
    • The first error landed at the same clock time in every lane, including a lane that started an hour late.
    • The remaining 68 scenarios recorded ERRORED within about 3 seconds each, with zero tokens, and the run still reported success.
    • A full sweep needs about 123% of what both accounts delivered in that window. #5533 now stops the run on a quota outage and resumes it later.

6.5 Cuts that keep coverage

Every cut keeps every scenario in the suite. “Work” cuts reduce machine-hours or tokens. “Rearrange” only changes how the same work is laid out. When a full sweep is mandatory, under rule (a):
  • Any change on CLAUDE.md’s LLM-affecting list: system prompts and mixin fragments, _compose_system_prompt, tool registration, docstrings or schema, error classification, the default model, the tokenizer or is_tool_calling_model, and tool-call parsing.
  • A Lemonade version bump.
  • A change to the model under test or to EVAL_MODEL.
  • A change under eval/prompts/.
A carried result counts only if the diff from its commit to the promotion commit touches none of those, and only within one release cycle. One eval per Lemonade backend still holds (CLAUDE.md). Nothing here runs two scenarios against one Lemonade. Parallelism stays across machines.

6.6 Tiers and cadence

Under the release train (#5492), a final promotes a tested RC without rebuilding or re-running the eval. So the full sweep belongs on the RC you intend to promote, not on the final tag. How the smoke tier is picked.
  • Rule: each smoke scenario passed at least 90% of at least 10 runs and never timed out, so a FAIL carries signal. The list takes one per category that has one, protected scenarios first, then the fastest.
  • Size: 30 scenarios, 13 of them protected. That’s 81 scenario-minutes on Gemma, or two machines at about 45 minutes each.
  • False alarms: about 0.42 false FAILs per run, and 0.03 after two confirmation re-runs.
  • Qwen3.6: its machine runs the same 30 scenarios, and its first runs set its baseline. If it takes longer than 60 minutes, cut it to the 13 protected scenarios.
  • Gaps: error_recovery, gaia_data and gaia_git have no stable scenario, so the smoke can’t catch regressions there. They stay in the full sweep.
The protected set is never pruned.
  • What’s in it: every scenario in gaia_honesty, adversarial, error_recovery and gaia_resilience, plus every scenario tagged security or with “injection” in its id. That’s 75 scenarios, 5.8 machine-hours and about 27M tokens.
  • The rule: these never leave the full sweep for weekly or get dropped because of their pass rate, whether they always pass or always fail.
  • The limit today: only 15 of the 75 pass reliably, 39 are mixed and 16 always fail. Most of this set can’t be gated until the noise study says how noisy it is.
The fake model server needs a real contract. Item 1 in section 5 checks requests against recorded real payloads. The hardware chaos lane (item 9) should re-record those payloads from a real Lemonade, so the fake can’t drift from the server it imitates. That’s the #1655 lesson.

6.7 Before and after, per release cycle

Assume a cycle with three RCs that run the eval. Under the release train as written, every RC runs the full sweep and the final reuses the promoted RC’s run. Where the 52 machine-hours come from:
  • Cutting work: about 50, from running a smoke instead of a full sweep on the two RCs that aren’t promoted.
  • Moving work: 2.5, from the backlog leaving the sweep, which the weekly backlog lane adds back.
  • Rearranging: zero. Packing only trades wall time against machine count.
  • Not counted here: the duplicate final-tag sweep (28 machine-hours on v0.25.0) is #5492’s saving.

6.8 Implementation, ranked by savings per effort

PRs 1, 2 and 7 have shipped; the rest are still proposed. Flake handling comes before any gate, or the gate gets waived back into report mode. Don’t build deduplication (6.5 g) or a model cache (6.5 h). The data says they save too little.

7. The bulletproof bar for a final tag

A final vX.Y.Z tag publishes only when all of these hold on its commit:
  1. CI is green on the tag commit: lint, unit, offline integration and CLI (already enforced).
  2. The fault-server suite (item 1) passes on all three OSes.
  3. The chaos suite (item 2) passes on all three OSes, plus the clock and network shims (item 4).
  4. The drift canary (item 5) passed within 24 hours on every OS and arch, Intel Mac included, or the failing dependency is capped.
  5. Clean-state install and N-1 upgrade pass for the wheel and the frozen binary on Windows, macOS arm64, macOS x64 and Linux (item 6).
  6. The flagship eval measured this commit, with no missing or unmeasured scenarios and no confirmed regression in the must-not-regress set. Every other confirmed regression is waived by name.
  7. The retrieval and code-retrieval benchmarks are green or waived by name, and none is red for a harness reason.
  8. The hardware chaos lane is green: Lemonade restart harness, live contract tests and Linux Strix Halo user issues (item 9).

8. Open questions

  • Should the must-not-regress set block RCs too, or only finals? Blocking RCs finds problems earlier, but costs more RC re-tags.
  • Should the Claude driver and judge run on a dedicated account? rc2 showed that one sweep needs more than two shared accounts deliver in one window.
  • Can a CPU-only tiny model on hosted runners stand in for the real model in the clean-state journeys, or does that path need Strix Point?
  • Who approves a waiver, and does it belong in the tag annotation or in a committed file the gate reads?