Repository navigation
Bench: run the receipts and PAST-Bench harnesses against a Postgres memory - #221
Merged
Merged
Conversation
…emory AREEV_BENCH_DB (or receipts/run.py --db) names the memory — a file path or a postgres://…?schema=… DSN, handed to areev.Areev verbatim — for the experience/evaluation/regress legs and the PAST-Bench backend, which both hard-coded a file under their work directory. A schema cannot be copied, so the harnesses say what they do instead: evaluate.py runs every arm on the one memory and produces arm A by a real rollback, last; snapshots and per-pass learner copies are refused; each leg's loop policy lands in its work dir. dryrun.sh reorders the legs on a DSN (B/B2, regress, then arm A via the new evaluate.py --append) since that rollback ends the state regress verifies. A DSN is printed and recorded only redacted. Unset, the file-backed runs are byte-for-byte unchanged.
Main landed the governed pass as a journaled `areev run` (`scripts/bench_run.py`) and moved PAST-Bench's injected prompt into `prompt.py`, so both files this branch changes were rewritten underneath it. Three conflicts, resolved onto main's shape: - `receipts/memory.py`: `learn()` is main's delegation to `bench_run.learn`, with this branch's `policy_dir` threaded through it. - `pastbench/areev_backend.py`: main's text-block injection, with `memory_present()` in place of the `db_path.exists()` it reintroduced. - `CHANGELOG.md`: both Unreleased entries kept. `bench_run.learn` derived everything from a file path — the journal's directory, the policy file's, and `agent_db` through `os.path.abspath` — which is the same hard-coding this branch removed from the two harnesses, arrived at from a new direction. It now takes `policy_dir` and uses it for both when the memory is a DSN, passing the DSN through untouched. The journal stays a local file there on purpose: the Cloud leg's role has no CREATE for a second schema, and the two-memories separation is about the writer handle, not the backend. `BENCH-TEMPLATE.md` and the new `areev-bench/CLAUDE.md` both stated a harness memory is a file; both now say what a DSN changes. Verified against the merge: `dryrun.sh` and `dryrun_drift.sh` (the keyless CI gates) pass unchanged on a file — same A0/B/B2/A numbers, all regress checks — with the learn passes journaled as runs and `loop-policy.json` in the leg's work dir; `selftest_run.py` and `parity_check.py` pass; `check_versions.py` and `repo_stats.py --check` pass. Claude-Session: https://claude.ai/code/session_016YzyEfdWprezzATrZGNtg8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both harnesses hard-coded a file memory under their work directory, so
the Cloud leg — one provisioned schema, owner role with no CREATE — could
not run them.
AREEV_BENCH_DB(orreceipts/run.py --db) now names thememory, file path or DSN, passed to
areev.Areevverbatim.What a schema cannot do is be copied, and the harnesses say so rather
than pretending:
evaluate.py: every arm reads the one memory; arm A is a real rollbackon it, run last. New
--appendadds arms to an existing trials set.dryrun.sh: on a DSN runs B/B2 (journaling B), then regress, thenarm A appended — regress needs B journaled and nothing applied survives
arm A.
--snapshot-every/--snapshot-at) andlearners.pycopiesare refused on a DSN with a message naming the alternative.
run.pyrefuses a schema that already holds grains, the file ruleasked of the schema. Loop policy files land in each leg's work dir;
regress.py --run-configpoints at the run's config (default: parentof its work dir on a DSN).
AREEV_BENCH_DBreplaces the derived path; fileoperations on the state root leave a Postgres memory alone.
run.config.json→memory) with thepassword redacted.
Verified: the keyless dry run passes on a file (unchanged from baseline)
and on a local Postgres 16 schema — same A0/B/B2/A numbers, same
McNemar verdicts, all regress checks pass, and the DSN memory ends with
no applied lessons.
Closes #200.