Skip to content

feat(eval): add offline MemLeak cross-user admissibility design and scaffold - #107

Closed
autohub-claude[bot] wants to merge 2 commits into
mainfrom
agent/hub-developer/7e7c93c9
Closed

autohub-claude[bot] wants to merge 2 commits into
mainfrom
agent/hub-developer/7e7c93c9

Conversation

@autohub-claude

Copy link
Copy Markdown
Contributor

Summary

Offline-first design and scaffold for cross-user / cross-agent admissibility leakage in pooled multi-tenant memory, based on MemLeak, "Cross-User Semantic Leakage in Multi-Tenant AI Agent Memory" (arXiv:2610.04195, Mudgal et al., Oct 2026). Candidate fingerprint: opportunity:automem-graph-rag-research-scout.

Nothing was run against AutoMem, no upstream code was executed (none exists), no network was used, and nothing was spent. The report the scaffold emits is status: not_scored, paper_comparable: false, scores: null. Every paper figure in the doc is paper-reported on a different construct and is never an AutoMem score.

Related, linked and not duplicated: #31 (ForgetEval; its "MemLeak" is a different paper, arXiv:2606.29788, on recovering deleted facts), #64 (PrecisionMemBench; tag-isolation smoke on a benchmark-supplied corpus), #102 (mempoison), #99 (graph expansion under a fixed budget). A search of this repo's issues and PRs (all states, including comments) for 2610.04195, "multi-tenant", "admissibility" and "tenant" returned nothing, so no existing issue references this paper.

Review Contract

This PR is a design document plus an offline scaffold. Acceptance, and therefore what review may hold it to:

  1. No run, no spend, no network. The scaffold has no recall transport, makes no AutoMem or model call, and cannot emit a score. A test checks it is stdlib-only and a test checks no memory id appears in any planned request.
  2. Paper numbers are baselines on a different construct, labeled as such, never presented as AutoMem results (paper_comparable: false).
  3. Classifiers hold the documented invariants on the response shapes AutoMem actually returns at the pinned commit: ownership comes from the fixture map (never sent to the server); an unowned returned id makes the aggregate invalid, never clean; rates are not_scored unless rows match the plan exactly; foreign inline relation text (content or summary) is a leak.
  4. Cold and matured reporting follows docs/eval/maturation.md; the matured graph is injected (graph: injected_oracle) and labeled so, and delta is null until both are run.
  5. Experiment index registered (EXP-MEMLEAK-ADMISSIBILITY) and the dashboard views are consistent with the registry.

Out of scope here: a live adapter, a stub-transport wiring test, per-user stacks for the partition arm, any automem change, and filing the drafted upstream issue. Those are open items in the doc's checklist.

What it adds

  • docs/eval/memleak-admissibility.md: artifact and license check (no official code or data found; arXiv license CC BY-NC-ND 4.0, so a from-scratch synthetic fixture and no copied Appendix E text), metrics (leakage rate with Wilson 95% CI, mean rank of first cross-user hit, score gap, crafted-memory top-k placement, plus lr_any_channel and inline content counters), the AutoMem mapping, eight arms, the fixture, cold/matured reporting, and a drafted, unfiled automem issue.
  • runners/memleak_admissibility/adapter.py: deterministic cold and matured multi-tenant fixtures (64 organic memories, 16 crafted, 32 queries, 48 injected cross-user edges when matured), 512 request plans (8 arms x 32 queries x 2 variants), classifiers, an aggregation that refuses to score without full plan coverage, and the not_scored report.
  • runners/test_memleak_admissibility.py: 18 unit tests.
  • Registry thread EXP-MEMLEAK-ADMISSIBILITY; STATUS.md, index.json, scoreboard.html refreshed.

AutoMem mapping (source level only)

Read from automem at the local origin/develop ref 933004ab (docs/API.md, automem/api/recall.py); not yet observed in a run, and the pin should be refreshed before any live probe. Findings the arms are built to test:

  • the server has no tenant concept; scope is a tag convention, and tag_match defaults to prefix, so a company-level tag matches every user below it;
  • expand_relations / expand_entities bypass the tag scope unless expand_respect_tags=true, and the inline relations[].memory scope check is gated on the same flag;
  • entity tags (entity:people:<slug>) carry no tenant component, so tenants who mention the same person share the tag;
  • scope_fallback=true fills a short scoped result from an unscoped vector search.

Discrepancy to settle with the first live probe: this repo's CLAUDE.md invariant 2 says server-side expand_relations is a no-op under tag gating, while the automem API doc says expansion bypasses tags by default. One is stale for the stack under test. CLAUDE.md is untouched here. Graph-expansion leakage has not been observed (no run), so the drafted automem issue stays a draft in the doc and is not filed.

Verification

$ python3 -m unittest discover -s runners -p 'test_*.py'
Ran 255 tests in 1.9s
OK (skipped=13)
$ python3 -m unittest discover -s scripts -p 'test_*.py'
Ran 63 tests ... OK
$ python3 scripts/test_experiment_index.py
Ran 14 tests ... OK
$ python3 runners/memleak_admissibility/adapter.py --run-id smoke --out report.json --plan-out plan.jsonl
status: not_scored, paper_comparable: false, scores: null, matured.delta: null; plan.jsonl = 512 lines

Same results under python3.12 (the default python3 here is 3.15; the repo requires 3.10+). The new file alone: Ran 18 tests ... OK. A scratch regeneration of the dashboard from the committed registry reproduces the EXP-MEMLEAK-ADMISSIBILITY entry (only worktree_status differs, from --no-vcs). This repo has no test or lint CI workflow (.github/workflows/ holds only the auto-merge helper and a ledger job path-filtered to public-ledger/index.html, which this PR does not touch), so the local runs above are the test evidence.

Size

863 changed lines (+855/-8) across 8 files: the doc (124), adapter (414), tests (244), a package marker (1), and the registry/dashboard refresh (80). That is in the 400-900 band, below the 900 gate. Tests count in full.

Local review (pre-PR gate)

Two bounded local Codex reviews of the branch (gpt-6.1-sol, medium). The first found two P2 classifier defects in the original commit. Both were reproduced against automem at the pin and both breach invariant 3 above, so both are fixed in e52a10d, each with a test that fails on the previous adapter (3 failures verified) and passes on the fix:

  1. Provenance-only expansion edges aggregated every expansion arm to invalid. Relation-expanded results carry relations[] entries of {type, strength, from, seed_rank, seed_score} with no id and no memory; the classifier read them as an unowned id. They are now not treated as inline targets, and only an unknown from seed id invalidates. The owner gate had the same shape confusion (it rewrote such an edge into a phantom memory: {id: None}) and is fixed in the same batch.
  2. A foreign enriched summary read as id-only, so a leaking response could aggregate clean. _summarize_relation_node returns summary and drops content for an enriched memory. A non-empty summary or content now counts as leaked text; an empty or whitespace summary stays id-only.

The second (confirmation) review found no actionable defects. Hosted Codex review is the authoritative gate and is still pending at the time of writing.

Provenance

Implementation harness: Claude Code (claude-sonnet-5-5) · GitHub identity: AutoJack GitHub App (autohub-claude[bot]). Babysit finalizer: Claude Code, same App identity.

🤖 Generated with Claude Code

autohub-claude Bot and others added 2 commits November 16, 2026 13:52
…caffold

Design doc and a stdlib-only scaffold for cross-user/cross-agent admissibility
leakage in pooled multi-tenant memory (arXiv:2610.04195, a different paper and
construct from the ForgetEval MemLeak in #31; tag isolation as one assertion
family in #64 is linked, not duplicated).

- docs/eval/memleak-admissibility.md: artifact and license check (no official
  code or data, arXiv CC BY-NC-ND, so a synthetic fixture), metrics (LR with
  Wilson CI, mean rank of first cross-user hit, score gap, crafted top-k
  placement, plus lr_any_channel and inline relation content counters), AutoMem
  mapping read from automem docs and source at 933004ab (tag_match prefix
  default, expansion and inline relations bypassing tag scope unless
  expand_respect_tags, entity-tag collisions, scope_fallback fills), eight arms
  including pooled tag filter vs per-user partition with over-fetch and a hard
  owner gate, cold/matured reporting per maturation.md, and a drafted (unfiled)
  automem issue.
- runners/memleak_admissibility/adapter.py: deterministic cold and matured
  fixtures, request plans, classifiers, aggregation that refuses to score
  without full plan coverage, and a not_scored report. No network, no model
  calls, no AutoMem requests; the CLI has no recall transport.
- runners/test_memleak_admissibility.py: 15 unit tests.
- registry thread EXP-MEMLEAK-ADMISSIBILITY; dashboard views refreshed in scope.

Nothing was run against AutoMem and nothing was spent. Paper figures are a
different construct and are never AutoMem scores.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ifiers

The pre-PR local review checked the classifiers against the response shapes in
automem at the pinned 933004ab and found two defects (both reproduced there):

- Relation-expanded results carry provenance-only edges (type, strength, from,
  seed_rank, seed_score) with no id and no memory. The classifier read them as
  an unowned id, so every expansion arm aggregated to invalid. They are now
  skipped as inline targets, and only an unknown `from` seed id invalidates.
- _summarize_relation_node returns `summary` and drops `content` for an
  enriched memory, so a foreign inline summary was counted as id-only and an
  own-only-looking response read as clean. Summary or content text is now a
  leak. The owner gate no longer rewrites a provenance edge into a phantom
  `memory: {id: None}` target.

Three tests reproduce each behavior (they fail on the previous adapter) and the
two metric rows in the design doc now describe the real shapes. Nothing was run
against AutoMem and nothing was spent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@autohub-claude autohub-claude Bot added babysit:active Babysit agent is actively working this PR babysit:waiting-codex 👀 Codex reviewing current head and removed babysit:active Babysit agent is actively working this PR labels Nov 16, 2026
@jack-arturo

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T13:12:23.085465Z e52a10d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: e52a10d3b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@autohub-claude

Copy link
Copy Markdown
Contributor Author

Babysit: verified green at e52a10d3b1 (e52a10d3b136724d905ef50508b868ab14d4663f). Ready for a human to merge; the agent did not merge.

  • Codex: 👍 all clear. Codex reviewed commit e52a10d3b1 ("Didn't find any major issues", has_any_findings: false), settled by both the reviewed-commit marker and the reaction. 0 review threads.
  • CI: not configured. .github/workflows/ has no test or lint workflow; the only checks are the skipped auto-merge helper jobs (its gate matches a different bot login than this PR's author, so it is not armed). The local runs in the PR body are the test evidence: python3 -m unittest discover for runners (255 OK, 13 skipped) and scripts (63 OK), plus python3 scripts/test_experiment_index.py (14 OK).
  • Local review: two bounded Codex passes before the PR. The first found two real classifier defects (provenance-only expansion edges invalidating every expansion arm; enriched summary text read as id-only), fixed in e52a10d with tests that fail on the previous adapter. The second pass was clean.
  • Size: 863 changed lines (400-900 band, below the 900 gate), no remediation pushes since the PR opened.
  • Mergeable: MERGEABLE / CLEAN.
  • No run, no spend: nothing was run against AutoMem, no network or model calls, not_scored report only.

Executed by Claude Code (claude-sonnet-5-5) via the AutoJack GitHub App (autohub-claude[bot]). Compare e52a10d3b1 with the PR's commit list before merging.

@autohub-claude autohub-claude Bot added babysit:ready 👍 Codex all clear + gates pass; human may merge and removed babysit:waiting-codex 👀 Codex reviewing current head labels Nov 16, 2026
jack-arturo added a commit that referenced this pull request Nov 19, 2026
Two scout leads opened after the 2026-11-19 sweep list was fixed (PR #107,
PR #109 with issue #108). Both are design docs with offline scaffolds and no
AutoMem score, so they follow the same rule as the other closed leads: one
watchlist row each, branches kept.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@jack-arturo

Copy link
Copy Markdown
Member

Closed in the pre-launch backlog sweep. This is a design doc and an offline scaffold with no AutoMem score, and no product decision is waiting on it. The branch is kept, and the lead is carried in the benchmark watchlist (docs/experiments/WATCHLIST.md, added in #111).

Comes back when: the product needs multi-user or team memory scoping, and a loopback probe of the pooled arms is approved.

Reopening is fine at any time.

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

Labels

babysit:ready 👍 Codex all clear + gates pass; human may merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant