fix(e2): token-tolerant D32 union grounding — stop rejecting prompt-mandated attribution scaffolding - #180
Merged
Merged
Conversation
Resolve the tolerant-matching backlog item exposed by the conv-26 E2 07h ledger: 144 grounding rejections, dominated by prompt-mandated attribution and decontextualization scaffolding. Keep all content and numeric tokens source-bound, skip empty additions, and record failed tokens.
fazpu
enabled auto-merge (squash)
July 29, 2026 21:01
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
1 task
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.
What
The extraction prompt REQUIRES attributed claims ("X said Y stays attributed") and pronoun/possessive decontextualization — but the D32 layer-2 gate demanded every
added_contextsubstring exist verbatim in the bundle union. The prompt and the gate contradicted each other, and the gate won: on the live conv-26 store (E2 07h), ~40–60% of all 144grounding_rejectedledger rows are prompt-mandated scaffolding ("said" ×13, "Caroline said" ×9, "said she" ×7, "said that" ×4, possessives, 13 empty-text additions). Gold facts died: "Yeah, I painted that lake sunrise last year!" produced a correct attributed claim that was killed over the addition "Melanie said, ".Layer-2 membership is now token-grain: every content token of a non-empty addition must appear case-insensitively at a word boundary somewhere in the same union as before (target chunk, header, same-section neighbours, stored prefix; summaries still excluded). A small closed functional allowlist (attribution verbs, function words, punctuation, possessive
's) may supply absent scaffolding. Hard rules:failed_tokensnow recorded in ledgeredit_detailfor sharper future analysis.Preserved invariant, stated in the D32 amendment: every content token of every addition remains traceable verbatim to source-derived bundle text — no outside knowledge can enter. Layer-1 verbatim span anchoring unchanged.
E2_EXTRACTOR_VERSION07h→07i.Reviews
Grok-4.5 adversarial review: APPROVE WITH NOTES. Verified: token failure-order (union → numeric → allowlist), glue-vs-content composition ("said that" passes; "from Paris" fails on
paris), empty-skip cannot mask invention, ledger backward-compat, honest docs/version notes. Notes (non-blocking, tracked as follow-ups): regression tests for boundary-matching and allowlist-poison, possible future extension of the closed attribution set (believes,replied) if the ledger shows demand, prompt wording alignment.Claude (final review): verified tokenizer possessive/curly-quote handling, numeric-before-allowlist ordering, no content words in the allowlist, ran the suite (25 passed).
I have read and agree to the RememberStack Contributor License Agreement v1.0.