From e5abf4acf402d42e93accb9fbfd32fc453c44cd5 Mon Sep 17 00:00:00 2001 From: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com> Date: Tue, 13 Oct 2026 11:27:53 +0000 Subject: [PATCH] fix(experiments): reject reused PCAP page receipt IDs Check page receipt uniqueness at the SDK workflow boundary before recording observations. A duplicate-ID injection over real MCP succeeds before the fix and fails after it without writing an answer; an unmodified real reply remains valid. Keep original measurements and production defaults unchanged. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> --- experiments/analysis-efficiency/measure.mjs | 2 ++ experiments/analysis-efficiency/pcap-small-captures.md | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/experiments/analysis-efficiency/measure.mjs b/experiments/analysis-efficiency/measure.mjs index 1130bc6dc..7b10fd515 100644 --- a/experiments/analysis-efficiency/measure.mjs +++ b/experiments/analysis-efficiency/measure.mjs @@ -588,6 +588,8 @@ const inspectPcapTarget = async () => { "PCAP page identity, scope or coverage differs from its parent", ); uris = page.page.items; + if (observations.some((item) => item.evidence_id === selected.evidence_id)) + throw new Error("PCAP retained read reused an Evidence identity"); observations.push(pcapObservation(selected)); } else { const { diff --git a/experiments/analysis-efficiency/pcap-small-captures.md b/experiments/analysis-efficiency/pcap-small-captures.md index c2c891d24..a7d90febd 100644 --- a/experiments/analysis-efficiency/pcap-small-captures.md +++ b/experiments/analysis-efficiency/pcap-small-captures.md @@ -146,6 +146,13 @@ injection setup loaded the separate CommonJS client and did not inject a fault; that discarded setup attempt remains private alongside the corrected ESM runs. Original measured driver sources, token totals and timing data remain unchanged. +The driver also requires a distinct Evidence receipt for the retained URI page. +A private SDK consumer injection reuses the summary's response ID after a real +MCP reply: the preceding driver accepts it, the corrected driver rejects it +without writing an answer, and an unmodified real reply still passes. This +checks receipt uniqueness before recording observations; it does not establish +that a provider actually returned duplicate IDs. + **Decision: keep existing complete defaults; add no production optimization.** For these compact recordings and this question, summary/page costs more total input in both real-model pairs. No stable speed or CPU/memory benefit justifies