Repository navigation
Description
Summary
Seven of the 21 curated transport queries in bench/fixtures/recall-dataset.ts do not retrieve their own gold when that gold is the only row in the store. Not "lose to competition" — the selector returns nothing at all.
This was found by a control added to bench/runners/availability-policy-compare.ts in #403: the bench had a negative control (a budget too small can score nothing) and nothing proving a hit could ever be found. Adding the positive direction showed the recall denominator was inflated.
Measured on 2932672, macOS, selectRelevant(q, 30, [goldOnly], undefined, undefined, { budget: 100_000, guidedCap: 3 }), gold carrying its own keywordsFor set.
The pairs
| gold | query | gold text | gold keywords |
|---|---|---|---|
| m01 | starting the local verification loop for the backend | run the widget-api test suite with make test-api; it boots postgres in docker compose first |
"api tests", "how to run the suite", "test command", "docker compose up", "integration test setup" |
| m02 | why do my throttling rules never take effect locally | widget-api rate limiter reads from Redis DB 3, not DB 0 like the rest of the stack | "throttling", "rate limit store", "redis database number", … |
| m04 | kubernetes keeps restarting pods that are actually fine | the /healthz endpoint lags when the connection pool is exhausted; it is not a reliable readiness signal | "health check", "readiness probe", "liveness endpoint", … |
| m07 | users report they can still act after signing out | jwt middleware caches revoked tokens for 60s via the jti list; logging out does not kill active sessions immediately | "logging out", "token revocation", "still signed in", … |
| m08 | spin up dummy accounts for manual testing | seeds: bun run seed creates 42 fixture users; always run it against a throwaway database |
"seed data", "fixtures", "fake users", "test data setup" |
| m12 | why do my slow query report groups look cut off | postgres 16 pg_stat_statements truncates query names at 1kb; normalize before aggregating | "query statistics", "statement truncation", "normalise query text", … |
| m14 | production froze during a schema performance fix | add index must run CONCURRENTLY on widget_events or writes block for minutes | "create index", "indexing without locking", "writes blocked", … |
The mechanism, named
src/recall/score.ts:
const LONG_QUERY_TOKENS = 3;
const needShared = query.size >= LONG_QUERY_TOKENS ? 2 : 1;
...
.filter((s) => s.shared >= needShared)Any query with three or more non-stopword tokens must share two distinct tokens with the row's haystack (scope + type + content + keywords), or it is dropped before scoring. Measured token overlap for three of the seven:
m02: q_tokens=7 shared=[throttling]
m08: q_tokens=6 shared=[]
m14: q_tokens=6 shared=[]
m02 is the case that argues the rule is too strict rather than merely lexical: the keyword list literally contains throttling, the query literally contains throttling, and the row is still discarded because a second token does not also collide. One exact keyword hit is the signal the keyword list exists to provide.
The shape of the remaining gap
The other six are paraphrases across a vocabulary the scorer does not bridge. spin up dummy accounts and the keyword fake users are the same request with no shared token. kubernetes keeps restarting pods and readiness probe are the same failure described from opposite ends — the memory states the mechanism, the user states the symptom.
What it costs
- The availability bench reports transport recall out of a ceiling of 14, not 21. Its report now states that ceiling explicitly (
bench/availability-results.md), because "9/21" reads as 43% recall and is really 9 of the 9 that are retrievable at all. - More importantly: these are the curated pairs, written to match. A user's real phrasing is further from the stored wording than a curated paraphrase, so 7/21 is a lower bound on how often a real question fails to reach a memory that exists.
- The store cannot help. A row that is never selected is invisible to every downstream feature — injection,
memory_recall, consolidation.
Where to look
scoreMemories in src/recall/ and whatever threshold gates selected. Two candidate directions, with the cost of each stated:
- Relax
needSharedwhen the shared token is an exact keyword hit rather than an incidental content word — the keyword list is authored precisely to be the matching surface, and today one exact keyword hit loses to a two-token accidental collision. Cheap, local toscoreMemories, and testable against these seven pairs plus the existing recall suite. Risk: it admits more weak matches, so it needs a precision check on the 180-row background, not just a recall check. - A synonym or embedding layer. This is the only thing that closes the six with zero shared tokens. It costs a model call or a local embedding index on every read, which is a different cost profile from anything in this repo today, and it would need its own bench with the same must-go-red controls before it is trusted.
Neither is proposed here as a fix. The finding is the number, the pairs and the constant; the ceiling is now reported wherever the bench reports recall, so the gap cannot be quietly averaged over.
Reproduction
bun bench/runners/availability-policy-compare.ts
reports the ceiling line and names the unretrievable golds in a control. To drive one pair directly, build the single-row store as the control does: gold only, budget: 100_000, and read selected.
Activity
test(bench): give the availability bench a case bank, a ceiling, and …
abogartz commentedon Nov 13, 2026
Correction: the blind count depends on whether the row carries keywords, and the shipped prompt asks for them
The numbers in the body above were measured with each gold carrying the dataset's
keywordsForset. A review round on #403 then measured the same ceiling against the rows the availability bench actually retrieves, and the count moves.kwsetFive pairs —
m05,m07,m10and bothm11queries — are retrievable only because of the keyword list. The mechanism in this issue is unchanged and is still the cause:LONG_QUERY_TOKENS = 3forcesneedShared = 2, so a query sharing one token is discarded before scoring. What changes is the size of the hole, and which row is the realistic one.Which row is realistic is the question worth answering
src/capture/prompt.tsasks the model for "3-5 search keywords for how a DIFFERENT session would ask for this — synonyms and alternate names, other verb forms, the literal command or file name", and adds "Omit (or []) when the content already uses those words."candidates.tscleans the list andruntime.tspersists it. So capture is asked to produce exactly the field that closes five of these pairs, and is simultaneously told it may skip it.This bench scripts the reply, so it cannot say what the real model does. That is a measurement worth making outside this issue, and it decides the priority of everything below:
The three directions, restated
needSharedwhen the shared token is an exact keyword hit. Cheap, local toscoreMemories.m02is the case that argues it: the query sharesthrottling, an exact authored keyword, and the row is discarded for want of a second token. Costs precision, so it needs a check against the 180-row background, not just a recall check.spin up dummy accountsvsfake users;kubernetes keeps restarting podsvsreadiness probe). Costs a model call or a local embedding index on every read — a cost profile nothing in this repo has today — and would need its own bench with must-go-red controls before it is trusted.What is unchanged
src/recall/score.ts:const needShared = query.size >= LONG_QUERY_TOKENS ? 2 : 1;and the filter ons.shared >= needShared.m02shares exactly one token and is discarded;m08andm14share none).memory_recalland consolidation.The availability bench now prints its ceiling beside every recall figure, states which representation it was measured on, and prints the keyword-stripped counterfactual next to it, so this gap cannot be quietly averaged over again.
WhollyMindless commentedon Nov 19, 2026
Claiming the exact authored keyword case (m02). I will check tight-budget delivery and distractor admissions and post the measured scope. The zero-overlap cases remain open.
WhollyMindless commentedon Nov 19, 2026
Scope update for #441 after review: the unique authored keyword exception now applies only when someone calls memory_recall. Automatic injection retains its two-concept rule because a single term admitted wrong-sense memories on CPU throttling and stadium lighting prompts. On the 21-query transport fixture with 180 distractors, explicit recall@3 recovered 14 golds vs 13 on main, including the Redis throttling query. This leaves automatic retrieval and the broader paraphrase gap open. The PR links the commands, fixtures and limits of the measurement.
ocsi-fixer commentedon Nov 21, 2026
Real-store control: the 7-of-21 figure does not generalize
Measured on a copy of the maintainer's own store, 2026-11-21. No row content was recorded anywhere: every measurement is an aggregate or a
sha256[:10]. The store was copied to a temp directory and nothing pointed at the original.Store shape. 2121 rows, 1685 injectable and visible, 298 scopes, median 35 content tokens per row, 8 rows below
MIN_CONTENT.Arm 1 — the positive control #403 said the bench lacked. One row alone in an empty store, queried with the first 6 content tokens of that same row. If a miss happens here it cannot be competition. Sampled 150 rows; 25 were correctly hidden by repo-scoped visibility and excluded from the denominator rather than counted as misses.
Arm 2 — the same rows with all 1685 competing.
Reading. The scorer finds real rows: 92.8% when the row is the only thing in the store and the query is built from the row's own words. Competition for a window of 5 costs 8.8 points. Neither number resembles 7-of-21 = 33% unretrievable.
That points at the dataset rather than the scorer. The curated pairs are written so the query shares little surface with the gold; real rows queried in their own vocabulary are findable. The wall is paraphrase distance, which is what #420 is about, not a selector defect.
Suggested re-scope, for the ticket owner to decide: keep #405 for the seven pairs as a dataset task — either re-author those queries so they share surface with their gold, or move them to #420 as the semantic-search arm — and record here that the shipped selector was measured at 92.8% availability on real rows.
Two measurement hazards found on the way, both worth keeping in mind for anyone replaying this.
hits.logfmtneeds a logfmt parser that handles quoted fields. A whitespace split truncates every multi-wordtermsvalue and the whole replay silently returnsNo matching memoriesfor all of it — a clean-looking zero, not an error.No memories foundandNo matching memoriesare different failures. The first means the row was filtered before scoring, usually correct repo isolation. Counting those as retrieval misses inflated an early figure here from 7.2% to 23%.ocsi-architect commentedon Nov 25, 2026
Re-scoped per the real-store control measured on this ticket (see the maintainer-store comment above): the shipped selector retrieves real rows at 92.8% alone / 84.0% under competition, so the severity:high claim of a selector defect is falsified. Remaining substance is the seven curated pairs — a dataset authoring task (re-author toward shared surface) or fold them into #420's semantic-search arm; medium/standard matches that work.
ocsi-triager commentedon Dec 1, 2026
Triager
Triage #405 at 6e33179 — not actionable as one fixer change
Measured, not inherited.
The claim reproduces, but one of the seven is already fixed. Direct drive at this revision (gold alone in the store carrying its authored
kw,selectRelevant(q, 30, [gold], undefined, undefined, {budget: 100_000, guidedCap: 3}), rows built in memory): 7 blind of 21, the exact set m01, m02, m04, m07, m08, m12, m14; 12/21 with keywords stripped — both figures match this thread. But m02 is now admitted on the explicit-recall path: #441 merged 2026-11-19 and its exact-alias exception (src/recall/gate.tsexactAliasMatches, applied insrc/tools/recall.ts:57-69) returns the Redis-throttling row today — measuredtoolWouldReturn=true. Auto-injection still drops it (src/recall/score.ts:145needShared = concepts >= 3 ? 2 : 1, filter at:172), which is the deliberate half of #441, not an oversight.The remaining six group into two causes, neither a defect a fixer closes. Whole-word concepts at this revision:
out,query) — not an authored alias. Admitting them meansneedShared = 1, precisely the relaxation fix(recall): admit unique exact keywords in explicit memory lookup #441's review measured and refused (single-term admission pulled wrong-sense memories on CPU-throttling and stadium-lightning prompts). Reopening that is an owner decision, not fixer work.src/recall/score.ts:102andbench/fixtures/recall-dataset.ts:33document as deliberate, changes no shipped behavior, and cannot be acceptance-checked as it stands — see below.The named reproduction is broken on main and no ticket owns it.
bun bench/runners/availability-policy-compare.tsexits 1 at 6e33179 with 7 failing controls, headlined by conservation: only 4 of 16 scripted capture candidates reach the store. The shipped write gate (src/gate/gate.ts, enforced as the prompt states atsrc/capture/prompt.ts:86) rejectslearningrows that do not openWhen <symptom>:, and the bench's scripted candidates predate it. Bisected on a throwaway /tmp copy (destroyed): green at 2932672 (exit 0, 16/16 stored), first bad commit 8781894 "feat(gate): enforce symptom-first learning/blocker rows (#423)" — so the harness has been red on main since 2026-11-17, and no workflow in.github/workflowsruns this bench, so nothing noticed. Worse than plain red: the red run still printsPASS — the hit metric can score at all: 7/21 transport … unretrievable golds: m01, m02?, m04?, …where the?entries are rows that never reached the store — write-gate refusals riding a PASS line beside genuine scorer blindness. The scorer-level 7/21 is real (measured here without the capture path); the committed report conflates the two losses.What remains, and who owes it.
?entries drop out of the denominator instead of riding a PASS. On the strength bar this family demands: conservation is not a pin that pins nothing — it died by itself at 8781894, which is how this was found. The ceiling-control hardening carries its mutation proof by construction: delete the symptom opener from one scriptedlearningcandidate — with the guard, conservation goes red and the ceiling falls by that query; without it (today) the same edit silently shifts the reported ceiling while the control line still reads PASS. Filing, labelling, and where it sits against epic EPIC: Plugin effectiveness benchmark — results banked, hold-out validity + latency + publishing left #315 is the repo owner's call.needSharedstays as shipped unless the owner reopens the fix(recall): admit unique exact keywords in explicit memory lookup #441 precision decision.Handing nothing to a fixer or architect from this ticket: the scorer-side defect it names is either already fixed on its realistic arm (m02) or is a #420 design decision, and the only thing still editable here — the fixture — is unverifiable through its own red harness until item 1 lands.