jouleclaw: an answer carries its verifier's backing, so a cached answer is not refused as ungrounded #276
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/answer-carries-entailment-backing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was wrong
An answer's
Provenancestored the entailment results the verifier consulted, but not the backing the verifier declared for them (VerificationReport::grounding_backing).jouleclaw-edge-cli rebuilds a
VerificationReportfrom a cached answer. Without a stored backing, the rebuild could only declare the floor,Backing::Unstated. As a result,require_substantive_groundingrefused every cached answer as ungrounded, including answers a real NLI model had grounded. The rebuild's own comment named the fix: persist the backing beside the entailments.The fix
Provenance.entailment_backing: Option<Backing>. It is omitted from the wire when absent, so answers and caches written before it keep their bytes and deserialize as before. Absent reads as unstated.compose_verified_answercopies the report's backing into the answer.model_ids, because that would let a stand-in pass as a real model.require_substantive_groundingstill checks the backing against the cached results:AnswerOrRefusalgainsallow(clippy::large_enum_variant), with the reason in a comment. The new field pushed theAnswervariant past clippy's size threshold. There is one value per query, and boxing it would change a public enum for no measurable gain.Checked
Tests run on the build host:
jouleclaw-schema,jouleclaw-composeandjouleclaw-edge-clipass, including the new tests:the_answer_carries_the_verifiers_backinga_cached_answer_keeps_the_backing_its_verifier_declareda_cached_backing_is_never_promoted_or_trusted_past_its_resultsNoneand round-trips whenSomeEach of these mutations fails a test:
SingleModelfrom the cachedmodel_id, which is the stand-in-as-model path.🤖 Generated with Claude Code