@actuarial-ts/compliance 0.7.0 → 0.7.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
@@ -3,14 +3,14 @@
3
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
4
 
5
5
  ```bash
6
- npm install @actuarial-ts/compliance@0.7.0 @actuarial-ts/core@0.7.0 @actuarial-ts/data@0.7.0 @actuarial-ts/interchange@0.7.0
6
+ npm install @actuarial-ts/compliance@0.7.1 @actuarial-ts/core@0.7.1 @actuarial-ts/data@0.7.1 @actuarial-ts/interchange@0.7.1
7
7
  ```
8
8
 
9
9
  Node 20+, ESM.
10
10
 
11
11
  ## Diagnostic provenance
12
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.
13
+ The example below uses eager provenance. `createDiagnosticRunIdentity` accepts only an owner-authenticated, completed eager data-package run. It does not accept caller-restated formulas, filters, review status, or result identities. Compact runs use the separate workflow below.
14
14
 
15
15
  ```ts
16
16
  import { createBundle, createDiagnosticRunIdentity } from "@actuarial-ts/compliance";
@@ -59,11 +59,48 @@ Material host judgments worth recording in the assumption ledger include amount
59
59
 
60
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.
61
61
 
62
- See the [formula catalog](https://github.com/yerromnitsuj/actng/blob/v0.7.0/docs/reference/diagnostic-formulas.md) and [migration guide](https://github.com/yerromnitsuj/actng/blob/v0.7.0/docs/migrations/0.6-generalized-diagnostics.md).
62
+ See the [formula catalog](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/reference/diagnostic-formulas.md) and [migration guide](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/migrations/0.6-generalized-diagnostics.md).
63
63
 
64
64
  ## Compact provenance and replay streams
65
65
 
66
- Version 0.7.0 adds separately authenticated compact provenance and a versioned replay stream. They retain complete audit evidence while avoiding archive-sized identity objects/strings; this is not a dataset-capacity certification. In the source checkout, `docs/reference/diagnostic-replay-stream.md` describes the APIs, host resource limits, wire version, independent verification, and assurance boundaries; that reference document is not part of the npm package. Existing eager provenance and interchange BundleDoc APIs remain unchanged.
66
+ Introduced in 0.7.0, this separate path retains complete audit evidence without
67
+ requiring expanded manifest/result objects or one archive-sized identity string.
68
+ It does not certify dataset capacity or total application memory use. Existing
69
+ eager provenance and interchange `BundleDoc` APIs remain available.
70
+
71
+ | Step | Public API and host responsibility |
72
+ |---|---|
73
+ | Produce a genuine completed run | Use the compact validated gateway in `@actuarial-ts/data`; handle both review and metric blocks. |
74
+ | Hash actual artifact bytes | `digestDiagnosticArtifactChunks` returns an authenticated computed digest. Keep a repeatable byte source; hashes without retained original bytes must remain caller-declared. |
75
+ | Bind run and artifact evidence | `createCompactDiagnosticRunIdentity` accepts the completed compact run, genuine computed receipts or explicitly declared evidence, and complete preparation lineage. |
76
+ | Write complete replay evidence | Consume `writeDiagnosticReplayStream` into a temporary host destination and publish it only after successful completion. `openArtifact` must reopen the bytes matching each computed digest. |
77
+ | Independently verify | `verifyDiagnosticReplayStream` requires explicit host resource limits, reruns the recorded input, and compares complete canonical evidence before issuing a receipt. Success requires the trailer and EOF. |
78
+
79
+ The host owns file/network I/O, pending-I/O cancellation, retention, and access
80
+ control. Supply the same abort signal to host I/O and the SDK. Cancellation is
81
+ cooperative between chunks/phases, not interruption of synchronous calculation.
82
+ Use summaries/pages for routine views; materializing all findings or identity
83
+ documents afterward can erase the representation's memory benefit.
84
+
85
+ `VerifiedCompactDiagnosticRunProvenance` is a distinct owner-authenticated
86
+ object, not an eager `VerifiedDiagnosticRunProvenance` or a serializable
87
+ authorization token. It cannot be cast into `createBundle`, the eager verifier,
88
+ or the current diagnostic agent executor. The stream format is
89
+ `diagnostic-replay/1`, separate from interchange wire `1.1.0`; it is not a
90
+ single JSON document or a `BundleDoc`.
91
+
92
+ Replay identities include the producing SDK's engine versions. Preserve those
93
+ exact package versions with stored evidence and use a matching runtime for
94
+ verification. Stream version 1 does not guarantee cross-SDK-version replay;
95
+ in particular, a patch upgrade must not be assumed to verify an older stream.
96
+ Successful replay establishes internal reproducibility, not source authenticity,
97
+ a digital signature, correct claim-level capping, or actuarial correctness.
98
+
99
+ The runnable [compact adoption guide](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/migrations/0.7-compact-diagnostics.md)
100
+ and complete [replay reference](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/reference/diagnostic-replay-stream.md)
101
+ document ownership, artifact bytes, paging, framing, resource limits, and
102
+ assurance boundaries. These repository guides are linked here for npm users;
103
+ the guide files themselves are not shipped inside the package.
67
104
 
68
105
  ## License
69
106
 
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const COMPLIANCE_PACKAGE_VERSION = "0.7.0";
1
+ export declare const COMPLIANCE_PACKAGE_VERSION = "0.7.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const COMPLIANCE_PACKAGE_VERSION = "0.7.0";
1
+ export const COMPLIANCE_PACKAGE_VERSION = "0.7.1";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actuarial-ts/compliance",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "ASOP-compliance-support layer for the actuarial-ts SDK: estimate metadata, assumption ledger, disclosures, model cards, diagnostics provenance, reproducibility bundles, and actual-vs-expected roll-forward. Responsibility for compliance remains with the credentialed actuary.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -47,9 +47,9 @@
47
47
  "prepublishOnly": "node ../../tools/release/verify-release-attestation.mjs @actuarial-ts/compliance"
48
48
  },
49
49
  "dependencies": {
50
- "@actuarial-ts/core": "^0.7.0",
51
- "@actuarial-ts/data": "^0.7.0",
52
- "@actuarial-ts/interchange": "^0.7.0"
50
+ "@actuarial-ts/core": "^0.7.1",
51
+ "@actuarial-ts/data": "^0.7.1",
52
+ "@actuarial-ts/interchange": "^0.7.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^22.10.5",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const COMPLIANCE_PACKAGE_VERSION = "0.7.0";
1
+ export const COMPLIANCE_PACKAGE_VERSION = "0.7.1";