Skip to content

Add backend A/B eval (graph-lite vs flat) - #82

Open
RodCor wants to merge 7 commits into
mainfrom
fuse/backend-ab-eval
Open

RodCor wants to merge 7 commits into
mainfrom
fuse/backend-ab-eval

Conversation

@RodCor

@RodCor RodCor commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Adds the graph-lite vs flat storage-backend A/B eval used on locomo-conv26 and lme-oracle, plus the result summaries from those runs.

What this A/B compares

A single variable: storage.backend, graph-lite (control) vs flat (treatment). Both arms use TinyBERT and broker.rerank_min_score=0.0 (fill-to-cap, reorder only). The scorer also reports a vector arm as a ceiling; that arm is not part of the A/B variable.

Scorer: scripts/retrieval_eval.py (retrieval-only, not an official judge).

Shared inputs

Recorded by the as-run runners (run_conv26.sh sha256 e49f07c3bed75d7782a038b41ec68bf44eaf9f6d836f8bb7b64cd780d5d694a1, run_lme.sh sha256 82b5912af94c506510caa54c69402c72a7e6c8415dc3d6cf7a3438e2c2e1d89e):

  • Binary: /workspace/fuse/e0s/bin/kimetsu-e0s sha256 262f17def1cfd67f07aaec325a2f2d23aa058d393adefc463d4bfc4c33391985
  • locomo-conv26 data sha256 a996cc78f35f78d24114800636e4a2425ddf60639254532bfacff35a2013dcd7
  • lme-oracle data sha256 1dcfd431b1a145d2a234e07d1a72f246fbc37019bb4e3409a6a191beb965b129
  • Env pin: FASTEMBED_CACHE_DIR/HF_HOME=/workspace/fuse/e0s/model-cache, OPENBLAS_NUM_THREADS=1, HF_HUB_OFFLINE=1, PYTHONHASHSEED=0
  • memcap 5120 MiB, nice 19

The committed run_*.sh scripts keep the as-run box paths (including EVAL/RES under /workspace/fuse/backend-ab/).

Which eval sha produced which run

  • locomo-conv26 run1 and run2: backend_ab_eval.py sha256 dbdb3ecc7f86f1ad60921b1afe5f075ef44c1b0f90d531cfae68c0505c1c04b6 (commit 1, 8257c3a3dfe753b1a0956e6e5b819dcb26b06fe6)
  • lme-oracle run1 and run2: backend_ab_eval.py sha256 5c371964c37b369bf53d63616ba30eb065e921da172252e33fcda2c485035fac (commit 2, 7f08deea61e2cf71c4422dc5798b6be3d7326dc8)

The chunk retry in commit 2 never fired on the lme-oracle runs: both lme-oracle.meta.json files have "chunk_retries": []. error_report.py reports 0 errors and 0 skips in every arm of both datasets and both runs, 199 rows/arm on locomo-conv26 and 500 rows/arm on lme-oracle, exit 0. The locomo-conv26 metas have no chunk_retries field because those runs used the commit 1 eval.

Why commit 2 exists

The first lme-oracle attempt died on a 300 s MCP client timeout during a box stall of about 17 minutes (memcap, a separate process, wrote nothing from 13:08:41 to 13:26:10 ART / America/Buenos_Aires on 2026-11-29). The call in flight was question 81507db6 (graph-lite). Rerun alone through timed.py three times (after one untimed run.sh pass), that question's brain_context calls took 1.04 / 1.04 / 1.32 s on graph-lite and 0.87 / 0.87 / 1.03 s on flat, with mcp_start 0.01 s every time and 8 capsules every call. Source: scripts/experiments/backend_ab/repro-81507db6/timed.log (sha256 c1715f2e7a471536db5500c3c5cdacb07f37589e13df7a23d0e5dde7242390db, byte-identical to the box copy). Whole-question wall times in that log are 10.1 / 9.6 / 11.0 s. Commit 2 reruns the whole chunk on TimeoutError, up to 3 attempts, then fails loudly. A timeout is never written as an error row and no question is skipped. Every retry is logged to stderr and recorded in meta chunk_retries.

Commit 2 also adds error_report.py and the optional repro-81507db6/run.sh + timed.py timing wrapper (the wrapper still points at the as-run box paths).

Commit 3 (path only)

backend_ab_eval.py in commits 1 and 2 defaults SCRIPTS_DIR to the box path /workspace/fuse/e0s/kimetsu/scripts. Commit 3 (f3ec4c5249059fe56d9a7982a34cbee1e967ae1d) changes only that default to a repo-relative lookup of scripts/retrieval_eval.py. KIMETSU_SCRIPTS_DIR still overrides it. Commits 1 and 2 remain byte-identical to the as-run files.

Review follow-up

run_conv26.sh and run_lme.sh now take BIN, DATA, RESULTS, MEMCAP, MODEL_CACHE, and EVAL from flags or env, with repo-relative defaults. Memcap defaults to the in-repo scripts/experiments/e0s/memcap.py. As-run box values are in scripts/experiments/backend_ab/as-run.env. How to build binary 262f17de, why each arm has two values, the head scorer shas, and the earlier conv-26 died/stalled attempts are documented in scripts/experiments/backend_ab/README.md.

Results

Numbers below are copied from scripts/experiments/backend_ab/results/conv26-summary.json (sha256 9b156e8e9c2b23c5d69f08125fc3a9ef8ddc562433593684783d191e95361896) and scripts/experiments/backend_ab/results/lme-summary.json (sha256 4e4ca493327d369ad448f68b914f98652e19fdbd1acb4659ee80ba2577357676). Scorer: scripts/retrieval_eval.py (retrieval-only, not an official judge).

locomo-conv26

n_all=199, n_scored=197. Empty rate 0.0 in every arm and run. Capsule histogram in every arm and run: 199 rows at 8, median 8, mean 8.

run arm R@1 R@3 R@8 MRR empty hist
1 graph_lite_fill_to_cap 0.3452 0.4569 0.4822 0.3997 0 8:199
1 flat_fill_to_cap 0.3401 0.5076 0.5888 0.4316 0 8:199
1 vector 0.3198 0.5228 0.6701 0.4356 0 8:199
2 graph_lite_fill_to_cap 0.3452 0.4569 0.4822 0.3997 0 8:199
2 flat_fill_to_cap 0.3401 0.4924 0.5838 0.4282 0 8:199
2 vector 0.3198 0.5228 0.6701 0.4356 0 8:199

Determinism (compared_fields: labels, rank, capsules, empty, excluded, error, skipped): deterministic is false, total_changed 223. Per arm, changed / only_run1 / only_run2 / total: flat_fill_to_cap 112 / 0 / 0 / 199; graph_lite_fill_to_cap 111 / 0 / 0 / 199; vector 0 / 0 / 0 / 199.

lme-oracle

n_all=500, n_scored=479. Empty rate 0.0 in every arm and run. Capsule histogram in every arm and run: {2: 2, 3: 1, 4: 4, 5: 2, 6: 2, 7: 7, 8: 482} (0 and 1 are 0), median 8.0, mean 7.9.

run arm R@1 R@3 R@8 MRR empty hist
1 graph_lite_fill_to_cap 0.5136 0.7662 0.8747 0.6486 0 8:482, 7:7, 6:2, 5:2, 4:4, 3:1, 2:2
1 flat_fill_to_cap 0.5136 0.7662 0.8789 0.6495 0 8:482, 7:7, 6:2, 5:2, 4:4, 3:1, 2:2
1 vector 0.4113 0.7265 0.952 0.589 0 8:482, 7:7, 6:2, 5:2, 4:4, 3:1, 2:2
2 graph_lite_fill_to_cap 0.5177 0.7724 0.8789 0.6526 0 8:482, 7:7, 6:2, 5:2, 4:4, 3:1, 2:2
2 flat_fill_to_cap 0.5177 0.7724 0.8831 0.6536 0 8:482, 7:7, 6:2, 5:2, 4:4, 3:1, 2:2
2 vector 0.4113 0.7265 0.952 0.589 0 8:482, 7:7, 6:2, 5:2, 4:4, 3:1, 2:2

Determinism (same compared fields): deterministic is false, total_changed 102. Per arm, changed / only_run1 / only_run2 / total: flat_fill_to_cap 51 / 0 / 0 / 500; graph_lite_fill_to_cap 51 / 0 / 0 / 500; vector 0 / 0 / 0 / 500.

Layout and file hashes

Files are under scripts/experiments/backend_ab/, matching scripts/experiments/e0s/ from #77. Result summaries and per-run jsonl (each under 1 MB) are under scripts/experiments/backend_ab/results/.

Commit 1 content sha256 (verified after copy and against git show of 8257c3a3dfe753b1a0956e6e5b819dcb26b06fe6):

  • backend_ab_eval.py: dbdb3ecc7f86f1ad60921b1afe5f075ef44c1b0f90d531cfae68c0505c1c04b6
  • run_conv26.sh: e49f07c3bed75d7782a038b41ec68bf44eaf9f6d836f8bb7b64cd780d5d694a1
  • run_lme.sh: 82b5912af94c506510caa54c69402c72a7e6c8415dc3d6cf7a3438e2c2e1d89e
  • results/conv26-summary.json: 9b156e8e9c2b23c5d69f08125fc3a9ef8ddc562433593684783d191e95361896
  • results/lme-summary.json: 4e4ca493327d369ad448f68b914f98652e19fdbd1acb4659ee80ba2577357676
  • results/run1/locomo-conv26.meta.json: 4b911000c0c8d0e3d129842d8d2fa18e62984abad0e8de59778fbf0da170d2dc
  • results/run2/locomo-conv26.meta.json: bf78c758f07c815b936d322c28bdbed803a92d0cd6f62321f40463d3d06b5346
  • results/run1/lme-oracle.meta.json: 212a5ac54d0b63147ccb791e5be6275748dd80e840fe2c529606cd8766b116f9
  • results/run2/lme-oracle.meta.json: 10d3e412b29b37b511aff04097be2dba257cd3ca3a27a8d5f274f6d1ea0b09c4
  • results/run1/locomo-conv26.jsonl: 439b8cebb9772ccf08415e8ef2bb6f9004945f429dc4cb3c3ddf038651f5758a
  • results/run2/locomo-conv26.jsonl: a58694314fd912306b910a67fef209fd9c397c14fd3d05f01222a49a3a474044
  • results/run1/lme-oracle.jsonl: 188cb10242f8297dbb2ef44494acff898e3f23bb95b52c67a19750d72a612def
  • results/run2/lme-oracle.jsonl: 29f1b352c482664344435d0c0ebf7469d5c84ba4c3db5cfcf921aedb182d65c4

Commit 2 content sha256 (against git show of 7f08deea61e2cf71c4422dc5798b6be3d7326dc8):

  • backend_ab_eval.py: 5c371964c37b369bf53d63616ba30eb065e921da172252e33fcda2c485035fac
  • error_report.py: a652c36bd91886396bcdf11a195511911f08c3bcde300349148b4bd715f51b47

Commits

  • Commit 1 (as-run): 8257c3a3dfe753b1a0956e6e5b819dcb26b06fe6
  • Commit 2 (chunk retry): 7f08deea61e2cf71c4422dc5798b6be3d7326dc8
  • Commit 3 (repo-relative SCRIPTS_DIR default): f3ec4c5249059fe56d9a7982a34cbee1e967ae1d
  • Commit 4 (parameterized runners, README, as-run.env): cb1fd1d88e1bbd1bf79f714c66cd90bde5e8a57a
  • Commit 5 (timing log, q.json, repo-relative repro): 927c68632a5c34109777591361f2d9478b77020b
  • Commit 6 (eval-scripts CI, error_report --self-test, docstring): 5585029fbbb2b04cf8a699021c498b12e0131e1b
  • Commit 7 (resolved-config snapshots, run-log headers): 1c149d0dd46949125f56a0bef9d472af917a06b8

Byte-identical copies of the scripts and summaries that produced the
graph-lite vs flat runs. backend_ab_eval.py is sha256 dbdb3ecc, which
produced locomo-conv26 run1 and run2. The lme-oracle summaries are
included here as results; those runs used the chunk-retry eval from
the following commit.
On MCP TimeoutError, rerun the whole chunk from scratch, up to 3
attempts, then fail loudly. Retries are logged to stderr and recorded
in meta chunk_retries. No question is skipped or written as an error
row. This eval (sha256 5c371964) produced the lme-oracle runs.

Also adds error_report.py and the 81507db6 per-call timing repro.
The as-run default was the box path /workspace/fuse/e0s/kimetsu/scripts.
KIMETSU_SCRIPTS_DIR still overrides it, so the recorded runs stay
reproducible. Commit 1 and commit 2 remain byte-identical to the
as-run files.

@RodCor RodCor left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

fail on bar 5 at f3ec4c5249059fe56d9a7982a34cbee1e967ae1d. the numbers are right but the rerun path isn't.

what passes:

  • all 12 R@8 figures (plus R@1/R@3/MRR) recompute from the committed jsonl. i did it two independent ways, row recall.@8 and rank<=8, and both match the body and summaries.
  • backend_ab_eval.py --summarize-pair results/run1/X.jsonl results/run2/X.jsonl regenerates both summaries byte-identical, apart from the determinism.run1/run2 path strings.
  • all 15 sha256 in the body verify against git show of the stated commits.
  • like-for-like holds. both runs and both arms have the same id and scored sets (199/197, 500/479), the same binary and data sha in the run headers, and a one-knob diff (--self-test passes). the results are labelled retrieval-only and not an official judge.
  • base is main and there are no force-pushes (timeline only shows commits). nothing under crates/ or Cargo.*, no secrets, and the largest file is 878 KB.

must-fix

  1. run_conv26.sh / run_lme.sh: the only rerun commands are hardcoded to /workspace/fuse, including the bin, data, eval, results, memcap and model cache, and they need box binary 262f17de. nothing in this PR says how to build it. see inline.
  2. the body says "about 1 s per brain_context call", but the repro scripts are box-only and none of their output is committed. that's an unsourced figure. see inline.

should-fix
3. nothing in the repo explains why each arm has two values. see inline.
4. new scripts aren't wired into ci eval-scripts (.github/workflows/ci.yml:77-85), and error_report.py has no self-test. see inline.
5. the resolved-config jsons and the run-log headers aren't committed. see inline.

nits

  • summaries :33-34 keep /workspace paths. see inline.
  • the stale docstring. see inline.
  • the conv26 runs also had an earlier died attempt (11-27) and a stalled one (11-28) on the box, and only the lme death is disclosed. the reported runs show no chunk reuse in their logs, so this is disclosure only.
  • the head scorer is fine for this profile. retrieval_eval.py has the same sha as the as-run copy, and retrieval_eval_profiles.py differs only in sweep_profile rerank_off, which backend-ab doesn't use. worth one line in the readme.

ci at review time: python eval self-tests green. cargo-audit (RUSTSEC) is red with 2 vulns. this pr touches no Cargo.lock, so that looks like advisory drift that hits main too, but bar 1 isn't met until it's fixed or waived. clippy, tests and codeql rust were still running. mergeable: yes, state blocked on review.

Comment on lines +6 to +11
export FASTEMBED_CACHE_DIR=/workspace/fuse/e0s/model-cache HF_HOME=/workspace/fuse/e0s/model-cache OPENBLAS_NUM_THREADS=1 HF_HUB_OFFLINE=1
BIN="/workspace/fuse/e0s/bin/kimetsu-e0s"
MEMCAP="/workspace/fuse/e0s/memcap.py"
DATA="/workspace/fuse/e0/data/locomo-conv26.json"
EVAL="/workspace/fuse/backend-ab/backend_ab_eval.py"
RES="/workspace/fuse/backend-ab/results"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

must-fix (bar 5): this is the only rerun command for the conv26 figures, and every input is a box path (bin, data, eval, res, memcap, model cache). it can't run from a checkout. same in run_lme.sh:6-11.

pass = take bin/data/out/model-cache from flags or env with repo-relative defaults, like scripts/experiments/e0s/run_e0s.sh does. keep the as-run copy if you want it. then add a readme that names the binary: kimetsu 2.11.0 with embeddings, sha 262f17de, built from 61dc9f0 (rust tree = main 19112da) with the build line already in docs/audits/2026-11-e0s/MANIFEST.md. it also needs the data step (scripts/prepare_e0_data.py, sha a996cc78 / 1dcfd431) and the summary regen command.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in cb1fd1d.

run_conv26.sh (and the shared run_common.sh) now take BIN, DATA, RESULTS, MEMCAP, MODEL_CACHE, and EVAL from flags or env, with repo-relative defaults. Memcap defaults to the in-repo scripts/experiments/e0s/memcap.py. The as-run box values are in as-run.env. scripts/experiments/backend_ab/README.md names binary 262f17de (kimetsu 2.11.0 with embeddings), the build commit (61dc9f01, Rust tree = main 19112dae, scripts-only sweep profile), the recorded cargo rustc -p kimetsu-cli --bin kimetsu --release --locked --features embeddings command from /workspace/fuse/e0s/run_e0s.sh / docs/audits/2026-11-e0s/MANIFEST.md, the prepare_e0_data.py step, and the --summarize-pair regen command.

Box evidence for that sha is /workspace/fuse/e0s/run_e0s.log (built kimetsu 2.11.0 (embeddings) sha256=262f17de… after building at 61dc9f0). The digest was not reproduced by a rebuild in this PR; a different toolchain may not match it byte-for-byte.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0. paths now come from flags or env with repo-relative defaults (run_common.sh). --self-test, --show-config and --help all run from a bare checkout, and with no binary it fails fast and points at the README. the build is documented in README.md:76-125 (2.11.0, embeddings, 61dc9f0 on top of 19112da, with both the box line and a portable build line). data prep and the summarize command are documented too.

Comment on lines +6 to +11
export FASTEMBED_CACHE_DIR=/workspace/fuse/e0s/model-cache HF_HOME=/workspace/fuse/e0s/model-cache OPENBLAS_NUM_THREADS=1 HF_HUB_OFFLINE=1
BIN="/workspace/fuse/e0s/bin/kimetsu-e0s"
MEMCAP="/workspace/fuse/e0s/memcap.py"
DATA="/workspace/fuse/e0/data/lme-oracle.json"
EVAL="/workspace/fuse/backend-ab/backend_ab_eval.py"
RES="/workspace/fuse/backend-ab/results"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

must-fix (bar 5): same as run_conv26.sh. the lme figures (0.8747/0.8789 vs 0.8789/0.8831) only have this box-only rerun path.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in cb1fd1d, same parameterization as run_conv26.sh (shared run_common.sh). Default DATA is $REPO/e0-data/lme-oracle.json. As-run box paths remain in as-run.env; build and data steps are in the README.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0. this is the same shared runner as conv26, and run_lme.sh --self-test passes locally and in eval-scripts.

return r
rs.MCP.__init__, rs.MCP.context = init, ctx
sys.argv = ["backend_ab_eval.py"] + sys.argv[1:]
runpy.run_path("/workspace/fuse/backend-ab/as-run/backend_ab_eval.py.dbdb3ecc", run_name="__main__")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

must-fix (bar 5): this runs /workspace/fuse/backend-ab/as-run/backend_ab_eval.py.dbdb3ecc and loads the scorer from /workspace/fuse/e0s/kimetsu/scripts (line 2). run.sh uses $D/q.json, which isn't committed, and none of the TIMING output is committed either. so the body's "about 1 s per brain_context call" has no source in the repo.

pass = commit q.json and the TIMING output and point these scripts at repo paths, or drop the figure from the body.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 927c686.

Committed repro-81507db6/timed.log (sha256 c1715f2e7a471536db5500c3c5cdacb07f37589e13df7a23d0e5dde7242390db, byte-identical to the box copy) and q.json. run.sh, timed.py, and time_reps.sh now default to repo-relative paths. The log is the output of timed.py invoked three times after one untimed run.sh pass, wrapping as-run eval dbdb3ecc. Quoted from that log: graph-lite brain_context 1.04 / 1.04 / 1.32 s, flat 0.87 / 0.87 / 1.03 s (8 capsules, mcp_start 0.01 s). The PR body now cites this file instead of an unsourced figure.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0. timed.log (sha c1715f2e) and q.json (sha 8740efce) are byte-identical to the box copies. the log has graph-lite at 1.04/1.04/1.32 s (median 1.04, mean 1.13) and flat at 0.87/0.87/1.03 s (median 0.87, mean 0.92), so the body's exact per-call values match. the scripts now default to repo paths and time_reps.sh is committed. a small nit on the log itself is in the new review.

"error",
"skipped"
],
"deterministic": false,

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

should-fix: nothing in the repo explains why each arm has two values. run1 and run2 are the same command run twice, and the output isn't deterministic. on lme, graph-lite moves too (0.8747 to 0.8789).

worth saying in a readme. on lme the drift is identical in both arms (the same 9 rank flips), so flat minus graph-lite is +2/479 hits in both runs, which is the same size as the run-to-run drift. on conv26 it's +21 and +20 hits (+0.1066 / +0.1015) against 1 hit of drift. so: a clear win on conv26, and no measurable difference on lme.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Agreed, and documented in scripts/experiments/backend_ab/README.md (cb1fd1d88e1bbd1bf79f714c66cd90bde5e8a57a).

run1 and run2 are the same command run twice, as a determinism check. No component takes a seed; PYTHONHASHSEED=0 is pinned. The output is not deterministic. On lme, the drift is identical in both arms (the same 9 rank flips), so flat minus graph-lite is +2/479 hits in both runs, the same size as the run-to-run drift. On conv-26 it is +21 and +20 hits (+0.1066 / +0.1015) against 1 hit of drift. So: a clear win on conv-26, and no measurable difference on lme.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0. README.md:16-28 explains run1/run2 and the non-determinism. it says conv26 is a clear win and lme shows no measurable difference (+2/479, the same size as the drift), so there's no over-claim.

@@ -0,0 +1,16 @@
#!/usr/bin/env python3

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

should-fix: there's no self-test, and nothing in .github/workflows/ci.yml eval-scripts (lines 77-85) runs this or backend_ab_eval.py --self-test, which does pass locally.

pass = add a tiny self-test here and wire both into eval-scripts. ideally also add a --summarize-pair regen check against the committed summaries, which already match byte for byte apart from the paths.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 5585029.

.github/workflows/ci.yml eval-scripts now runs py_compile on the new scripts, backend_ab_eval.py --self-test, error_report.py --self-test, and both runners' --self-test. error_report.py --self-test checks synthetic rows for error/skip counts and chunk_retries. backend_ab_eval.py --self-test still checks the one-knob profile and now also regenerates both committed summaries with --summarize-pair; they must match byte-for-byte aside from the determinism.run1 / run2 path strings. These ran clean locally before the push.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0. error_report.py has a synthetic --self-test. ci.yml eval-scripts now runs py_compile, backend_ab_eval.py --self-test (which includes a summary regen check), the error_report self-test, and both runner self-tests. all pass locally, and python eval self-tests is green on 1c149d0.

questions, scored = load_questions(args.dataset, args.limit)
binary = str(Path(args.bin).resolve())
args.out.parent.mkdir(parents=True, exist_ok=True)
resolve_configs(binary, args.out.parent / f"resolved-config-{args.name}.json")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

should-fix: these runs wrote resolved-config-{locomo-conv26,lme-oracle}.json, but they aren't committed. they're the evidence that the binary resolved storage.backend to graph-lite and flat with everything else equal. the box copies show that. the run-log headers, the binary/data/eval sha lines from run_*.sh:16-18, are also only on the box. commit both.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1c149d0.

Committed the successful-run resolved-config-{locomo-conv26,lme-oracle}.json and .log files from results/run1/ and results/run2/ (not the dead lme attempt under results/run1.lme-died-20261129/). Those snapshots show storage.backend resolving to graph-lite and flat with everything else equal. The first six lines of the successful run_conv26.log / run_lme.log and of the earlier died/stalled attempts are in results/run-log-headers.txt.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0. the four resolved-config json/log pairs are byte-identical to the box. in each, the only key that differs between arms is storage.backend ("graph-lite" vs "flat"). results/run-log-headers.txt carries the binary, data and eval sha lines.

Comment on lines +4 to +5
Reuses scripts/retrieval_eval.py and scripts/retrieval_eval_profiles.py
without modifying the pinned e0s worktree.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

nit: after commit 3, the scorer loads from repo scripts/, so "without modifying the pinned e0s worktree" is stale.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 5585029. The docstring now says the scorer is loaded from repo scripts/ (or KIMETSU_SCRIPTS_DIR), not from a pinned e0s worktree.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

resolved at 1c149d0, the docstring is updated.

Comment on lines +33 to +34
"run1": "/workspace/fuse/backend-ab/results/run1/locomo-conv26.jsonl",
"run2": "/workspace/fuse/backend-ab/results/run2/locomo-conv26.jsonl",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

nit: box paths here (and in lme-summary.json:33-34) are the only bytes a checkout regen can't reproduce. fine as provenance, or summarize with repo-relative paths.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Left the committed summaries as provenance (the as-run box paths are the only bytes a checkout regen cannot reproduce). Documented that in the README (cb1fd1d88e1bbd1bf79f714c66cd90bde5e8a57a). backend_ab_eval.py --self-test now regenerates both summaries and compares them after dropping determinism.run1 / run2 (5585029fbbb2b04cf8a699021c498b12e0131e1b).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

answered at 1c149d0. the paths are kept as provenance and documented in README.md:30-33, and the self-test compares while ignoring them. fine.

run_conv26.sh and run_lme.sh take BIN, DATA, RESULTS, MEMCAP,
MODEL_CACHE, and EVAL from flags or env, with repo-relative defaults.
Memcap defaults to the in-repo scripts/experiments/e0s/memcap.py.
As-run box paths stay in as-run.env. README records how binary
262f17de was built (61dc9f0, Rust tree 19112da), why each arm has
two values, the head scorer shas, and the earlier conv-26 failed
attempts.
timed.log is a byte-identical copy of the box output from timed.py
invoked three times (after an untimed run.sh pass). graph-lite
brain_context was 1.04/1.04/1.32 s; flat was 0.87/0.87/1.03 s.
q.json is the single-question slice that was used. run.sh, timed.py,
and time_reps.sh now default to repo-relative paths.
Add py_compile, backend_ab_eval.py --self-test (one-knob check plus a
summarize-pair regen against the committed summaries, ignoring box
paths), error_report.py --self-test on synthetic rows, and runner
--self-test. Also refresh the eval docstring: the scorer now loads
from repo scripts/.
Successful run1/run2 resolved-config JSON and logs show
storage.backend resolving to graph-lite and flat with everything
else equal. results/run-log-headers.txt has the first six lines of
the successful run_conv26/run_lme logs and of the earlier
died/stalled attempts (disclosure only).

@RodCor RodCor left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

pass on bar 5 at 1c149d0dd46949125f56a0bef9d472af917a06b8. every must-fix and should-fix from review 6131270962 is resolved, and i replied on each thread. what's left is nits.

how i checked:

  • history: f3ec4c5 is an ancestor. the 4 new commits (cb1fd1d, 927c686, 5585029, 1c149d0) are fast-forward, the timeline shows only commits, and base is main.
  • scope: diff is scripts/experiments/backend_ab/, plus 7 lines in ci.yml eval-scripts and a .gitignore block (ignores /backend-ab-results/, un-ignores the committed logs). nothing under crates/ or Cargo.*.
  • runners: run_{conv26,lme}.sh take --help, --show-config and --self-test from a bare checkout. paths come from flags or env with repo-relative defaults. with no binary they exit 2 and point at the README. nothing needs /workspace (box values are only in as-run.env).
  • build: README:76-125 has 2.11.0 with embeddings, commit 61dc9f0 (parent 19112da, scripts-only diff, so the rust tree is main), the box cargo line plus a portable one, data prep with shas, and the summarize command. 19112da and 61dc9f0 both resolve on github. the as-run memcap sha 6737690d matches the box.
  • timing: timed.log (c1715f2e) and q.json (8740efce) are byte-identical to the box. per call, graph-lite is 1.04/1.04/1.32 s (median 1.04, mean 1.13) and flat is 0.87/0.87/1.03 s (median 0.87, mean 0.92). the body and README quote exactly those values and the 10.1/9.6/11.0 s walls.
  • resolved configs: all four json/log pairs are byte-identical to the box. the only differing key between arms is storage.backend, graph-lite vs flat.
  • figures: the independent recompute is unchanged. all 12 R@8 values match, with the same id and scored sets. --summarize-pair still matches byte for byte apart from the 2 path lines. error_report reports 0 errors, 0 skips and 0 retries.
  • self-tests: all five eval-scripts commands pass locally.

nits, non-blocking:

  • timed.log meta lines are cut at about 260 chars. see inline.
  • run.sh:12 quotes a wall time from an uncommitted run.log. see inline.
  • the summary self-test skips silently when files are missing. see inline.
  • README says byte-for-byte, but the self-test compares parsed json. see inline.
  • PR body lines "The committed run_*.sh scripts keep the as-run box paths..." and "(the wrapper still points at the as-run box paths)" read as current. both were true at commits 1 and 2, not at head.

ci at 1c149d0 (cargo-audit ignored as known RUSTSEC-2026-0620 drift):

  • green: python eval self-tests, rustfmt, clippy, TypeScript SDK, cargo/npm version sync, npm staging, integration asset drift, decision provider examples, and codeql for actions, js/ts and python.
  • codeql summary: neutral.
  • still running: test on ubuntu, embeddings ubuntu, macos-15 and windows, and codeql rust.
  • mergeable: yes, state blocked on review.

TIMING brain_context 1.04s capsules=8
TIMING mcp_start 0.01s log=flat_fill_to_cap.log
TIMING brain_context 0.87s capsules=8
{"dataset": "repro", "questions": 1, "rows": 3, "rows_scored": 3, "scorer": "scripts/retrieval_eval.py (retrieval-only, not an official judge)", "exit": 0, "wall_s": 10.1, "peak_child_rss_mib_rusage": 239.3, "peak_self_rss_mib": 23.4, "profile": "backend-ab",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

nit: the meta json lines (6, 12, 18) stop at "profile": "backend-ab", at about 260 chars, so this isn't the raw stdout of time_reps.sh, which prints full lines. the TIMING lines and wall_s are intact, so the figures hold. one comment saying how it was trimmed (or the untrimmed log) would make it exact.

# python3 /workspace/fuse/backend-ab/backend_ab_eval.py \
# --bin /workspace/fuse/e0s/bin/kimetsu-e0s --dataset $D/q.json \
# --name repro --out $D/out.jsonl
# That pass is recorded in run.log (not committed; wall 10.1 s).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

nit: "wall 10.1 s" here cites run.log, which isn't committed. the box out.meta.json does say 10.1, so it's true. commit out.meta.json or drop the number.

Comment on lines +257 to +258
if not committed.is_file() or not run1.is_file() or not run2.is_file():
continue

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

nit: if a summary or jsonl goes missing, the self-test silently skips the regen check and still prints ok. in-repo these files should always exist, so failing loudly would make the ci guard real.

Comment on lines +32 to +33
checkout `--summarize-pair` regen matches the summaries byte-for-byte except
those two path strings. `--self-test` checks that.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

nit: the regen really is byte-for-byte apart from the 2 path lines (checked by hand). --self-test compares parsed json with the paths dropped, though, so "self-test checks that" is a bit stronger than what it actually checks.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant