@actuarial-ts/compliance 0.5.0 → 0.6.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.
package/README.md CHANGED
@@ -1,96 +1,66 @@
1
1
  # @actuarial-ts/compliance
2
2
 
3
- The compliance-support layer of the actuarial-ts SDK: the part no
4
- calculator ships. It turns an analysis into the documentation the
5
- Actuarial Standards of Practice ask for.
6
-
7
- - **Estimate metadata** (ASOP 43): intended purpose and measure, gross/net
8
- basis, LAE treatment, and the accounting / valuation / review dates — as
9
- typed, validated fields instead of tribal knowledge.
10
- - **Assumption ledger** (ASOPs 41/43/56): an immutable record of every
11
- selection, distinguishing machine defaults from human or agent judgment;
12
- judgment entries require a rationale.
13
- - **Disclosure generator** (ASOP 41): renders a methods-assumptions-and-data
14
- appendix from the analysis itself — written to the "another qualified
15
- actuary could appraise it" bar, deterministic to the byte.
16
- - **Model cards** (ASOP 56): intended use, specification, key assumptions,
17
- known weaknesses, and sensitivities for every method the SDK ships (a
18
- cross-package sync test enforces the completeness, so the registry can
19
- never silently fall behind core) — the
20
- "basic understanding" content an actuary relying on vendor models must
21
- hold and disclose.
22
- - **Reproducibility bundles** (ASOP 21 / 56): canonical serialization of
23
- inputs, parameters, and results with an integrity tag, so an analysis
24
- re-runs identically years later for an auditor or examiner.
25
- - **Diagnostics provenance composition**: `createDiagnosticsProvenance`
26
- snapshots formula-pack/metric versions, executable-definition metadata,
27
- layer configuration, exposure basis and scale, sparse/age conventions,
28
- cutoffs, caller-selected filters/groups, and caller-owned input IDs/hashes.
29
- - **Actual-vs-expected roll-forward**: expected emergence from the prior
30
- valuation's pattern versus actual, by origin.
31
-
32
- Everything here is pure, deterministic, and browser-safe: no clock reads,
33
- no randomness, no node builtins. Identical inputs produce byte-identical
34
- documents.
35
-
36
- ## Quickstart
3
+ Documentation, judgment, provenance, and reproducibility primitives for actuarial-ts. The package is designed to support compliance work under applicable ASOPs; it neither determines compliance nor replaces the actuary’s review.
4
+
5
+ ```bash
6
+ npm install @actuarial-ts/compliance@0.6.1 @actuarial-ts/core@0.6.1 @actuarial-ts/data@0.6.1 @actuarial-ts/interchange@0.6.1
7
+ ```
8
+
9
+ Node 20+, ESM.
10
+
11
+ ## Diagnostic provenance
12
+
13
+ `createDiagnosticRunIdentity` accepts only an owner-authenticated, completed data-package run. It does not accept caller-restated formulas, filters, review status, or result identities.
37
14
 
38
15
  ```ts
39
- import { runChainLadder, runMack } from "@actuarial-ts/core";
40
- import {
41
- createLedger,
42
- recordAssumption,
43
- generateDisclosure,
44
- } from "@actuarial-ts/compliance";
45
-
46
- let ledger = createLedger();
47
- ledger = recordAssumption(ledger, {
48
- timestamp: "2026-01-05T10:05:00Z",
49
- actor: "actuary",
50
- field: "paid.tailFactor",
51
- value: 1.02,
52
- rationale: "Exponential-decay fit valid with R^2 0.97; judgmentally confirmed",
53
- source: "fitted",
54
- });
16
+ import { createBundle, createDiagnosticRunIdentity } from "@actuarial-ts/compliance";
55
17
 
56
- const cl = runChainLadder(paidTriangle, { selected, tailFactor: 1.02 });
57
- const mack = runMack(paidTriangle, { selected, tailFactor: 1.02 });
18
+ if (outcome.status !== "completed") throw new Error(`diagnostics blocked at ${outcome.stage}`);
58
19
 
59
- const markdown = generateDisclosure({
60
- metadata: {
61
- intendedPurpose: "Estimate unpaid claims for year-end statutory reporting",
62
- intendedMeasure: { kind: "central-estimate" },
63
- basis: { grossNet: "gross", laeTreatment: "dcc-only" },
64
- accountingDate: "2025-12-31",
65
- valuationDate: "2025-12-31",
66
- },
67
- methods: [
68
- { methodId: "chainLadder", basisLabel: "paid", parameters: { selected, tailFactor: 1.02 }, resultSummary: { ultimate: cl.totals.ultimate, unpaid: cl.totals.unpaid } },
69
- { methodId: "mack", basisLabel: "paid", resultSummary: { standardError: mack.totals.standardError } },
20
+ const provenance = await createDiagnosticRunIdentity({
21
+ completedRun: outcome,
22
+ inputArtifacts: [
23
+ { id: "loss-run", scope: "input", assurance: "sdk-computed", bytes: lossRunBytes },
24
+ { id: "exposures", scope: "input", assurance: "sdk-computed", bytes: exposureBytes },
25
+ { id: "source-archive", scope: "input", assurance: "caller-declared", algorithm: "sha256", value: archiveSha256 },
26
+ ],
27
+ preparationArtifacts: [
28
+ { id: "transform-script", scope: "preparation", assurance: "caller-declared", algorithm: "git-sha", value: transformCommit },
70
29
  ],
71
- ledger,
72
- sdkVersion: "0.5.0",
73
- generatedAt: "2026-01-05T10:15:00Z",
30
+ preparationLineage: [
31
+ { outputArtifactId: "loss-run", inputArtifactIds: ["source-archive"], transformationArtifactIds: ["transform-script"] },
32
+ ],
33
+ });
34
+
35
+ const bundle = createBundle({
36
+ inputs,
37
+ parameters,
38
+ results: outcome.result,
39
+ sdkVersions: {
40
+ "@actuarial-ts/core": provenance.manifest.engine.packages.core,
41
+ "@actuarial-ts/data": provenance.manifest.engine.packages.data,
42
+ "@actuarial-ts/compliance": provenance.manifest.engine.packages.compliance,
43
+ },
44
+ createdAt: "2026-09-03T00:00:00Z",
45
+ diagnosticRuns: [provenance],
46
+ wrap: { triangles: [], selections: [], results: [] },
74
47
  });
75
48
  ```
76
49
 
77
- Diagnostic numeric results remain independent of this package. When an audit
78
- record is needed, call `createDiagnosticsProvenance({ metrics, layers, ... })`
79
- and place the returned plain record in `createBundle(...).parameters` or an
80
- interchange document's `extensions`. Executable warning callbacks are excluded
81
- from the record; their metric definition version is retained. Hashing,
82
- timestamps, persistence, and signatures remain caller-owned.
50
+ SDK-computed evidence requires actual `Uint8Array` bytes and records SHA-256 plus exact byte length. Caller-declared digests remain explicitly unverified. All evidence is synchronously validated and copied before hashing. Source, dataset fallback, external transformation, layer-comparability rationale, and fail-override references must resolve to the correct artifact scope. Lineage must have unique producers, resolve completely, be acyclic, and contain no orphan evidence.
51
+
52
+ The manifest contains the complete normalized definition, preparation identity and input audit, filter, cutoffs, expected-grid identity, grouping, review identity, two-gate execution policy, artifact graph, and core/data/compliance versions. The provenance adds the authentic complete result and separate run, result-content, and run-result binding fingerprints. Creation verifies preparation integrity, regenerates review and both gates, reruns core, and compares normalized output before stamping.
53
+
54
+ The returned `VerifiedDiagnosticRunProvenance` is frozen and registered in private owner state. A cast, clone, or parsed JSON object cannot author a new bundle. Use `verifyDiagnosticRunIdentity(stored, sameRunAndEvidence)` to regenerate and authenticate stored provenance; it reports the first mismatching JSON path and returns regenerated authentic review text rather than trusting stored prose.
55
+
56
+ Wrapped bundles include one deduplicated typed `diagnostic-definition` document per definition and require the outer SDK versions/generator to agree with every run manifest. `verifyBundle` also recompiles serialized definitions and rechecks definition, review, result, run, and binding fingerprints plus the typed definition mirror; merely re-stamping inconsistent JSON cannot make it verify. FNV-1a/JCS tags are deterministic integrity aids, not cryptographic authentication.
57
+
58
+ Material host judgments worth recording in the assumption ledger include amount basis and limit application, expense treatment, missingness, exposure timing, period convention, filters/grouping, communicated scale, and any policy that permits a failed review. Helpers never invent an actuary’s rationale.
83
59
 
84
- ## The honest claim
60
+ The package also provides estimate metadata, assumption ledgers, ASOP No. 41 draft disclosure generation, ASOP No. 56 model cards, actual-versus-expected roll-forward, and canonical reproducibility bundles.
85
61
 
86
- The ASB does not approve, certify, or endorse software, and no software can
87
- be "ASOP-compliant" on its own — compliance is a property of a credentialed
88
- actuary's work in context. This package is **designed to support the
89
- actuary's compliance** with ASOP Nos. 41, 43, 23, 56, 21, and 20 by generating
90
- the disclosures, documentation, and audit artifacts those standards call
91
- for. The generated documents are draft support material for the responsible
92
- actuary to review, edit, and adopt.
62
+ See the [formula catalog](https://github.com/yerromnitsuj/actng/blob/v0.6.1/docs/reference/diagnostic-formulas.md) and [migration guide](https://github.com/yerromnitsuj/actng/blob/v0.6.1/docs/migrations/0.6-generalized-diagnostics.md).
93
63
 
94
64
  ## License
95
65
 
96
- Apache-2.0. Copyright 2026 Justin Morrey.
66
+ Apache-2.0. See LICENSE and NOTICE.
package/dist/bundle.d.ts CHANGED
@@ -26,7 +26,10 @@
26
26
  * responsibility for compliance remains with the credentialed actuary.
27
27
  */
28
28
  import { canonicalJson, fnv1a64 } from "@actuarial-ts/core";
29
- import type { BundleDoc, MethodResultDoc, SelectionDoc, StochasticResultDoc, TriangleDoc } from "@actuarial-ts/interchange";
29
+ import { BundleDoc, MethodResultDoc, SelectionDoc, StochasticResultDoc, TriangleDoc } from "@actuarial-ts/interchange";
30
+ import type { VerifiedDiagnosticRunProvenance } from "./diagnosticRun.js";
31
+ export { ComplianceError, COMPLIANCE_ERROR_CODES, type ComplianceErrorCode, } from "./errors.js";
32
+ export { COMPLIANCE_PACKAGE_VERSION } from "./version.js";
30
33
  export { canonicalJson, fnv1a64 };
31
34
  /**
32
35
  * The wrapped reproducibility bundle: the interchange BundleDoc (spec 3.2),
@@ -44,13 +47,6 @@ export type WrappedBundleDoc = BundleDoc;
44
47
  * of this package. Add the code here when introducing a new throw.
45
48
  * (UNSUPPORTED_VALUE moved to core's registry with canonicalJson in 0.2.0.)
46
49
  */
47
- export declare const COMPLIANCE_ERROR_CODES: readonly ["BAD_BUNDLE", "BAD_CDF", "MISSING_RATIONALE"];
48
- export type ComplianceErrorCode = (typeof COMPLIANCE_ERROR_CODES)[number];
49
- /** Thrown for invalid compliance input (bad bundles, judgment without rationale, non-positive CDFs). */
50
- export declare class ComplianceError extends Error {
51
- readonly code: ComplianceErrorCode;
52
- constructor(code: ComplianceErrorCode, message: string);
53
- }
54
50
  /**
55
51
  * The interchange version the wrapped form is written under. Kept in literal
56
52
  * sync with `@actuarial-ts/interchange`'s INTERCHANGE_SPEC_VERSION (the dep
@@ -58,14 +54,13 @@ export declare class ComplianceError extends Error {
58
54
  * test parses the emitted doc with the real interchange parser, which
59
55
  * refuses a wrong-major version — drift fails loudly.
60
56
  */
61
- export declare const WRAPPED_BUNDLE_INTERCHANGE_VERSION = "1.0.0";
57
+ export declare const WRAPPED_BUNDLE_INTERCHANGE_VERSION = "1.1.0";
62
58
  /**
63
59
  * This package's version, stamped into a wrapped bundle's `generator`
64
60
  * envelope field. A sync test asserts it matches package.json so it cannot
65
61
  * silently drift (mirroring interchange's INTERCHANGE_PACKAGE_VERSION
66
62
  * discipline).
67
63
  */
68
- export declare const COMPLIANCE_PACKAGE_VERSION = "0.5.0";
69
64
  /**
70
65
  * The interchange mirror for a wrapped bundle (spec 3.2): the triangles the
71
66
  * analysis consumed, the selections it applied, and the results it produced,
@@ -113,6 +108,8 @@ export interface CreateBundleInput {
113
108
  name: string;
114
109
  version: string;
115
110
  };
111
+ /** Authenticated diagnostic runs included in the canonical body and, when wrapped, as typed definition documents. */
112
+ diagnosticRuns?: readonly VerifiedDiagnosticRunProvenance[];
116
113
  }
117
114
  export interface ReproducibilityBundle {
118
115
  /** Canonical JSON of the full bundle body; the reproducibility record itself. */
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACZ,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;AAElC;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,yDAIzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,wGAAwG;AACxG,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;gBACvB,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM;CAKvD;AAID;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,UA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,EAAE,OAAO,CAAC;IACpB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC;AA4OD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,qBAAqB,GAAG,gBAAgB,EAChD,YAAY,EAAE,OAAO,GACpB,kBAAkB,CAIpB"}
package/dist/bundle.js CHANGED
@@ -25,27 +25,19 @@
25
25
  * ASOP No. 41 (documentation and reproducibility of the analysis);
26
26
  * responsibility for compliance remains with the credentialed actuary.
27
27
  */
28
- import { canonicalJson, fnv1a64 } from "@actuarial-ts/core";
28
+ import { canonicalJson, fnv1a64, isDiagnosticPlainRecord, } from "@actuarial-ts/core";
29
+ import { INTERCHANGE_SPEC_VERSION, diagnosticDefinitionToDoc, docToDiagnosticDefinition, } from "@actuarial-ts/interchange";
30
+ import { assertVerifiedDiagnosticRunProvenance, serializedDiagnosticRunMismatch, verifiedDefinitionForBundle, } from "./diagnosticRun.js";
31
+ import { ComplianceError } from "./errors.js";
32
+ import { COMPLIANCE_PACKAGE_VERSION } from "./version.js";
33
+ export { ComplianceError, COMPLIANCE_ERROR_CODES, } from "./errors.js";
34
+ export { COMPLIANCE_PACKAGE_VERSION } from "./version.js";
29
35
  export { canonicalJson, fnv1a64 };
30
36
  /**
31
37
  * Every machine-readable code a ComplianceError can carry, across all modules
32
38
  * of this package. Add the code here when introducing a new throw.
33
39
  * (UNSUPPORTED_VALUE moved to core's registry with canonicalJson in 0.2.0.)
34
40
  */
35
- export const COMPLIANCE_ERROR_CODES = [
36
- "BAD_BUNDLE",
37
- "BAD_CDF",
38
- "MISSING_RATIONALE",
39
- ];
40
- /** Thrown for invalid compliance input (bad bundles, judgment without rationale, non-positive CDFs). */
41
- export class ComplianceError extends Error {
42
- code;
43
- constructor(code, message) {
44
- super(message);
45
- this.name = "ComplianceError";
46
- this.code = code;
47
- }
48
- }
49
41
  /**
50
42
  * The interchange version the wrapped form is written under. Kept in literal
51
43
  * sync with `@actuarial-ts/interchange`'s INTERCHANGE_SPEC_VERSION (the dep
@@ -53,14 +45,7 @@ export class ComplianceError extends Error {
53
45
  * test parses the emitted doc with the real interchange parser, which
54
46
  * refuses a wrong-major version — drift fails loudly.
55
47
  */
56
- export const WRAPPED_BUNDLE_INTERCHANGE_VERSION = "1.0.0";
57
- /**
58
- * This package's version, stamped into a wrapped bundle's `generator`
59
- * envelope field. A sync test asserts it matches package.json so it cannot
60
- * silently drift (mirroring interchange's INTERCHANGE_PACKAGE_VERSION
61
- * discipline).
62
- */
63
- export const COMPLIANCE_PACKAGE_VERSION = "0.5.0";
48
+ export const WRAPPED_BUNDLE_INTERCHANGE_VERSION = INTERCHANGE_SPEC_VERSION;
64
49
  export function createBundle(input) {
65
50
  const body = {
66
51
  createdAt: input.createdAt,
@@ -71,6 +56,39 @@ export function createBundle(input) {
71
56
  };
72
57
  if (input.seeds !== undefined)
73
58
  body["seeds"] = input.seeds;
59
+ if (input.diagnosticRuns !== undefined) {
60
+ for (const run of input.diagnosticRuns)
61
+ assertVerifiedDiagnosticRunProvenance(run);
62
+ const seenBindings = new Set();
63
+ for (const [runIndex, run] of input.diagnosticRuns.entries()) {
64
+ if (seenBindings.has(run.runResultFingerprint))
65
+ throw new ComplianceError("BAD_DIAGNOSTIC_RUN", "Duplicate diagnostic run-result fingerprint", `$.diagnosticRuns[${runIndex}].runResultFingerprint`);
66
+ seenBindings.add(run.runResultFingerprint);
67
+ }
68
+ if (input.diagnosticRuns.length > 0) {
69
+ if (!isDiagnosticPlainRecord(input.sdkVersions))
70
+ throw new ComplianceError("BAD_DIAGNOSTIC_RUN", "Diagnostic bundles require a plain SDK-version map", "$.sdkVersions");
71
+ const expected = input.diagnosticRuns[0].manifest.engine.packages;
72
+ for (const [runIndex, run] of input.diagnosticRuns.entries()) {
73
+ if (canonicalJson(run.manifest.engine.packages) !==
74
+ canonicalJson(expected))
75
+ throw new ComplianceError("BAD_DIAGNOSTIC_RUN", "Diagnostic runs disagree on SDK package versions", `$.diagnosticRuns[${runIndex}].manifest.engine.packages`);
76
+ }
77
+ for (const [name, version] of Object.entries({
78
+ "@actuarial-ts/core": expected.core,
79
+ "@actuarial-ts/data": expected.data,
80
+ "@actuarial-ts/compliance": expected.compliance,
81
+ }))
82
+ if (input.sdkVersions[name] !== version)
83
+ throw new ComplianceError("BAD_DIAGNOSTIC_RUN", `Outer sdkVersions must record ${name} at ${version}`, `$.sdkVersions.${name}`);
84
+ if (input.wrap !== undefined &&
85
+ input.generator !== undefined &&
86
+ (input.generator.name !== "@actuarial-ts/compliance" ||
87
+ input.generator.version !== COMPLIANCE_PACKAGE_VERSION))
88
+ throw new ComplianceError("BAD_DIAGNOSTIC_RUN", "Wrapped diagnostic bundles require the actual compliance generator stamp", "$.generator");
89
+ }
90
+ body["diagnosticRuns"] = input.diagnosticRuns;
91
+ }
74
92
  const payload = canonicalJson(body);
75
93
  const inner = { payload, hash: fnv1a64(payload) };
76
94
  if (input.wrap === undefined)
@@ -78,18 +96,43 @@ export function createBundle(input) {
78
96
  // The inner record is carried opaquely as the `bundle` segment; the outer
79
97
  // tag is fnv1a64(canonicalJson({ bundle, interchange })) — exactly
80
98
  // interchange's semanticBodyOf for kind "bundle" (spec 3.2).
81
- const bundleSegment = { hash: inner.hash, payload: inner.payload };
99
+ const bundleSegment = {
100
+ hash: inner.hash,
101
+ payload: inner.payload,
102
+ };
103
+ const definitions = new Map();
104
+ for (const run of input.diagnosticRuns ?? []) {
105
+ const compiled = verifiedDefinitionForBundle(run);
106
+ definitions.set(run.definition.identities.definition, diagnosticDefinitionToDoc(compiled, {
107
+ createdAt: input.createdAt,
108
+ generator: {
109
+ name: "@actuarial-ts/compliance",
110
+ version: COMPLIANCE_PACKAGE_VERSION,
111
+ },
112
+ }));
113
+ }
82
114
  const interchange = {
83
115
  triangles: [...input.wrap.triangles],
84
116
  selections: [...input.wrap.selections],
85
117
  results: [...input.wrap.results],
118
+ ...(definitions.size === 0
119
+ ? {}
120
+ : {
121
+ diagnosticDefinitions: [...definitions.values()].sort((a, b) => a.diagnosticDefinition.identities.definition <
122
+ b.diagnosticDefinition.identities.definition
123
+ ? -1
124
+ : 1),
125
+ }),
86
126
  };
87
127
  const wrapped = {
88
128
  interchangeVersion: WRAPPED_BUNDLE_INTERCHANGE_VERSION,
89
129
  kind: "bundle",
90
130
  generator: input.generator
91
131
  ? { ...input.generator }
92
- : { name: "@actuarial-ts/compliance", version: COMPLIANCE_PACKAGE_VERSION },
132
+ : {
133
+ name: "@actuarial-ts/compliance",
134
+ version: COMPLIANCE_PACKAGE_VERSION,
135
+ },
93
136
  createdAt: input.createdAt,
94
137
  bundle: bundleSegment,
95
138
  interchange,
@@ -106,10 +149,13 @@ function isPlainObject(value) {
106
149
  /** First differing path between two canonicalizable structures, or null when equal. */
107
150
  function firstDifference(stored, rerun, path) {
108
151
  if (isPlainObject(stored) && isPlainObject(rerun)) {
109
- const keys = [...new Set([...Object.keys(stored), ...Object.keys(rerun)])].sort();
152
+ const keys = [
153
+ ...new Set([...Object.keys(stored), ...Object.keys(rerun)]),
154
+ ].sort();
110
155
  for (const key of keys) {
111
156
  const keyPath = `${path}.${key}`;
112
- if (!(key in stored) || !(key in rerun))
157
+ if (!Object.prototype.hasOwnProperty.call(stored, key) ||
158
+ !Object.prototype.hasOwnProperty.call(rerun, key))
113
159
  return keyPath;
114
160
  const diff = firstDifference(stored[key], rerun[key], keyPath);
115
161
  if (diff !== null)
@@ -148,12 +194,44 @@ function verifyUnwrapped(bundle, rerunResults) {
148
194
  if (!isPlainObject(stored) || !("results" in stored)) {
149
195
  throw new ComplianceError("BAD_BUNDLE", 'bundle payload has no "results" segment');
150
196
  }
197
+ if (Object.prototype.hasOwnProperty.call(stored, "diagnosticRuns")) {
198
+ if (!Array.isArray(stored["diagnosticRuns"]))
199
+ throw new ComplianceError("BAD_BUNDLE", 'bundle payload "diagnosticRuns" must be an array');
200
+ const seen = new Set();
201
+ for (const [index, run] of stored["diagnosticRuns"].entries()) {
202
+ const path = `$.diagnosticRuns[${index}]`;
203
+ const mismatch = serializedDiagnosticRunMismatch(run, path);
204
+ if (mismatch !== null)
205
+ return { reproduced: false, mismatchPath: mismatch };
206
+ const fingerprint = run["runResultFingerprint"];
207
+ if (seen.has(fingerprint))
208
+ return {
209
+ reproduced: false,
210
+ mismatchPath: `${path}.runResultFingerprint`,
211
+ };
212
+ seen.add(fingerprint);
213
+ const packages = run.manifest.engine
214
+ .packages;
215
+ for (const [name, shortName] of [
216
+ ["@actuarial-ts/core", "core"],
217
+ ["@actuarial-ts/data", "data"],
218
+ ["@actuarial-ts/compliance", "compliance"],
219
+ ]) {
220
+ if (!isPlainObject(stored["sdkVersions"]) ||
221
+ stored["sdkVersions"][name] !== packages?.[shortName])
222
+ return { reproduced: false, mismatchPath: `$.sdkVersions.${name}` };
223
+ }
224
+ }
225
+ }
151
226
  const storedResults = stored["results"];
152
227
  const rerunCanonical = canonicalJson(rerunResults);
153
228
  const storedCanonical = canonicalJson(storedResults);
154
229
  if (rerunCanonical === storedCanonical)
155
230
  return { reproduced: true };
156
- return { reproduced: false, mismatchPath: firstDifference(storedResults, rerunResults, "$") ?? "$" };
231
+ return {
232
+ reproduced: false,
233
+ mismatchPath: firstDifference(storedResults, rerunResults, "$") ?? "$",
234
+ };
157
235
  }
158
236
  function isWrappedBundleDoc(value) {
159
237
  return value.kind === "bundle";
@@ -173,12 +251,85 @@ function verifyWrapped(doc, rerunResults) {
173
251
  // exactly interchange's semanticBodyOf for kind "bundle" (spec 3.2).
174
252
  const expected = fnv1a64(canonicalJson({ bundle: doc.bundle, interchange: doc.interchange }));
175
253
  const actual = typeof doc.integrity === "string" ? doc.integrity : null;
176
- const outerIntegrity = { ok: expected === actual, expected, actual };
254
+ const outerIntegrity = {
255
+ ok: expected === actual,
256
+ expected,
257
+ actual,
258
+ };
177
259
  if (!outerIntegrity.ok) {
178
260
  return { reproduced: false, mismatchPath: "$.integrity", outerIntegrity };
179
261
  }
180
- const inner = { payload: innerRaw["payload"], hash: innerRaw["hash"] };
181
- return { ...verifyUnwrapped(inner, rerunResults), outerIntegrity };
262
+ const inner = {
263
+ payload: innerRaw["payload"],
264
+ hash: innerRaw["hash"],
265
+ };
266
+ const innerResult = verifyUnwrapped(inner, rerunResults);
267
+ if (!innerResult.reproduced)
268
+ return { ...innerResult, outerIntegrity };
269
+ const body = JSON.parse(inner.payload);
270
+ const runs = Array.isArray(body["diagnosticRuns"])
271
+ ? body["diagnosticRuns"]
272
+ : [];
273
+ const docs = doc.interchange
274
+ .diagnosticDefinitions;
275
+ if (runs.length > 0) {
276
+ const packages = runs[0].manifest.engine
277
+ .packages;
278
+ if (doc.generator?.name !== "@actuarial-ts/compliance")
279
+ return {
280
+ reproduced: false,
281
+ mismatchPath: "$.generator.name",
282
+ outerIntegrity,
283
+ };
284
+ if (doc.generator.version !== packages.compliance)
285
+ return {
286
+ reproduced: false,
287
+ mismatchPath: "$.generator.version",
288
+ outerIntegrity,
289
+ };
290
+ if (!Array.isArray(docs))
291
+ return {
292
+ reproduced: false,
293
+ mismatchPath: "$.interchange.diagnosticDefinitions",
294
+ outerIntegrity,
295
+ };
296
+ const expected = new Set(runs.map((run) => run.definition.identities.definition));
297
+ const actual = new Set();
298
+ for (const [index, raw] of docs.entries()) {
299
+ try {
300
+ const document = raw;
301
+ const integrity = docToDiagnosticDefinition(document).definition.definitionIntegrity;
302
+ if (actual.has(integrity))
303
+ return {
304
+ reproduced: false,
305
+ mismatchPath: `$.interchange.diagnosticDefinitions[${index}]`,
306
+ outerIntegrity,
307
+ };
308
+ if (document.generator.name !== doc.generator.name ||
309
+ document.generator.version !== doc.generator.version)
310
+ return {
311
+ reproduced: false,
312
+ mismatchPath: `$.interchange.diagnosticDefinitions[${index}].generator`,
313
+ outerIntegrity,
314
+ };
315
+ actual.add(integrity);
316
+ }
317
+ catch {
318
+ return {
319
+ reproduced: false,
320
+ mismatchPath: `$.interchange.diagnosticDefinitions[${index}]`,
321
+ outerIntegrity,
322
+ };
323
+ }
324
+ }
325
+ if (canonicalJson([...actual].sort()) !== canonicalJson([...expected].sort()))
326
+ return {
327
+ reproduced: false,
328
+ mismatchPath: "$.interchange.diagnosticDefinitions",
329
+ outerIntegrity,
330
+ };
331
+ }
332
+ return { ...innerResult, outerIntegrity };
182
333
  }
183
334
  /**
184
335
  * Verifies a re-run against a bundle: canonicalizes `rerunResults` and
@@ -199,6 +350,8 @@ function verifyWrapped(doc, rerunResults) {
199
350
  * serialized cannot be verified.
200
351
  */
201
352
  export function verifyBundle(bundle, rerunResults) {
202
- return isWrappedBundleDoc(bundle) ? verifyWrapped(bundle, rerunResults) : verifyUnwrapped(bundle, rerunResults);
353
+ return isWrappedBundleDoc(bundle)
354
+ ? verifyWrapped(bundle, rerunResults)
355
+ : verifyUnwrapped(bundle, rerunResults);
203
356
  }
204
357
  //# sourceMappingURL=bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAS5D,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;AAclC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,YAAY;IACZ,SAAS;IACT,mBAAmB;CACX,CAAC;AAIX,wGAAwG;AACxG,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,IAAI,CAAsB;IACnC,YAAY,IAAyB,EAAE,OAAe;QACpD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAID;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,OAAO,CAAC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