fix(e2): ground relative claim times against in-document session anchors (#158) - #179
Merged
Conversation
fazpu
enabled auto-merge (squash)
July 29, 2026 17:27
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Closes #158.
What
WHEN questions failed even with perfect retrieval: a claim like "went to the support group yesterday" stored the relative phrase with no absolute time anywhere (13/168 claims got valid-time on the flash arm; none of the gold ones). Two changes:
Extraction resolves relative time into structured D41 fields. The Claimify prompt now REQUIRES resolving relative temporal expressions ("yesterday", "last Saturday", "last year") against the absolute anchor in the document header, into the existing
valid_kind/valid_from_iso/valid_until_iso/valid_precisionfields with honest precision — day as equal bounds, year as calendar-range bounds (2022-01-01..2022-12-31). Three worked examples. Claim text keeps the source's relative wording; computed dates never enterclaim_textoradded_context— which also removes the old prompt's instruction to resolve relative dates via decontextualization, a path the D32 union-grounding gate would reject as non-verbatim. No anchor → fields stay null; never invent.E2_EXTRACTOR_VERSION07g→07h (re-extraction under D56).The stamp is visible at answer time.
claims_verbatimand relation-evidence hydration now surface nullableclaim_valid_from/claim_valid_untilon evidence rows via the sharedEvidenceResultenvelope model (both SQL paths; the benchmark client shares the model, so it flows through with no benchmark change). Precision/kind enums intentionally not surfaced — inferable from the bounds; named as a non-goal in the design doc.No migrations, no
benchmarks/changes, no protocol-fingerprinted content touched. decisions.md D41 amendment (2026-07-29); website API reference updated.Acceptance (per #158)
On the smoke corpus after re-extraction under 07h: the two gold WHEN facts (support-group visit → day precision 2023-05-07; sunrise painting → year 2022) must carry grounded
claim_valid_from. Verified on the VM store after merge, before the full benchmark.Reviews
Grok-4.5 adversarial review: REQUEST CHANGES → remediated → conditional APPROVE. Verified: date arithmetic in prompt examples (Mon 2023-05-08 → Sat 2023-05-06), grounding-gate isolation from structured fields, both EvidenceResult SQL paths covered (no silent third path), naive-datetime rejection, D56 version-bump semantics, old-envelope compat. Blocking finding (design doc retained pre-Relative temporal expressions are never grounded to the session date — WHEN questions fail even when the event claim is in store #158 anti-pattern worked examples that could re-break the fix) remediated in the amended commit; three minor notes (non-goal naming, website wording, last-Saturday test pin) also applied.
Claude (final review): verified prompt/design consistency post-remediation, benchmark envelope compatibility, ran affected suites green.
I have read and agree to the RememberStack Contributor License Agreement v1.0.