diff --git a/experiments/analysis-efficiency/measure.mjs b/experiments/analysis-efficiency/measure.mjs index 613fa6ca1..60dce4f80 100644 --- a/experiments/analysis-efficiency/measure.mjs +++ b/experiments/analysis-efficiency/measure.mjs @@ -524,15 +524,11 @@ const inspectEvmTarget = async () => { }; const PCAP_EVIDENCE_ID = /^ev_[a-f0-9]{64}$/u; -const pcapObservation = (evidence, requestedView) => { - if ( - !Array.isArray(evidence.limitations) || - !evidence.limitations.every((item) => typeof item === "string") - ) - throw new Error("PCAP Evidence lacks a valid limitations list"); +const pcapObservation = (evidence, requestedView, parseEvidence) => { + // Authenticate with the selected runtime's owner, preserving the original + // envelope for measurement and provenance rather than reconstructing it. + parseEvidence(evidence); const evidenceId = evidence.evidence_id; - if (typeof evidenceId !== "string" || !PCAP_EVIDENCE_ID.test(evidenceId)) - throw new Error("PCAP Evidence receipt identity is missing or malformed"); const value = normalized(evidence); for (const key of ["limitations", "unknowns"]) if ( @@ -609,6 +605,10 @@ const pcapObservation = (evidence, requestedView) => { }; }; const inspectPcapTarget = async () => { + const { parseEvidence } = await import( + pathToFileURL(resolve(values["runtime-root"], "dist/domain/evidence.js")) + .href + ); const input = { path: values.path, ...(values.delivery === "summary" ? { detail: "summary" } : {}), @@ -627,6 +627,7 @@ const inspectPcapTarget = async () => { pcapObservation( inspected, values.delivery === "summary" ? { kind: "summary" } : undefined, + parseEvidence, ), ]; let capture, uris; @@ -651,7 +652,7 @@ const inspectPcapTarget = async () => { view, }); const page = normalized(selected); - const observation = pcapObservation(selected, view); + const observation = pcapObservation(selected, view, parseEvidence); const total = capture.retained_counts.http_request_uris; const examined = Math.min(view.limit, total); const expectedCoverage = { diff --git a/experiments/analysis-efficiency/pcap-small-captures.md b/experiments/analysis-efficiency/pcap-small-captures.md index e36ff6456..88502a5ac 100644 --- a/experiments/analysis-efficiency/pcap-small-captures.md +++ b/experiments/analysis-efficiency/pcap-small-captures.md @@ -250,3 +250,12 @@ parent Evidence ID for both summary and page views. SDK acceptance and factual grading reject mismatches and missing digests while preserving complete deliveries. Before/after private actual-reply mutations verify both view roles; unmodified deliveries and four stored original-model factual regrades pass. + +The SDK observation boundary additionally authenticates each complete, summary +and page envelope with the selected runtime’s existing `parseEvidence` owner. +It preserves the original envelope, without duplicating semantic-ID hashing. +Format-valid swapped-ID mutations over actual SDK replies pass before this +guard and fail afterward; unmodified complete/summary controls pass. The model +grader tests selected facts against cited transcript receipts; its synthetic +fixtures do not establish Evidence authentication. The original real-model +receipts are independently authenticated against the pinned runtime.