assertledger 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.fr.md +3 -3
  2. package/README.md +3 -3
  3. package/SECURITY.md +11 -6
  4. package/conformance/schema-extensions.json +36 -0
  5. package/dist/build-info.d.ts +16 -0
  6. package/dist/build-info.d.ts.map +1 -0
  7. package/dist/build-info.js +18 -0
  8. package/dist/build-info.js.map +1 -0
  9. package/dist/build-info.json +7 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +117 -19
  12. package/dist/cli.js.map +1 -1
  13. package/dist/contracts/index.d.ts +943 -0
  14. package/dist/contracts/index.d.ts.map +1 -1
  15. package/dist/contracts/index.js +561 -21
  16. package/dist/contracts/index.js.map +1 -1
  17. package/dist/core/index.d.ts +10 -1
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +473 -4
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/diagnostics.d.ts.map +1 -1
  22. package/dist/diagnostics.js +42 -2
  23. package/dist/diagnostics.js.map +1 -1
  24. package/dist/engine/adapters/node-test-runtime.d.ts +17 -0
  25. package/dist/engine/adapters/node-test-runtime.d.ts.map +1 -1
  26. package/dist/engine/adapters/node-test-runtime.js +45 -23
  27. package/dist/engine/adapters/node-test-runtime.js.map +1 -1
  28. package/dist/engine/container.d.ts +54 -0
  29. package/dist/engine/container.d.ts.map +1 -0
  30. package/dist/engine/container.js +464 -0
  31. package/dist/engine/container.js.map +1 -0
  32. package/dist/engine/git-regression.d.ts +12 -2
  33. package/dist/engine/git-regression.d.ts.map +1 -1
  34. package/dist/engine/git-regression.js +63 -16
  35. package/dist/engine/git-regression.js.map +1 -1
  36. package/dist/engine/index.d.ts +7 -1
  37. package/dist/engine/index.d.ts.map +1 -1
  38. package/dist/engine/index.js +300 -74
  39. package/dist/engine/index.js.map +1 -1
  40. package/dist/mcp/index.d.ts.map +1 -1
  41. package/dist/mcp/index.js +53 -1
  42. package/dist/mcp/index.js.map +1 -1
  43. package/dist/sdk/index.d.ts +16 -6
  44. package/dist/sdk/index.d.ts.map +1 -1
  45. package/dist/sdk/index.js +63 -5
  46. package/dist/sdk/index.js.map +1 -1
  47. package/docs/agentic-test-profile.md +5 -0
  48. package/docs/architecture.md +8 -3
  49. package/docs/ci.md +7 -1
  50. package/docs/conformance-v1.md +11 -2
  51. package/docs/container-isolation.md +156 -0
  52. package/docs/evidence-export.md +146 -0
  53. package/docs/git-regression.md +7 -3
  54. package/docs/migration-verification-v2.md +55 -0
  55. package/docs/project-intent.md +3 -2
  56. package/docs/proof-model.md +8 -4
  57. package/docs/reference.md +56 -11
  58. package/docs/roadmap.md +12 -4
  59. package/examples/agentic-profile/profile-manifest.mjs +5 -1
  60. package/examples/evidence-export/consumer.mjs +35 -0
  61. package/package.json +2 -2
  62. package/schemas/evidence-export-replay-result.v1.json +49 -0
  63. package/schemas/evidence-export-request.v1.json +681 -0
  64. package/schemas/evidence-export.v1.json +1479 -0
  65. package/schemas/evidence-manifest.v2.json +886 -0
  66. package/schemas/evidence-provider-manifest.v1.json +269 -0
  67. package/schemas/verification-request.v2.json +457 -0
@@ -1,4 +1,4 @@
1
- import { type AgenticBenchmarkArtifact, type AgenticBenchmarkAcquisitionReplayResult, type AgenticBenchmarkReplayResult, type AgenticBenchmarkRequest, type AgenticCorpusAllocation, type AgenticCorpusAllocationCommitment, type AgenticCorpusAllocationCommitmentReplayResult, type AgenticCorpusAllocationReplayResult, type AgenticCorpusAllocationReveal, type AgenticCorpusAllocationRequest, type AgenticCorpusExperimentArtifact, type AgenticCorpusExperimentPlan, type AgenticCorpusExperimentPlanReplayResult, type AgenticCorpusExperimentReplayResult, type AgenticCorpusExperimentRequest, type AgenticCorpusTrustPolicy, type AgenticProfileReplayResult, type AgenticProfileReplayResultV2, type AgenticProfileReport, type AgenticProfileReportV2, type AgenticProfileRequest, type AgenticProfileRequestV2 } from "../contracts/index.js";
1
+ import { type AgenticBenchmarkArtifact, type AgenticBenchmarkAcquisitionReplayResult, type AgenticBenchmarkReplayResult, type AgenticBenchmarkRequest, type AgenticCorpusAllocation, type AgenticCorpusAllocationCommitment, type AgenticCorpusAllocationCommitmentReplayResult, type AgenticCorpusAllocationReplayResult, type AgenticCorpusAllocationReveal, type AgenticCorpusAllocationRequest, type AgenticCorpusExperimentArtifact, type AgenticCorpusExperimentPlan, type AgenticCorpusExperimentPlanReplayResult, type AgenticCorpusExperimentReplayResult, type AgenticCorpusExperimentRequest, type AgenticCorpusTrustPolicy, type AgenticProfileReplayResult, type AgenticProfileReplayResultV2, type AgenticProfileReport, type AgenticProfileReportV2, type AgenticProfileRequest, type AgenticProfileRequestV2, type EvidenceExport, type EvidenceExportReplayResult, type EvidenceExportRequest, type EvidenceProviderManifest } from "../contracts/index.js";
2
2
  export type WorldKind = "REFERENCE" | "TARGET" | "NEUTRAL";
3
3
  export type CandidateStatus = "ELIGIBLE" | "UNSTABLE" | "INCONCLUSIVE" | "INVALID" | "WEAK_ORACLE";
4
4
  export type DecisionStatus = "VERIFIED" | "REJECTED" | "INCONCLUSIVE" | "ENGINE_ERROR";
@@ -45,6 +45,7 @@ export interface EvidenceContext {
45
45
  environmentAllowlist: string[];
46
46
  budgets: JsonValue;
47
47
  candidateRoots: string[];
48
+ backend?: JsonValue;
48
49
  };
49
50
  worlds: Array<{
50
51
  id: string;
@@ -116,6 +117,14 @@ export interface EvidenceReplayResult {
116
117
  export declare function replayEvidenceManifest(manifest: unknown): EvidenceReplayResult;
117
118
  export declare function createAgenticProfile(request: AgenticProfileRequest): AgenticProfileReport;
118
119
  export declare function replayAgenticProfile(value: unknown): AgenticProfileReplayResult;
120
+ export interface EvidenceProviderIdentity {
121
+ version: string;
122
+ sourceRevision: EvidenceProviderManifest["provider"]["sourceRevision"];
123
+ adapters: EvidenceProviderManifest["adapters"];
124
+ }
125
+ export declare function createEvidenceProviderManifest(identity: EvidenceProviderIdentity): EvidenceProviderManifest;
126
+ export declare function createEvidenceExport(request: EvidenceExportRequest): EvidenceExport;
127
+ export declare function replayEvidenceExport(value: unknown): EvidenceExportReplayResult;
119
128
  export declare function createAgenticBenchmark(request: AgenticBenchmarkRequest): AgenticBenchmarkArtifact;
120
129
  export declare function replayAgenticBenchmark(value: unknown): AgenticBenchmarkReplayResult;
121
130
  export declare function replayAgenticBenchmarkAcquisition(value: unknown): AgenticBenchmarkAcquisitionReplayResult;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,uCAAuC,EAE5C,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,6CAA6C,EAClD,KAAK,mCAAmC,EACxC,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,KAAK,uCAAuC,EAE5C,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAmB7B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,aAAa,CAAC;AAEnG,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,CAAC;AAgBvF,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAGlD;CACF;AAED,UAAU,KAAK;IAC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,4BAA4B,EAAE,MAAM,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,aAAa,CAAC;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/E,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;IAC3D,gBAAgB,CACd,YAAY,EAAE,OAAO,EACrB,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,OAAO,EACpB,oBAAoB,EAAE,MAAM,GAC3B;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IACtB,0BAA0B,CACxB,UAAU,EAAE,iCAAiC,EAC7C,MAAM,EAAE,wBAAwB,EAChC,oBAAoB,EAAE,MAAM,GAC3B,gDAAgD,CAAC;CACrD;AA6BD,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,OAAO,EACd,YAAY,CAAC,EAAE,yCAAyC,GACvD,mCAAmC,CAiTrC;AA8BD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAoB5E"}
@@ -1,5 +1,7 @@
1
- import { parseAgenticBenchmarkArtifact, parseAgenticBenchmarkAcquisitionResult, parseAgenticBenchmarkRequest, parseAgenticCorpusAllocation, parseAgenticCorpusAllocationCommitment, parseAgenticCorpusAllocationReveal, parseAgenticCorpusAllocationRequest, parseAgenticCorpusExperimentArtifact, parseAgenticCorpusExperimentPlan, parseAgenticCorpusExperimentReplayRequest, parseAgenticCorpusExperimentReceipt, parseAgenticCorpusExperimentRequest, parseAgenticCorpusExperimentStructuredResult, parseAgenticCorpusTrustPolicy, parseAgenticProfileReport, parseAgenticProfileReportV2, parseAgenticProfileRequest, parseAgenticProfileRequestV2, } from "../contracts/index.js";
1
+ import { parseAgenticBenchmarkArtifact, parseAgenticBenchmarkAcquisitionResult, parseAgenticBenchmarkRequest, parseAgenticCorpusAllocation, parseAgenticCorpusAllocationCommitment, parseAgenticCorpusAllocationReveal, parseAgenticCorpusAllocationRequest, parseAgenticCorpusExperimentArtifact, parseAgenticCorpusExperimentPlan, parseAgenticCorpusExperimentReplayRequest, parseAgenticCorpusExperimentReceipt, parseAgenticCorpusExperimentRequest, parseAgenticCorpusExperimentStructuredResult, parseAgenticCorpusTrustPolicy, parseAgenticProfileReport, parseAgenticProfileReportV2, parseAgenticProfileRequest, parseAgenticProfileRequestV2, parseEvidenceExport, parseEvidenceExportRequest, parseEvidenceProviderManifest, } from "../contracts/index.js";
2
2
  const EVIDENCE_SCHEMA_VERSION = "1.0.0";
3
+ // Version 2.0.0 adds a decision-bound execution backend record; its absence stays a v1 manifest.
4
+ const EVIDENCE_SCHEMA_VERSION_V2 = "2.0.0";
3
5
  const EVIDENCE_POLICY_VERSION = "1.0.0";
4
6
  const SHA256_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/u;
5
7
  const OBSERVATION_OUTCOMES = new Set([
@@ -180,7 +182,7 @@ function sortedUniqueStrings(record, key, maximumItems, maximumLength) {
180
182
  }
181
183
  return [...new Set(value)].sort(compareOrdinal);
182
184
  }
183
- function parseEvidenceContext(value) {
185
+ function parseEvidenceContext(value, schemaVersion) {
184
186
  if (!isRecord(value))
185
187
  throw new TypeError("evidenceContext must be an object");
186
188
  if (!isRecord(value.engine))
@@ -190,6 +192,10 @@ function parseEvidenceContext(value) {
190
192
  if (!isRecord(value.execution)) {
191
193
  throw new TypeError("evidenceContext.execution must be an object");
192
194
  }
195
+ const backendRequired = schemaVersion === EVIDENCE_SCHEMA_VERSION_V2;
196
+ if (backendRequired && !isRecord(value.execution.backend)) {
197
+ throw new TypeError("evidenceContext.execution.backend must be an object");
198
+ }
193
199
  if (!Array.isArray(value.worlds) || value.worlds.length === 0) {
194
200
  throw new TypeError("evidenceContext.worlds must be non-empty");
195
201
  }
@@ -222,6 +228,7 @@ function parseEvidenceContext(value) {
222
228
  environmentAllowlist: sortedUniqueStrings(value.execution, "environmentAllowlist", 100, 128),
223
229
  budgets: jsonField(value.execution, "budgets"),
224
230
  candidateRoots: sortedUniqueStrings(value.execution, "candidateRoots", 100, 512),
231
+ ...(backendRequired ? { backend: jsonField(value.execution, "backend") } : {}),
225
232
  },
226
233
  worlds,
227
234
  };
@@ -230,7 +237,7 @@ function parseInputUnchecked(input) {
230
237
  if (!isRecord(input))
231
238
  throw new TypeError("Evidence must be an object");
232
239
  const schemaVersion = stringField(input, "schemaVersion");
233
- if (schemaVersion !== EVIDENCE_SCHEMA_VERSION) {
240
+ if (schemaVersion !== EVIDENCE_SCHEMA_VERSION && schemaVersion !== EVIDENCE_SCHEMA_VERSION_V2) {
234
241
  throw new TypeError(`Unsupported schemaVersion: ${schemaVersion}`);
235
242
  }
236
243
  const policyValue = input.policy;
@@ -298,7 +305,7 @@ function parseInputUnchecked(input) {
298
305
  }
299
306
  }
300
307
  const worldIds = new Set(worlds.map((world) => world.id));
301
- const evidenceContext = parseEvidenceContext(input.evidenceContext);
308
+ const evidenceContext = parseEvidenceContext(input.evidenceContext, schemaVersion);
302
309
  if (evidenceContext.worlds.length !== worlds.length ||
303
310
  evidenceContext.worlds.some((world) => !worldIds.has(world.id))) {
304
311
  throw new TypeError("evidenceContext worlds must exactly match decision worlds");
@@ -1079,6 +1086,468 @@ export function replayAgenticProfile(value) {
1079
1086
  semanticsValid,
1080
1087
  };
1081
1088
  }
1089
+ const EVIDENCE_EXPORT_COST_ASSUMPTIONS = [
1090
+ "One candidate-free control run per world and attempt precedes the candidate runs.",
1091
+ "Each run is one process execution bounded by the campaign timeout.",
1092
+ ];
1093
+ export function createEvidenceProviderManifest(identity) {
1094
+ const base = {
1095
+ schemaVersion: "1.0.0",
1096
+ provider: {
1097
+ name: "assertledger",
1098
+ version: identity.version,
1099
+ sourceRevision: identity.sourceRevision,
1100
+ },
1101
+ scope: "Qualification of regression tests recorded in AssertLedger evidence manifest v1: candidate-free controls, reference, target, and neutral worlds, repeated attempts, deterministic gates, and replayable digests.",
1102
+ formats: {
1103
+ accepts: [
1104
+ {
1105
+ schemaId: "https://testforge.dev/schemas/evidence-export-request.v1.json",
1106
+ schemaVersion: "1.0.0",
1107
+ },
1108
+ {
1109
+ schemaId: "https://testforge.dev/schemas/evidence-manifest.v1.json",
1110
+ schemaVersion: "1.0.0",
1111
+ },
1112
+ ],
1113
+ emits: [
1114
+ {
1115
+ schemaId: "https://testforge.dev/schemas/evidence-export.v1.json",
1116
+ schemaVersion: "1.0.0",
1117
+ },
1118
+ {
1119
+ schemaId: "https://testforge.dev/schemas/evidence-export-replay-result.v1.json",
1120
+ schemaVersion: "1.0.0",
1121
+ },
1122
+ ],
1123
+ },
1124
+ capabilities: [
1125
+ {
1126
+ id: "CONTROL_WITHOUT_CANDIDATE",
1127
+ status: "SUPPORTED",
1128
+ modality: "TEST_OBSERVED",
1129
+ description: "Every world runs without a candidate first; controls must pass without candidate attribution.",
1130
+ },
1131
+ {
1132
+ id: "REFERENCE_PASS",
1133
+ status: "SUPPORTED",
1134
+ modality: "TEST_OBSERVED",
1135
+ description: "Candidates must pass every reference world.",
1136
+ },
1137
+ {
1138
+ id: "REGRESSION_DETECTION",
1139
+ status: "SUPPORTED",
1140
+ modality: "TEST_OBSERVED",
1141
+ description: "Only an attributed ASSERTION_FAILURE on a target world is detection; compilation, collection, crash, timeout, infrastructure, and no-test outcomes never are.",
1142
+ },
1143
+ {
1144
+ id: "NEUTRAL_PASS",
1145
+ status: "SUPPORTED",
1146
+ modality: "TEST_OBSERVED",
1147
+ description: "Candidates must pass every neutral world.",
1148
+ },
1149
+ {
1150
+ id: "STABILITY_REPETITION",
1151
+ status: "SUPPORTED",
1152
+ modality: "TEST_OBSERVED",
1153
+ description: "Normalized outcomes must agree across the recorded attempts.",
1154
+ },
1155
+ {
1156
+ id: "GIT_REVISION_PROVENANCE",
1157
+ status: "SUPPORTED_WHEN_RECORDED",
1158
+ modality: "RECORDED_METADATA",
1159
+ description: "Git commits and trees are exported only when committed Git regression qualification recorded them.",
1160
+ },
1161
+ {
1162
+ id: "EXECUTION_FRESHNESS",
1163
+ status: "UNSUPPORTED",
1164
+ modality: "NONE",
1165
+ description: "Evidence manifest v1 does not record whether observations were freshly executed or reused.",
1166
+ },
1167
+ {
1168
+ id: "PRODUCER_AUTHENTICATION",
1169
+ status: "UNSUPPORTED",
1170
+ modality: "NONE",
1171
+ description: "Exports are unsigned; digests check integrity, not producer identity.",
1172
+ },
1173
+ {
1174
+ id: "SANDBOXED_EXECUTION",
1175
+ status: "UNSUPPORTED",
1176
+ modality: "NONE",
1177
+ description: "trusted-local execution is explicitly UNSANDBOXED.",
1178
+ },
1179
+ ],
1180
+ adapters: identity.adapters,
1181
+ cost: {
1182
+ unit: "PROCESS_EXECUTIONS",
1183
+ estimate: "(candidates + 1) * worlds * requiredAttempts",
1184
+ assumptions: [
1185
+ ...EVIDENCE_EXPORT_COST_ASSUMPTIONS,
1186
+ "Wall time is observed per recorded run and is never estimated.",
1187
+ ],
1188
+ },
1189
+ limits: [
1190
+ "An announced capability does not prove that a control ran; only the recorded observations of an exported manifest do.",
1191
+ "Exports cover only the recorded worlds, candidates, and attempts and do not generalize to unexecuted states.",
1192
+ "Evidence is unauthenticated and trusted-local execution is unsandboxed.",
1193
+ "Consumers decide whether to admit, degrade, or ignore evidence; that decision never changes AssertLedger results.",
1194
+ ],
1195
+ };
1196
+ return parseEvidenceProviderManifest({ ...base, manifestDigest: sha256Canonical(base) });
1197
+ }
1198
+ function recordedGitRevision(provenance) {
1199
+ let value;
1200
+ try {
1201
+ value = JSON.parse(provenance);
1202
+ }
1203
+ catch {
1204
+ return null;
1205
+ }
1206
+ if (!isRecord(value) || canonicalize(value) !== provenance)
1207
+ return null;
1208
+ if (Object.keys(value).sort(compareOrdinal).join(",") !==
1209
+ "commit,format,objectFormat,projection,reason,role,tree")
1210
+ return null;
1211
+ const { commit, format, objectFormat, projection, reason, role, tree } = value;
1212
+ const length = objectFormat === "sha1" ? 40 : objectFormat === "sha256" ? 64 : 0;
1213
+ const objectId = new RegExp(`^[a-f0-9]{${length}}$`);
1214
+ if (length === 0 ||
1215
+ format !== "assertledger-git-regression/1" ||
1216
+ (role !== "reference" && role !== "target" && role !== "neutral") ||
1217
+ typeof commit !== "string" ||
1218
+ !objectId.test(commit) ||
1219
+ typeof tree !== "string" ||
1220
+ !objectId.test(tree) ||
1221
+ typeof projection !== "string" ||
1222
+ typeof reason !== "string")
1223
+ return null;
1224
+ return { role, commit, tree, objectFormat: objectFormat };
1225
+ }
1226
+ function recordedFramework(manifest) {
1227
+ const configuration = manifest.evidenceContext.adapter.configuration;
1228
+ if (manifest.adapter.kind !== "node-test" ||
1229
+ !isRecord(configuration) ||
1230
+ configuration.kind !== "node-test" ||
1231
+ !isRecord(configuration.profile))
1232
+ return { status: "UNKNOWN" };
1233
+ const { profileId, profileVersion, official } = configuration.profile;
1234
+ const boundedText = (text) => typeof text === "string" && text.length > 0 && text.length <= 128;
1235
+ if (!boundedText(profileId) || !boundedText(profileVersion) || typeof official !== "boolean")
1236
+ return { status: "UNKNOWN" };
1237
+ return {
1238
+ status: "RECORDED",
1239
+ profileId,
1240
+ profileVersion,
1241
+ official,
1242
+ nodeVersion: boundedText(configuration.nodeVersion) ? configuration.nodeVersion : null,
1243
+ executableDigest: typeof configuration.executableDigest === "string" &&
1244
+ /^sha256:[a-f0-9]{64}$/.test(configuration.executableDigest)
1245
+ ? configuration.executableDigest
1246
+ : null,
1247
+ };
1248
+ }
1249
+ function exportedWorld(manifest, candidateId, world, detectionEstablished) {
1250
+ const runs = manifest.observations.filter((observation) => observation.candidateId === candidateId && observation.worldId === world.id);
1251
+ const complete = isComplete(runs, manifest.policy.requiredAttempts);
1252
+ const first = runs[0];
1253
+ const outcome = !complete || first === undefined
1254
+ ? "MISSING"
1255
+ : runs.every((run) => run.outcome === first.outcome)
1256
+ ? first.outcome
1257
+ : "DIVERGENT";
1258
+ const attributed = complete && runs.every((run) => run.attributed && run.candidateTestsDiscovered >= 1);
1259
+ const signal = attributed && outcome === "ASSERTION_FAILURE"
1260
+ ? "RED"
1261
+ : attributed && outcome === "PASS"
1262
+ ? "GREEN"
1263
+ : "NONE";
1264
+ const detection = world.kind !== "TARGET"
1265
+ ? "NOT_APPLICABLE"
1266
+ : !detectionEstablished
1267
+ ? "NOT_ESTABLISHED"
1268
+ : signal === "RED"
1269
+ ? "OBSERVED"
1270
+ : signal === "GREEN"
1271
+ ? "NOT_OBSERVED"
1272
+ : "NOT_ESTABLISHED";
1273
+ return {
1274
+ worldId: world.id,
1275
+ kind: world.kind,
1276
+ required: world.required,
1277
+ weight: world.weight,
1278
+ outcome,
1279
+ attempts: runs.length,
1280
+ signal,
1281
+ detection,
1282
+ };
1283
+ }
1284
+ export function createEvidenceExport(request) {
1285
+ request = parseEvidenceExportRequest(request);
1286
+ const manifest = request.manifest;
1287
+ if (!replayEvidenceManifest(manifest).valid) {
1288
+ throw new EvidenceValidationError("EVIDENCE_EXPORT_SOURCE_INVALID");
1289
+ }
1290
+ const worlds = [...manifest.worlds].sort((left, right) => compareOrdinal(left.id, right.id));
1291
+ const worldKinds = new Map(manifest.worlds.map((world) => [world.id, world.kind]));
1292
+ const controlsValid = manifest.decision.status !== "ENGINE_ERROR" &&
1293
+ !manifest.decision.reasonCodes.includes("CONTROL_EVIDENCE_INVALID");
1294
+ const selected = new Set(manifest.decision.selectedCandidateIds);
1295
+ const sortedCandidates = [...manifest.candidates].sort((left, right) => compareOrdinal(left.id, right.id));
1296
+ const candidates = sortedCandidates.map((candidate) => {
1297
+ // Detection is only meaningful once controls, discovery, reference, and neutral evidence held.
1298
+ const detectionEstablished = controlsValid && (candidate.status === "ELIGIBLE" || candidate.status === "WEAK_ORACLE");
1299
+ return {
1300
+ id: candidate.id,
1301
+ digest: candidate.digest,
1302
+ status: candidate.status,
1303
+ selected: selected.has(candidate.id),
1304
+ reasonCodes: [...candidate.reasonCodes],
1305
+ worlds: worlds.map((world) => exportedWorld(manifest, candidate.id, world, detectionEstablished)),
1306
+ };
1307
+ });
1308
+ const statuses = new Set(candidates.map((candidate) => candidate.status));
1309
+ const targetDetections = candidates.flatMap((candidate) => candidate.worlds.filter((world) => world.kind === "TARGET").map((world) => world.detection));
1310
+ const [detection, reasonCode] = manifest.decision.status === "VERIFIED"
1311
+ ? ["OBSERVED", "REGRESSION_ASSERTION_OBSERVED"]
1312
+ : manifest.decision.status === "ENGINE_ERROR"
1313
+ ? ["NOT_ESTABLISHED", "ENGINE_ERROR"]
1314
+ : !controlsValid
1315
+ ? ["NOT_ESTABLISHED", "CONTROL_EVIDENCE_INVALID"]
1316
+ : statuses.has("UNSTABLE") || statuses.has("INCONCLUSIVE")
1317
+ ? ["NOT_ESTABLISHED", "CANDIDATE_EVIDENCE_INCONCLUSIVE"]
1318
+ : statuses.has("INVALID")
1319
+ ? ["NOT_ESTABLISHED", "CANDIDATE_EVIDENCE_INVALID"]
1320
+ : targetDetections.includes("NOT_ESTABLISHED")
1321
+ ? ["NOT_ESTABLISHED", "OPERATIONAL_OUTCOME_NOT_DETECTION"]
1322
+ : targetDetections.includes("NOT_OBSERVED")
1323
+ ? ["NOT_OBSERVED", "TARGET_PASSED_WITHOUT_DETECTION"]
1324
+ : ["NOT_ESTABLISHED", "TARGET_STRENGTH_INSUFFICIENT"];
1325
+ const contextWorlds = new Map(manifest.evidenceContext.worlds.map((world) => [world.id, world]));
1326
+ const scopeWorlds = worlds.map((world) => {
1327
+ const context = contextWorlds.get(world.id);
1328
+ if (context === undefined)
1329
+ throw new EvidenceValidationError("EVIDENCE_EXPORT_SOURCE_INVALID");
1330
+ return {
1331
+ id: world.id,
1332
+ kind: world.kind,
1333
+ required: world.required,
1334
+ weight: world.weight,
1335
+ digest: context.digest,
1336
+ declaredProvenance: context.provenance,
1337
+ git: recordedGitRevision(context.provenance),
1338
+ };
1339
+ });
1340
+ const recordedGit = scopeWorlds.filter((world) => world.git !== null).length;
1341
+ const candidateRuns = manifest.observations.filter((observation) => observation.candidateId !== null);
1342
+ const candidateRunsIn = (kind) => candidateRuns.filter((observation) => worldKinds.get(observation.worldId) === kind).length;
1343
+ const executed = [
1344
+ ["CONTROL_WITHOUT_CANDIDATE", manifest.observations.length - candidateRuns.length],
1345
+ ["REFERENCE_PASS", candidateRunsIn("REFERENCE")],
1346
+ ["REGRESSION_DETECTION", candidateRunsIn("TARGET")],
1347
+ ["NEUTRAL_PASS", candidateRunsIn("NEUTRAL")],
1348
+ [
1349
+ "STABILITY_REPETITION",
1350
+ manifest.observations.filter((observation) => observation.attempt >= 2).length,
1351
+ ],
1352
+ ].map(([control, observations]) => ({
1353
+ control,
1354
+ status: observations > 0 ? "EXECUTED" : "NOT_EXECUTED",
1355
+ observations,
1356
+ }));
1357
+ const executedStatus = new Map(executed.map((control) => [control.control, control.status]));
1358
+ const consumerRequest = request.consumerRequest === null
1359
+ ? null
1360
+ : {
1361
+ reference: request.consumerRequest.reference,
1362
+ profileId: request.consumerRequest.profileId,
1363
+ obligations: [...request.consumerRequest.obligations]
1364
+ .sort((left, right) => compareOrdinal(left.id, right.id))
1365
+ .map(({ id, control }) => ({ id, control })),
1366
+ };
1367
+ let requested = { status: "NOT_SUPPLIED" };
1368
+ if (consumerRequest !== null) {
1369
+ // Only executable controls can be covered; anything else stays UNSUPPORTED, never inferred.
1370
+ const obligations = consumerRequest.obligations.map((obligation) => ({
1371
+ ...obligation,
1372
+ coverage: executedStatus.get(obligation.control) ?? "UNSUPPORTED",
1373
+ }));
1374
+ const covered = obligations.filter((obligation) => obligation.coverage === "EXECUTED").length;
1375
+ requested = {
1376
+ status: obligations.length === 0
1377
+ ? "NO_OBLIGATIONS"
1378
+ : covered === obligations.length
1379
+ ? "COVERED"
1380
+ : covered === 0
1381
+ ? "NOT_COVERED"
1382
+ : "PARTIAL",
1383
+ obligations,
1384
+ };
1385
+ }
1386
+ const timed = manifest.observations.filter((observation) => observation.durationMs !== undefined);
1387
+ const recordedWallTimeMs = timed.length === 0
1388
+ ? null
1389
+ : timed.reduce((total, observation) => total + (observation.durationMs ?? 0), 0);
1390
+ const base = {
1391
+ schemaVersion: "1.0.0",
1392
+ sourceManifest: manifest,
1393
+ sourceArtifactDigest: manifest.artifactDigest,
1394
+ consumerRequest,
1395
+ result: {
1396
+ detection,
1397
+ modality: detection === "NOT_ESTABLISHED" ? "NONE" : "TEST_OBSERVED",
1398
+ reasonCode,
1399
+ decision: {
1400
+ status: manifest.decision.status,
1401
+ selectedCandidateIds: [...manifest.decision.selectedCandidateIds],
1402
+ reasonCodes: [...manifest.decision.reasonCodes],
1403
+ },
1404
+ candidates,
1405
+ },
1406
+ integrity: {
1407
+ sourceReplay: "VALID",
1408
+ verifiedRails: ["SCHEMA", "DECISION_DIGEST", "ARTIFACT_DIGEST", "DECISION_SEMANTICS"],
1409
+ bindings: {
1410
+ artifactDigest: manifest.artifactDigest,
1411
+ decisionDigest: manifest.decisionDigest,
1412
+ repositoryDigest: manifest.repositoryDigest,
1413
+ policyDigest: sha256Canonical(manifest.policy),
1414
+ worldDigests: scopeWorlds.map((world) => ({ worldId: world.id, digest: world.digest })),
1415
+ },
1416
+ },
1417
+ authenticity: {
1418
+ status: "UNAUTHENTICATED",
1419
+ attestation: "NONE",
1420
+ declaredProducer: {
1421
+ name: manifest.evidenceContext.engine.name,
1422
+ version: manifest.evidenceContext.engine.version,
1423
+ },
1424
+ },
1425
+ environment: {
1426
+ isolation: { kind: manifest.isolation.kind, level: manifest.isolation.level },
1427
+ environmentAllowlist: [...manifest.evidenceContext.execution.environmentAllowlist],
1428
+ adapter: {
1429
+ kind: manifest.adapter.kind,
1430
+ name: manifest.evidenceContext.adapter.name,
1431
+ version: manifest.evidenceContext.adapter.version,
1432
+ framework: recordedFramework(manifest),
1433
+ },
1434
+ },
1435
+ confidence: {
1436
+ level: "REPLAY_CONSISTENT_UNAUTHENTICATED",
1437
+ established: [
1438
+ "SOURCE_SCHEMA_VALID",
1439
+ "DECISION_DIGEST_RECOMPUTED",
1440
+ "ARTIFACT_DIGEST_RECOMPUTED",
1441
+ "DECISION_RECOMPUTED_FROM_RECORDED_OBSERVATIONS",
1442
+ ],
1443
+ notEstablished: [
1444
+ "PRODUCER_AUTHENTICITY",
1445
+ "OBSERVATION_TRUTHFULNESS",
1446
+ "EXECUTION_ISOLATION",
1447
+ "EXECUTION_FRESHNESS",
1448
+ "WORLD_SEMANTIC_RELEVANCE",
1449
+ ],
1450
+ },
1451
+ scope: {
1452
+ requiredAttempts: manifest.policy.requiredAttempts,
1453
+ candidates: manifest.candidates.length,
1454
+ observations: manifest.observations.length,
1455
+ gitRevisions: recordedGit === 0
1456
+ ? "NOT_RECORDED"
1457
+ : recordedGit === scopeWorlds.length
1458
+ ? "RECORDED"
1459
+ : "PARTIAL",
1460
+ worlds: scopeWorlds,
1461
+ },
1462
+ controls: {
1463
+ executed,
1464
+ requested,
1465
+ omittedGates: sortedCandidates.flatMap((candidate) => candidate.gates
1466
+ .filter((gate) => gate.status === "NOT_RUN")
1467
+ .map((gate) => ({
1468
+ candidateId: candidate.id,
1469
+ gate: gate.name,
1470
+ reasonCodes: [...gate.reasonCodes],
1471
+ }))),
1472
+ },
1473
+ profile: consumerRequest?.profileId == null
1474
+ ? { status: "NOT_REQUESTED" }
1475
+ : { status: "UNKNOWN_PROFILE", requestedProfileId: consumerRequest.profileId },
1476
+ policy: {
1477
+ policyVersion: manifest.policy.policyVersion,
1478
+ digest: sha256Canonical(manifest.policy),
1479
+ },
1480
+ cost: {
1481
+ estimated: {
1482
+ unit: "PROCESS_EXECUTIONS",
1483
+ value: (manifest.candidates.length + 1) *
1484
+ manifest.worlds.length *
1485
+ manifest.policy.requiredAttempts,
1486
+ basis: "RECORDED_CAMPAIGN_SHAPE",
1487
+ assumptions: [...EVIDENCE_EXPORT_COST_ASSUMPTIONS],
1488
+ },
1489
+ observed: {
1490
+ unit: "PROCESS_EXECUTIONS",
1491
+ executions: manifest.observations.length,
1492
+ recordedWallTimeMs,
1493
+ wallTimeCoverage: timed.length === 0
1494
+ ? "NOT_RECORDED"
1495
+ : timed.length === manifest.observations.length
1496
+ ? "COMPLETE"
1497
+ : "PARTIAL",
1498
+ },
1499
+ execution: { freshness: "UNKNOWN", cache: "NOT_RECORDED" },
1500
+ },
1501
+ limitations: [
1502
+ "The export restates replay-valid recorded evidence; it does not rerun tests or authenticate the producer.",
1503
+ "Detection covers only the recorded target worlds and attempts.",
1504
+ "Consumers decide admissibility; rejecting or ignoring an export does not change AssertLedger results.",
1505
+ ],
1506
+ };
1507
+ return { ...base, exportDigest: sha256Canonical(base) };
1508
+ }
1509
+ function evidenceExportProjection(value) {
1510
+ const { exportDigest: _exportDigest, ...projection } = value;
1511
+ return projection;
1512
+ }
1513
+ export function replayEvidenceExport(value) {
1514
+ const invalid = {
1515
+ valid: false,
1516
+ schemaValid: false,
1517
+ sourceManifestValid: false,
1518
+ exportDigestValid: false,
1519
+ semanticsValid: false,
1520
+ };
1521
+ let evidenceExport;
1522
+ try {
1523
+ evidenceExport = parseEvidenceExport(value);
1524
+ }
1525
+ catch {
1526
+ return invalid;
1527
+ }
1528
+ const sourceManifestValid = replayEvidenceManifest(evidenceExport.sourceManifest).valid;
1529
+ const exportDigestValid = evidenceExport.exportDigest === sha256Canonical(evidenceExportProjection(evidenceExport));
1530
+ let semanticsValid = false;
1531
+ try {
1532
+ semanticsValid =
1533
+ canonicalize(evidenceExport) ===
1534
+ canonicalize(createEvidenceExport({
1535
+ schemaVersion: "1.0.0",
1536
+ manifest: evidenceExport.sourceManifest,
1537
+ consumerRequest: evidenceExport.consumerRequest,
1538
+ }));
1539
+ }
1540
+ catch {
1541
+ semanticsValid = false;
1542
+ }
1543
+ return {
1544
+ valid: sourceManifestValid && exportDigestValid && semanticsValid,
1545
+ schemaValid: true,
1546
+ sourceManifestValid,
1547
+ exportDigestValid,
1548
+ semanticsValid,
1549
+ };
1550
+ }
1082
1551
  const BENCHMARK_PHASES = ["PREPARATION", "STARTUP", "COMPILE_OR_COLLECTION", "EXECUTION"];
1083
1552
  function benchmarkSourceBindingValid(request) {
1084
1553
  if (request.sourceManifest.decision.status !== "VERIFIED")