Skip to content

test: run GAIA at a real user's size on every release tag - #7355

Merged
kovtcharov-amd merged 18 commits into
amd:mainfrom
kovtcharov:kalin/ci-scale-run
Nov 12, 2026
Merged

kovtcharov-amd merged 18 commits into
amd:mainfrom
kovtcharov:kalin/ci-scale-run

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Every unit test indexes three files and stores five memories, and rc18 fell over at 300 of each: a folder index reloaded the embedder once per file, so 300 small files took 15 minutes, and a memory search over a few hundred rows ended the turn on a JSON error. This adds a scale run that does both at a real user's size on every release tag, with no model: the installer journeys' fake model server answers, and the test asserts counts of what GAIA asked it for.

What it asserts:

At scale Assertion Today
large folder index every file indexed, exactly one library row each ✅
large folder index the embedder is loaded at most twice, within a time budget ✅ (fixed by #7310 while this was in review; it caught #7288, a reload per file, before that)
search over 500 memories the result can be sent as JSON ✅ (fixed by #7308 while this was in review; the test caught it before that)
500 memories the memory API reaches every one, page by page ✅

Size: 300 files, the size rc18 failed at. With #7310 in, they index in about 25 s against the fake server, well inside the 240 s budget; before it, 300 ran past 45 minutes on a hosted runner (that slowness was the bug).

Not built here, and why: the 60-turn chat with the context meter compared to what the model is sent (F59) needs a real flagship turn loop behind the relay, and the memory page showing only 200 of 500 (F63) and duplicate rows from a re-add during indexing (F65) are a frontend bug and a race. Each has its own focused test in its fix PR (#7309, #7312, #7311); a scale version belongs with the Electron journey proposed in #7343.

Stacked on #7331 (it uses that PR's tests/fixtures/fake_lemonade.py); the commits before "test: run GAIA at a real user's size ..." are that PR.

Test plan

  • The new Scale Run workflow on this PR passes (4 passed)
  • Locally: GAIA_SCALE_FILES=8 python -m pytest tests/integration/test_scale_run.py -q passes
  • Runs on every v* tag (each RC and final) and on PRs that touch the test, its fixture or the workflow
🔍 Technical details
  • The folder is indexed once per run through POST /api/documents/index-folder with the real RAG code; the embedder's load and unload requests are read from the fake server's log.
  • The time budget (240 s) sits in the same expected-failure test as the load count, since the reloads are what make it slow.

In rc18 a cloud-only user had a 5 GB local model downloaded and loaded behind
their back by the start-up warm-up, by Memory > Run Inference and by a
scheduled run. Each bug fired only from one starting state, and every test had
been written from a PC that was already set up.

tests/fixtures/fake_lemonade.py is a model server that answers like Lemonade
over real HTTP and writes down every request. The matrix crosses five starting
states with three entry points and asserts what reached the server: no local
chat model touched on a cloud setup, nothing downloaded unasked, and the local
default used where that is right.

Three cells fail on the open fixes for amd#7217 and amd#7218. Two fail on a bug the
matrix found: a scheduled run ignores a cloud model picked in the app (amd#7329).
All five are strict expected failures.
The unit job does not install the flagship package, so the start-up warm-up
cells failed there with ModuleNotFoundError. They now skip when the package
is absent, and test_gaia_agent.yml, the lane that installs it, runs the
matrix so the column is still enforced.
installer/headless/fake_model_server.py already answers like Lemonade and
logs every request, so the fixture now starts that server and reads its log
instead of carrying a second one. It plays a PC whose only downloaded models
are the ones a state names, and refuses a model that is not downloaded, so a
request for one is counted as the download it would be on a user's PC.
The matrix's fixture starts installer/headless/fake_model_server.py, so a
change to that file has to run the lane that runs the matrix.
Every unit test indexes three files and stores five memories. rc18 fell over
at 300 of each: a folder index reloaded the embedder once per file, so 300
small files took 15 minutes, and a memory search over a few hundred rows
ended the turn on "Object of type bytes is not JSON serializable".

The scale run indexes a 300-file folder through the real endpoint and RAG
code against the installer journeys' fake model server, and searches and
pages 500 memories. It asserts every file got exactly one library row, the
embedder was loaded at most twice, the index fit a time budget, the search
result can be sent as JSON, and the memory API reaches all 500.

Two of those fail today on open fixes (amd#7310, amd#7308) and are strict expected
failures. It takes minutes, so it runs on release tags in its own workflow.
kovtcharov and others added 13 commits November 11, 2026 23:48
It imports src/gaia modules but deliberately does not run on every PR that
changes them: it takes minutes. The allowlist entry says so and names the
per-PR lane that covers the same code at small size.
Both fixes are on main now, so the memory-inference and warm-up cells pass
and their expected-failure lines go, as the strict marker requires. The two
scheduled-run cells (amd#7329) are the ones left.
…md#7308

The fix is on main, so a search over 500 memories now returns something JSON
can carry and the strict marker goes. The embedder reload (amd#7288) is the one
left.
On main every indexed file still reloads the embedder (amd#7288), and 300 of
them ran past 45 minutes on a hosted runner. The test keeps 300 as its
default; the workflow sets GAIA_SCALE_FILES=60 and says to delete it with
the fix (amd#7310). The load-count assertion fails at any size, so the strict
expected failure still holds.
…bug cells

The fake server logs a stderr line per request into a pipe nobody read, so it
stalled once the pipe filled: after 77 requests on Windows, ~700 on Linux. It
now logs to a file in its own folder, and a test drives 200 KB of log through
it.

A known-bug cell now only passes as expected on an assertion failure, so a
broken import or a renamed entry point fails loudly instead of reading as the
bug. The scheduled run's refused load is the request the cell judges, so that
refusal no longer ends the run before the assertion. The server is registered
for teardown as soon as it starts.
amd#7310 merged, so a folder index loads the embedder once and the strict
expected failure on the load count now passes. 300 files index in about 25 s
against the fake server, well inside the 240 s budget, so the lane drops its
60-file override and runs the size rc18 failed at.
# Conflicts:
#	.github/workflows/test_gaia_agent.yml
@github-actions github-actions Bot added devops DevOps/infrastructure changes tests Test changes labels Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This adds a release-tag run that indexes 300 files and searches 500 memories against the fake model server. It checks the two rc18 failures at the size where they happened, and it has already caught both bugs before their fixes landed. The new lane passed on this PR (4 passed, 8 s of test time), and its exemption from per-PR runs on src/gaia/** changes is declared with a reason. The path-coverage check passes.

One suggestion (🟢): the "embedder loaded at most twice" check also passes if the embedder is never called. If indexing ever skipped the fake server, for example through a different base URL or a cached path, every file would still count as indexed and the run would stay green. A floor of at least one embedding request would close that gap cheaply.

🔍 Technical details
  • tests/integration/test_scale_run.py:94: len(loads) <= 2 is satisfied by 0. The fixture could also record [r for r in server.requests if r.path.endswith("/embeddings")] and assert that it is non-empty (or >= FILES), so the index is proven to have gone through the recorded server.
  • Sibling paths and doc drift: not applicable. The PR is test and CI only and changes no behaviour.
  • tests/integration/ is not collected wholesale by any per-PR lane, so this module runs only in test_scale.yml, as intended.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 12, 2026
Merged via the queue into amd:main with commit d4bf34b Nov 12, 2026
28 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/ci-scale-run branch November 12, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants