fix(search): admit hosted-event session neighbors for host leftover covering (P32) - #148
Merged
Merged
Conversation
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>
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>
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.
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:
ListMemoriesLimitedis a 400-row recency window (party list rank 1224 / 2571).session_ids from leftover-covering candidates, not FTS head.7fa994, 115/180 net 0) coveredJohn organized a small party for veteransbut omitted share-stories. That leftover isprimitive=episodeand 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 SHAcd77a74; pin docs67bac0b.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).Test plan
gofmt+go test ./internal/memory/--run-prefix locomo-s0-diag-mh-135-p32bvs P31909042→ 116/180 net +1Linear / tracking
cd77a74/ docs67bac0b)98d8931/ docs86d2a65)Risk / follow-ups
advice.