- Python 93.6%
- Shell 4.3%
- Rust 1.7%
- Dockerfile 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
On a runner that is itself a container, docker mounts paths from the host, so the compare container saw an empty /results and the comparison was skipped (test-7.1.0-dev, run 75084). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LnueZzbXh93VNCBW9My8D4 |
||
| .forgejo/workflows | ||
| ci | ||
| data | ||
| docs | ||
| fixtures | ||
| harness | ||
| scripts | ||
| tests | ||
| vendor | ||
| .gitignore | ||
| .gitmodules | ||
| omh | ||
| PLAN.md | ||
| pyproject.toml | ||
| README.md | ||
| TODO.md | ||
| uv.lock | ||
OmniMem test harness
Black-box tests for OmniMem. One command downloads a release (or takes a local build), starts a fresh, named instance of it, loads an invented sample dataset, runs the suites, and writes everything to:
results/<instance-name>/<YYYY-MM-DD>/<HHMMSS>/
The suites come from the Agent Memory Atlas benchmarks page. The reasons for picking these and not the others are in PLAN.md.
Runs and suites still to do, LongMemEval among them, are in TODO.md.
Testing a version in CI
Push a tag named test-<version>:
git tag test-7.0.8 && git push origin test-7.0.8
The Harness workflow (.forgejo/workflows/harness.yml) then does four things:
- It downloads
omnimem-7.0.8-linux-amd64.tar.gzand checks it against the published.sha256. - It runs the
coresuites and S9, the dead-end benchmark, against an instance named after the tag. - It commits the run folder to the
resultsbranch. - It attaches the folder as a workflow artifact.
If any gate fails, the job turns red. The results are published either way.
When it publishes, the job also compares the run with the latest run of the highest earlier OmniMem version on the results branch that has the same enrichment setting. For test-7.0.9 that's the newest test-7.0.8 run. The comparison is written into the run folder as compare-<baseline>.html and compare-<baseline>.pdf (see Comparing two versions). The first run of all has nothing to compare with, so it skips this step.
To compare any two runs that are already on the results branch, start the Compare workflow (.forgejo/workflows/compare.yml) from the Actions page with Run workflow:
- Candidate: the run to check. Give an instance name such as
test-7.0.9for its latest run, orname/date/timefor one particular run. - Baseline: the run to compare it with, in the same form, or
auto.
The workflow doesn't run any suites. It commits compare-<baseline>.html and .pdf into the candidate's run folder and attaches them to the workflow run.
To see what an API key changes, compare the two runs of one version: candidate test-7.0.9-enrich, baseline test-7.0.9. The page is then titled not enriched vs enriched. Every page says whether its runs were enriched, in the title, the lede and the provenance table.
You can run the same version again with test-7.0.8+rerun (the instance is then named test-7.0.8-rerun). You can also start a run from the Actions page with Run workflow, which lets you pick the suites.
The job runs on [linux, amd64] inside ci/Dockerfile, so the runner needs Docker and nothing else. To push to results, it uses the job's own token. If Forgejo's job token can't push to this repo, add a repository secret HARNESS_PUSH_TOKEN: a Forgejo access token with write access to this repository.
Testing with an Anthropic API key
Without a key, OmniMem stores memories exactly as written, and contradictions are linked only by its word-pair heuristic. With a key, it also extracts facts in the background, can expand queries, and has Claude confirm contradictions. That's a different configuration, so the harness never uses a key unless you ask. A keyed run is marked Enrichment: on in report.md and manifest.json. The key itself is never written anywhere.
In CI: add a repository secret named ANTHROPIC_API_KEY (Settings → Actions → Secrets). Then push a tag with +enrich in it:
git tag test-7.0.8+enrich && git push origin test-7.0.8+enrich # instance test-7.0.8-enrich
You can also start the workflow by hand with enrichment ticked. Plain test-<version> tags never pass the secret to the container.
Locally: export the key and add --enrichment:
export ANTHROPIC_API_KEY=sk-ant-...
./omh run --name rel-7.0.8-enrich --omnimem 7.0.8 --suites core --enrichment
Without --enrichment, a key in your shell is stripped before the server starts. With it on, each suite waits for the enrichment queue to empty before it checks anything. S6 then also covers the Atlas's step 9 (facts extracted from a memory must go when it does), and S2 records whether Claude confirms each linked pair. S1 never gets the key: the pinned script strips it, and its judge calls go through the claude CLI.
Fact extraction calls Claude Haiku for every memory written, including the roughly 875-record baseline that each suite loads. Expect a few hundred Haiku calls per suite.
Running it locally
You need Python 3.13 and uv. This command runs from a checkout with the submodule present:
git submodule update --init
uv sync
./omh fetch --suites s4 # Lethe's ForgetEval, pinned
./omh run --name rel-7.0.8 --omnimem 7.0.8 --suites core # a released build
./omh run --name main-head --binary ../omnimem/target/release/omnimem --suites smoke
./omh run --name span --omnimem 7.0.8 --config RECALL_EXPERIENCE_SPAN=0.05 --suites s5
./omh report results/rel-7.0.8/latest # re-render report.md
uv run pytest # the harness's own tests
OMH_BINARY=/path/to/omnimem uv run pytest -m integration # plus an end-to-end smoke run
Each suite gets its own throwaway server on a port from 8770 to 8789. The harness refuses ports 6399, 8080 and 8765–8767, and refuses any port where something is already listening. It also checks that the store is empty before writing anything.
Suites
| Suite | Tests | Gate |
|---|---|---|
smoke |
Remember one memory and recall it back | It comes back as the top hit |
s2 |
The Atlas's Contradiction Test, without an API key: replacement, polarity and retraction pairs, at gaps of 1 minute and 120 days | No STALE value after resolution, maintenance or re-entry |
s4 |
Lethe's ForgetEval (smoke set plus the adversarial layer), using its own case checks through an OmniMem adapter | Reported per family, not gated |
s5 |
Ranking weights against configuration.md (recency curve, DEPRIORITISED_WEIGHT) and feed-article expiry |
Expired articles are archived |
s6 |
The Atlas's 13-step deletion sequence, in two arms: forget, and forget plus suppress_topic |
The cells listed in PLAN.md §4.3 |
s7 |
Recall on questions the store knows nothing about | Nothing comes back above the weak band |
s8 |
Project isolation in recall, recall_index, briefing and the PreToolUse hook |
No cross-project leaks |
s1 |
LongMemEval through omnimem's own run_memory_bench.py, unchanged. This spends money: about $30 at n=60 |
Memory beats no memory |
s9 |
Dead-end interception through omnimem's own run_deadend_bench.py, unchanged: Claude Code agents with and without OmniMem on one Rust task. This spends money: about $2.80 at ten pairs |
The OmniMem arm passes every run, never walks into the dead end, and uses fewer tokens (median) |
The groups are core (s8, s6, s7, s5, s2, s4), judged (s1), deadend (s9) and all.
Before any case runs, each suite runs a positive fixture (a case it must pass) and a negative fixture (a broken case it must fail). If either gives the wrong answer, the suite is reported INVALID, because a check that can't tell a pass from a failure proves nothing.
The dead-end benchmark (S9)
This is the test from the main omnimem repository that showed OmniMem cutting tokens and stopping an agent repeating a known failure. It doesn't come from the Atlas. It asks whether memory stops an agent walking into a dead end it has already been down.
The task is in fixtures/harrier-rs, a small Rust workspace: implement make_limiter so that cargo test --offline passes. TODO.md recommends kestrel-rs. That crate keeps its handle on the thread that installed it, so every shard thread but the first fails. Nothing in the docs or the error says so; the tests have to be run to find out. The vendored pellham works.
Each pair is two Claude Code runs on a fresh copy of the code, back to back:
- without OmniMem: no MCP server and no hooks.
- with OmniMem: the server, plus
omnimem hookas a PreToolUse hook, with the earlier failure already in the store.
cargo test decides whether the task was done; there's no judge. The tests and the vendored crates are hashed before and after each run, so a pass that edited them counts as tampered. Before any money is spent, the script proves the scenario: untouched code must fail, the kestrel-rs route must fail and the pellham route must pass.
claude setup-token # once; prints a token for your subscription
export CLAUDE_CODE_OAUTH_TOKEN=... # or OMH_AGENT_API_KEY / ANTHROPIC_API_KEY
./omh run --name rel-7.0.10 --omnimem 7.0.10 --suites deadend --dry-run # proves the fixture, spends nothing
./omh run --name rel-7.0.10 --omnimem 7.0.10 --suites deadend --deadend-pairs 10
It needs cargo and the claude CLI on the PATH. The agents run with an empty CLAUDE_CONFIG_DIR and a workspace outside this repository, so your own CLAUDE.md, hooks and plugins don't reach either arm. That's why it needs a token or a key rather than your normal login. The credential goes only to the claude processes; the OmniMem server always runs without a key. Without a credential, S9 is reported NOT_RUN.
In CI, add a repository secret CLAUDE_CODE_OAUTH_TOKEN (from claude setup-token). Without it, the job uses the ANTHROPIC_API_KEY secret for the agents. With neither, S9 is NOT_RUN and the rest of the run carries on. To change the number of pairs, start the workflow by hand.
The wrapper sets OMNIMEM_PROJECT=harrier for the hook. Since 7.0.6 the hook matches dead ends to the project, which it otherwise takes from the directory name, and the script runs its agents in directories called control-1, omnimem-1 and so on. Without the setting, the hook never fires on 7.0.6 or later, and the OmniMem arm measures nothing.
The run folder gets s9.jsonl, one record per agent run, and s9/ with the script's results.json and the gzipped transcripts. s9.summary.json gives the median token and cost change, the pairs where OmniMem used fewer tokens, and a one-sided sign test on them. The default is ten pairs, as in omnimem's recorded run; six is the fewest that test can call at p < 0.05.
What this doesn't show:
- One scenario, one model, a shallow dead end. An agent without memory gets out of this one in a test run or two. A dead end that takes longer to find is worth more, and this doesn't measure that.
- It measures the hook, not recall. In the original runs, agents never called OmniMem's tools themselves.
- The fixture was rebuilt. The
harrier-rsthat produced omnimem's recorded results (10 pairs: 23% fewer tokens, 27% lower cost, no OmniMem run reaching the failing suite) was never committed. This one is rebuilt from the script's description and passes the script's own proof. Its numbers aren't directly comparable with those.
Comparing two versions
./omh compare results/rel-7.0.8/latest results/dev-7.0.9/latest # baseline, then candidate
./omh compare auto results/dev-7.0.9/latest # the highest earlier version under results/
./omh run --name dev-7.0.9 --binary ../omnimem/target/release/omnimem --compare auto
This writes compare-<baseline>.html and an A4 compare-<baseline>.pdf into the candidate's run folder. The page uses the same styling as the OmniMem investor brief: Space Grotesk, IBM Plex Sans and JetBrains Mono, in ink and green on paper. Its sections are:
- the run status
- the gates held
- what got worse
- a chart of each suite's headline measure
- S4 by family
- every gate
- every measure
- the candidate's notes
- where each run came from
Every number is read from the two run folders. The fonts and logo are embedded from harness/assets/, so the page needs no network.
The PDF is printed by a headless Chromium. The harness looks for one in this order:
OMH_CHROMIUM- the
PATH /Applications- Playwright's cache
The CI image installs Debian's chromium. Pass --no-pdf for the HTML alone.
What a run folder holds
| File | Contents |
|---|---|
manifest.json |
The instance name, the OmniMem version the server reported, the binary's sha256 and source, config overrides, and the harness and submodule commits |
<suite>.jsonl |
One record per case. Records are written as cases finish, so --resume <run_dir> can carry on after a crash |
<suite>.summary.json |
Counts, failing case IDs, fixture results, and p50/p95/p99 for settle time and latency |
gates.json |
Every gate, and the run's status: PASSED, FAILED, INVALID or ERROR |
report.md |
A table of every suite, then each gate |
compare-<baseline>.html, .pdf |
The comparison with an earlier run, when one was made |
Layout
omh CLI entry point
harness/ instance, adapters, suites, results, manifest
fixtures/build_baseline.py generates fixtures/baseline/baseline.json from a fixed seed
fixtures/harrier-rs/ S9's Rust task; nothing in it may explain the dead end
vendor/omnimem/ omnimem, pinned as a submodule (its scripts/benchmarking is reused)
data/manifest.lock pinned third-party data; everything else under data/ is fetched
.forgejo/workflows/ the tag-triggered CI run
docs/review/ the design review of PLAN.md