Skip to content

bug: /api/memory/search can never match Verifiable Memory — VM graph filter still uses pre-rc.16 "_verified" prefix (+ http-only schema.org matching) #1096

Description

@Bojan131

Bug Description

POST /api/memory/search (the backing route for dkg_memory_search, the primary agent recall tool) returns 0 results for entities that are verifiably present in VM. Two independent causes: (1) the VM graph filter still matches the old _verified graph-name prefix, but the rc.16 KA memory refactor renamed VM graphs to _verifiable_memory/..., so the VM layer is permanently invisible to search; (2) the label match only covers http://schema.org/name, so anything written with the (very common) https://schema.org/name is unfindable in any layer.

Expected Behavior

  • Searching for the literal name of a published VM entity returns it.
  • Both http://schema.org/name and https://schema.org/name (and ideally rdfs:label, which is already included) match.

Actual Behavior

  • Entity https://example.org/alice with https://schema.org/name "Alice QA" confirmed in VM via POST /api/query (view: "verifiable-memory"), but /api/memory/search {"query":"Alice QA"}resultCount: 0.
  • Control: writing an entity with http://schema.org/name "FindableEntity" into SWM → search finds it immediately (sources: ["sparql"]). Same entity shape with https:// → 0 results.

Steps to Reproduce

  1. Publish a KA whose triples use https://schema.org/name (e.g. the SKILL.md quick-start example, which uses https://schema.org/name).
  2. Confirm it in VM: POST /api/query with view: "verifiable-memory" → row returned.
  3. POST /api/memory/search {"query":"<that name>","contextGraphId":"<cg>"}resultCount: 0.
  4. Write the same data with http://schema.org/name into SWM → search finds it (proves the scheme sensitivity).

Possible Root Causes

packages/cli/src/daemon/routes/memory.ts (~line 2394):

if (l === 'vm') return `STRSTARTS(STR(?g), "${cgUri}/_verified")`;   // graphs are now .../_verifiable_memory/...

_verifiable… does not start with _verified (they diverge at the 8th character), so the VM branch matches nothing post-rc.16. And ~line 2403 hardcodes the http scheme:

?entity <http://schema.org/name>|<http://www.w3.org/2000/01/rdf-schema#label> ?name .

Note the served SKILL.md quick start itself writes https://schema.org/name, so following our own docs produces unsearchable data.

DKG daemon / version

10.0.0-rc.17, commit 809cf3a (origin/main 2026-06-10)

Surface / Component

daemon HTTP /api/memory/search / MCP dkg_memory_search

Notes / Related Issues

Found during a QA pass on fresh main. Regression risk class: rc.16 graph rename (_verified_memory_verifiable_memory) — worth grepping for other stale _verified prefixes outside this route.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfix-in-flightFix exists on an open PR — close after mergepre-mainnetMust land before mainnet launchpriority:highMust-fix: protocol correctness, security, economics, or headline flow broken

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions