Skip to content

Recall reports "the bank had nothing" when it was the resolver that dropped everything #9

Open

Description

@krapcys1-maker

Recall can drop every item it received and report that the memory bank was empty.

Where

src/lib/research-memory/hindsight-provider.ts:

return { items, latencyMs, empty: items.length === 0 };

items is what survived canonical resolution. Hindsight can return 14 candidates, all 14 can be dropped — either the node carried no dedup: tag, or the tag resolved to no CanonicalMemoryRecord row — and this returns empty: true.

The contract for that field in types.ts reads "a healthy provider responded but found nothing". That is a different fact.

RecallResult has no field for droppedNoCanonical, rawCandidateCount or collapsedDuplicates. The only trace is a logger.warn no consumer reads:

recall: dropped items with no resolvable canonical metadata (UNKNOWN_METADATA policy)
droppedNoCanonical=12 totalRaw=14

pipeline-bridge.ts then does if (result.empty || result.items.length === 0) return; — no context row, no event, no trace. The run proceeds and its report reads as though prior research established nothing on the topic.

Why it matters

This is the same defect degraded was added to fix one layer up, at a layer that never got the fix. degraded correctly separates "provider unreachable" from "bank had nothing". There is no third state for "the bank answered and we could not resolve any of it".

Suggested fix

  • add droppedNoCanonical, droppedUnknownType, collapsedDuplicates and rawCandidateCount to RecallResult
  • set empty only when raw.length === 0
  • add unresolvable: true when raw.length > 0 && items.length === 0, and have ensureRunMemoryContext emit an error event on it, exactly as it already does for degraded

Related, same file

toRecallItem returns null for an unrecognised memoryType and the caller does a bare continue — no counter, no log, unlike the droppedNoCanonical path directly above it. Legacy rows written before SOURCE_CLAIM existed, or any future rename, vanish from every recall with zero instrumentation.

Activity

  1. added
    help wanted
    recall
    silent-failure
    on Aug 31, 2026
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

    help wantedrecallsilent-failure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions