Repository navigation
fix: ground retention references in structured turn authors - #243
Merged
Merged
Conversation
The context witness rejected two kinds of legitimate references as context_witness_invalid, which held the candidate as discourse_uncertain: - a speakerless assistant or user turn has no author label, so the verifier's first-person "assistant" reference could not be grounded; - a name stated in one turn could not anchor a pronoun or short name in the same author's later turn. An unnamed assistant or user item now supplies its role as its author label, and an unambiguous antecedent may come from an earlier item with the identical author label. Another author's item, a later item and an item without an author label still cannot donate an identity; explicit names must still occur in their own frame. The verifier contract describes both, so the verifier version advances to v54. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The automatic-retention context witness was rejecting two kinds of legitimate references as
context_witness_invalid. Each rejection held the candidate asdiscourse_uncertain. While measuring #241, these were the largest single loss channel.source_name: "assistant", explicit, own frame) could therefore never be grounded.What changes:
retentionItemAuthorgives an item its speaker, or itsassistant/userrole when it has no speaker. The existing own-frame first-person rule then applies unchanged.retentionContextWitnesstakes the source's item order. Anunambiguous_antecedentmay now anchor on an exact name in an earlier item with the identical author label.RETAIN_VERIFIER_VERSIONadvances to v54, as fix: retain source context through immutable antecedent witnesses #226 did when it changed this contract.Still rejected, with a test for each:
explicitacross frames;Every reference keeps its semantic-role, preservation and completeness checks. The inner-reporter attribution audit keeps its same-item rule.
Measurement: an exact replay with identical model responses
I replayed all 224 live gpt-6-luna retention runs recorded for #241 through
runRetain. A model stub returned each recorded response, so every local check ran fresh under the old and the new grounding. 221 of 224 runs replayed completely; 3 revision calls had no recorded counterpart and were treated as unavailable.context_witness_invalidholdsI hand-audited the 35 newly admitted records against their sources, and so did a blinded gpt-6-luna judge.
self_attestedor a filledsource_speaker;What the 34 remaining holds are:
Notes for the release
RETAIN_VERIFIER_VERSIONv54 invalidates timeline-source extraction proofs, so timeline sources re-verify on upgrade. This matches earlier contract changes.Testing
pnpm check:repository,build,lint,knip,smokeanddocs:doctorpass.pnpm testpasses: 5024 passed in the full run. Threeingest.test.tscases timed out at 30 s under full-suite load, and that file passes 70/70 on its own.format:checkflags onlypackages/core/src/ops/context.ts, which is unchanged frommain.🤖 Generated with Claude Code