Repository navigation
fix(agents): check saves to Windows paths after a 'would have' clause - #8051
Conversation
A drive letter's colon (C:/, C:\) ended the 'would have written' clause early, so the ', but saved ...' that followed lost its subject and the claimed save to an absolute Windows path was never checked. The clause now continues past a drive-letter colon; any other colon still ends it. Closes #8029
|
Verdict: Approve When an answer said it "would have written" a file to one Windows path but then saved to another, GAIA skipped checking that second save. Paths like Real-world evidenceN/A: no CLI, API or MCP surface changed, so this rests on code review alone. The Windows packaged-app step in the test plan is still unchecked. 🔍 Technical detailsHow I checked it. pytest isn't installed on this runner, so I pulled Issues
Strengths
|
When an answer said "I would have written it to C:/…/a.txt, but saved the totals to C:/…/b.txt" and nothing was written, GAIA showed no "No successful write … is recorded" note. On Windows almost every path the model writes is absolute, so #7540's check missed the common case. Now the save to
b.txtis flagged withC:/andC:\paths, just as it already was with bare file names.Closes #8029
Test plan
python -m pytest tests/unit/agents/passes (6623 passed). The fulltests/unit/run here stops at an unrelated import error because this runner lacks theresponsespackagepython util/lint.py --allpassesquote2.txtand confirm the "No successful write to …b.txt" note appears🔍 Technical details
_COUNTERFACTUAL(src/gaia/agents/base/completion.py), the clause body was[^,;:—–]*. That class stopped matching at the:inC:, so thejoingroup never matched and_drop_counterfactualnever put theIback in front ofsaved._FIRST_PERSONthen found no claim.(?:[^,;:—–]|(?<=\b[A-Za-z]):(?=[\\/]))*. A colon stays in the clause only when it follows a single letter and comes before a slash. Any other colon still ends the clause:"I would have written the report: then saved b.txt."still stops at the:.test_a_save_to_a_windows_path_after_a_would_have_clause_is_a_claimruns with both separators and covers the ", but saved", "but … instead" and plain "I saved" forms. In each caseb.txtmust be flagged anda.txtmust not.