Skip to content

feat: temporal_score + IncludeHistorical on temporal intent - #103

Merged
cursor[bot] merged 1 commit into
devfrom
pr/temporal-features-v1-a6c7
Aug 13, 2026
Merged

feat: temporal_score + IncludeHistorical on temporal intent#103
cursor[bot] merged 1 commit into
devfrom
pr/temporal-features-v1-a6c7

Conversation

@sdntsng

@sdntsng sdntsng commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Wave D: LME temporal-reasoning 0/6 and knowledge-update 0/3. /recall searched before intent classification, so IncludeHistorical was only set when the client sent it. Auto-supersede still hides prior state (NY) from default search after “moved to Austin”.

This is PR3 (temporal retrieval V1). Reuses mig-16 columns (valid_to already written on atom retire; ends_at now written on event close). No new event schema.

Changes

  • Classify intents first; set IncludeHistorical for historical/temporal intents (before / when / ago / how long / used to).
  • SearchOpt also upgrades from query intent so /memories/search matches /recall.
  • temporal_score fusion channel via ScoreAndRankV2Temporal (zero temporal does not change max_possible).
  • memory_type (state / event / episode) in record metadata — not a duplicate time table.
  • EventEnder.EndMemoryEventsByMemoryID sets memory_events.ends_at on supersede.
  • Tests: NY retrieved on “where did they live before”; current-state still prefers Austin and does not leak NY.

Test plan

  • go test ./internal/memory/
  • go test ./internal/store/postgres/ ./internal/jobs/ ./internal/api/ (postgres/jobs/api were green with this change)
  • OpMem 13/13 + marketing after merge
  • Honest remasure of LoCoMo temporal slice / LME temporal+KU only after this is on the stack — do not invent lift here

Linear / tracking

Wave D gate after #100 / #101. Independent of PR5 (#102) on dev.

Risk / follow-ups

  • “when” / “how long” include historical for retrieval; current-state ranking still prefers active state.
  • PR4 (budgets / episode penalty) and PR9 (assistant episodes) are separate.
  • No SOTA claim. dev only; do not merge to main.
Open in Web Open in Cursor 

Classify intents before SearchOpt so before/when/used-to queries
include superseded state. Add temporal_score as a fusion channel
(not recency +0.05). Tag memory_type in metadata; set event ends_at
on supersede (mig-16 columns). Current-state still prefers Austin.

Co-authored-by: Siddhant Singh <sdntsng@users.noreply.github.com>
@sdntsng
sdntsng marked this pull request as ready for review August 13, 2026 12:48
@cursor
cursor Bot merged commit eee9031 into dev Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant