Repository navigation
fix(llm): leave empty truncated verifier replies unattributed - #485
Conversation
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Verified follow-up review at merged head e66a08c: the protected truncated-response parse hook preserves generic valid-empty parses, while FindingVerifier rejects zero complete salvaged verdicts before assigning answering-model provenance. The red regressions first produced 4 failures and a passing control; repaired focused validation passed 22 cases, broader validation passed 1,640 with 1 skip, and the source passed independent review. JSON-only model metadata remains intentional. The brittle documentation sentence assertion was relaxed without changing runtime behavior. This PR has since merged externally as main b8bbd52; no branch write or merge was performed in this review. No remaining actionable finding.
When a truncated verifier reply contains no complete JSON verdict,
FindingVerifier.verify()returns{}but currently attributes it to the fallback model. This follow-up to #455 leavesmodel_usedunset for that failed salvage, while retaining provenance for complete salvaged verdicts.A protected truncated-response parser hook lets the verifier reject empty salvage without changing other LLM subclasses, where an empty result may be valid. The brittle documentation sentence-equality assertion is also replaced by checks for the model label, fallback rule, and truncated-reply concept. Answering-model labels remain JSON metadata, as documented.
Validation: the new regressions first produced 4 failures and 1 valid-empty control pass. Final focused provenance/docs checks: 22 passed. Broader inference, security-validator and intra-skill analyzer suite: 1,640 passed, 1 skipped. Changed-file Ruff and applicable formatting checks pass. Independent diff/caller review approved e66a08c. No external model requests were made; SDK responses are controlled test fixtures.
Addresses Devin’s empty-truncated-verdict finding and Chris’s documentation-test nit on #455. This is a separate current-main repair; #455 remains merged. No merge performed.