assertledger 1.0.0 → 1.1.1

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 (93) 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 +484 -8
  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/proof-planner/carry-over.d.ts +21 -0
  44. package/dist/proof-planner/carry-over.d.ts.map +1 -0
  45. package/dist/proof-planner/carry-over.js +212 -0
  46. package/dist/proof-planner/carry-over.js.map +1 -0
  47. package/dist/proof-planner/index.d.ts +11 -0
  48. package/dist/proof-planner/index.d.ts.map +1 -0
  49. package/dist/proof-planner/index.js +11 -0
  50. package/dist/proof-planner/index.js.map +1 -0
  51. package/dist/proof-planner/model.d.ts +272 -0
  52. package/dist/proof-planner/model.d.ts.map +1 -0
  53. package/dist/proof-planner/model.js +215 -0
  54. package/dist/proof-planner/model.js.map +1 -0
  55. package/dist/proof-planner/plan.d.ts +140 -0
  56. package/dist/proof-planner/plan.d.ts.map +1 -0
  57. package/dist/proof-planner/plan.js +1124 -0
  58. package/dist/proof-planner/plan.js.map +1 -0
  59. package/dist/proof-planner/policy.d.ts +100 -0
  60. package/dist/proof-planner/policy.d.ts.map +1 -0
  61. package/dist/proof-planner/policy.js +407 -0
  62. package/dist/proof-planner/policy.js.map +1 -0
  63. package/dist/proof-planner/render.d.ts +4 -0
  64. package/dist/proof-planner/render.d.ts.map +1 -0
  65. package/dist/proof-planner/render.js +73 -0
  66. package/dist/proof-planner/render.js.map +1 -0
  67. package/dist/sdk/index.d.ts +16 -6
  68. package/dist/sdk/index.d.ts.map +1 -1
  69. package/dist/sdk/index.js +63 -5
  70. package/dist/sdk/index.js.map +1 -1
  71. package/docs/agentic-test-profile.md +5 -0
  72. package/docs/architecture.md +15 -3
  73. package/docs/ci.md +7 -1
  74. package/docs/conformance-v1.md +11 -2
  75. package/docs/container-isolation.md +156 -0
  76. package/docs/evidence-export.md +146 -0
  77. package/docs/git-regression.md +7 -3
  78. package/docs/migration-timeout-discovery-inconclusive.md +126 -0
  79. package/docs/migration-verification-v2.md +55 -0
  80. package/docs/project-intent.md +3 -2
  81. package/docs/proof-model.md +28 -6
  82. package/docs/proof-planner.md +368 -0
  83. package/docs/reference.md +59 -12
  84. package/docs/roadmap.md +12 -4
  85. package/examples/agentic-profile/profile-manifest.mjs +5 -1
  86. package/examples/evidence-export/consumer.mjs +35 -0
  87. package/package.json +5 -5
  88. package/schemas/evidence-export-replay-result.v1.json +49 -0
  89. package/schemas/evidence-export-request.v1.json +681 -0
  90. package/schemas/evidence-export.v1.json +1479 -0
  91. package/schemas/evidence-manifest.v2.json +886 -0
  92. package/schemas/evidence-provider-manifest.v1.json +269 -0
  93. 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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O,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");
@@ -479,22 +486,29 @@ function assessCandidate(input, candidate) {
479
486
  reasonCodes: ["OBSERVATIONS_DIVERGE"],
480
487
  };
481
488
  }
482
- const discoveryValid = allRuns.every((run) => run.candidateTestsDiscovered >= 1 && run.attributed);
489
+ const undiscoveredRuns = allRuns.filter((run) => !(run.candidateTestsDiscovered >= 1 && run.attributed));
490
+ const discoveryValid = undiscoveredRuns.length === 0;
491
+ // A run that timed out or failed in infrastructure never reached a verdict: it can neither
492
+ // prove nor disprove discovery. Only a completed run makes the candidate invalid here.
493
+ const discoveryInconclusive = !discoveryValid && undiscoveredRuns.every((run) => INCONCLUSIVE_OUTCOMES.has(run.outcome));
494
+ const discoveryReason = discoveryInconclusive
495
+ ? "CANDIDATE_EXECUTION_INCONCLUSIVE"
496
+ : "CANDIDATE_DISCOVERY_INVALID";
483
497
  gates.push({
484
498
  name: "DISCOVERY",
485
499
  status: discoveryValid ? "PASSED" : "FAILED",
486
500
  evidenceRunIds: ids(allRuns),
487
- reasonCodes: discoveryValid ? [] : ["CANDIDATE_DISCOVERY_INVALID"],
501
+ reasonCodes: discoveryValid ? [] : [discoveryReason],
488
502
  });
489
503
  if (!discoveryValid) {
490
504
  gates.push(notRun("REFERENCE"), notRun("NEUTRAL"), notRun("TARGET_STRENGTH"));
491
505
  return {
492
506
  ...candidate,
493
- status: "INVALID",
507
+ status: discoveryInconclusive ? "INCONCLUSIVE" : "INVALID",
494
508
  killedTargetIds: [],
495
509
  targetWeightKilled: 0,
496
510
  gates,
497
- reasonCodes: ["CANDIDATE_DISCOVERY_INVALID"],
511
+ reasonCodes: [discoveryReason],
498
512
  };
499
513
  }
500
514
  const referenceRuns = worldRuns
@@ -1079,6 +1093,468 @@ export function replayAgenticProfile(value) {
1079
1093
  semanticsValid,
1080
1094
  };
1081
1095
  }
1096
+ const EVIDENCE_EXPORT_COST_ASSUMPTIONS = [
1097
+ "One candidate-free control run per world and attempt precedes the candidate runs.",
1098
+ "Each run is one process execution bounded by the campaign timeout.",
1099
+ ];
1100
+ export function createEvidenceProviderManifest(identity) {
1101
+ const base = {
1102
+ schemaVersion: "1.0.0",
1103
+ provider: {
1104
+ name: "assertledger",
1105
+ version: identity.version,
1106
+ sourceRevision: identity.sourceRevision,
1107
+ },
1108
+ 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.",
1109
+ formats: {
1110
+ accepts: [
1111
+ {
1112
+ schemaId: "https://testforge.dev/schemas/evidence-export-request.v1.json",
1113
+ schemaVersion: "1.0.0",
1114
+ },
1115
+ {
1116
+ schemaId: "https://testforge.dev/schemas/evidence-manifest.v1.json",
1117
+ schemaVersion: "1.0.0",
1118
+ },
1119
+ ],
1120
+ emits: [
1121
+ {
1122
+ schemaId: "https://testforge.dev/schemas/evidence-export.v1.json",
1123
+ schemaVersion: "1.0.0",
1124
+ },
1125
+ {
1126
+ schemaId: "https://testforge.dev/schemas/evidence-export-replay-result.v1.json",
1127
+ schemaVersion: "1.0.0",
1128
+ },
1129
+ ],
1130
+ },
1131
+ capabilities: [
1132
+ {
1133
+ id: "CONTROL_WITHOUT_CANDIDATE",
1134
+ status: "SUPPORTED",
1135
+ modality: "TEST_OBSERVED",
1136
+ description: "Every world runs without a candidate first; controls must pass without candidate attribution.",
1137
+ },
1138
+ {
1139
+ id: "REFERENCE_PASS",
1140
+ status: "SUPPORTED",
1141
+ modality: "TEST_OBSERVED",
1142
+ description: "Candidates must pass every reference world.",
1143
+ },
1144
+ {
1145
+ id: "REGRESSION_DETECTION",
1146
+ status: "SUPPORTED",
1147
+ modality: "TEST_OBSERVED",
1148
+ description: "Only an attributed ASSERTION_FAILURE on a target world is detection; compilation, collection, crash, timeout, infrastructure, and no-test outcomes never are.",
1149
+ },
1150
+ {
1151
+ id: "NEUTRAL_PASS",
1152
+ status: "SUPPORTED",
1153
+ modality: "TEST_OBSERVED",
1154
+ description: "Candidates must pass every neutral world.",
1155
+ },
1156
+ {
1157
+ id: "STABILITY_REPETITION",
1158
+ status: "SUPPORTED",
1159
+ modality: "TEST_OBSERVED",
1160
+ description: "Normalized outcomes must agree across the recorded attempts.",
1161
+ },
1162
+ {
1163
+ id: "GIT_REVISION_PROVENANCE",
1164
+ status: "SUPPORTED_WHEN_RECORDED",
1165
+ modality: "RECORDED_METADATA",
1166
+ description: "Git commits and trees are exported only when committed Git regression qualification recorded them.",
1167
+ },
1168
+ {
1169
+ id: "EXECUTION_FRESHNESS",
1170
+ status: "UNSUPPORTED",
1171
+ modality: "NONE",
1172
+ description: "Evidence manifest v1 does not record whether observations were freshly executed or reused.",
1173
+ },
1174
+ {
1175
+ id: "PRODUCER_AUTHENTICATION",
1176
+ status: "UNSUPPORTED",
1177
+ modality: "NONE",
1178
+ description: "Exports are unsigned; digests check integrity, not producer identity.",
1179
+ },
1180
+ {
1181
+ id: "SANDBOXED_EXECUTION",
1182
+ status: "UNSUPPORTED",
1183
+ modality: "NONE",
1184
+ description: "trusted-local execution is explicitly UNSANDBOXED.",
1185
+ },
1186
+ ],
1187
+ adapters: identity.adapters,
1188
+ cost: {
1189
+ unit: "PROCESS_EXECUTIONS",
1190
+ estimate: "(candidates + 1) * worlds * requiredAttempts",
1191
+ assumptions: [
1192
+ ...EVIDENCE_EXPORT_COST_ASSUMPTIONS,
1193
+ "Wall time is observed per recorded run and is never estimated.",
1194
+ ],
1195
+ },
1196
+ limits: [
1197
+ "An announced capability does not prove that a control ran; only the recorded observations of an exported manifest do.",
1198
+ "Exports cover only the recorded worlds, candidates, and attempts and do not generalize to unexecuted states.",
1199
+ "Evidence is unauthenticated and trusted-local execution is unsandboxed.",
1200
+ "Consumers decide whether to admit, degrade, or ignore evidence; that decision never changes AssertLedger results.",
1201
+ ],
1202
+ };
1203
+ return parseEvidenceProviderManifest({ ...base, manifestDigest: sha256Canonical(base) });
1204
+ }
1205
+ function recordedGitRevision(provenance) {
1206
+ let value;
1207
+ try {
1208
+ value = JSON.parse(provenance);
1209
+ }
1210
+ catch {
1211
+ return null;
1212
+ }
1213
+ if (!isRecord(value) || canonicalize(value) !== provenance)
1214
+ return null;
1215
+ if (Object.keys(value).sort(compareOrdinal).join(",") !==
1216
+ "commit,format,objectFormat,projection,reason,role,tree")
1217
+ return null;
1218
+ const { commit, format, objectFormat, projection, reason, role, tree } = value;
1219
+ const length = objectFormat === "sha1" ? 40 : objectFormat === "sha256" ? 64 : 0;
1220
+ const objectId = new RegExp(`^[a-f0-9]{${length}}$`);
1221
+ if (length === 0 ||
1222
+ format !== "assertledger-git-regression/1" ||
1223
+ (role !== "reference" && role !== "target" && role !== "neutral") ||
1224
+ typeof commit !== "string" ||
1225
+ !objectId.test(commit) ||
1226
+ typeof tree !== "string" ||
1227
+ !objectId.test(tree) ||
1228
+ typeof projection !== "string" ||
1229
+ typeof reason !== "string")
1230
+ return null;
1231
+ return { role, commit, tree, objectFormat: objectFormat };
1232
+ }
1233
+ function recordedFramework(manifest) {
1234
+ const configuration = manifest.evidenceContext.adapter.configuration;
1235
+ if (manifest.adapter.kind !== "node-test" ||
1236
+ !isRecord(configuration) ||
1237
+ configuration.kind !== "node-test" ||
1238
+ !isRecord(configuration.profile))
1239
+ return { status: "UNKNOWN" };
1240
+ const { profileId, profileVersion, official } = configuration.profile;
1241
+ const boundedText = (text) => typeof text === "string" && text.length > 0 && text.length <= 128;
1242
+ if (!boundedText(profileId) || !boundedText(profileVersion) || typeof official !== "boolean")
1243
+ return { status: "UNKNOWN" };
1244
+ return {
1245
+ status: "RECORDED",
1246
+ profileId,
1247
+ profileVersion,
1248
+ official,
1249
+ nodeVersion: boundedText(configuration.nodeVersion) ? configuration.nodeVersion : null,
1250
+ executableDigest: typeof configuration.executableDigest === "string" &&
1251
+ /^sha256:[a-f0-9]{64}$/.test(configuration.executableDigest)
1252
+ ? configuration.executableDigest
1253
+ : null,
1254
+ };
1255
+ }
1256
+ function exportedWorld(manifest, candidateId, world, detectionEstablished) {
1257
+ const runs = manifest.observations.filter((observation) => observation.candidateId === candidateId && observation.worldId === world.id);
1258
+ const complete = isComplete(runs, manifest.policy.requiredAttempts);
1259
+ const first = runs[0];
1260
+ const outcome = !complete || first === undefined
1261
+ ? "MISSING"
1262
+ : runs.every((run) => run.outcome === first.outcome)
1263
+ ? first.outcome
1264
+ : "DIVERGENT";
1265
+ const attributed = complete && runs.every((run) => run.attributed && run.candidateTestsDiscovered >= 1);
1266
+ const signal = attributed && outcome === "ASSERTION_FAILURE"
1267
+ ? "RED"
1268
+ : attributed && outcome === "PASS"
1269
+ ? "GREEN"
1270
+ : "NONE";
1271
+ const detection = world.kind !== "TARGET"
1272
+ ? "NOT_APPLICABLE"
1273
+ : !detectionEstablished
1274
+ ? "NOT_ESTABLISHED"
1275
+ : signal === "RED"
1276
+ ? "OBSERVED"
1277
+ : signal === "GREEN"
1278
+ ? "NOT_OBSERVED"
1279
+ : "NOT_ESTABLISHED";
1280
+ return {
1281
+ worldId: world.id,
1282
+ kind: world.kind,
1283
+ required: world.required,
1284
+ weight: world.weight,
1285
+ outcome,
1286
+ attempts: runs.length,
1287
+ signal,
1288
+ detection,
1289
+ };
1290
+ }
1291
+ export function createEvidenceExport(request) {
1292
+ request = parseEvidenceExportRequest(request);
1293
+ const manifest = request.manifest;
1294
+ if (!replayEvidenceManifest(manifest).valid) {
1295
+ throw new EvidenceValidationError("EVIDENCE_EXPORT_SOURCE_INVALID");
1296
+ }
1297
+ const worlds = [...manifest.worlds].sort((left, right) => compareOrdinal(left.id, right.id));
1298
+ const worldKinds = new Map(manifest.worlds.map((world) => [world.id, world.kind]));
1299
+ const controlsValid = manifest.decision.status !== "ENGINE_ERROR" &&
1300
+ !manifest.decision.reasonCodes.includes("CONTROL_EVIDENCE_INVALID");
1301
+ const selected = new Set(manifest.decision.selectedCandidateIds);
1302
+ const sortedCandidates = [...manifest.candidates].sort((left, right) => compareOrdinal(left.id, right.id));
1303
+ const candidates = sortedCandidates.map((candidate) => {
1304
+ // Detection is only meaningful once controls, discovery, reference, and neutral evidence held.
1305
+ const detectionEstablished = controlsValid && (candidate.status === "ELIGIBLE" || candidate.status === "WEAK_ORACLE");
1306
+ return {
1307
+ id: candidate.id,
1308
+ digest: candidate.digest,
1309
+ status: candidate.status,
1310
+ selected: selected.has(candidate.id),
1311
+ reasonCodes: [...candidate.reasonCodes],
1312
+ worlds: worlds.map((world) => exportedWorld(manifest, candidate.id, world, detectionEstablished)),
1313
+ };
1314
+ });
1315
+ const statuses = new Set(candidates.map((candidate) => candidate.status));
1316
+ const targetDetections = candidates.flatMap((candidate) => candidate.worlds.filter((world) => world.kind === "TARGET").map((world) => world.detection));
1317
+ const [detection, reasonCode] = manifest.decision.status === "VERIFIED"
1318
+ ? ["OBSERVED", "REGRESSION_ASSERTION_OBSERVED"]
1319
+ : manifest.decision.status === "ENGINE_ERROR"
1320
+ ? ["NOT_ESTABLISHED", "ENGINE_ERROR"]
1321
+ : !controlsValid
1322
+ ? ["NOT_ESTABLISHED", "CONTROL_EVIDENCE_INVALID"]
1323
+ : statuses.has("UNSTABLE") || statuses.has("INCONCLUSIVE")
1324
+ ? ["NOT_ESTABLISHED", "CANDIDATE_EVIDENCE_INCONCLUSIVE"]
1325
+ : statuses.has("INVALID")
1326
+ ? ["NOT_ESTABLISHED", "CANDIDATE_EVIDENCE_INVALID"]
1327
+ : targetDetections.includes("NOT_ESTABLISHED")
1328
+ ? ["NOT_ESTABLISHED", "OPERATIONAL_OUTCOME_NOT_DETECTION"]
1329
+ : targetDetections.includes("NOT_OBSERVED")
1330
+ ? ["NOT_OBSERVED", "TARGET_PASSED_WITHOUT_DETECTION"]
1331
+ : ["NOT_ESTABLISHED", "TARGET_STRENGTH_INSUFFICIENT"];
1332
+ const contextWorlds = new Map(manifest.evidenceContext.worlds.map((world) => [world.id, world]));
1333
+ const scopeWorlds = worlds.map((world) => {
1334
+ const context = contextWorlds.get(world.id);
1335
+ if (context === undefined)
1336
+ throw new EvidenceValidationError("EVIDENCE_EXPORT_SOURCE_INVALID");
1337
+ return {
1338
+ id: world.id,
1339
+ kind: world.kind,
1340
+ required: world.required,
1341
+ weight: world.weight,
1342
+ digest: context.digest,
1343
+ declaredProvenance: context.provenance,
1344
+ git: recordedGitRevision(context.provenance),
1345
+ };
1346
+ });
1347
+ const recordedGit = scopeWorlds.filter((world) => world.git !== null).length;
1348
+ const candidateRuns = manifest.observations.filter((observation) => observation.candidateId !== null);
1349
+ const candidateRunsIn = (kind) => candidateRuns.filter((observation) => worldKinds.get(observation.worldId) === kind).length;
1350
+ const executed = [
1351
+ ["CONTROL_WITHOUT_CANDIDATE", manifest.observations.length - candidateRuns.length],
1352
+ ["REFERENCE_PASS", candidateRunsIn("REFERENCE")],
1353
+ ["REGRESSION_DETECTION", candidateRunsIn("TARGET")],
1354
+ ["NEUTRAL_PASS", candidateRunsIn("NEUTRAL")],
1355
+ [
1356
+ "STABILITY_REPETITION",
1357
+ manifest.observations.filter((observation) => observation.attempt >= 2).length,
1358
+ ],
1359
+ ].map(([control, observations]) => ({
1360
+ control,
1361
+ status: observations > 0 ? "EXECUTED" : "NOT_EXECUTED",
1362
+ observations,
1363
+ }));
1364
+ const executedStatus = new Map(executed.map((control) => [control.control, control.status]));
1365
+ const consumerRequest = request.consumerRequest === null
1366
+ ? null
1367
+ : {
1368
+ reference: request.consumerRequest.reference,
1369
+ profileId: request.consumerRequest.profileId,
1370
+ obligations: [...request.consumerRequest.obligations]
1371
+ .sort((left, right) => compareOrdinal(left.id, right.id))
1372
+ .map(({ id, control }) => ({ id, control })),
1373
+ };
1374
+ let requested = { status: "NOT_SUPPLIED" };
1375
+ if (consumerRequest !== null) {
1376
+ // Only executable controls can be covered; anything else stays UNSUPPORTED, never inferred.
1377
+ const obligations = consumerRequest.obligations.map((obligation) => ({
1378
+ ...obligation,
1379
+ coverage: executedStatus.get(obligation.control) ?? "UNSUPPORTED",
1380
+ }));
1381
+ const covered = obligations.filter((obligation) => obligation.coverage === "EXECUTED").length;
1382
+ requested = {
1383
+ status: obligations.length === 0
1384
+ ? "NO_OBLIGATIONS"
1385
+ : covered === obligations.length
1386
+ ? "COVERED"
1387
+ : covered === 0
1388
+ ? "NOT_COVERED"
1389
+ : "PARTIAL",
1390
+ obligations,
1391
+ };
1392
+ }
1393
+ const timed = manifest.observations.filter((observation) => observation.durationMs !== undefined);
1394
+ const recordedWallTimeMs = timed.length === 0
1395
+ ? null
1396
+ : timed.reduce((total, observation) => total + (observation.durationMs ?? 0), 0);
1397
+ const base = {
1398
+ schemaVersion: "1.0.0",
1399
+ sourceManifest: manifest,
1400
+ sourceArtifactDigest: manifest.artifactDigest,
1401
+ consumerRequest,
1402
+ result: {
1403
+ detection,
1404
+ modality: detection === "NOT_ESTABLISHED" ? "NONE" : "TEST_OBSERVED",
1405
+ reasonCode,
1406
+ decision: {
1407
+ status: manifest.decision.status,
1408
+ selectedCandidateIds: [...manifest.decision.selectedCandidateIds],
1409
+ reasonCodes: [...manifest.decision.reasonCodes],
1410
+ },
1411
+ candidates,
1412
+ },
1413
+ integrity: {
1414
+ sourceReplay: "VALID",
1415
+ verifiedRails: ["SCHEMA", "DECISION_DIGEST", "ARTIFACT_DIGEST", "DECISION_SEMANTICS"],
1416
+ bindings: {
1417
+ artifactDigest: manifest.artifactDigest,
1418
+ decisionDigest: manifest.decisionDigest,
1419
+ repositoryDigest: manifest.repositoryDigest,
1420
+ policyDigest: sha256Canonical(manifest.policy),
1421
+ worldDigests: scopeWorlds.map((world) => ({ worldId: world.id, digest: world.digest })),
1422
+ },
1423
+ },
1424
+ authenticity: {
1425
+ status: "UNAUTHENTICATED",
1426
+ attestation: "NONE",
1427
+ declaredProducer: {
1428
+ name: manifest.evidenceContext.engine.name,
1429
+ version: manifest.evidenceContext.engine.version,
1430
+ },
1431
+ },
1432
+ environment: {
1433
+ isolation: { kind: manifest.isolation.kind, level: manifest.isolation.level },
1434
+ environmentAllowlist: [...manifest.evidenceContext.execution.environmentAllowlist],
1435
+ adapter: {
1436
+ kind: manifest.adapter.kind,
1437
+ name: manifest.evidenceContext.adapter.name,
1438
+ version: manifest.evidenceContext.adapter.version,
1439
+ framework: recordedFramework(manifest),
1440
+ },
1441
+ },
1442
+ confidence: {
1443
+ level: "REPLAY_CONSISTENT_UNAUTHENTICATED",
1444
+ established: [
1445
+ "SOURCE_SCHEMA_VALID",
1446
+ "DECISION_DIGEST_RECOMPUTED",
1447
+ "ARTIFACT_DIGEST_RECOMPUTED",
1448
+ "DECISION_RECOMPUTED_FROM_RECORDED_OBSERVATIONS",
1449
+ ],
1450
+ notEstablished: [
1451
+ "PRODUCER_AUTHENTICITY",
1452
+ "OBSERVATION_TRUTHFULNESS",
1453
+ "EXECUTION_ISOLATION",
1454
+ "EXECUTION_FRESHNESS",
1455
+ "WORLD_SEMANTIC_RELEVANCE",
1456
+ ],
1457
+ },
1458
+ scope: {
1459
+ requiredAttempts: manifest.policy.requiredAttempts,
1460
+ candidates: manifest.candidates.length,
1461
+ observations: manifest.observations.length,
1462
+ gitRevisions: recordedGit === 0
1463
+ ? "NOT_RECORDED"
1464
+ : recordedGit === scopeWorlds.length
1465
+ ? "RECORDED"
1466
+ : "PARTIAL",
1467
+ worlds: scopeWorlds,
1468
+ },
1469
+ controls: {
1470
+ executed,
1471
+ requested,
1472
+ omittedGates: sortedCandidates.flatMap((candidate) => candidate.gates
1473
+ .filter((gate) => gate.status === "NOT_RUN")
1474
+ .map((gate) => ({
1475
+ candidateId: candidate.id,
1476
+ gate: gate.name,
1477
+ reasonCodes: [...gate.reasonCodes],
1478
+ }))),
1479
+ },
1480
+ profile: consumerRequest?.profileId == null
1481
+ ? { status: "NOT_REQUESTED" }
1482
+ : { status: "UNKNOWN_PROFILE", requestedProfileId: consumerRequest.profileId },
1483
+ policy: {
1484
+ policyVersion: manifest.policy.policyVersion,
1485
+ digest: sha256Canonical(manifest.policy),
1486
+ },
1487
+ cost: {
1488
+ estimated: {
1489
+ unit: "PROCESS_EXECUTIONS",
1490
+ value: (manifest.candidates.length + 1) *
1491
+ manifest.worlds.length *
1492
+ manifest.policy.requiredAttempts,
1493
+ basis: "RECORDED_CAMPAIGN_SHAPE",
1494
+ assumptions: [...EVIDENCE_EXPORT_COST_ASSUMPTIONS],
1495
+ },
1496
+ observed: {
1497
+ unit: "PROCESS_EXECUTIONS",
1498
+ executions: manifest.observations.length,
1499
+ recordedWallTimeMs,
1500
+ wallTimeCoverage: timed.length === 0
1501
+ ? "NOT_RECORDED"
1502
+ : timed.length === manifest.observations.length
1503
+ ? "COMPLETE"
1504
+ : "PARTIAL",
1505
+ },
1506
+ execution: { freshness: "UNKNOWN", cache: "NOT_RECORDED" },
1507
+ },
1508
+ limitations: [
1509
+ "The export restates replay-valid recorded evidence; it does not rerun tests or authenticate the producer.",
1510
+ "Detection covers only the recorded target worlds and attempts.",
1511
+ "Consumers decide admissibility; rejecting or ignoring an export does not change AssertLedger results.",
1512
+ ],
1513
+ };
1514
+ return { ...base, exportDigest: sha256Canonical(base) };
1515
+ }
1516
+ function evidenceExportProjection(value) {
1517
+ const { exportDigest: _exportDigest, ...projection } = value;
1518
+ return projection;
1519
+ }
1520
+ export function replayEvidenceExport(value) {
1521
+ const invalid = {
1522
+ valid: false,
1523
+ schemaValid: false,
1524
+ sourceManifestValid: false,
1525
+ exportDigestValid: false,
1526
+ semanticsValid: false,
1527
+ };
1528
+ let evidenceExport;
1529
+ try {
1530
+ evidenceExport = parseEvidenceExport(value);
1531
+ }
1532
+ catch {
1533
+ return invalid;
1534
+ }
1535
+ const sourceManifestValid = replayEvidenceManifest(evidenceExport.sourceManifest).valid;
1536
+ const exportDigestValid = evidenceExport.exportDigest === sha256Canonical(evidenceExportProjection(evidenceExport));
1537
+ let semanticsValid = false;
1538
+ try {
1539
+ semanticsValid =
1540
+ canonicalize(evidenceExport) ===
1541
+ canonicalize(createEvidenceExport({
1542
+ schemaVersion: "1.0.0",
1543
+ manifest: evidenceExport.sourceManifest,
1544
+ consumerRequest: evidenceExport.consumerRequest,
1545
+ }));
1546
+ }
1547
+ catch {
1548
+ semanticsValid = false;
1549
+ }
1550
+ return {
1551
+ valid: sourceManifestValid && exportDigestValid && semanticsValid,
1552
+ schemaValid: true,
1553
+ sourceManifestValid,
1554
+ exportDigestValid,
1555
+ semanticsValid,
1556
+ };
1557
+ }
1082
1558
  const BENCHMARK_PHASES = ["PREPARATION", "STARTUP", "COMPILE_OR_COLLECTION", "EXECUTION"];
1083
1559
  function benchmarkSourceBindingValid(request) {
1084
1560
  if (request.sourceManifest.decision.status !== "VERIFIED")