Repository navigation
feat(processing): source-backed document references and contextual nomination (D122/D123) - #403
Merged
Merged
Conversation
This was referenced Sep 14, 2026
fazpu
force-pushed
the
feat/document-reference-context
branch
from
September 14, 2026 12:17
fc2d6b0 to
0a0db91
Compare
Preserve distinct cards that share a passage, measure Claimify bounds on the rendered block, require merged status on identity redirects, and pin the observed catalog constraint counts. Record the implementation eval.
The review found no blockers or material findings. Optional nits are left unfixed so the reviewed code SHA remains the contract head.
Replace the temporary PassageSupport stand-in with the shared catalog descriptor and PassageRegion. Card publication still requires a target body passage, not keep-origin eligibility.
EXTRACT_CLAIMS now publishes one frozen Selection result per chunk, including zero-candidate/zero-card outcomes and remapped same-input reuse. GROUND_CLAIMS requires the target freeze and every previous-eight producer, hashes Claimify inputs from those source bases, remaps occurrences through target-9..+1 windows, and completes no-keep chunks without a provider call.
Pin RS-LoCoMo-Full-v31 to D122/D123 generations and the ground_claims E2 split. Extractor assertion-clarity-4:d122-source-references-1, normalizer d123-context-refs-2, adjudicators d123-context-nom-2, concise renderer concise-handles-2. GemmaVertex stays reader-only. Fingerprint regenerated from prepare. Question manifests unchanged.
Adapt existing worker tests to the D122 two-stage contract: Selection freezes on extract_claims, Claimify runs on ground_claims with the same handler, and normalize waits for ground completion. Catalog stubs expose selections and chunks_for_references.
fazpu
force-pushed
the
feat/document-reference-context
branch
from
September 14, 2026 13:12
93f3acf to
e7553a1
Compare
fazpu
marked this pull request as ready for review
September 14, 2026 13:55
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.
A document can introduce a tournament in chunk 2 and discuss “that tournament” in chunk 7. Independent chunk extraction misses that connection; fact nomination can also miss relevant existing assertions even after the event is identified. This implements D122/D123 using source-backed references and ordinary entity resolution.
What changes
Selection saves its complete response once, including empty results and references with exact source passages. After every chunk has finished Selection, Claimify runs through the existing
ground_claimswork stage. It can use references from the previous eight chunks, including across section boundaries. The limits are four published references per Selection and eight references / 4,096 rendered characters per Claimify request. The source quotations must be cited; descriptive reference names are navigation hints.Version reuse includes the source inputs of every eligible earlier producer, even one that emitted no references. Unchanged inputs reuse decisions and claim IDs, with every evidence range remapped to the new occurrence. The normal extraction barrier, readiness and connector finalization wait for Claimify. Late responses cannot republish forgotten sources; the new source-owned stores are scrubbed and verified by hard forget.
Normalization may identify up to four other entities discussed in an assertion, including a particular unnamed event with a descriptive name. Existing resolution remains authoritative. Fact nomination retains the same-subject 20-fact baseline and may add up to eight context matches. Sharing an event is not a decision that two propositions are the same: a win, participation and enjoyment remain different assertions. Context names and aliases enter the compact model presentation linked to their source assertion; database validation stays in the full internal snapshot.
The clean-store migration refuses populated prior stores. Full-v31 pins the combined generations, including the new Claimify work stage. No event type, extra date window, third extraction model call, grouping algorithm, provider default change or conversion framework is introduced.
Sources and validation
Binding:
plan/designs/document_reference_context_design.md,contextual_fact_nomination_design.md, D119–D121, andplan/analysis/lean_processing_contracts.md. Detailed evidence and limitations:plan/implementation_evals/d122_d123_document_reference_context_20260914.md.Rebased onto main
6205fe09, after PR400 and PR402 merged. No paid quality or cost result is claimed. A separately identified conv-42 processing experiment with explicit Gemma/Vertex routing follows merge; the standard Gemma benchmark variant remains reader-only. No answering or judging is part of that requested experiment.Contributor agreement
Signing on behalf of a legal entity (leave blank if accepting individually):
Final review: Antigravity approved runtime e7553a1 with no material findings; its report and 81 independent PostgreSQL checks are recorded in
plan/implementation_evals/d122_d123_agy_review_e7553a1a.md. Parent corrected the old retrieval fixture to run GROUND_CLAIMS; all 14 direct retrieval tests pass. Final head 7e64bed changes only tests/review evidence beyond the reviewed runtime. Exact-head CI is being collected before merge.