Skip to content

fix(recall): relaxed recall rung + v0.1.1 (ADR-0102) - #13

Merged
Xxx91n merged 3 commits into
mainfrom
hotfix-0.1.1-recall
Oct 15, 2026
Merged

Xxx91n merged 3 commits into
mainfrom
hotfix-0.1.1-recall

Conversation

@Xxx91n

@Xxx91n Xxx91n commented Oct 14, 2026

Copy link
Copy Markdown
Owner

What

Hotfix 0.1.1: recall_memory couldn't reach stored evidence when asked in natural language.

  • Both recall layers (internal retrieval_results and the project index) build the FTS5 query as (w1* AND … AND wN*) OR "phrase" (ADR-0023 D2).
  • A host's natural-language follow-up almost never has every term inside a single row.
  • Host-in-loop repro (Codex 0.142.5): 111 internal rows and 85 project-index rows were stored, yet recall_memory("latest NBA champion NBA Finals MVP") → 0 hits in both layers. The same terms OR-ed → 85/111.

Fix (ADR-0102 D1): strict rung first, relaxed rung on under-fill

  • The strict rung is unchanged; its ranking and priority are kept.
  • When it returns fewer than limit rows, append a relaxed rung:
    • content words OR-ed with prefix match;
    • same BM25 ranking, plus freshness for the internal layer.
  • Coverage floor: a relaxed row must cover a strict majority of the query's content words. This keeps the golden unanswerable (un_*) near-miss contract: a row sharing a single entity word is not evidence. The first draft without the floor broke 3 eval tests; with it they pass.
  • Applied to SqliteSessionStore.searchMemory, searchMemoryMultiQuery (per variant) and ProjectIndexStore.search.
  • Also noted (ADR-0102 Consequences): ProjectIndexStore's SELECT p.rowid returns the PK as id at runtime, so dedupe keys on id. The SQL and the /recall shape are unchanged.

Version

0.1.0 → 0.1.1 in one commit: 9 package.json + plugin.json + ship-gate release pin + provider clientInfo. CHANGELOG 0.1.1, ADR-0102 + index regen, CONTEXT term.

Verification (local, Windows)

  • pnpm -r check → exit 0
  • pnpm test → exit 0, 0 failures, including eval-abstain / eval-gate / eval-runner
  • New regression tests:
    • packages/store/test/fts5-relaxed-recall.test.ts (8, including the 0-hit repro and the near-miss negative)
    • apps/plugin/test/project-index-relaxed.test.ts (2)
  • node scripts/ship-gate.mjs → ship gate green — ready to tag the next release (server reports v0.1.1)

After merge (release)

gh workflow run release.yml -f runPurpose=pre-tag → when green, git tag v0.1.1 && git push origin v0.1.1 → the OIDC publish job runs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GoFKmiw99ChCMjGAX8BVxL

Euiop1 and others added 3 commits October 15, 2026 02:21
…ored evidence (ADR-0102) + v0.1.1 全包钉版

- fts5: fts5RelaxedQuery / relaxedTerms / coversMajority / appendRelaxed — strict rung (ADR-0023 D2) first; on under-fill append content-word OR rung, same BM25/freshness ranking, strict-majority coverage floor (golden un_* near-miss contract kept)
- applied to SqliteSessionStore.searchMemory, searchMemoryMultiQuery (per variant), ProjectIndexStore.search (dedupe on runtime PK key id)
- regression: packages/store/test/fts5-relaxed-recall.test.ts (repro: strict rung alone = 0 rows), apps/plugin/test/project-index-relaxed.test.ts
- v0.1.1: 9 package.json + plugin.json + ship-gate release pin + provider clientInfo (R66 F-01 同 commit)
- docs: ADR-0102, CHANGELOG 0.1.1, CONTEXT Relaxed Recall Rung

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GoFKmiw99ChCMjGAX8BVxL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GoFKmiw99ChCMjGAX8BVxL
…3f85fee — assert well-formed path, not existence

main 3f85fee (untrack .scratch) turned ci + ship-gate red on clean checkouts: 64 docs-golden entries cite .scratch/ provenance that no longer ships. Tracked refs still must resolve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GoFKmiw99ChCMjGAX8BVxL
@Xxx91n
Xxx91n merged commit 95d5fd0 into main Oct 15, 2026
13 of 14 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