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>
This commit is contained in:
N0zoM1z0
2026-10-14 02:40:31 +08:00
committed by morluto
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Kaoru0822
parent 6b167f9812
commit e5abf4acf4
2 changed files with 9 additions and 0 deletions
@@ -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 {