Skip to content

feat(eval): add memprobe offline adapter scaffold - #101

Closed
autohub-claude[bot] wants to merge 3 commits into
mainfrom
agent/kernel-worker/adf45213
Closed

autohub-claude[bot] wants to merge 3 commits into
mainfrom
agent/kernel-worker/adf45213

Conversation

@autohub-claude

@autohub-claude autohub-claude Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an offline adapter scaffold for MEMPROBE / MemAudit (arXiv:2606.24595, v3 HTML), tracked in #100. It pins and verifies the upstream release, builds isolated per-user tags, reads one user's store through the paper's two access modes against a loopback AutoMem, and defines the recovery / answer / abstention metrics. It produces no AutoMem score: every report it can emit is not_scored.

Refs #100 (does not close it: the run itself, judge access and the AutoMem seeding step are still open there). Deliberately not folded into #62, and DynamicMem (2606.22877) is out of scope.

What changed

  • runners/memprobe/adapter.py (new, stdlib only)
    • Pins upstream sora1998/MEMAUDIT-bench at 0c20cf72… (CC BY 4.0); verify_checkout refuses any other HEAD. No upstream code or data is vendored.
    • load_bank checks the bank SHA-256 and the 50 users x 31 dimensions shape (7/7/7/5/5 by category) before use.
    • Target.probe() / probe_query() can never carry the reference value or explanation.
    • assert_loopback rejects non-loopback endpoints (including 127.0.0.1@evil userinfo tricks); user_tag builds memprobe:<run>:<user> and rejects unsafe ids.
    • http_transport keeps the key on loopback after the endpoint check: it refuses every HTTP redirect (ProtocolError) and ignores http(s)_proxy from the environment (ProxyHandler({})). Both were Codex review findings, fixed in 527a4923 and d5358af1 with regression tests.
    • AutoMemReader.full_store pages GET /memory/by-tag to exhaustion and fails closed on a malformed or non-terminating envelope; top_k is GET /recall with tag_match=exact, tag_mode=all, limit=5.
    • footprint counts records carrying t_invalid (superseded but still enumerable).
    • summarize keeps recovery (category-balanced), answer_rate, abstention_rate and answered_recovery separate; any missing judge score or no judge returns not_scored with null metrics.
    • build_report always sets paper_comparable: false.
  • runners/memprobe/__init__.py (new)
  • runners/test_memprobe_adapter.py (new, 21 tests, synthetic bank; the transport tests use real loopback servers only, nothing leaves 127.0.0.1)

Review Contract

Invariants a reviewer can hold this PR to:

  1. No model call, no paid credit, no network beyond a loopback AutoMem; nothing in the scaffold reaches a judge.
  2. No score is ever invented: no judge, or any missing score, means status: not_scored and null metrics.
  3. Endpoints are loopback-only and every read is scoped to an isolated per-user tag.
  4. The upstream is pinned by commit and bank hash; a mismatch exits non-zero.
  5. Reference values and explanations never reach the reader-facing probe.

Out of scope here: seeding AutoMem from the bank, the reader/judge calls, and any published number.

Verification

Python 3.12 (the default macOS python3 3.9.6 fails the existing suites for unrelated reasons):

python3.12 -m unittest runners.test_memprobe_adapter              # 21 tests OK
python3.12 -m unittest discover -s runners -p 'test_*.py'         # 254 tests OK (13 skipped)
python3.12 -m unittest discover -s scripts -p 'test_*.py'         # 30 tests OK

The adapter's API assumptions were cross-checked against the sibling automem server source: /memory/by-tag clamps limit to 200, returns memories / has_more, and matches exact lowercased tags; /recall accepts tag_match=exact and tag_mode=all (its default tag_match is prefix, hence the explicit exact).

Risk

Low. New files only, nothing imports them, no existing behavior changes. One known server-side nuance: GET /memory/by-tag runs the server's on_access hook, so enumeration touches access metadata. That matters only if a later run reuses a store.

Implementation harness: Claude Code (claude-sonnet-5-5) via the AutoHub kernel worker
GitHub identity: autohub-claude[bot] GitHub App

🤖 Generated with Claude Code

Pin-verified, loopback-only AutoMem reader for MEMPROBE/MemAudit
(arXiv:2606.24595): isolated per-user tags, full-store (by-tag) and top-k
(/recall) access, separate recovery/answer/abstention metrics, and
not_scored reports whenever no judge ran. No upstream code or data is
vendored and no model is called. Tracked in #100.

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 12, 2026
@jack-arturo

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 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-12T14:52:10.503637Z d5358af New commits
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 395c60c0b8

ℹ️ 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".

Comment thread runners/memprobe/adapter.py Resolved
@autohub-claude autohub-claude Bot added babysit:active Babysit agent is actively working this PR and removed babysit:waiting-codex 👀 Codex reviewing current head labels Nov 12, 2026
urllib follows redirects without re-running assert_loopback and forwards
the X-Api-Key header, so a loopback endpoint that answered with a redirect
could send the API key to a non-loopback host. AutoMem never redirects, so
the transport now raises ProtocolError on any redirect instead of following.

Tests run real loopback servers: the redirect target is never contacted and
never receives the key (fails against the previous transport), and the happy
path still returns JSON with the key attached.

Addresses the Codex review finding on runners/memprobe/adapter.py (P2).

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 527a492356

ℹ️ 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".

Comment thread runners/memprobe/adapter.py Resolved
build_opener installs a default ProxyHandler that reads http(s)_proxy. With a
proxy configured and no_proxy not covering loopback, requests that
assert_loopback had accepted were routed through that proxy, carrying the
X-Api-Key header and the recall query off loopback. The opener now installs
ProxyHandler({}) so the environment cannot reroute this transport.

The regression test points http_proxy at a recording loopback server and
asserts the proxy never sees the request or the key (fails against the
previous transport).

Addresses the second Codex review finding on runners/memprobe/adapter.py (P2).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@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 12, 2026
@autohub-claude

Copy link
Copy Markdown
Contributor Author

Babysit: ready for you to merge. The agent did not merge. Verified green at d5358af197be46f9138b6592596a3901162a91f1. Compare that SHA with the commit list at merge time.

  • Codex: 👍 clean on this exact head (its review state names d5358af197, completed). Two P2 findings across two rounds, both fixed with regression tests and resolved: redirects followed off loopback (527a4923) and environment proxies rerouting the transport (d5358af1). Round verdicts: converging, then clean.
  • Threads: 2 of 2 resolved, none open.
  • Local checks (Python 3.12): memprobe adapter tests 21 OK; runners suite 254 OK (13 skipped); scripts suite 30 OK.
  • CI: not configured for this change. The only workflow run is the auto-merge helper, which skipped (this PR's author is not the account it keys on), and no checks are required. Local tests above are the only automated verification.
  • Size: 602 changed lines (start 507, after fixes 577, then 602), inside the 400-900 band.
  • Scope: offline scaffold only. No score, no model call, no vendored upstream. Refs eval(memprobe): hidden user-state recovery under full-store vs top-k #100; that issue stays open for the run itself.

Implementation harness: Claude Code (claude-sonnet-5-5) via the AutoHub kernel worker; GitHub identity: autohub-claude[bot] GitHub App.

@jack-arturo

Copy link
Copy Markdown
Member

Closed in the pre-launch backlog sweep. This item has no AutoMem score and no product decision waiting on it. The branch is kept, and the lead is carried in the benchmark watchlist (docs/experiments/WATCHLIST.md, added in #110).

Comes back when: a judge budget is approved and the replay arm is seeded.

Reopening is fine at any time.

@autojack-bot

autojack-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Acknowledged. #101 is closed with no code action needed. The branch agent/kernel-worker/adf45213 (head d5358af1) stays as is, and the lead lives in docs/experiments/WATCHLIST.md.

Resume trigger: a judge budget is approved and the replay arm is seeded. #100 stays the tracking issue for that. I'm not dispatching any work now.

@jack-arturo jack-arturo removed the babysit:ready 👍 Codex all clear + gates pass; human may merge label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant