Repository navigation
test: run GAIA at a real user's size on every release tag - #7355
Conversation
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.
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.
…to kalin/ci-scale-run
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
|
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 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
|
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:
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
GAIA_SCALE_FILES=8 python -m pytest tests/integration/test_scale_run.py -qpassesv*tag (each RC and final) and on PRs that touch the test, its fixture or the workflow🔍 Technical details
POST /api/documents/index-folderwith the real RAG code; the embedder's load and unload requests are read from the fake server's log.