Repository navigation
fix(gaia): preserve query errors when undo history cannot be saved - #5734
kovtcharov-amd merged 1 commit into
Conversation
|
Verdict: Approve with suggestions A turn can fail after changing a file, and saving that turn's undo history can then fail too. Before this PR, the sidecar dropped the real error and showed the generic "This is a bug" message. Now the user sees the real error, still gets the "undo may not work" warning, and both tracebacks go to the server log. The fix is small and only touches that one path, and the new test covers the outcomes that matter: the error event comes last, its text is right, and the session lock is released. Nothing blocks this. There is one small cleanup in the technical notes. Real-world evidenceN/A here: the CI evidence stage produced no bundle, and pytest isn't installed on this review runner, so this verdict rests on reading the code. The PR description links its own evidence: before/after Agent UI screenshots from a real 🔍 Technical detailsIssues 🟢 The same exception is logged twice when the turn itself raises Behavior change worth knowing about (no action needed): before this PR, a recorded turn whose own processing raised Strengths
|
Summary
Keep the original query error when saving that turn's undo history also fails.
Why
A turn that raises after changing a file can lose its real error if the snapshot store also runs out of space. The sidecar then reports “This is a bug” instead of the processing failure. The original error now survives, undo still gets its warning, and both tracebacks are logged even when the copy error suppresses exception context.
Linked issue
Closes #5666
Changes
Test plan
pytest tests/unit/ -n 4 --dist=worksteal: 27508 passed / 478 skipped / 3 xfailed, with 41 passing subtests. Collection guard passed unchanged.python util/lint.py --all: 17 passed / 1 configured nonblocking MyPy advisory; staged lane/path checks passed. Wheel/sdist builds, Twine validation and independent installed-wheel import parity passed.error_recoveryunder the repository's no-local-Strix-Halo eval exception. Real model evals were not run here.An additional fixture-enabled relay-query diagnostic exposes the same old fake-handler mismatch on both revisions (1 failed / 3 passed, missing
set_relay_question). It is recorded separately, not counted as green. The configured contract run above retains its normal conditional query skip; the actual browser proof uses the production handler and passes.Evidence
Exact commits, commands, versions, logs, controls and raw screenshots.
The real
gaia chat --ui→ browser → daemon → dev sidecar → GaiaAgent →write_filechain runs on both revisions. Only model HTTP replies and an isolated install receipt are fixtures. After the real file write, a separate 1 MiB tmpfs produces genuine snapshotENOSPC; no production Python code is monkeypatched. This tests the user path, not real inference/GPU behavior or a frozen binary installation.gaia chat --uicommand; logs and arguments are in the evidence harness. The in-process one-shot CLI is unchanged.Baseline
82ad2a771c7ed5b6b26f4521b3e4eaad40820f85; candidate529dc35fd434f9582c3490b2f7f39d1797464c6b. The manifest ties validation to all three committed blobs. The scripted processing error uses the independently tracked #5471 baseline case; this fix does not stack #5732's parser change. Hosted CI and human review are separate from these local results.Checklist
AI-assisted implementation and verification; human review is pending.