Skip to content

fix(search): admit hosted-event session neighbors for host leftover covering (P32) - #148

Merged
cursor[bot] merged 7 commits into
devfrom
pr/locomo-180-p32-1e9e
Aug 25, 2026
Merged

cursor[bot] merged 7 commits into
devfrom
pr/locomo-180-p32-1e9e

Conversation

@sdntsng

@sdntsng sdntsng commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

P31 frozen pin is 115/180. Remaining SH miss conv-41-q98 (What did John host for the veterans in May 2023 as part of the project?) gold is a small party to share their stories.

Covering-only and admit-only were not enough:

  1. Generic session-neighbor cap 16 misses the party line (session_15 has 69 rows; party is neighbor ~50).
  2. ListMemoriesLimited is a 400-row recency window (party list rank 1224 / 2571).
  3. FTS overfetch never contains session_15; realize/photograph enter via dense/related. Seed session_ids from leftover-covering candidates, not FTS head.
  4. Undated party ranked [GAP-M1] Fair Mem0 LOCOMO same-pin compare #51 vs May-dated photograph [M3] Close remaining eval seeds 3,5,8-10 (ENG-98) #6. Host-query boost for leftover hosted-event lines.
  5. First P32 180 (7fa994, 115/180 net 0) covered John organized a small party for veterans but omitted share-stories. That leftover is primitive=episode and fact-primary recall dropped it.

This increment (generic English, not a host→party dictionary, May stays in search): leftover covering for what-did/does/has-X-host prefers hosted-event lines and joins two covering lines; bounded session-id fetch; hosted-event rank boost; host queries keep leftover hosted-event episode primitives.

Pin: skip-ingest locomo-s0-diag-mh-135-p32b-product-recall-s1-ecb9c9 = 116/180 (0.644) vs P31 115/180. Flips +1 / −0. Only gain: conv-41-q98. MH 18/33 · OD 4/11 · SH 64/98 · temporal 30/38. Ledger: RETRIEVAL 28 / PROOF 22 / READER 8 / WRITE 4 / HARNESS 2. Product SHA cd77a74; pin docs 67bac0b.

First P32 180 is not a pin.

Changes

  • internal/memory/recall.go: host leftover covering, prefer hosted-event over realize, join up to two hosted-event covering lines.
  • internal/memory/service.go: leftover-coverage-ranked session-id fetch, hosted-event rank boost, keep hosted-event episodes on host queries.
  • internal/store/postgres/store.go: ListMemoriesBySessionIDs (bounded per-session window).
  • Tests: covering vs realize/photograph/dinner/5K; join requires stories; episode keep; rank boost.
  • Pin: locomo-s0-diag-mh-135-p32-20260825.md + cycle-closeout P32 section.

Test plan

  • gofmt + go test ./internal/memory/
  • Live veterans cites party and share stories (not realize, not photograph, not 5K)
  • Holds: P31 stuffed-animal, P30 push, P28 22/22
  • Skip-ingest 180 --run-prefix locomo-s0-diag-mh-135-p32b vs P31 909042116/180 net +1

Linear / tracking

  • ENG-176 / ENG-168
  • Frozen pin this cycle: P32 116/180 (cd77a74 / docs 67bac0b)
  • Prior pin: P31 115/180 (98d8931 / docs 86d2a65)

Risk / follow-ups

Open in Web Open in Cursor 

sdntsng and others added 2 commits August 25, 2026 08:50
What-did-X-host leftover covering was selecting dated realize lines
because they carry the query month. Prefer party/dinner/gathering lines
and penalize realize-only restatements. Do not treat 5K runs as hosted
events. Do not drop May from search.

Co-authored-by: aria <aria@engramhq.com>
Host leftover covering cannot prefer a party/dinner line that never
enters the packet. Crowded same-session stores fill the 16-neighbor
cap before the hosted event. Admit a bounded hosted-event subset from
lexical-seed sessions without raising the global cap or adding event
nouns as query tokens.

Co-authored-by: aria <aria@engramhq.com>
@cursor cursor Bot changed the title fix(recall): host leftover covering prefers party over realize (P32) fix(search): admit hosted-event session neighbors for host leftover covering (P32) Aug 25, 2026
sdntsng and others added 5 commits August 25, 2026 09:02
The hosted-event admit helper only sees ListMemoriesLimited's 400-row
recency window. Crowded subjects park older session rows past that
window, so the party line never reaches leftover covering. Fetch a
bounded per-session slice for lexical-seed session_ids instead of
raising the global corpus cap or adding event nouns as query tokens.

Co-authored-by: aria <aria@engramhq.com>
Lexical overfetch fills the first eight session_ids with unrelated
project/community sessions, so the hosted-event session never loaded.
Rank seed sessions by leftover token coverage (veterans/May beat a
lone project mention) before the bounded per-session fetch.

Co-authored-by: aria <aria@engramhq.com>
FTS never contains the hosted-event session, so seed session_ids from
leftover-covering candidates (realize/photograph) and fetch that
session. Date-token ranking still buried the undated party past top-k;
boost leftover hosted-event lines on host queries so covering can see
them. Photograph and 5K runs are not hosted events.

Co-authored-by: aria <aria@engramhq.com>
The compiler stamps the first-person party leftover as primitive
episode, so fact-primary recall dropped it once coverage looked
complete. Host queries keep leftover hosted-event episodes, then join
two hosted-event covering lines so the answer carries both the event
and its leftover purpose. Foreign dinners and 5K runs stay out.

Co-authored-by: aria <aria@engramhq.com>
Skip-ingest p32b 116/180 (+1 veterans party+stories / -0 vs P31). First
p32 180 was 115/180 net 0 from party stamp without share-stories; not a pin.

Co-authored-by: aria <aria@engramhq.com>
@sdntsng
sdntsng marked this pull request as ready for review August 25, 2026 09:41
@cursor
cursor Bot merged commit 67bac0b into dev Aug 25, 2026
2 checks passed
@sdntsng
sdntsng deployed to dev - brainy-worker-staging August 25, 2026 09:42 — with Render Active
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