feat: run-integrity leak detection over finished transcripts - #84
feat: run-integrity leak detection over finished transcripts#84dmorosanu wants to merge 31 commits into
Conversation
b28f08d to
e36c92a
Compare
…stead of counting them as failures
…d quoted heredoc bodies
…f partitioning on any angle bracket
…in the transcript
…nstead of sweeping every token
…ide listing versus emitting
…s before matching
…ed material is a read
…k dir is not a read
…s classify as the command that ran
… a quote-swallowed pipeline tail cannot turn execution into a read
Validation summary (detect-mode)The detector has been validated two independent ways: a live forward sweep and an offline A/B that isolates the effect of the fixes. Keeping this PR in draft — it is sound for 1. Live forward sweep — 127 tasks,
|
What
After a task finishes,
coder_eval.integrityderives what counts as graded material from the task's own config (reference.file,$TASK_DIRoperands in its criteria,sandbox.mock_path_dirs,template_sources[*].mount_point, plus always-answer basenames and path segments), scans the untruncated transcript, and classifies each command as a read of that material or not. Listing a path (ls,find) is not a read; emitting its content (cat,sed,python,git show) is.Verdicts:
CLEAN/TAINTED/INCONCLUSIVE(never CLEAN when the scan was partly blind - unrecovered sub-agent threads, parameterless commands over threshold, or unknown tools touching graded material). Findings are typedGRADED_READ(reference answer, grader script, task YAML,_fixtures/goldens) vsMOCK_DATA_READ(mock fixture stores), so the two can be triaged apart.INTEGRITY_MODEdefaults todetect(report only). Invoidmode a tainted pass flipsSUCCESStoFAILUREwithvoided=true, keepingweighted_scoreas computed (the score is the diagnostic); voided replicates are excluded from the experiment pass rate.Why
A task's score only measures the agent if the agent worked from the scenario's evidence. Measured across finished runs, agents read the reference answer, grader scripts, their own task YAML, golden solutions, and mock fixture stores - and every leaking row scored SUCCESS at or near 1.0, inflating suite averages and hiding regressions. Containment cannot close this (graders must be executable at grading time), so detection is the control.
Design constraints
driver: tempdirthe whole checkout shares the agent's filesystem by design; detection is the only driver-independent lever.CommandTelemetry.parametersdirectly, neverresult_summary, and never truncates the haystack (CommandExecutedCheckerclips at 2000 chars - exactly where a longcathides)._finalize_result.evaluate_integritynever raises - an integrity bug must not take down a row that otherwise ran fine.Validation
WinError 1314, 3 live-marked claude-settings).b390d7dc- zero regressions from this branch. The previously win32-skipped Docker/preservation files plus both integrity suites: 268 passed, 0 skipped, including the mount-shape change ine303ce5c.Known follow-ups (kept out of this PR)
./m/uip <verb>) is flaggedMOCK_DATA_READby the conservative unknown-utility rule even though executing the shim is the intended use. Fix direction: treat a graded-path match that is the segment's argv[0] as execution, not a read.mockspath segment matches inside unrelated library paths (.venv/lib/python3.x/site-packages/uipath/eval/mocks/...).voidmode;detectmode is unaffected in its purpose.