Skip to content

Add E0 sweep artifacts and fusion attribution for #68 - #80

Merged
RodCor merged 4 commits into
mainfrom
cursor/e0s-artifacts
Nov 27, 2026
Merged

RodCor merged 4 commits into
mainfrom
cursor/e0s-artifacts

Conversation

@RodCor

@RodCor RodCor commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Why

The E0+sweep measurements for issue #68 currently live only on the box. This PR commits the run1/run2 summaries, per-question outputs, run1-vs-run2 delta check, and fusion attribution so those numbers can be cited from commit paths.

What landed

  • docs/audits/2026-11-e0s/: run1 and run2 summary.md / summary.json, capsule histograms, meta and resolved-config JSON, locomo-conv26.jsonl, gzipped lme-oracle.jsonl.gz, determinism-diff.md, run1-run2-delta.md / .json, resolved-config-per-arm.json, wrapper-sha256.txt, MANIFEST.md, README.md, and SHA256SUMS.
  • scripts/experiments/e0s/fusion_attribution.py: fusion attribution over run1/run2 results (supports .jsonl and .jsonl.gz, includes --self-test), plus attribution-run1.md / .json and attribution-run2.json.
  • scripts/experiments/e0s/summary_delta.py: computes per-arm run1-vs-run2 R@8 deltas (includes --self-test) to back the run-stability claim in README.md.
  • .github/workflows/ci.yml: wires --self-test for both fusion_attribution.py and summary_delta.py into the eval-scripts job.

Results are under docs/audits/ because that is the existing home for committed measurement artifacts. /bench/ and /e0s-results/ are gitignored.

What is not in the tree

  • Stdout logs (*.log); the repository gitignores them.
  • Uncompressed run{1,2}/lme-oracle.jsonl (committed as run{1,2}/lme-oracle.jsonl.gz; uncompressed SHA-256 values are recorded in docs/audits/2026-11-e0s/SHA256SUMS).

Binary used for both runs: sha256 262f17def1cfd67f07aaec325a2f2d23aa058d393adefc463d4bfc4c33391985. Run1 runner: run_e0s.sh at cc7b729, sha256 4b4155f1…. Run2 runner: scripts/experiments/e0s/rerun_run2.sh (PR #79), sha256 0580084a…. Scorer: scripts/retrieval_eval.py via scripts/e0_eval.py --profile bench-sweep. Retrieval only; not an official judge.

How to rerun

From a checkout (with the dataset JSONs in $DATA):

python3 scripts/experiments/e0s/fusion_attribution.py \
  --results docs/audits/2026-11-e0s \
  --data "$DATA" \
  --out-dir docs/audits/2026-11-e0s

python3 scripts/experiments/e0s/summary_delta.py \
  --results docs/audits/2026-11-e0s \
  --out-dir docs/audits/2026-11-e0s

Self-tests (also run in CI eval-scripts):

python3 scripts/experiments/e0s/fusion_attribution.py --self-test
python3 scripts/experiments/e0s/summary_delta.py --self-test

Commit the run1/run2 summaries, capsule histograms, resolved configs, and
determinism diff for the E0 hybrid sweep on issue #68, plus the fusion
attribution script and its outputs. Large lme-oracle JSONL files are left
on the box and recorded by hash. Results live under docs/audits/ because
/bench/ and /e0s-results/ are gitignored.
Reproduce the current hybrid formula from sqlite (FTS bm25, cosine over
stored embeddings, union_max, usefulness/trust/decay, per-kind
normalization, semantic floor, MMR) and gate it against fill_to_cap's
top-8 set. If the match rate is at least 95%, score TM2C2 bm25/max_q
arms at alpha 0.5-0.8. The script does not run a benchmark by default;
brains are rebuilt with the same binary when the per-question temp
databases are missing.

@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 at 78e0ef1: one must-fix, a wrong and unsourced number in the readme. everything else traces.

what i checked:

  • every committed artifact is byte-identical to the box original. sha256sum -c SHA256SUMS passes, and the omitted lme jsonl hashes and sizes match.
  • summary.json recomputed from the per-row jsonl (2520 stats): all match. summary.md vs summary.json (1764 cells): 0 mismatches. capsule-hist (36 hists): 0 mismatches. determinism-diff: 6291 rows, 1099 changed, per-arm counts identical.
  • reran fusion_attribution.py from this branch: outputs are identical except the lines recording its own path. independent recompute of the kill-rule headline: 197 scored, 132 / 95 with gold, 64 affected, 71 lost. matches.
  • pr body figures (jsonl sizes, binary and runner shas, 419-memory corpus, 495 lme chunk sets) all check out. retrieval-only / not-a-judge labeling is present. no secrets, no binaries.

must-fix

  • README.md:39: "R@8 moved by at most 0.005" is wrong (inline).

should-fix

  • SHA256SUMS:31: commit the lme-oracle jsonl gzipped (~116 KB) so the lme figures can be recomputed from a checkout.
  • MANIFEST.md:10: "deterministic" contradicts determinism-diff.md.
  • fusion_rescore.py: drop it from this pr. nothing cites it, and it fails its own gate when run (inline).
  • fusion_attribution.py: no --self-test in ci, unlike the other e0s scripts.

nits

  • the scripts default to /workspace/fuse paths, so running with defaults writes into that tree. make the paths required.
  • /home/box paths in MANIFEST.md and wrapper-sha256.txt. fine as provenance.

foreman's questions: (1) every number traces to a committed source except README.md:39. lme figures trace only through the off-tree jsonl (sha-pinned). (2) fusion_rescore.py: drop it, or land it later with a fixture test once its gate can pass.

ci at 78e0ef1: 17/22 done and green (CodeQL neutral). Analyze (rust) x2 and test embeddings / macos-15 / windows were still running.

Comment thread docs/audits/2026-11-e0s/README.md Outdated
|---|---|
| [MANIFEST.md](MANIFEST.md) | Run manifest (commands, env, binary, data paths). |
| [wrapper-sha256.txt](wrapper-sha256.txt) | SHA-256 of the wrappers and data used for run1. |
| [determinism-diff.md](determinism-diff.md) | Row-level run1 vs run2 comparison. 1099 of 6291 rows changed; R@8 moved by at most 0.005. |

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: "R@8 moved by at most 0.005" is not true and nothing computes it (determinism-diff.md has no R@8 figures). summary.json all-rows R@8, run1 -> run2: locomo-conv26 rrf_k60 0.487 -> 0.462 (-0.025), lme-oracle rrf_k60 0.624 -> 0.639 (+0.015). it only holds without rrf_k60 (max 0.0042). state the real max and cite run{1,2}/summary.json, or add a per-arm delta table to determinism-diff.md.

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 2ce1300. the delta table matches summary.json (252 cells, 0 mismatches), and summary_delta.py regenerates it byte-identical.

Comment thread docs/audits/2026-11-e0s/SHA256SUMS Outdated
c00b010d3cd7bc00fe88eef497cf00dc1689fc055c6267ede238d215860b0e37 ./wrapper-sha256.txt

# omitted (live on the box at /workspace/fuse/e0s/results/...)
# OMITTED e6287fb20b4c984d65e065d57aa7e63769f2ae95d96663269519d568f8434eab run1/lme-oracle.jsonl # omitted,2355878 bytes; /workspace/fuse/e0s/results/run1/lme-oracle.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.

should-fix: with the lme-oracle jsonl off-tree, none of the lme figures can be recomputed from a checkout. gzip -c run1/lme-oracle.jsonl is ~116 KB, so commit run{1,2}/lme-oracle.jsonl.gz and keep the raw sha here.

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 2ce1300. the .gz files decompress byte-identical to the originals, and all 1152 lme stats recompute from the checkout with 0 mismatches.

Comment thread docs/audits/2026-11-e0s/MANIFEST.md Outdated
- build (run1 only; run2 reused the binary): (cd /workspace/fuse/e0s/kimetsu && env PATH=/home/box/.cargo/bin:/workspace/fuse/e0s/toolchain/bin:/usr/local/bin:/usr/bin:/bin CXX=/workspace/fuse/e0s/toolchain/zig-cxx OPENSSL_INCLUDE_DIR=/usr/include OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu LIBRARY_PATH=/workspace/fuse/e0s/toolchain/lib CARGO_BUILD_JOBS=2 CARGO_TARGET_DIR=/workspace/fuse/e0s/target nice -n 19 /home/box/.cargo/bin/cargo rustc -p kimetsu-cli --bin kimetsu --release --locked --features embeddings -j 2 -- -C link-arg=-L/workspace/fuse/e0s/toolchain/lib -C link-arg=-lc++ -C link-arg=-lc++abi -C link-arg=-lunwind)
- data: /workspace/fuse/e0/data/locomo-conv26.json (199 q / 197 scored), /workspace/fuse/e0/data/lme-oracle.json (500 q / 479 scored)
- scorer: /workspace/fuse/e0s/kimetsu/scripts/retrieval_eval.py metrics via scripts/e0_eval.py --profile bench-sweep; retrieval only, no reader, NOT an official judge
- seed: none (deterministic); PYTHONHASHSEED=0. threads: 1 ONNX thread

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: "seed: none (deterministic)" contradicts determinism-diff.md (verdict NOT DETERMINISTIC, 1099/6291 rows changed). add a line under corrections, like the #79 ones.

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 2ce1300: the seed line cites 1099/6291, and there's a corrections entry.

RERANK_OFF_ARM = "rerank_off"
DATASETS = ("locomo-conv26", "lme-oracle")
BINARY_SHA256 = "262f17def1cfd67f07aaec325a2f2d23aa058d393adefc463d4bfc4c33391985"
DEFAULT_SANITY_THRESHOLD = 0.95

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: drop this file from the pr. nothing in docs/ cites numbers from it. i ran it on a 5-question locomo-conv26 subset (temp brains, out and model-cache dirs): it runs end to end but matches 0/5 fill_to_cap sets, so it exits 1 and scores no alpha arms. the binary admits mostly D1:* rows, while the offline sets spread across D4-D18, so the reconstruction is off somewhere (likely freshness or tie-break). the 0.95 gate is also above the binary's own rerun agreement: fill_to_cap top-8 sets are equal run1 vs run2 on 164/199 (0.824) locomo and 464/500 (0.928) lme, 0.898 combined. the body says "not run", but a run is going now (/workspace/fuse/e0s/rescore/conv26-gate.log). land it later with a tiny-fixture test once the gate is calibrated and passes.

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.

dropped in 2ce1300. no references are left in the tree. the pr body still describes it, so i flagged that in the summary.


def parse_args(argv: list[str]) -> argparse.Namespace:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--results", type=Path, default=DEFAULT_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.

should-fix: memcap.py and run_e0s.sh each have a --self-test that ci runs (ci.yml eval-scripts). add one here on a tiny inline fixture (two questions, two arms) and wire it in. nit: these defaults (lines 33-35) point at /workspace/fuse, so a bare run writes into that tree. make the paths required.

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 2ce1300. --self-test passes, it's wired into eval-scripts (green), and the paths are required now.

@RodCor

RodCor commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Addressed all review items in 2ce1300:

  • Must-fix (README.md:39 unsourced R@8 delta): added scripts/experiments/e0s/summary_delta.py (with --self-test) and its generated docs/audits/2026-11-e0s/run1-run2-delta.{md,json} computed from the committed run{1,2}/summary.json. README now cites run1-run2-delta.md: overall max |Δ R@8| is 0.025381 (locomo-conv26 rrf_k60), and across all non-rrf arms |Δ R@8| is at most 0.004175.
  • Should-fix (lme-oracle JSONL): committed run1/lme-oracle.jsonl.gz (108,949 B) and run2/lme-oracle.jsonl.gz (108,530 B), updated SHA256SUMS (both .gz and uncompressed hashes verified), and added .jsonl.gz reading to fusion_attribution.py so lme figures recompute directly from a checkout.
  • Should-fix (MANIFEST.md:10 "deterministic"): updated the seed line to note that determinism-diff.md found 1099/6291 changed rows, and recorded the edit in the corrections section.
  • Should-fix (fusion_rescore.py): removed scripts/experiments/e0s/fusion_rescore.py from this PR; it will land separately once its sanity gate passes.
  • Should-fix (CI self-test) & nit (default paths): added --self-test and required --results/--data/--out-dir flags to fusion_attribution.py (new sha256 6bd9f525…, verified to reproduce identical counts to c2fc141d… from docs/audits/2026-11-e0s), and added both fusion_attribution.py --self-test and summary_delta.py --self-test to the eval-scripts job in .github/workflows/ci.yml.

@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 at 2ce1300 on the bar from review 6000711961. all five findings are fixed. one should-fix left, and it's the pr body, not the tree. 78e0ef1 is an ancestor of the new head, so no force-push.

prior findings

  • must-fix README.md:39: fixed. i recomputed the delta table from run{1,2}/summary.json: 18 rows, 252 cells, 0 mismatches. rerunning summary_delta.py from the readme command gives byte-identical .md and .json. maxima check: 0.025381 overall (locomo rrf_k60), 0.004175 for non-rrf arms, a 5-way tie on lme.
  • should-fix SHA256SUMS:31: fixed. both .jsonl.gz are committed, sha256sum -c passes, and the decompressed files are byte-identical to the box originals and the pinned hashes. i recomputed all 1152 lme summary stats from the .gz alone: 0 mismatches.
  • should-fix MANIFEST.md:10: fixed. the seed line now cites 1099/6291, and there's a corrections entry.
  • should-fix fusion_rescore.py: dropped. no references are left in docs, scripts or ci.
  • should-fix fusion_attribution.py: fixed. --self-test passes locally, summary_delta.py's does too, and both are wired into eval-scripts. that job is green on this head. the paths nit is also fixed: the flags are required now, and a bare run errors out.
  • i reran attribution from the checkout (--results docs/audits/2026-11-e0s with the .gz files) and got the same counts (64 affected). only the provenance path and sha lines differ.

should-fix

  • the pr body is stale. it still describes fusion_rescore.py and its rerun block. it still lists lme-oracle.jsonl under "not in the tree" and says to "copy the omitted lme-oracle JSONL". it still says ci doesn't run the new scripts. please update it before merge, since it likely becomes the squash message.

new diff: nothing else. no unsourced numbers, no stray files, and summary_delta.py has no box-path defaults.

ci at 2ce1300: 12/22 done and green (CodeQL neutral), including python eval self-tests. Analyze (rust) x2, cargo-audit and test embeddings / macos / ubuntu / windows were still running. mergeable, blocked only on checks.

@RodCor RodCor changed the title Add E0 sweep artifacts and an offline fusion rescore for #68 Add E0 sweep artifacts and fusion attribution for #68 Nov 27, 2026
@RodCor
RodCor merged commit 9ecf35b into main Nov 27, 2026
22 checks passed
@RodCor
RodCor deleted the cursor/e0s-artifacts branch November 27, 2026 17:42
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