Skip to content

Should unscoped Memories pass a project filter? #456

Closed

Description

@possiblyneal

Part of #448

Question

Fork issue #441 says Memories with no project pass every project filter (createProjectMatcher, src/functions/search.ts). Is that intended Global behaviour or a leak? If a leak, does excluding them improve Recall on the evals and on the Operator's store? Upstream: rohitg00#1647, rohitg00#1722, rohitg00#1723.

Activity

  1. self-assigned this
    on Nov 18, 2026
  2. possiblyneal commented on Nov 18, 2026

    @possiblyneal
    OwnerAuthor

    Decision (Operator): exclude, no migration. A non-Global Memory with no resolvable project (no project, Session or Summary) is left out of project-scoped recall; global-scope searches still return it. The live store holds 1 such Memory; nothing is rewritten.

  3. possiblyneal commented on Nov 18, 2026

    @possiblyneal
    OwnerAuthor

    Verdict: APPLY — exclude unscoped non-Global Memories from a project filter, no migration (Operator's call)

    Class 2: yes (changes what a project-scoped Recall returns).

    Repro: test/project-matcher-unscoped-memory.test.ts, fails 4/6 on base fdc3d45:

    • excludes a non-Global Memory with no project, Session or Summary (returned true)
    • matches an explicit project without reading a Session (Session read happened first)
    • does not fail when the Session read fails and the Memory names its project (threw)
    • does not fail an Observation whose Session read fails (threw)
      The other 2 (Observation pass-through kept, Global Memory passes) pass on base and after.

    Fix: createProjectMatcher (src/functions/search.ts) checks Global, then the Memory's own project, before any Session read; a failed Session read counts as no Session; an unresolvable non-Global Memory returns false, an unresolvable Observation still passes. Callers: mem::search (also serves prompt-context) and smart-search (two sites); session-start filters by stored project and never uses the matcher. Global scope sends no project, so no matcher runs and the Memory is still returned. CLAUDE.md Right scope updated.

    Live store (tmp/verify/live-copy.sqlite): 1 unscoped non-Global Memory, 0 Session disagreements.

    Bar (tmp/verify/441-verify.log, branch verify/441-unscoped-memory): typecheck 0 errors; npm test 272 files, 3,122 passed, 1 skipped; build ok; eval:gate and eval:gate:rules pass; eval:suite --tier fast against base-fdc3d459: all 15 metrics unchanged (Δ 0.000 on coding-life, PrecisionMemBench, LongMemEval). No bench corpus holds an unscoped Memory, so flat is expected; the gain is the scope rule, not a score.

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions