@actuarial-ts/data 0.4.0 → 0.6.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 (42) hide show
  1. package/README.md +45 -127
  2. package/dist/casualtyDiagnosticReview.d.ts +46 -0
  3. package/dist/casualtyDiagnosticReview.d.ts.map +1 -0
  4. package/dist/casualtyDiagnosticReview.js +23 -0
  5. package/dist/casualtyDiagnosticReview.js.map +1 -0
  6. package/dist/diagnosticDefinition.d.ts +4 -0
  7. package/dist/diagnosticDefinition.d.ts.map +1 -0
  8. package/dist/diagnosticDefinition.js +6 -0
  9. package/dist/diagnosticDefinition.js.map +1 -0
  10. package/dist/diagnosticInput.d.ts +97 -13
  11. package/dist/diagnosticInput.d.ts.map +1 -1
  12. package/dist/diagnosticInput.js +58 -46
  13. package/dist/diagnosticInput.js.map +1 -1
  14. package/dist/diagnosticPreparedReview.d.ts +43 -0
  15. package/dist/diagnosticPreparedReview.d.ts.map +1 -0
  16. package/dist/diagnosticPreparedReview.js +58 -0
  17. package/dist/diagnosticPreparedReview.js.map +1 -0
  18. package/dist/index.d.ts +4 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +4 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/review.d.ts +15 -1
  23. package/dist/review.d.ts.map +1 -1
  24. package/dist/review.js +3 -2
  25. package/dist/review.js.map +1 -1
  26. package/dist/version.d.ts +2 -0
  27. package/dist/version.d.ts.map +1 -0
  28. package/dist/version.js +2 -0
  29. package/dist/version.js.map +1 -0
  30. package/package.json +3 -3
  31. package/src/casualtyDiagnosticReview.ts +17 -0
  32. package/src/diagnosticDefinition.ts +6 -0
  33. package/src/diagnosticInput.ts +61 -66
  34. package/src/diagnosticPreparedReview.ts +39 -0
  35. package/src/index.ts +4 -1
  36. package/src/review.ts +18 -3
  37. package/src/version.ts +1 -0
  38. package/dist/diagnosticReview.d.ts +0 -68
  39. package/dist/diagnosticReview.d.ts.map +0 -1
  40. package/dist/diagnosticReview.js +0 -370
  41. package/dist/diagnosticReview.js.map +0 -1
  42. package/src/diagnosticReview.ts +0 -547
package/README.md CHANGED
@@ -1,148 +1,66 @@
1
1
  # @actuarial-ts/data
2
2
 
3
- Data ingestion and ASOP No. 23 data-quality review for the
4
- [actuarial-ts](../core) SDK. Pure functions, fully typed, with runtime schemas
5
- at object boundaries.
6
-
7
- - `parseCsv(text)` — minimal RFC 4180-subset CSV parser (quoted fields,
8
- escaped quotes, embedded commas/newlines, BOM, CRLF/LF); the result's
9
- `rowLines` gives each row's 1-based physical start line in the file.
10
- - `parseLossRunCsv(text)` — loss-run import to `ClaimSnapshot[]` with
11
- per-row validation errors (errors cite 1-based physical file lines,
12
- header = line 1).
13
- - `annualDevelopmentToClaimSnapshots(rows, options)` — converts claim
14
- valuations known only to annual precision without hiding the derived-date,
15
- report-year, or duplicate-row conventions.
16
- - `parseExposureCsv(text)` — imports earned premium and/or exposure units by
17
- origin; extra source measures remain extra rather than being relabeled.
18
- - `triangleFromLongFormat(rows, { kind })` — pivots long-format
19
- `(origin, age, value)` rows into a `Triangle`.
20
- - `reviewClaimData(claims, { asOfDate? })` / `reviewTriangles(paid, incurred)`
21
- — the ASOP No. 23-oriented review; every check performed is listed in the
22
- report, pass or fail, so the actuary's disclosure can state what WAS
23
- reviewed, not just what was found.
24
- - `validateDiagnosticDataset(value)` /
25
- `validateAndReconcileDiagnosticExposures(value)` /
26
- `runValidatedMetricDiagnostics(...)` — Zod-validated boundaries plus
27
- stable-key exposure reconciliation for generic diagnostic rows.
28
- - `reviewDiagnosticData(snapshots, exposures, options)` — quarterly aggregate,
29
- exposure, layer, grouping, and cached-formula checks using the same
30
- `DataReviewReport` status contract, with optional structured finding context.
31
-
32
- ## Checks
33
-
34
- ### `reviewClaimData`
35
-
36
- | id | status when found | what it finds |
37
- |----|-------------------|---------------|
38
- | `negative-paid` | fail | cumulative paid < 0 |
39
- | `negative-case` | warning | case reserve < 0 (legitimate but rare) |
40
- | `paid-decreasing` | fail | cumulative paid decreasing across a claim's snapshots ordered by evaluation date |
41
- | `date-order` | fail | report before accident, or evaluation before report |
42
- | `duplicate-snapshot` | fail | same claimId + evaluationDate twice |
43
- | `future-dated` | fail | any claim date after `asOfDate` (not evaluated when `asOfDate` is omitted) |
44
- | `closed-with-case` | warning | closed claim still carrying case reserve |
45
-
46
- ### `reviewTriangles`
47
-
48
- | id | status when found | what it finds |
49
- |----|-------------------|---------------|
50
- | `shape-mismatch` | fail | origins/ages differ between paid and incurred (blocks cell-level checks, which stay listed as "not evaluated") |
51
- | `paid-exceeds-incurred` | fail | paid > incurred in a cell (1e-9 relative tolerance) |
52
- | `negative-incremental-paid` | warning | cumulative paid decreasing along a row (salvage/subrogation makes this legal but reportable) |
53
- | `negative-incremental-incurred` | warning | cumulative incurred decreasing along a row |
54
- | `interior-missing` | warning | a null cell with observed cells both before and after it in the same row |
55
-
56
- ## Quickstart
3
+ Typed ingestion, preparation, and data-review boundaries for the actuarial-ts SDK. It supports loss-run/exposure CSVs, annual claim-development adaptation, triangle assembly, and generalized diagnostic review designed to support ASOP No. 23 work.
57
4
 
58
- ```ts
59
- import { buildTriangles } from "@actuarial-ts/core";
60
- import { parseLossRunCsv, reviewClaimData, reviewTriangles } from "@actuarial-ts/data";
5
+ ```bash
6
+ npm install @actuarial-ts/data@0.6.0 @actuarial-ts/core@0.6.0
7
+ ```
61
8
 
62
- const { claims, errors } = parseLossRunCsv(csvText);
63
- if (errors.length > 0) console.warn(errors); // caller decides: abort or proceed
9
+ Node 20+, ESM. Responsibility for the review and resulting actuarial work remains with the actuary.
64
10
 
65
- const claimReview = reviewClaimData(claims, { asOfDate: "2023-12-31" });
11
+ ## Existing ingestion and triangle review
66
12
 
67
- const { paid, incurred } = buildTriangles(claims, {
68
- cadence: "annual",
69
- asOfDate: "2023-12-31",
70
- });
71
- const triangleReview = reviewTriangles(paid, incurred);
72
- ```
13
+ `parseLossRunCsv`, `parseExposureCsv`, `adaptAnnualClaimDevelopment`, `triangleFromLongFormat`, `reviewClaimData`, and `reviewTriangles` return structured errors/findings rather than silently cleaning source records. Physical source-line numbers are retained where available.
73
14
 
74
- ### Annual-precision claim data
15
+ ## Diagnostic run boundary
75
16
 
76
- Do not label a source year as an exact accident or evaluation date. Normalize
77
- the source fields to annual rows, then let the adapter derive calendar-year-end
78
- compatibility dates and return the convention as a disclosure finding:
17
+ Use `validateDiagnosticRunInput` before `runValidatedMetricDiagnostics`. Validation parses the entire configuration atomically and compiles its definition; no partially validated run escapes.
79
18
 
80
19
  ```ts
81
- import { annualDevelopmentToClaimSnapshots } from "@actuarial-ts/data";
82
-
83
- const conversion = annualDevelopmentToClaimSnapshots(
84
- [{
85
- claimId: "1995-000001",
86
- originYear: 1995,
87
- evaluationYear: 1996,
88
- paidToDate: 100,
89
- incurredToDate: 140,
90
- status: "open",
20
+ import { runValidatedMetricDiagnostics, validateDiagnosticRunInput } from "@actuarial-ts/data";
21
+
22
+ const validated = validateDiagnosticRunInput({
23
+ definition,
24
+ losses: [{
25
+ rowType: "aggregate",
26
+ recordId: "loss-1",
27
+ sourceGroup: "fleet-a",
28
+ origin: "2025",
29
+ valuation: "2025-03-31",
30
+ complete: true,
31
+ source: { artifactId: "loss-run", sourceRow: 2 },
32
+ measures: { reported: 4, "gross-paid": 100, "gross-incurred": 160 },
91
33
  }],
92
- { duplicatePolicy: "reject" },
93
- );
94
-
95
- console.log(conversion.conventions.derivedDateConvention); // calendar-year-end
96
- console.log(conversion.findings); // date and inferred-report-year disclosures
97
- ```
98
-
99
- The default duplicate policy is `reject`. Selecting `combine` is an explicit
100
- judgment: same-claim/same-year paid and incurred values are summed, and the
101
- combined record is open if any component is open. The adapter reports how many
102
- groups and rows were combined.
103
-
104
- ### Exposure data
105
-
106
- `parseExposureCsv` requires `origin` plus `earned_premium`, `exposure_units`,
107
- or both. Each numeric measure may be blank independently. For example, a
108
- source containing insurance-years and gross written premium should expose only
109
- the insurance-years to the SDK unless an earned-premium transformation has
110
- actually been performed:
34
+ exposures: [{
35
+ key: "exp-2025",
36
+ sourceGroup: "fleet-a",
37
+ origin: "2025",
38
+ measureId: "earned-vehicle-years",
39
+ value: 20,
40
+ complete: true,
41
+ source: { artifactId: "exposures", sourceRow: 2 },
42
+ }],
43
+ filter: { sourceGroups: ["fleet-a"], instanceIds: ["casualty/count/reported-frequency"] },
44
+ groupMap: { "fleet-a": "all-fleet" },
45
+ groupDimensions: { "all-fleet": { region: "all" } },
46
+ runPresetId: "annual-review-v1",
47
+ datasetArtifactId: "loss-run",
48
+ });
111
49
 
112
- ```csv
113
- origin,exposure_units,gross_written_premium
114
- 2024,125000,42000000
50
+ const outcome = runValidatedMetricDiagnostics(validated);
51
+ if (outcome.status !== "completed") console.error(outcome.stage, outcome.review.report);
115
52
  ```
116
53
 
117
- The extra GWP column is retained in the source file but ignored by the parser;
118
- it is never silently loaded as `earnedPremium`.
119
-
120
- ### Quarterly diagnostic review
54
+ Loss rows use `sourceGroup`; output `group` exists only after explicit mapping. Exposure observations are long-form and measure-specific. `origin-static` exposures ignore valuation filters but honor source-group/origin selection; `valuation-specific` exposures require and honor a valuation. The pre-exclusion audit retains invalid, cutoff, filtered, and retained inputs. Omitted and explicitly empty expected-cell grids remain distinct.
121
55
 
122
- `reviewDiagnosticData` lists all 19 stable codes in
123
- `DIAGNOSTIC_REVIEW_CHECK_CODES`. The suite covers duplicate aggregate and
124
- exposure keys; invalid or mismatched development ages; valuation-before-origin;
125
- count identities; paid/incurred and cumulative movement checks; reopen
126
- signals; layer ordering and control totals; both sides of the loss/exposure
127
- join; zero/incomplete exposure; grouping consistency; and lightweight cached
128
- formula provenance.
56
+ Review happens before output-group filtering and calculation. The structural catalog checks identities, periods, measure/source contracts, completeness, exposure attachment, expected-cell coverage, grouping evidence, and cached-formula provenance in deterministic order. Full findings retain code, message, complete source unions, origin, valuation, derived development age, and unit. `not-evaluated` is not treated as pass.
129
57
 
130
- The existing `DataCheck.details: string[]` field is unchanged. New checks also
131
- populate `DataCheck.findings` with optional `origin`, `valuation`, `ageMonths`,
132
- `group`, `sourceFile`, and `sourceRow` context so consumers need not parse
133
- prose. Severities and numeric tolerances are caller-configurable. Optional
134
- checks without configuration report `not-evaluated`, never a misleading pass.
58
+ Definitions add declarative `compare`, `reconcile`, `monotonic`, `layer-order`, and `control-total` review rules. `createCasualtyDiagnosticReviewRules` is an optional convenience factory, not a fixed taxonomy. Missing rule inputs follow each rule’s explicit `not-evaluated` or `finding` policy. Review and metric gates have separate allowed status/severity sets; permitting a fail requires a nonblank rationale reference.
135
59
 
136
- For unknown objects, call `validateDiagnosticDataset` (or the convenience
137
- `runValidatedMetricDiagnostics`) before the core analysis. For workbook input,
138
- extract rows with the host's spreadsheet tooling and pass cached formula
139
- metadata to the review; this package deliberately does not add a heavyweight
140
- XLSX dependency.
60
+ Completed outcomes are owner-branded and include the exact prepared data, review receipt, run preset, dataset artifact, grouping, result, and two-gate receipt. Compliance provenance accepts only that completed object.
141
61
 
142
- These utilities are designed to support the actuary's compliance with
143
- ASOP No. 23; responsibility for compliance remains with the credentialed
144
- actuary.
62
+ See the [formula catalog](https://github.com/yerromnitsuj/actng/blob/v0.6.0/docs/reference/diagnostic-formulas.md) and [migration guide](https://github.com/yerromnitsuj/actng/blob/v0.6.0/docs/migrations/0.6-generalized-diagnostics.md).
145
63
 
146
64
  ## License
147
65
 
148
- Apache-2.0. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE).
66
+ Apache-2.0. See LICENSE and NOTICE.
@@ -0,0 +1,46 @@
1
+ import type { CasualtyCountBindings, DiagnosticControlTotalProjection, DiagnosticMeasureExpression, DiagnosticReviewFilter, DiagnosticReviewRule } from "@actuarial-ts/core";
2
+ export interface CasualtyMonotonicReviewBinding {
3
+ readonly id: string;
4
+ readonly expression: DiagnosticMeasureExpression;
5
+ readonly direction: "nondecreasing" | "nonincreasing";
6
+ readonly tolerance?: {
7
+ readonly absolute?: number;
8
+ readonly relative?: number;
9
+ };
10
+ }
11
+ export interface CasualtyLayerOrderReviewBinding {
12
+ readonly id: string;
13
+ readonly narrower: DiagnosticMeasureExpression;
14
+ readonly broader: DiagnosticMeasureExpression;
15
+ readonly comparability: {
16
+ readonly kind: "compiler-proven";
17
+ } | {
18
+ readonly kind: "caller-asserted";
19
+ readonly rationaleArtifactId: string;
20
+ };
21
+ readonly tolerance?: {
22
+ readonly absolute?: number;
23
+ readonly relative?: number;
24
+ };
25
+ }
26
+ export interface CasualtyControlTotalReviewBinding {
27
+ readonly id: string;
28
+ readonly expression: DiagnosticMeasureExpression;
29
+ readonly expected: number;
30
+ readonly filter?: DiagnosticReviewFilter;
31
+ readonly projection: DiagnosticControlTotalProjection;
32
+ readonly tolerance?: {
33
+ readonly absolute?: number;
34
+ readonly relative?: number;
35
+ };
36
+ }
37
+ export interface CreateCasualtyDiagnosticReviewRulesInput {
38
+ readonly counts: CasualtyCountBindings;
39
+ readonly exposure: string;
40
+ readonly monotonicMeasures: readonly CasualtyMonotonicReviewBinding[];
41
+ readonly layerOrders: readonly CasualtyLayerOrderReviewBinding[];
42
+ readonly controlTotals: readonly CasualtyControlTotalReviewBinding[];
43
+ readonly severityOverrides?: Readonly<Record<string, "warning" | "fail">>;
44
+ }
45
+ export declare function createCasualtyDiagnosticReviewRules(input: CreateCasualtyDiagnosticReviewRulesInput): readonly DiagnosticReviewRule[];
46
+ //# sourceMappingURL=casualtyDiagnosticReview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"casualtyDiagnosticReview.d.ts","sourceRoot":"","sources":["../src/casualtyDiagnosticReview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gCAAgC,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE7K,MAAM,WAAW,8BAA8B;IAAG,QAAQ,CAAC,EAAE,EAAC,MAAM,CAAC;IAAA,QAAQ,CAAC,UAAU,EAAC,2BAA2B,CAAC;IAAA,QAAQ,CAA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CAAC;IAAA,QAAQ,CAAC,iBAAiB,EAAC,SAAS,8BAA8B,EAAE,CAAC;IAAA,QAAQ,CAAC,WAAW,EAAC,SAAS,+BAA+B,EAAE,CAAC;IAAA,QAAQ,CAAC,aAAa,EAAC,SAAS,iCAAiC,EAAE,CAAC;IAAA,QAAQ,CAAC,iBAAiB,CAAC,EAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAC,SAAS,GAAC,MAAM,CAAC,CAAC,CAAA;CAAE;AAE3Y,wBAAgB,mCAAmC,CAAC,KAAK,EAAC,wCAAwC,GAAE,SAAS,oBAAoB,EAAE,CASlI"}
@@ -0,0 +1,23 @@
1
+ const m = (measureId) => ({ op: "measure", measureId });
2
+ const tolerance = (value) => ({ absolute: value?.absolute ?? 0, relative: value?.relative ?? 0 });
3
+ export function createCasualtyDiagnosticReviewRules(input) {
4
+ const fixed = [
5
+ { kind: "reconcile", id: "casualty/review/count-reconciliation", code: "count-reconciliation", description: "Reported count must equal open plus closed-no-pay plus closed-with-pay count", severity: "fail", missingInput: "not-evaluated", tolerance: { absolute: 0, relative: 0 }, actual: m(input.counts.reported), expected: { op: "add", terms: [m(input.counts.open), m(input.counts.closedNoPay), m(input.counts.closedWithPay)] } },
6
+ { kind: "compare", id: "casualty/review/closed-no-pay-bound", code: "closed-no-pay-bound", description: "Closed-no-pay count must not exceed reported count", severity: "fail", missingInput: "not-evaluated", tolerance: { absolute: 0, relative: 0 }, when: { left: m(input.counts.closedNoPay), operator: "gt", right: m(input.counts.reported) } },
7
+ { kind: "compare", id: "casualty/review/positive-exposure", code: "positive-exposure", description: "Exposure must be strictly positive", severity: "fail", missingInput: "not-evaluated", tolerance: { absolute: 0, relative: 0 }, when: { left: m(input.exposure), operator: "lte", right: { op: "constant", value: 0 } } },
8
+ { kind: "monotonic", id: "casualty/review/closed-reopen-signal", code: "closed-reopen-signal", description: "Closed count must be nondecreasing across valuations", severity: "warning", missingInput: "not-evaluated", tolerance: { absolute: 0, relative: 0 }, expression: { op: "add", terms: [m(input.counts.closedNoPay), m(input.counts.closedWithPay)] }, direction: "nondecreasing" },
9
+ ];
10
+ const dynamic = [...input.monotonicMeasures.map((item) => ({ kind: "monotonic", id: item.id, code: item.id, description: `Expression must be ${item.direction} across valuations`, severity: "warning", missingInput: "not-evaluated", tolerance: tolerance(item.tolerance), expression: item.expression, direction: item.direction })), ...input.layerOrders.map((item) => ({ kind: "layer-order", id: item.id, code: item.id, description: "Narrower amount expression must not exceed broader amount expression", severity: "fail", missingInput: "not-evaluated", tolerance: tolerance(item.tolerance), narrower: item.narrower, broader: item.broader, comparability: item.comparability })), ...input.controlTotals.map((item) => ({ kind: "control-total", id: item.id, code: item.id, description: "Expression must reconcile to the declared control total", severity: "fail", missingInput: "not-evaluated", tolerance: tolerance(item.tolerance), expression: item.expression, expected: item.expected, ...(item.filter ? { filter: item.filter } : {}), projection: item.projection }))];
11
+ const all = [...fixed, ...dynamic];
12
+ const ids = new Set();
13
+ for (const rule of all) {
14
+ if (ids.has(rule.id))
15
+ throw new Error(`Duplicate review rule ID ${rule.id}`);
16
+ ids.add(rule.id);
17
+ }
18
+ for (const key of Object.keys(input.severityOverrides ?? {}))
19
+ if (!ids.has(key))
20
+ throw new Error(`Unknown severity override ${key}`);
21
+ return Object.freeze(all.map((rule) => Object.freeze({ ...rule, severity: input.severityOverrides?.[rule.id] ?? rule.severity })));
22
+ }
23
+ //# sourceMappingURL=casualtyDiagnosticReview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"casualtyDiagnosticReview.js","sourceRoot":"","sources":["../src/casualtyDiagnosticReview.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,GAAC,CAAC,SAAgB,EAAC,EAAE,CAAA,CAAC,EAAC,EAAE,EAAC,SAAkB,EAAC,SAAS,EAAC,CAAC,CAAC;AAAA,MAAM,SAAS,GAAC,CAAC,KAAmD,EAAC,EAAE,CAAA,CAAC,EAAC,QAAQ,EAAC,KAAK,EAAE,QAAQ,IAAE,CAAC,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,KAAK,CAAC,4BAA4B,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAAA,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAAA,CAAC;IAAA,KAAI,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,IAAE,EAAE,CAAC;QAAC,IAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,EAAE,CAAC,CAAC;IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAC,EAAE,CAAA,MAAM,CAAC,MAAM,CAAC,EAAC,GAAG,IAAI,EAAC,QAAQ,EAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAE,IAAI,CAAC,QAAQ,EAAC,CAAyB,CAAC,CAAC,CAAC;AACnc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type CompiledDiagnosticDefinition } from "@actuarial-ts/core";
2
+ /** Validates unknown authored definition data through core's single semantic compiler. */
3
+ export declare function validateDiagnosticDefinition(value: unknown): CompiledDiagnosticDefinition;
4
+ //# sourceMappingURL=diagnosticDefinition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnosticDefinition.d.ts","sourceRoot":"","sources":["../src/diagnosticDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,4BAA4B,EAA6B,MAAM,oBAAoB,CAAC;AAE/H,0FAA0F;AAC1F,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,4BAA4B,CAEzF"}
@@ -0,0 +1,6 @@
1
+ import { compileDiagnosticDefinition } from "@actuarial-ts/core";
2
+ /** Validates unknown authored definition data through core's single semantic compiler. */
3
+ export function validateDiagnosticDefinition(value) {
4
+ return compileDiagnosticDefinition(value);
5
+ }
6
+ //# sourceMappingURL=diagnosticDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnosticDefinition.js","sourceRoot":"","sources":["../src/diagnosticDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAgE,MAAM,oBAAoB,CAAC;AAE/H,0FAA0F;AAC1F,MAAM,UAAU,4BAA4B,CAAC,KAAc;IACzD,OAAO,2BAA2B,CAAC,KAA6B,CAAC,CAAC;AACpE,CAAC"}
@@ -1,14 +1,98 @@
1
- import { type DiagnosticExposureRow, type DiagnosticLossRow, type MetricDiagnosticsResult, type ReconciledDiagnosticExposures, type RunMetricDiagnosticsInput } from "@actuarial-ts/core";
2
- export interface ValidatedDiagnosticDataset {
3
- losses: DiagnosticLossRow[];
4
- /** Omitted when the caller did not supply exposure data. */
5
- exposures?: DiagnosticExposureRow[];
6
- }
7
- /** Zod-validates unknown diagnostic rows at the data package boundary. */
8
- export declare function validateDiagnosticDataset(value: unknown): ValidatedDiagnosticDataset;
9
- /** Validates unknown exposure rows, then applies core's stable-key reconciliation. */
10
- export declare function validateAndReconcileDiagnosticExposures(value: unknown): ReconciledDiagnosticExposures;
11
- export type ValidatedMetricDiagnosticsOptions = Omit<RunMetricDiagnosticsInput, "losses" | "exposures">;
12
- /** Convenience boundary: validate unknown rows, then run the dependency-free core engine. */
13
- export declare function runValidatedMetricDiagnostics(dataset: unknown, options: ValidatedMetricDiagnosticsOptions): MetricDiagnosticsResult;
1
+ import { type CompiledDiagnosticDefinition, type DiagnosticCompletePeriodCutoff, type DiagnosticDeepReadonly, type DiagnosticDefinition, type DiagnosticExpectedCell, type DiagnosticExposureObservation, type DiagnosticLossInput, type DiagnosticsFilter, type JsonValue, type MetricDiagnosticsResult } from "@actuarial-ts/core";
2
+ import { type DiagnosticReviewReceipt } from "./diagnosticPreparedReview.js";
3
+ export type DiagnosticAllowedReviewStatus = "pass" | "warning" | "not-evaluated" | "fail";
4
+ export interface DiagnosticExecutionPolicyInput {
5
+ readonly allowedReviewStatuses?: readonly DiagnosticAllowedReviewStatus[];
6
+ readonly allowedMetricFindingSeverities?: readonly ("info" | "warning" | "fail")[];
7
+ readonly rationaleRef?: string;
8
+ }
9
+ export interface DiagnosticRunInput {
10
+ readonly definition: DiagnosticDefinition;
11
+ readonly losses: readonly DiagnosticLossInput[];
12
+ readonly exposures?: readonly DiagnosticExposureObservation[];
13
+ readonly filter?: DiagnosticsFilter;
14
+ readonly completePeriodCutoffs?: readonly DiagnosticCompletePeriodCutoff[];
15
+ readonly expectedCells?: readonly DiagnosticExpectedCell[];
16
+ readonly reviewEvidence?: JsonValue | null;
17
+ readonly runPresetId?: string;
18
+ readonly datasetArtifactId?: string;
19
+ readonly groupMap?: Readonly<Record<string, string>>;
20
+ readonly groupDimensions?: Readonly<Record<string, JsonValue>>;
21
+ readonly policy?: DiagnosticExecutionPolicyInput;
22
+ }
23
+ declare const validatedDiagnosticRunInputBrand: unique symbol;
24
+ export interface ValidatedDiagnosticRunInput {
25
+ readonly [validatedDiagnosticRunInputBrand]: true;
26
+ readonly definition: CompiledDiagnosticDefinition;
27
+ readonly losses: readonly DiagnosticDeepReadonly<DiagnosticLossInput>[];
28
+ readonly exposures: readonly DiagnosticDeepReadonly<DiagnosticExposureObservation>[];
29
+ readonly filter: DiagnosticDeepReadonly<DiagnosticsFilter> | null;
30
+ readonly completePeriodCutoffs: readonly DiagnosticCompletePeriodCutoff[];
31
+ readonly expectedCells: readonly DiagnosticExpectedCell[] | null;
32
+ readonly reviewEvidence: JsonValue | null;
33
+ readonly runPresetId: string | null;
34
+ readonly datasetArtifactId: string | null;
35
+ readonly groupMap: Readonly<Record<string, string>>;
36
+ readonly groupDimensions: Readonly<Record<string, JsonValue>>;
37
+ readonly policy: {
38
+ readonly allowedReviewStatuses: readonly DiagnosticAllowedReviewStatus[];
39
+ readonly allowedMetricFindingSeverities: readonly ("info" | "warning" | "fail")[];
40
+ readonly rationaleRef: string | null;
41
+ };
42
+ }
43
+ export interface DiagnosticExecutionGateReceipt {
44
+ readonly allowedReviewStatuses: readonly DiagnosticAllowedReviewStatus[];
45
+ readonly allowedMetricFindingSeverities: readonly ("info" | "warning" | "fail")[];
46
+ readonly rationaleRef: string | null;
47
+ readonly reviewGate: "passed" | "blocked";
48
+ readonly metricGate: "not-run" | "passed" | "blocked";
49
+ }
50
+ export interface CompletedValidatedMetricDiagnosticsRun {
51
+ readonly status: "completed";
52
+ readonly prepared: import("@actuarial-ts/core").PreparedDiagnosticData;
53
+ readonly review: DiagnosticReviewReceipt;
54
+ readonly result: DiagnosticDeepReadonly<MetricDiagnosticsResult>;
55
+ readonly runPresetId: string | null;
56
+ readonly datasetArtifactId: string | null;
57
+ readonly groupMap: Readonly<Record<string, string>>;
58
+ readonly groupDimensions: Readonly<Record<string, JsonValue>>;
59
+ readonly gate: DiagnosticExecutionGateReceipt & {
60
+ readonly reviewGate: "passed";
61
+ readonly metricGate: "passed";
62
+ };
63
+ }
64
+ export type ValidatedMetricDiagnosticsOutcome = CompletedValidatedMetricDiagnosticsRun | {
65
+ readonly status: "blocked";
66
+ readonly stage: "review";
67
+ readonly prepared: import("@actuarial-ts/core").PreparedDiagnosticData;
68
+ readonly review: DiagnosticReviewReceipt;
69
+ readonly result: null;
70
+ readonly runPresetId: string | null;
71
+ readonly datasetArtifactId: string | null;
72
+ readonly groupMap: Readonly<Record<string, string>>;
73
+ readonly groupDimensions: Readonly<Record<string, JsonValue>>;
74
+ readonly gate: DiagnosticExecutionGateReceipt & {
75
+ readonly reviewGate: "blocked";
76
+ readonly metricGate: "not-run";
77
+ };
78
+ } | {
79
+ readonly status: "blocked";
80
+ readonly stage: "metric";
81
+ readonly prepared: import("@actuarial-ts/core").PreparedDiagnosticData;
82
+ readonly review: DiagnosticReviewReceipt;
83
+ readonly result: DiagnosticDeepReadonly<MetricDiagnosticsResult>;
84
+ readonly runPresetId: string | null;
85
+ readonly datasetArtifactId: string | null;
86
+ readonly groupMap: Readonly<Record<string, string>>;
87
+ readonly groupDimensions: Readonly<Record<string, JsonValue>>;
88
+ readonly gate: DiagnosticExecutionGateReceipt & {
89
+ readonly reviewGate: "passed";
90
+ readonly metricGate: "blocked";
91
+ };
92
+ };
93
+ export declare function validateDiagnosticRunInput(value: unknown): ValidatedDiagnosticRunInput;
94
+ export declare function assertValidatedDiagnosticRunInput(value: unknown): asserts value is ValidatedDiagnosticRunInput;
95
+ export declare function runValidatedMetricDiagnostics(input: ValidatedDiagnosticRunInput): ValidatedMetricDiagnosticsOutcome;
96
+ export declare function assertCompletedValidatedMetricDiagnosticsRun(value: unknown): asserts value is CompletedValidatedMetricDiagnosticsRun;
97
+ export {};
14
98
  //# sourceMappingURL=diagnosticInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticInput.d.ts","sourceRoot":"","sources":["../src/diagnosticInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AA+B5B,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED,0EAA0E;AAC1E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CAYpF;AAED,sFAAsF;AACtF,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,OAAO,GACb,6BAA6B,CAG/B;AAED,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC,yBAAyB,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAC;AAExG,6FAA6F;AAC7F,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,iCAAiC,GACzC,uBAAuB,CAGzB"}
1
+ {"version":3,"file":"diagnosticInput.d.ts","sourceRoot":"","sources":["../src/diagnosticInput.ts"],"names":[],"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AQ,CAAC,MAAM,CAAC,MAAM,EAAC,SAAS,CAAC,CAAC,CAAC;IAAA,QAAQ,CAAC,IAAI,EAAC,8BAA8B,GAAC;QAAC,QAAQ,CAAC,UAAU,EAAC,QAAQ,CAAC;QAAA,QAAQ,CAAC,UAAU,EAAC,SAAS,CAAA;KAAC,CAAA;CAAC,CAAC;AAM/iC,wBAAgB,0BAA0B,CAAC,KAAK,EAAC,OAAO,GAAE,2BAA2B,CAYpF;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAC,OAAO,GAAE,OAAO,CAAC,KAAK,IAAI,2BAA2B,CAAuO;AAGpV,wBAAgB,6BAA6B,CAAC,KAAK,EAAC,2BAA2B,GAAE,iCAAiC,CAUjH;AACD,wBAAgB,4CAA4C,CAAC,KAAK,EAAC,OAAO,GAAE,OAAO,CAAC,KAAK,IAAI,sCAAsC,CAAiO"}
@@ -1,51 +1,63 @@
1
- import { ReservingError, reconcileDiagnosticExposureKeys, runMetricDiagnostics, } from "@actuarial-ts/core";
1
+ import { DiagnosticValidationError, compileDiagnosticDefinition, prepareDiagnosticData, runMetricDiagnostics, } from "@actuarial-ts/core";
2
2
  import { z } from "zod";
3
- const measuresSchema = z.record(z.number().nullable());
4
- const diagnosticLossRowSchema = z.object({
5
- id: z.string().min(1),
6
- group: z.string().min(1),
7
- origin: z.string().min(1),
8
- valuation: z.string().min(1),
9
- ageMonths: z.number(),
10
- policyPeriod: z.string().min(1).optional(),
11
- dimensions: z.unknown().optional(),
12
- measures: measuresSchema,
13
- }).strict();
14
- const diagnosticExposureRowSchema = z.object({
15
- key: z.string().min(1),
16
- group: z.string().min(1),
17
- origin: z.string().min(1),
18
- valuation: z.string().min(1).optional(),
19
- measures: measuresSchema,
20
- complete: z.boolean().optional(),
21
- dimensions: z.unknown().optional(),
22
- }).strict();
23
- const diagnosticDatasetSchema = z.object({
24
- losses: z.array(diagnosticLossRowSchema),
25
- exposures: z.array(diagnosticExposureRowSchema).optional(),
26
- }).strict();
27
- /** Zod-validates unknown diagnostic rows at the data package boundary. */
28
- export function validateDiagnosticDataset(value) {
29
- const parsed = diagnosticDatasetSchema.safeParse(value);
30
- if (!parsed.success) {
31
- const details = parsed.error.issues
32
- .map((issue) => `${issue.path.length > 0 ? issue.path.join(".") : "$"}: ${issue.message}`)
33
- .join("; ");
34
- throw new ReservingError("SHAPE", `Invalid diagnostic dataset: ${details}`);
3
+ import { reviewPreparedDiagnosticData } from "./diagnosticPreparedReview.js";
4
+ const sourceSchema = z.object({ artifactId: z.string().min(1), sourceFile: z.string().min(1).optional(), sourceSheet: z.string().min(1).optional(), sourceRow: z.number().int().nonnegative().optional(), sourceCell: z.string().min(1).optional() }).strict();
5
+ const measuresSchema = z.record(z.union([z.number(), z.null()]));
6
+ const lossBase = { recordId: z.string().min(1), sourceGroup: z.string().min(1), origin: z.string().min(1), valuation: z.string().min(1), complete: z.boolean(), source: sourceSchema.optional(), measures: measuresSchema };
7
+ const lossSchema = z.discriminatedUnion("rowType", [z.object({ ...lossBase, rowType: z.literal("claim"), claimId: z.string().min(1) }).strict(), z.object({ ...lossBase, rowType: z.literal("aggregate") }).strict()]);
8
+ const exposureSchema = z.object({ key: z.string().min(1), sourceGroup: z.string().min(1), origin: z.string().min(1), valuation: z.string().min(1).optional(), measureId: z.string().min(1), value: z.union([z.number(), z.null()]), complete: z.boolean(), source: sourceSchema.optional() }).strict();
9
+ const filterSchema = z.object({ sourceGroups: z.array(z.string().min(1)).optional(), outputGroups: z.array(z.string().min(1)).optional(), origins: z.array(z.string().min(1)).optional(), originFrom: z.string().min(1).optional(), originThrough: z.string().min(1).optional(), valuations: z.array(z.string().min(1)).optional(), valuationFrom: z.string().min(1).optional(), valuationThrough: z.string().min(1).optional(), minDevelopmentAge: z.number().int().nonnegative().optional(), maxDevelopmentAge: z.number().int().nonnegative().optional(), instanceIds: z.array(z.string().min(1)).optional() }).strict();
10
+ const cutoffSchema = z.object({ sourceGroup: z.string().min(1), originThrough: z.string().min(1).nullable(), valuationThrough: z.string().min(1).nullable() }).strict();
11
+ const expectedSchema = z.object({ sourceGroup: z.string().min(1), origin: z.string().min(1), valuation: z.string().min(1), source: sourceSchema.optional() }).strict();
12
+ const jsonSchema = z.lazy(() => z.union([z.null(), z.boolean(), z.number().finite(), z.string(), z.array(jsonSchema), z.record(jsonSchema)]));
13
+ const policySchema = z.object({ allowedReviewStatuses: z.array(z.enum(["pass", "warning", "not-evaluated", "fail"])).optional(), allowedMetricFindingSeverities: z.array(z.enum(["info", "warning", "fail"])).optional(), rationaleRef: z.string().min(1).optional() }).strict();
14
+ const runSchema = z.object({ definition: z.unknown(), losses: z.array(lossSchema), exposures: z.array(exposureSchema).optional(), filter: filterSchema.optional(), completePeriodCutoffs: z.array(cutoffSchema).optional(), expectedCells: z.array(expectedSchema).optional(), reviewEvidence: jsonSchema.nullable().optional(), runPresetId: z.string().min(1).optional(), datasetArtifactId: z.string().min(1).optional(), groupMap: z.record(z.string().min(1)).optional(), groupDimensions: z.record(jsonSchema).optional(), policy: policySchema.optional() }).strict();
15
+ const authentic = new WeakSet();
16
+ function freeze(value, seen = new WeakSet()) { if (value === null || typeof value !== "object" || seen.has(value))
17
+ return value; seen.add(value); for (const child of Object.values(value))
18
+ freeze(child, seen); return Object.freeze(value); }
19
+ function issues(error) { return new DiagnosticValidationError(error.issues.map((issue) => ({ domain: (issue.path[0] === "definition" ? "definition" : issue.path[0] === "losses" || issue.path[0] === "exposures" || issue.path[0] === "reviewEvidence" ? "input" : "configuration"), code: issue.code === "unrecognized_keys" ? "unknown-key" : "invalid-type", path: `$${issue.path.map((part) => typeof part === "number" ? `[${part}]` : /^[A-Za-z_$][\w$]*$/.test(part) ? `.${part}` : `[${JSON.stringify(part)}]`).join("")}`, message: issue.message }))); }
20
+ export function validateDiagnosticRunInput(value) {
21
+ const parsed = runSchema.safeParse(value);
22
+ if (!parsed.success)
23
+ throw issues(parsed.error);
24
+ const definition = compileDiagnosticDefinition(parsed.data.definition);
25
+ const relationIssues = parsed.data.losses.flatMap((row, index) => row.rowType === definition.definition.lossRowGrain ? [] : [{ domain: "input", code: "invalid-input-relationship", path: `$.losses[${index}].rowType`, message: "Loss row type does not match definition grain" }]);
26
+ for (const [index, row] of (parsed.data.exposures ?? []).entries()) {
27
+ const measure = definition.definition.measures.find((item) => item.id === row.measureId);
28
+ if (measure?.exposureTiming === "valuation-specific" && row.valuation === undefined)
29
+ relationIssues.push({ domain: "input", code: "missing-required", path: `$.exposures[${index}].valuation`, message: "Valuation-specific exposure requires valuation" });
35
30
  }
36
- return {
37
- losses: parsed.data.losses,
38
- ...(parsed.data.exposures !== undefined ? { exposures: parsed.data.exposures } : {}),
39
- };
31
+ if (relationIssues.length)
32
+ throw new DiagnosticValidationError(relationIssues);
33
+ const review = parsed.data.policy?.allowedReviewStatuses ?? ["pass", "warning", "not-evaluated"];
34
+ const metric = parsed.data.policy?.allowedMetricFindingSeverities ?? ["info", "warning"];
35
+ const rationale = parsed.data.policy?.rationaleRef ?? null;
36
+ if ((review.includes("fail") || metric.includes("fail")) && rationale === null)
37
+ throw new DiagnosticValidationError([{ domain: "configuration", code: "missing-required", path: "$.policy.rationaleRef", message: "A rationale is required when fail outcomes are allowed" }]);
38
+ const result = freeze({ definition, losses: parsed.data.losses, exposures: parsed.data.exposures ?? [], filter: parsed.data.filter ?? null, completePeriodCutoffs: parsed.data.completePeriodCutoffs ?? [], expectedCells: parsed.data.expectedCells ?? null, reviewEvidence: parsed.data.reviewEvidence ?? null, runPresetId: parsed.data.runPresetId ?? null, datasetArtifactId: parsed.data.datasetArtifactId ?? null, groupMap: parsed.data.groupMap ?? Object.create(null), groupDimensions: parsed.data.groupDimensions ?? Object.create(null), policy: { allowedReviewStatuses: [...new Set(review)], allowedMetricFindingSeverities: [...new Set(metric)], rationaleRef: rationale } });
39
+ authentic.add(result);
40
+ return result;
40
41
  }
41
- /** Validates unknown exposure rows, then applies core's stable-key reconciliation. */
42
- export function validateAndReconcileDiagnosticExposures(value) {
43
- const validated = validateDiagnosticDataset({ losses: [], exposures: value });
44
- return reconcileDiagnosticExposureKeys(validated.exposures ?? []);
45
- }
46
- /** Convenience boundary: validate unknown rows, then run the dependency-free core engine. */
47
- export function runValidatedMetricDiagnostics(dataset, options) {
48
- const validated = validateDiagnosticDataset(dataset);
49
- return runMetricDiagnostics({ ...options, ...validated });
42
+ export function assertValidatedDiagnosticRunInput(value) { if (value === null || typeof value !== "object" || !authentic.has(value))
43
+ throw new DiagnosticValidationError([{ domain: "input", code: "invalid-input-relationship", path: "$", message: "Value is not an authentic validated diagnostic run input" }]); }
44
+ const completed = new WeakSet();
45
+ export function runValidatedMetricDiagnostics(input) {
46
+ assertValidatedDiagnosticRunInput(input);
47
+ const prepared = prepareDiagnosticData({ definition: input.definition, losses: input.losses, exposures: input.exposures, filter: input.filter ?? undefined, completePeriodCutoffs: input.completePeriodCutoffs, expectedCells: input.expectedCells ?? undefined });
48
+ const review = reviewPreparedDiagnosticData({ prepared, evidence: input.reviewEvidence });
49
+ const disallowedReview = review.report.checks.some((check) => !input.policy.allowedReviewStatuses.includes(check.status));
50
+ const base = { prepared, review, runPresetId: input.runPresetId, datasetArtifactId: input.datasetArtifactId, groupMap: input.groupMap, groupDimensions: input.groupDimensions };
51
+ if (disallowedReview)
52
+ return freeze({ ...base, status: "blocked", stage: "review", result: null, gate: { ...input.policy, reviewGate: "blocked", metricGate: "not-run" } });
53
+ const result = runMetricDiagnostics({ prepared, groupMap: input.groupMap, groupDimensions: input.groupDimensions });
54
+ const disallowedMetric = result.findings.some((finding) => finding.category !== "structural" && !input.policy.allowedMetricFindingSeverities.includes(finding.severity));
55
+ if (disallowedMetric)
56
+ return freeze({ ...base, status: "blocked", stage: "metric", result, gate: { ...input.policy, reviewGate: "passed", metricGate: "blocked" } });
57
+ const outcome = freeze({ ...base, status: "completed", result, gate: { ...input.policy, reviewGate: "passed", metricGate: "passed" } });
58
+ completed.add(outcome);
59
+ return outcome;
50
60
  }
61
+ export function assertCompletedValidatedMetricDiagnosticsRun(value) { if (value === null || typeof value !== "object" || !completed.has(value))
62
+ throw new DiagnosticValidationError([{ domain: "input", code: "invalid-input-relationship", path: "$", message: "Value is not an authentic completed diagnostic run" }]); }
51
63
  //# sourceMappingURL=diagnosticInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticInput.js","sourceRoot":"","sources":["../src/diagnosticInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,+BAA+B,EAC/B,oBAAoB,GAMrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEvD,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1C,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,cAAc;CACzB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,KAAK,EAAE,CAAC,CAAC,MAA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