Repository navigation
test(agent): replay recorded turns through the answer checks - #7328
Conversation
The release test of rc18 found seven cases where GAIA's own checks added a
false note or nudge to a correct answer, and unit tests of each check had not
caught any of them: every one needed the real loop, the request, the tool
results and the answer together.
Each file in tests/fixtures/answer_check_corpus is one such turn. One
parametrized test replays them with no model and asserts the note, the nudge,
or their absence. Seeded with a must-fire and a must-not-fire turn per finding.
Turns that fail today are strict expected failures naming the issue and the
open fix, so the fix has to delete the marker.
The corpus also found a made-up save that gets no note ("I also saved it to
X"), filed as amd#7326.
|
Verdict: Approve with suggestions This adds 18 recorded turns that replay through GAIA's real answer checks with no model, so each answer-check misfire from the rc18 release test becomes a lasting test. The nine known bugs are strict expected failures, so each fix PR has to remove its marker, which keeps the corpus honest. Nothing blocks merge. The two suggestions below are small accuracy fixes: one in the test plan, one in the test's stand-in for the chat window. Real-world evidenceN/A: this PR only adds tests and fixtures, and no evidence bundle was produced. I couldn't run the suite either, because this runner has no Python env with pytest, so the verdict rests on static review alone. For F81, I checked open fix PR #7322's diff against the fixture. Its unanswered-question result starts with 🔍 Technical detailsIssues 🟢 The test plan's pass count is off. There are 18 case files, 9 with 🟢 The stand-in console handles an empty-string default differently from the real one ( 🟢 The Checks run
Strengths
|
The unit job does not install the flagship package, so the case that calls its real request_user_input failed there with ModuleNotFoundError. That case now skips when the package is absent, and test_gaia_agent.yml, the lane that installs it, runs the corpus so the case is still enforced.
amd#7276, amd#7277, amd#7278, amd#7248, amd#7319 and amd#7322 merged, so their seven strict expected failures now pass and would turn the unit job red. The two left (amd#7321 open, amd#7326 unfixed) still fail as recorded. The stand-in console now returns an empty-string default the way the real transport does, instead of reading it as no default.
|
Verdict: Request changes 🟡 The F80 "script output saved beside its input" case will turn the unit job red as soon as this PR meets current main. Its fix, #7321, merged at 09:30 UTC today, after this branch last merged main. The case is still marked as a strict expected failure, so once the fix is in, the case passes and pytest reports that unexpected pass as a failure. The pull-request CI run tests the merge with main, so it hits this too. Please merge main again, drop that case's 🔍 Technical details
|
The rc18 release test found seven cases where GAIA's own answer checks got a turn wrong: a correct read-only answer ended with "I couldn't confirm all of this", a plan the user asked for was thrown away, an unanswered question became the user's answer. Each check had unit tests and none caught these, because every case needed the request, the tool results and the answer together. This adds a corpus of recorded turns and one test that replays each through the real loop with no model, so a misfire seen once in a release test becomes a file that guards it for good.
Seeded with 16 turns: a "must not fire" and a "must fire" case for each of F8, F10, F11, F12, F36, F80 and F81. Adding a case is adding a JSON file; the README beside the cases says how to make one from a transcript.
Bugs it found (a bug still open is a strict expected failure, so the fix has to delete the marker):
tailreads as an unpassed checkI replayed the corpus on each fix branch: every case passes there, so the markers come off as those PRs land.
Test plan
python -m pytest tests/unit/agents/test_answer_check_corpus.py -qreports 17 passed, 1 xfailed"xfail"line from any case and the test fails with the note or nudge the tester sawtest_unit.ymlrunstests/unit/), no workflow change needed🔍 Technical details
kind: "turn"builds a bareAgentwhose tools are stand-ins returning the recorded results (and writing the files the real call wrote, since the checks stat the disk), scripts the model's replies, and runsprocess_query.kind: "stream"feeds recorded provider chunks toAgentSDK.send_messages_stream(F36 lives below the loop).kind: "question"calls the flagship's realrequest_user_inputwith a console that answers or stays silent (F81 is the tool's contract, not a check).