Repository navigation
Fix/gepa user provenance evidence - #788
Conversation
|
Thanks for digging into this. You're right that real requests go missing from GEPA evidence, and #747 points the same way. I can't take this approach, though. Today the rows with What would fix the missing requests is having If you'd rather not, no problem: I'm happy to take it from here with you as co-author. |
|
Update: I pushed a follow-up commit ("befda6086783a90cbd13227f1ddcf1844169c19d") addressing the trust/provenance concern.
Validation shows: collected in this environment because "croniter" is missing. CI checks are running on the new commit. Please let me know if I could handle it! Chatgpt 6 was used to fix this🤖 |
The request is the newest user-role row that is not a tool result. Tool results are recognised by what they hold (no flat text, and content_json made only of tool_result blocks), not by their trust tags. The trust check then applies to that row: trusted, its text is the request; untrusted, the request is withheld. So a tool round after an untrusted turn no longer reaches past it to an older request that did not start the run. Tests: an untrusted turn followed by a tool round is withheld; an untrusted row that is not a tool result is withheld, not skipped; several tool rounds are all walked past; the tool-result fixture now looks like a real row (empty content, a tool_result block in content_json). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for sticking with this. You got the important part right: keeping the trust check. I pushed one small commit on top to cover a last edge case (a tool round after an untrusted turn) plus a test for it, so there's nothing more you need to do. Merging once CI is green. Really appreciate it! |
Summary
This PR fixes an edge case in GEPA request evidence selection where genuine user messages could be incorrectly excluded due to inconsistent trust metadata.
Previously, messages were withheld whenever "is_trusted" was false, even when "provenance" identified them as originating from the user. This could cause legitimate user requests to be missing from GEPA evidence.
Changes
Testing
Added "tests/test_gepa_evidence_request_provenance.py" to cover the relevant cases. The test suite has not yet been executed in this environment, so CI validation is still needed.
Related to #747.
This change is intentionally limited to GEPA evidence selection and does not modify trust policies elsewhere.