fix(experiments): preserve PCAP receipt producer provenance

Keep tool and Evidence together in the receipt index, reject conflicting ID ownership, and validate requested tool and delegated operation roles. Preserve legitimate summary delegation to inspect_analysis_view and identical repeated receipts. Validate the same operation contract at the SDK observation boundary. Twenty grading/context tests and six comparator tests pass after reproducing the gap; real SDK fault/control runs and all four stored actual-model factual grades pass without model reruns.

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 073f6c07e9
commit 3e88ebf735
4 changed files with 85 additions and 13 deletions
@@ -538,6 +538,16 @@ const pcapObservation = (evidence) => {
target?.path !== values.path
)
throw new Error("PCAP Evidence does not identify the selected capture");
// Summary delivery delegates to a retained view, whose Evidence operation is
// inspect_analysis_view even when inspect_pcap_capture was requested.
const operation =
values.delivery === "summary"
? "inspect_analysis_view"
: "inspect_pcap_capture";
if (evidence.operation !== operation)
throw new Error(
"PCAP Evidence operation differs from the requested delivery",
);
if (
values.delivery === "summary" &&
(typeof value.parent_evidence_id !== "string" ||