You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs+bench: audit follow-up — honesty caveat, opt-out docs, STATE anchor
A 3-agent triple-audit (fresh-clone health · adversarial dedup-math · session-arc
structure) verified the arc is healthy (1100/1100 from a clean clone, all
features smoke-verified, v4.2.0 live, no double-counting, P-model uncorrupted)
and surfaced real polish to land before the next step:
- BENCH HONESTY (HIGH, the W1.9-class catch): the dedup 99%/whole-session 91%
numbers are a SAME-EPOCH best case — dedup doesn't fire after a context
compaction (ADR-0003 reset), the most common real re-read trigger. Added the
⚠ same-epoch-ceiling caveat to the console + md + JSON, report the ACTUAL
re-read rate (1/3 ≈ 33%, not the nominal 0.4 — Math.round artifact), and
disclose dedup's share of the session baseline (~32%) so the lift over the
P-model reads as a near-free bucket, not improved interception.
- ADR-0001 → ADR-0004 cross-ref: 0001 described a 'caller-file list'; 0004
evolved it to call-site lines + the content/≥4-caller gates. Added the note.
- README: documented the per-feature env opt-outs (ENGRAM_GREP_INTERCEPT,
ENGRAM_READ_DEDUP, ENGRAM_MISTAKE_GUARD) next to the kill switch — they were
only in CHANGELOG/source before.
- docs/STATE.md: new single 'where we are / what's next' anchor (shipped arc,
honest-claim through-line, ADR index, next-step candidates, gated items).
No code-behaviour change. Audit: tsc clean; full suite 1100/1100; bench runs
with the caveat; leak-scan 0 hits.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@@ -625,9 +648,11 @@ async function main(): Promise<void> {
625
648
"",
626
649
`## Read dedup (re-reads) + whole session`,
627
650
"",
628
-
`**Read dedup: ${dedupReduction.toFixed(1)}%** of the re-read budget (${dedupBase} → ${Math.round(dedupEng)} tok) at a ${REPEAT_RATE} re-read rate (Phase-0 measured 38–46% of real reads are same-session repeats). A **clean** saving — the re-read content is already in the agent's context, so it is NOT discounted by P.`,
651
+
`**Read dedup: ${dedupReduction.toFixed(1)}%** of the re-read budget (${dedupBase} → ${Math.round(dedupEng)} tok), with ${reReadsPerTrace} re-read/trace of ${READS_PER_TRACE} (~${actualRepeatPct.toFixed(0)}%; Phase-0 measured 38–46% of real reads are same-session repeats). A **clean** saving — the re-read content is already in the agent's context, so it is NOT discounted by P.`,
652
+
"",
653
+
`> **⚠ Same-epoch ceiling.** Dedup only fires when no context compaction has happened since the first read — ADR-0003 resets the served-set on PreCompact / SessionStart. A real re-read that *follows* a compaction (the most common real trigger) correctly re-serves, so the realistic rate is **below** these figures. The dedup bucket is ${dedupShare.toFixed(0)}% of the whole-session baseline, so most of the lift over the P-model is this near-free bucket, not improved interception.`,
629
654
"",
630
-
`**Whole session** (first-reads/greps at the P-model + dedup re-reads, ${sessionBase} tokens): P=0 **${sessionReductionAt(0).toFixed(1)}%** · P=0.5 **${sessionReductionAt(0.5).toFixed(1)}%**.`,
655
+
`**Whole session** (first-reads/greps at the P-model + dedup re-reads, ${sessionBase} tokens, same-epoch ceiling): P=0 **${sessionReductionAt(0).toFixed(1)}%** · P=0.5 **${sessionReductionAt(0.5).toFixed(1)}%**.`,
631
656
"",
632
657
`> The **P=0 number is an OPTIMISTIC ceiling**, not a lower bound: it assumes engram's structural packet fully answers what the agent grepped/read. The packet is a subset of the raw output, so the real saving lies between P=0 and break-even, by workload (high recall-sufficiency on structural/discovery work, low when exact call sites are needed — the same bimodal split as W1.9). Structural context-token reduction, **not** a bill saving. Traces generated by a rule (top-${TOP_SYMBOLS} most-referenced symbols × caller files), word-boundary grep baseline.`,
0 commit comments