Skip to content

KB: review merged PR #307 - fix: recall hits carry actionable memory identity + search/list corpus parity (ISS-006) #309

Description

@github-actions

A merged PR may require knowledge-base updates. Review the change and update library/ as needed.

Source PR

  • PR: #307 - fix: recall hits carry actionable memory identity + search/list corpus parity (ISS-006)
  • Author: @thenotoriousllama
  • Merged into: main
  • Files changed: 18

PR description

Fixes ISS-006 (library/issues/issue-register.md): the /memories page's pre-search list and the search behind it were two different things — different result TYPE (interactive cards vs inert hits) and literally different corpora.

Acceptance criteria (user-stated, both encoded as regression tests)

  1. Presentation parity (primary): a memory returned by search must render as the SAME interactive card as the pre-search list — clickable, edit, forget — which requires recall hits to carry actionable memory identity end to end. This PR ships the daemon half of that contract; the hive card-rendering PR consumes it.
  2. Corpus parity (secondary): any memory visible in the pre-search list must be findable by search when the query matches its content — same table, same scope semantics, tokenized matching on top.

What changed

Piece 0 — recall hits carry actionable memory identity (additive)

Every memories-source hit now carries:

  • memoryId — the bare memories.id (open → GET /api/memories/:id, edit → /:id/modify, forget → /:id/forget). Derived from the hit identity, so lexical, semantic <#>, hydrate, and local-ANN hits all carry it.
  • memoryType — the list row's type badge (fact, …), projected as memory_type on the memories lexical arm, the fast semantic arm, the hydrate SELECT, and the local ANN index.

Session/summary/hive-graph hits are unchanged (no memory id exists — the UI renders those as today). Strictly additive: all pre-existing hit/response fields are byte-identical; the hooks fast lane reads only source/id/text and the full hooks suites are green.

Piece A — unified scope decision: no project → whole-workspace corpus

Pre-fix, the SAME degraded input (no project header, no cwd) resolved to opposite corpora: list → NO filter (whole workspace); recall → inbox-only. Recall now runs workspace-wide on degraded resolution, matching what the list shows (the list is the user's mental

Files touched

  • .claude-plugin/marketplace.json (+2/-2)
  • .claude-plugin/plugin.json (+1/-1)
  • CHANGELOG.md (+4/-0)
  • harnesses/claude-code/.claude-plugin/plugin.json (+1/-1)
  • harnesses/codex/package.json (+1/-1)
  • harnesses/openclaw/openclaw.plugin.json (+1/-1)
  • harnesses/openclaw/package.json (+1/-1)
  • package-lock.json (+2/-2)
  • package.json (+1/-1)
  • src/daemon/runtime/memories/api.ts (+32/-10)
  • src/daemon/runtime/memories/local-vector-index.ts (+37/-12)
  • src/daemon/runtime/memories/reads.ts (+6/-1)
  • src/daemon/runtime/memories/recall.ts (+205/-31)
  • src/daemon/runtime/recall/scope-clause.ts (+19/-0)
  • tests/daemon/runtime/memories/api.test.ts (+8/-5)
  • tests/daemon/runtime/memories/iss-006-search-list-corpus-parity.test.ts (+451/-0)
  • tests/daemon/runtime/memories/local-vector-index.test.ts (+3/-2)
  • tests/daemon/runtime/memories/recall-fast.test.ts (+3/-2)

Auto-generated by .github/workflows/kb-issue-on-merge.yaml on merge.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    knowledgeKB update prompted by a merged PR

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions