Skip to content

feat(mem2actbench): port AutoMem evidence-retrieval pilot - #34

Draft
jack-arturo wants to merge 1 commit into
mainfrom
feat/mem2actbench-pilot
Draft

jack-arturo wants to merge 1 commit into
mainfrom
feat/mem2actbench-pilot

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

Refs #24

Summary

This ports the Mem2ActBench evidence-retrieval pilot into runners/mem2actbench/. The work was first done in a private automation repo and landed there by mistake. This is its home.

  • runners/mem2actbench/index.mjs: the runner. Per task it stores the labelled evolution_chain facts under a unique run tag, links consecutive facts with RELATES_TO, recalls k facts for the task query, scores them, then deletes them.
  • runners/mem2actbench/lib.mjs: pure helpers for the payload, associations, batch selection and parameter-grounding scoring.
  • runners/mem2actbench/harness.test.mjs: node --test unit tests.
  • runners/mem2actbench/README.md: the metric contract, dataset notes, env vars and run commands.
  • data/results/SUMMARY-mem2actbench-pilot-2026-09-18.md and data/results/mem2actbench/pilot-results-2026-09-18.json: the pilot writeup and its aggregate.
  • .gitignore gets two new rules. data/benchmarks/ covers the upstream dataset clone: the license is unconfirmed, so it must never be committed. data/results/mem2actbench/runs/ covers raw per-run reports.

The Node code is dependency-free, matching runners/aml/ in #29: no package.json, no install step.

Results (exploratory, not a benchmark claim)

Full split, all 400 tasks, k=5:

Measurement F1 Accuracy
AutoMem parameter-grounding evidence 77.81% 75.67% (398/526 labelled non-default params)
AutoMem strict task evidence — 75.75%
L4 conflict resolution only (45 tasks) 48.72% 57.58%

Caveats:

  • This is a retrieval-evidence score. It is not comparable to the paper's end-to-end 53.8 oracle F1 (or its 30.7 passive k=5 F1). The paper's metric also requires producing a valid tool call. This pilot stops before argument synthesis.
  • It seeds only each task's labelled facts, not the full session history. That makes retrieval easier than in the paper's setting.
  • L4 conflict resolution is the weak spot. It produced 52 of the 99 false-positive evidence items.
  • The by-complexity table was derived from the raw per-case reports, which are not committed. The runner itself writes one report per batch and does not aggregate across batches.

Port and sanitization

  • .js → .mjs. Imports now point at ./lib.mjs.
  • Default dataset and output paths now resolve from the repo root. Reports record a repo-relative dataset path, never an absolute one.
  • Dropped the package.json script entry and its .env loading. The README documents AUTOMEM_API_URL / AUTOMEM_API_KEY instead.
  • Removed from the docs: local absolute and /tmp paths, the private repo's issue links, its eslint evidence, and internal run ids. Tracking now points at feat(automem): Evaluate against Mem2ActBench — proactive tool-calling memory (arXiv:2601.19935) #24.
  • Folded in from the earlier, superseded fit assessment: paper provenance (ACL 2026), the note that the upstream repo is untagged with no license file GitHub can identify (pin a commit), and the next-pass design with no-memory, full-history and oracle-evidence control arms.
  • Storage, recall and scoring logic are unchanged.
  • No experiment-registry record was added (docs/experiments/registry.json and the generated files are untouched).

Verification

$ node --test runners/mem2actbench/*.test.mjs
✔ buildFactMemoryPayload keeps benchmark source evidence in a scoped memory
✔ buildChainAssociations links consecutive memories in temporal order
✔ selectCases supports bounded resumable batches
✔ evaluateParameterGrounding scores sourced parameters and excludes defaults
ℹ tests 4
ℹ pass 4
ℹ fail 0

$ for f in runners/mem2actbench/*.mjs; do node --check "$f" && echo "node --check $f: ok"; done
node --check runners/mem2actbench/harness.test.mjs: ok
node --check runners/mem2actbench/index.mjs: ok
node --check runners/mem2actbench/lib.mjs: ok

$ node runners/mem2actbench/index.mjs --help
Usage: node runners/mem2actbench/index.mjs [options]
  --dataset PATH     QA JSONL (default: data/benchmarks/mem2actbench/toolmembench_small/qa_dataset.jsonl)
  --output DIR       Results directory (default: data/results/mem2actbench/runs)
  ...
exit=0

--dry-run still reads a dataset, so it ran against a 3-task synthetic JSONL fixture (not committed, no download):

$ node runners/mem2actbench/index.mjs --dataset <scratch>/port-m2a-fixture/qa_dataset.jsonl --dry-run --limit 2
{ "benchmark": "Mem2ActBench", "dataset": "port-m2a-fixture/qa_dataset.jsonl",
  "available_tasks": 3, "offset": 0, "selected_tasks": 2, "dry_run": true }
exit=0

# with AUTOMEM_* unset and no --dry-run:
mem2actbench pilot failed: AUTOMEM_API_URL and AUTOMEM_API_KEY are required (deprecated AUTOMEM_ENDPOINT and AUTOMEM_API_TOKEN also work).
exit=1

I also ran the full non-dry path against a throwaway in-process HTTP stub, not AutoMem, on the same fixture. The stub implements POST /memory, POST /associate, GET /recall and DELETE /memory/:id. The run covered store, associate, recall, scoring, cleanup and report write:

Completed 1/3: qa_001 ... Completed 3/3: qa_003
"supported_parameters": 4, "expected_parameters": 4, "defaults_excluded": 1,
"unlabelled_parameters_excluded": 1, "f1_percent": 100, "cleanup": "deleted after each task"
STUB counts={"store":5,"associate":2,"recall":3,"delete":5,"badAuth":0} remaining_memories=0 harness_exit=0

git check-ignore -v on the SUMMARY, the results JSON and the README reports nothing ignored. data/results/mem2actbench/runs/*.json and data/benchmarks/** are ignored by the new rules.

Sanitize check: a grep over the new files for local absolute paths, private-repo names, .env references and internal run ids hits only process.env in index.mjs.

Not verified in this port:

  • There was no live AutoMem run and no dataset download. The 77.81% / 75.67% figures come from the pre-port run, on the same logic.
  • The upstream dataset commit used by the pilot is not recorded.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-18T14:07:21.933385Z 246ff50 PR opened
ℹ️ 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.

Port the Mem2ActBench parameter-grounding pilot, first run in a private
automation repo, into runners/mem2actbench/ as dependency-free Node:
index.mjs (runner), lib.mjs (pure payload/association/scoring helpers),
harness.test.mjs (node --test) and a README with the metric contract.

Results: data/results/SUMMARY-mem2actbench-pilot-2026-09-18.md plus the
aggregate JSON in data/results/mem2actbench/. Full split, 400 tasks, k=5:
77.81% evidence F1, 75.67% labelled-parameter accuracy, L4 conflict
resolution weakest (48.72% F1). This is a retrieval-evidence score, not
comparable to the paper's end-to-end 53.8 oracle F1. Key facts from the
earlier fit assessment (paper provenance, untagged upstream repo with
unconfirmed license, next-pass control arms) are folded into the SUMMARY.

Port changes: .js -> .mjs imports; defaults resolve from the repo root;
the dataset clone (data/benchmarks/) and raw run reports
(data/results/mem2actbench/runs/) are gitignored; reports record a
repo-relative dataset path instead of an absolute one. Storage, recall
and scoring logic are unchanged.

Sanitized: dropped the package.json script and its .env loading, local
absolute and /tmp paths, the private repo's issue links and eslint
evidence, and internal run ids. Tracking is now #24.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jack-arturo
jack-arturo force-pushed the feat/mem2actbench-pilot branch from 246ff50 to 5d23e29 Compare September 18, 2026 14:06

@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: 246ff501ac

ℹ️ 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 on lines +118 to +122
function headers(config) {
return {
Authorization: `Bearer ${config.token}`,
'Content-Type': 'application/json',
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Authenticate AutoMem with X-Api-Key

The documented local AutoMem /recall surface requires the X-Api-Key header (docs/session_2026-04-28_hook_replay.md:60-66), whereas this sends only a bearer token. A normal non-dry run can therefore store memories—POST /memory has accepted bearer auth—but then fail at recall authentication and produce no report; use X-Api-Key consistently for the AutoMem requests.

Useful? React with 👍 / 👎.

Comment on lines +205 to +208
const precision =
totals.supported + totals.falsePositiveEvidence === 0
? 0
: totals.supported / (totals.supported + totals.falsePositiveEvidence);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Compute evidence precision from evidence counts

When one recalled fact grounds multiple parameters, totals.supported counts parameters while falsePositiveEvidence counts recalled memories, so this precision divides incompatible units. For example, one fact supporting three parameters plus one irrelevant fact is reported as 75% precision instead of 50% evidence precision; this distorts the committed F1 and complexity aggregates, so the numerator must be the number of supporting evidence items rather than supported parameters.

Useful? React with 👍 / 👎.

Comment on lines +171 to +174
return null;
} catch (error) {
return error.message;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail the run when per-case cleanup fails

If any DELETE returns an error or encounters a network failure, this converts it into a resolved string and the caller discards the result. Because every case recalls under the same runId tag, leaked facts remain eligible for subsequent cases, silently corrupting their scores while the final report still says deleted after each task; propagate or explicitly check cleanup failures before continuing.

Useful? React with 👍 / 👎.

Comment on lines +3 to +4
Tracking: #24. Runner: [`runners/mem2actbench/`](../../runners/mem2actbench/README.md).
Aggregate: [`mem2actbench/pilot-results-2026-09-18.json`](mem2actbench/pilot-results-2026-09-18.json).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Register the Mem2ActBench experiment

This adds a full 400-task experiment summary and aggregate without an entry in docs/experiments/registry.json, so the generated experiment dashboard will not surface this work or its decision state. Add the experiment record and regenerate the index before landing this substantial experiment session, as required by the repository workflow.

AGENTS.md reference: AGENTS.md:L97-L97

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Merge review completed at 5d23e2989fcc82f6332264ceaeb68aa8541a858c. The head is current with main (mergeStateStatus: CLEAN); no rebase was needed. node --test runners/mem2actbench/*.test.mjs passed (4/4), syntax checks and --help passed, and GitHub reports no checks configured. No agent merge is permitted by this run's execution boundary; this is awaiting maintainer merge.

@autohub-codex

autohub-codex Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Backlog triage (2026-09-28): rechecked current head 5d23e2989fcc82f6332264ceaeb68aa8541a858c against main: mergeable/CLEAN, 856 additions across 7 files, and no GitHub checks configured. Exact blocker: Codex has only reviewed ancestor 246ff501ac; the current head has neither a matching reviewed-commit marker nor clean reaction. The focused 4/4 local test evidence is recorded, but a current-head hosted Codex review is still needed before readiness/maintainer merge.

Copy link
Copy Markdown
Member Author

Added a MemDelta-style controlled-baselines execution tracker in #48. Once this adapter is merged or pinned, its Mem2ActBench runs should use the shared result metadata (embedding, reader family, judge, and write-path cost) and keep the current evidence-retrieval proxy explicitly separate from end-to-end tool-call scores.

@jack-arturo jack-arturo added the parked-post-launch Parked until after the Dec 15 launch. Not under review. label Nov 19, 2026
@jack-arturo
jack-arturo marked this pull request as draft November 19, 2026 00:00

This branch has not been deployed

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

Labels

parked-post-launch Parked until after the Dec 15 launch. Not under review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant