Skip to content

EPIC: Plugin effectiveness benchmark — results banked, hold-out validity + latency + publishing left #315

Done
7 of 8 issues completed

Description

@abogartz

Purpose

Causal A/B evidence for whether this plugin helps, hurts, or is neutral — the isolation the Prime Agent paper (arXiv:2608.23552) lacks. Benchmark lives OUTSIDE this repo at ~/Documents/benchmark-tests/ocsi (decision: no benchmark files in the plugin repo). Model seat: local evo/Qwen3.8-Flash-Next-UD-Q4_K_XL, opencode v2.2.5, plugin pinned to local checkout.

Method (final design)

  • Harness drives opencode run --standalone --auto --format json per task with isolated HOME, pinned PWD, per-arm OPENCODE_MEMORY_DIR.
  • Arms: A plugin off; B1–B4 plugin on, store chained across passes; C1–C4 same but OPENCODE_MEMORY_INJECT_BUDGET=999999 (naive full-dump ablation); N find-task non-inferiority control; BA/BB fixed-budget 150s scoring (timeout = model failure, no retry).
  • Tasks: base2/ repo, 4 modules with header invariant comments, 10 mutation templates, 24 fix instances + 8 find controls. Blind mode: hidden test/ suite removed from agent view, git squashed to one sync commit, invariant comments KEPT (oracle). Grading copies agent src/ into pristine grade/ and runs bun test.
  • RHAE discipline: harness failures re-run once on clean repo, never re-scored. Key difference from the paper: we re-run, they re-score.

Harness invalidators found (all fixed, all silent)

  1. opencode resolves cwd from $PWD env, not spawn cwd → agents escaped into harness dir (answer key). Fix: pin PWD per run.
  2. .git history leaked tests + mutation diffs. Fix: squash to single sync commit.
  3. Blind-mode strip of invariant comments made tasks undecidable. Fix: keep comments.
  4. Per-task fresh repo dir = per-task memory amnesia (plugin scopes by repo identity). Zero memory_used events. Fix: one fixed repo path per arm, reset in place.

Four harness failures, zero model failures — most apparent "model behavior" was plumbing.

Results — dark run (2026-11-05/06, no contention, publishable)

arm pass med-in med-reason med-bill med-sec $/solve ($3/M in, $15/M out)
A (off) 24/24 3,241 6,473 13,143 178 0.153
B1 (cold) 6/6 13,783 4,641 24,297 178 0.175
B2 6/6 4,738 3,303 12,262 139 0.123
B3 6/6 5,959 2,311 12,092 106 0.109
B4 6/6 6,821 1,461 12,303 103 0.101
C1 (dump cold) 6/6 13,247 3,181 19,320 129 0.141
C4 (dump warm) 6/6 8,075 1,262 12,472 90 0.099
BA (150s, off) 10/24 = 42%
BB (150s, warm) 24/24 = 100% 12,106 84 0.092
find A / N 8/8 / 8/8 control clean

Store at end: B4 41 rows, C4 47 rows. Ledger (hits.logfmt) proves row written → row injected → task solved cheaper.

Verdicts (pre-registered H1–H6)

  • H1 (budget pass-rate): SUPPORTED. 42% → 100% at 150s. BB median 84s. (Pending hold-out validity fix below.)
  • H2 (billable −25%): passes in dollars (−34%), not tokens (−6%). Mechanism: reasoning collapse 6,473 → 1,461 (−77%); reasoning bills 5× input, so token-class arbitrage favors memory.
  • Cold-start tax: CONFIRMED product fact. B1 = 1.85× A billable; payback at pass 2. Belongs in README.
  • H4 (ranked injection beats dump): NOT SUPPORTED at ≤50-row stores. C4 ≈ B4 ($0.099 vs $0.101). Ranking overhead costs as much as it saves until the store outgrows the context budget.
  • H5 (mechanism/ledger): SUPPORTED. inject/recall/pull paths all fire; no tool thrashing (B steps/run = A steps/run).
  • H6 (self-correction): observed. Stale specific claims generalized into meta-lessons; supersede events in store.

Validity flag (blocks the headline claim)

B chain learned on all 24 instances; BB re-runs those same 24. Store rows name specific fixed bugs ("shipping() > vs >=") — answer memorization, not transfer. Rotation protected within-chain passes but not BA/BB. Hold-out mutation test required before claiming generalization (sub-issue).

Measurement artifacts to report

  • Interactive vs dark wall-clock gap (B1 450s → 178s) = chat/GPU contention; wall-clock claims come from dark runs only; token counts robust either way.
  • Write-path latency (see sub-issue): memory_remember median ~4.2–4.5s vs reads ~0.5s; memory_init ~25s — part of B1 cold tax.

Data locations

  • ~/Documents/benchmark-tests/ocsi/results3/ — dark run (publishable): results.jsonl, per-run out.jsonl+err.log, stores, dark.log, audits.
  • ~/Documents/benchmark-tests/ocsi/results2/ — interactive run (token numbers valid, wall-clock contaminated).
  • Harness: run2-ab.ts, gen-instances.ts, mutations-v2.json, tasks-v2.json, base2/, run-suite.sh, run-dark.sh, board.ts, analyze-cost.ts, PLAN-v2.md.
  • Archived invalid eras: results2-gitleak-1346/, contaminated/run1.

Next steps

See sub-issues: hold-out test → write-latency fix → bench into git → RESULTS.md + plots → docs → H4 scale test → (optional) second model seat.

Sub-issues

Sub-issues

7 of 8 Issues completed
Loading 8 sub-issues

Activity

  1. added
    bench
    on Nov 6, 2026
  2. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    Bench evidence protocol adopted 2026-11-08 (full text on #349): bench ACs close via an evidence comment — run dir + plugin SHA + bench SHA + results table. This epic's remaining tickets (#316, #319, #320, #321, #322) and #318 itself are the publishing path: #318 (bench to a private git repo) is the blocker that makes cited bench SHAs resolvable.

  3. abogartz commented on Nov 11, 2026

    @abogartz
    OwnerAuthor

    The results table in this EPIC (medians per arm, and H2 "passes in dollars (-34%), not tokens (-6%)") is bad-metric throughout, and #327 already established the B-chain numbers were elicited-write numbers. The dollar claim is retracted with it: no hosted-provider measurement was ever taken, and a local llama.cpp seat has no cache price to divide.


    Cost retraction (#392). The token figure above came from runSession().tokens = input + output + reasoning, with cache excluded and capture excluded. On this provider input is only the uncached remainder: one run reported 13,393 of 187,856 tokens that actually moved — 7%. A metric that undercounts by 93% still produces a plausible number, and a plausible number gets quoted.

    Disposition: retracted as a cost claim. Do not quote it as tokens moved, saved, or spent. The stored wire logs for this run carry no provider usage object, so no recomputed figure exists.

    Corrected metric, in force: work = session generation + capture generation, with cache read/write reported separately and never folded in. Two results survive it, both with n and seat named on #386: transport 0/5 to 5/5 (leak-checked, one seat) and reuse median 0.98x (n=6, no measurable effect).

    Rules now written down where contributors hit them: no cost claim below n=6 pairs per arm; a ratio at 6 <= n < 21 is labelled "20% resolution"; the word "cheaper" does not appear without an n, a seat and a metric named on the same line; no dollar figure without a hosted-provider measurement.

  4. added
    severity:high
    on Nov 14, 2026
  5. added
    enhancement
    tier:full
    on Nov 23, 2026
  6. ocsi-triager commented on Dec 1, 2026

    @ocsi-triager

    Triager

    Triager — triage of this EPIC against 6e33179af00aef5da2b6d2586071755e82f7aa85 (origin/main, clean tree), read-only.

    Not actionable. The title's three remaining legs — hold-out validity, latency, publishing — are each already satisfied, shipped, owner-abandoned, or moved to a ticket that owns them. There is no single reviewable change on this revision that satisfies #315; the EPIC survives only as an umbrella whose enumerated next steps are all closed.

    The body is stale in every "left" clause

    1. Hold-out validity — satisfied, and its outcome retired the headline. The body's "Validity flag (blocks the headline claim)" names a hold-out mutation test "required before claiming generalization." That test ran (#316, closed 2026-11-09): results5/results6/results7 dark, gate-verified unknown. Result: no transfer — seed-store rows quoted the t11/t12 answers verbatim ("the exact forms t11 and t12 break"), the different-repo arm pooled 11/16 warm vs 10/16 cold at Fisher p=1.00, and the framing itself was corrected ("cross-repo generalization is not what this plugin claims"). So "H1 SUPPORTED (Pending hold-out validity fix below)" is doubly stale: the fix happened, and it refuted the claim it was pending for. Re-running it would spend a live-model hour to re-litigate a settled null. Nothing left here.

    2. Latency — its own ticket (#317, open), and the in-tree part has already shipped on this very revision. #317's title records the settled mechanism (write latency is model synopsis generation, not plugin; plugin-internal write 4–7 ms vs the 2,020 ms host-reported figure — a different quantity, owner-settled, not re-opened here). The graph half — "built but never consumed" — is gone: PR #368 (231-remove-graph) at f8f42fd is an ancestor of 6e33179 (verified with git merge-base --is-ancestor), and src/init/run.ts:1-9 documents the deterministic no-model path with "The codebase-memory graph integration was removed." The only open AC on #317 is "Benchmark B1 re-run shows reduced cold tax" — a live-model measurement in the owner's serial bench queue, and #317 was refused today (2026-12-01T02:24Z) for exactly that reason. It is not fixer work, and #315 cannot absorb it.

    3. Publishing — satisfied or explicitly abandoned, and verified on this tree.

    4. "Results banked" is true but the bank itself was retracted as a cost claim — per this ticket's own 2026-11-11 comment (the arms table is "bad-metric throughout"; the H2 dollar claim retracted; no hosted-provider measurement was ever taken) and #392. What survives under the corrected metric — work = session generation + capture generation, cache reported separately — is already recorded and quoted: transport 0/5→5/5 and reuse 0.98x (n=6) are the entries in bench/claims.json. A fixer who "satisfied #315 as written" would republish retracted numbers; by the rules now in force that is a defect, not a deliverable. (The body's "no benchmark files in the plugin repo" decision has also since been superseded: bench/ exists in-tree with result docs, deterministic runners, and the claims gate; raw run data stays out by policy, bench/claims.json:1.)

    Disposition of every remaining EPIC item

    Item Classification
    Hold-out mutation test Already satisfied — #316 closed; verdict: refuted, recorded
    Write-latency fix Separate ticket — #317 open; in-tree half shipped via #368; remaining AC is an owner-run live-model measurement
    Bench into git Already satisfied — #318 closed, tagged, SHAs resolvable
    RESULTS.md + plots Separate item, owner wontfix — #319; reopening needs an owner decision on a surviving premise
    README + docs/benchmarks.md Already satisfied — #320 closed; claim discipline verified at this revision
    H4 scale test Separate item, owner wontfix — #321
    Second model seat Separate item, owner wontfix — #322
    Hosted-provider dollar measurement (implied by the standing "no dollar figure without one" rule) Separate ticket — belongs to #386's open cost-accounting line, not to this EPIC

    Who owes what

    No code request survives on this ticket: the repo-side artifacts exist and are CI-gated, the measurement legs are refuted or owner-reserved, and the numbers as written are retracted. Handoff: none.

  7. abogartz commented on Dec 1, 2026

    @abogartz
    OwnerAuthor

    Closed as done. Every enumerated epic step is closed, satisfied, or owner-wontfixed (#316-#322); surviving claims ship on main (README.md:32). The only open item, the cold-tax re-run, is tracked on #317.

    Reopen it whenever the premise comes back; nothing here is deleted and the history stays put.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchenhancementseverity:hightier:full

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions