Repository navigation
fix(agent): config, data and skill edits after a test run mark "tests pass" stale again - #8622
Conversation
… pass" stale again Since amd#8211, editing a requested config or data file (settings.yaml, app.json, schema.sql, Dockerfile, .env, ...) or a SKILL.md / prompt file after a test run left the earlier pass standing, so the agent could report "tests pass" for code it changed afterwards. - Only docs and requested reports (prose, text, tables, documents, images) are exempt; any other requested file still counts as a change. - SKILL.md and anything under a skills or prompts folder is treated as a test input, never as a doc. - A slow non-check script that times out gets the background-run and longer-timeout hint back; test and lint runs stay scoped to the changed files. - read_tool_output with to_entry past the last entry returns what is there instead of raising. Closes amd#8213
|
Verdict: Approve Restores an agent check that broke in 0.3.6. The agent could run the tests, then edit a config, data, skill or prompt file, and still report "tests pass." Now only docs and requested reports (prose, tables, documents, images) leave an earlier run standing. The PR also restores the "run it in the background or give it more time" hint for slow non-test scripts, and makes a One behaviour change to know before merging: a requested Real-world evidenceN/A: no evidence bundle was produced for this run. On this runner the verdict rests on static review alone. The PR description reports a guarded live run on 🔍 Technical detailsIssues 🟢 Requested 🟢 Docs and prompt guides under a 🟢 Unwrapped long line ( Checked and fine
Strengths
|
Since #8211, an agent could run the tests, then edit a config or skill file, and still report "tests pass": a requested
settings.yaml,app.json,schema.sql,Dockerfileor.env, or anySKILL.mdor prompt file, no longer marked the earlier run stale. Now only docs and requested reports (prose, text, tables, documents, images) leave a run standing, and anything under askillsorpromptsfolder counts as a change. In a live run on a gateway model, main answered "Tests pass" after settingretries: 0, a value that breaks the test. With this PR the agent flags the run as stale and says it can't confirm the tests pass.Two smaller fixes from the same issue: a slow data or build script that times out gets the background-run and longer-timeout hint back (test and lint runs stay scoped to the changed files), and
read_tool_outputwith ato_entrypast the last part returns what is there instead of an error.Test plan
test_stale_test_claim_config_skills.py): requested and unrequested config/data files at nested and absolute paths, every write tool and path key, same-name-elsewhere matches, skill/prompt files, an edit before vs after the run, a re-run after the edit (fresh again), several runs, a report written after a config edit, and docs that must not raise false alarms (README,docs/skills.md,myskills/README.md). 87 of them fail on main.tests/unit/agentsplus all shell-tool tests: 12169 passed. The only 2 failures (test_cyrillic_names_in_an_english_csv_are_not_windows_ansi,test_render_call_names_a_file_change_in_words) fail on main too.os.getuid/SIGKILLin files this PR doesn't touch.amd.DeepSeek-V4.1-Flash: run tests, editsettings.yaml/skills/greet/SKILL.md, then claim. Main misses both, this PR flags both. A README edit is flagged by neither.gaia_core,gaia_honesty,gaia_code,gaia_files,gaia_shell🔍 Technical details
is_code_mutation()exempted every requested non-code file thatfeeds_tests()didn't claim, andis_doc_path()classedSKILL.mdas prose.is_code_mutation()now exempts a requested file only whenis_report_path()matches (_REPORT_SUFFIXES);is_code_path()/_CODE_SUFFIXESwere left without callers and are removed.feeds_tests()returns True forskill.mdand for anyskill(s)/prompt(s)folder below the project root._timeout_hint()takes the command and gives ascriptwith nocommand_check_label()the background / longer-timeout hint.run_shell_commandorrun_pythonare still not judged, as before fix(agent): cut wasted steps, stalls and empty answers in the agent loop #8211 (see_FILE_MUTATION_TOOLS). A test pins that.finish_reason == "length"), and on the last step a reasoning-only reply goes to the step-cap closing call on purpose.