Skip to content

fix(llm): leave empty truncated verifier replies unattributed - #485

Merged
rng1995 merged 1 commit into
mainfrom
naren/llm-empty-truncation-provenance
Nov 13, 2026
Merged

rng1995 merged 1 commit into
mainfrom
naren/llm-empty-truncation-provenance

Conversation

@rng1995

@rng1995 rng1995 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

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 leaves model_used unset 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.

@rng1995
rng1995 merged commit b8bbd52 into main Nov 13, 2026
27 checks passed
@rng1995
rng1995 deleted the naren/llm-empty-truncation-provenance branch November 13, 2026 08:47

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant