spec-controller 0.1.215 → 0.1.217
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/dist/cli.js +35 -25
- package/dist/spec-reconciliation.schema.json +21 -22
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -11818,7 +11818,7 @@ function reconcileEvidenceObligation(scnId, obligation, evidenceObservations) {
|
|
|
11818
11818
|
return makeQualityCheckReconciliation({
|
|
11819
11819
|
qualityCheckKind: obligation.qualityCheckKind,
|
|
11820
11820
|
...answered ? {} : { outcome: "missing" },
|
|
11821
|
-
evidenceObligation: obligation,
|
|
11821
|
+
evidenceObligation: { ...obligation, qualityCheckKind: obligation.qualityCheckKind ?? null },
|
|
11822
11822
|
...observationsField(linesFor(citing, "evidence-obligation"))
|
|
11823
11823
|
});
|
|
11824
11824
|
}
|
|
@@ -11839,7 +11839,7 @@ function unnamedClaimReconciliationsOf(observations) {
|
|
|
11839
11839
|
return reconciliationsByQualityCheckKind(observations, "unnamed-claim");
|
|
11840
11840
|
}
|
|
11841
11841
|
function noScnCodeReconciliations() {
|
|
11842
|
-
return [makeQualityCheckReconciliation({ outcome: "no-scn-code", evidenceObligation: {} })];
|
|
11842
|
+
return [makeQualityCheckReconciliation({ outcome: "no-scn-code", evidenceObligation: { qualityCheckKind: null } })];
|
|
11843
11843
|
}
|
|
11844
11844
|
function duplicateScnCodeReconciliationsOf(obligations, scenario) {
|
|
11845
11845
|
const naming = scenario === void 0 ? {} : { scenario };
|
|
@@ -11850,9 +11850,14 @@ function duplicateScnCodeReconciliationsOf(obligations, scenario) {
|
|
|
11850
11850
|
}
|
|
11851
11851
|
}
|
|
11852
11852
|
if (firstNaming.size === 0) {
|
|
11853
|
-
return [makeQualityCheckReconciliation({ outcome: "duplicate-scn-code", evidenceObligation: {}, ...naming })];
|
|
11853
|
+
return [makeQualityCheckReconciliation({ outcome: "duplicate-scn-code", evidenceObligation: { qualityCheckKind: null }, ...naming })];
|
|
11854
11854
|
}
|
|
11855
|
-
return [...firstNaming].map(([qualityCheckKind, evidenceObligation]) => makeQualityCheckReconciliation({
|
|
11855
|
+
return [...firstNaming].map(([qualityCheckKind, evidenceObligation]) => makeQualityCheckReconciliation({
|
|
11856
|
+
qualityCheckKind,
|
|
11857
|
+
outcome: "duplicate-scn-code",
|
|
11858
|
+
evidenceObligation: { ...evidenceObligation, qualityCheckKind },
|
|
11859
|
+
...naming
|
|
11860
|
+
}));
|
|
11856
11861
|
}
|
|
11857
11862
|
function bothMissingReconciliation() {
|
|
11858
11863
|
return makeQualityCheckReconciliation({ outcome: "both-missing" });
|
|
@@ -11924,7 +11929,7 @@ function observationsOf(row) {
|
|
|
11924
11929
|
return row.qualityCheckReconciliations.flatMap((reconciliation) => reconciliation.evidenceObservations ?? []);
|
|
11925
11930
|
}
|
|
11926
11931
|
function obligationsOf(row) {
|
|
11927
|
-
return row.qualityCheckReconciliations.flatMap(({ evidenceObligation }) => evidenceObligation?.qualityCheckKind
|
|
11932
|
+
return row.qualityCheckReconciliations.flatMap(({ evidenceObligation }) => evidenceObligation?.qualityCheckKind == null ? [] : [evidenceObligation]);
|
|
11928
11933
|
}
|
|
11929
11934
|
function isScenario(row) {
|
|
11930
11935
|
return row.kind === "scenario";
|
|
@@ -27899,7 +27904,7 @@ function assembleRenderInput(evidenceReconciliation, ctx, evidenceObligations2,
|
|
|
27899
27904
|
scenarioCodeErrors: evidenceReconciliation.scenarioCodeErrors,
|
|
27900
27905
|
strict: ctx.strict === true
|
|
27901
27906
|
}),
|
|
27902
|
-
|
|
27907
|
+
claimReconciliations: evidenceReconciliation.ledger.claimReconciliations
|
|
27903
27908
|
};
|
|
27904
27909
|
}
|
|
27905
27910
|
var init_renderInput2 = __esm({
|
|
@@ -28205,7 +28210,7 @@ function assembleSavedReport(saved, strictGiven) {
|
|
|
28205
28210
|
...saved,
|
|
28206
28211
|
runProvenance: { ...saved.runProvenance, strict },
|
|
28207
28212
|
summary: concludedSummary(saved.summary, {
|
|
28208
|
-
ledger: saved.
|
|
28213
|
+
ledger: { claimReconciliations: saved.claimReconciliations },
|
|
28209
28214
|
scenarioCodeErrors: saved.errors?.scenarioCodes,
|
|
28210
28215
|
strict
|
|
28211
28216
|
})
|
|
@@ -28274,7 +28279,7 @@ var init_messages4 = __esm({
|
|
|
28274
28279
|
CoreMessage2[CoreMessage2["ThemPronoun"] = 31] = "ThemPronoun";
|
|
28275
28280
|
CoreMessage2[CoreMessage2["HoldsVerb"] = 32] = "HoldsVerb";
|
|
28276
28281
|
CoreMessage2[CoreMessage2["HoldVerb"] = 33] = "HoldVerb";
|
|
28277
|
-
CoreMessage2[CoreMessage2["
|
|
28282
|
+
CoreMessage2[CoreMessage2["SummaryHeading"] = 34] = "SummaryHeading";
|
|
28278
28283
|
CoreMessage2[CoreMessage2["RunVerdictHeading"] = 35] = "RunVerdictHeading";
|
|
28279
28284
|
CoreMessage2[CoreMessage2["VerdictExit"] = 36] = "VerdictExit";
|
|
28280
28285
|
CoreMessage2[CoreMessage2["ScenarioCodeErrorsHeadline"] = 37] = "ScenarioCodeErrorsHeadline";
|
|
@@ -28456,7 +28461,7 @@ var init_messages4 = __esm({
|
|
|
28456
28461
|
[CoreMessage.ThemPronoun]: "them",
|
|
28457
28462
|
[CoreMessage.HoldsVerb]: "holds",
|
|
28458
28463
|
[CoreMessage.HoldVerb]: "hold",
|
|
28459
|
-
[CoreMessage.
|
|
28464
|
+
[CoreMessage.SummaryHeading]: "## Summary",
|
|
28460
28465
|
[CoreMessage.RunVerdictHeading]: "### Run verdict",
|
|
28461
28466
|
[CoreMessage.VerdictExit]: (code) => `exit ${code}`,
|
|
28462
28467
|
[CoreMessage.ScenarioCodeErrorsHeadline]: "**SCENARIO CODE ERRORS**",
|
|
@@ -28715,12 +28720,11 @@ var init_runVerdict2 = __esm({
|
|
|
28715
28720
|
gloss: CORE_MESSAGES[CoreMessage.BalancedGloss]
|
|
28716
28721
|
};
|
|
28717
28722
|
runVerdictSection = (report, exitCodeOf2) => {
|
|
28718
|
-
const reconciliation = { claimReconciliations: report.ledger.claimReconciliations };
|
|
28719
28723
|
const verdict = report.summary.runVerdict;
|
|
28720
|
-
const line = verdictFor2(verdict,
|
|
28724
|
+
const line = verdictFor2(verdict, report, report.runProvenance.corpus, report.errors?.scenarioCodes ?? []);
|
|
28721
28725
|
const exit = CORE_MESSAGES[CoreMessage.VerdictExit](exitCodeOf2(verdict));
|
|
28722
28726
|
const lines = [CORE_MESSAGES[CoreMessage.RunVerdictHeading], "", `${line.headline} \u2014 ${line.gloss} (${exit})`];
|
|
28723
|
-
if (verdict === "balanced" && hasPendingItems(
|
|
28727
|
+
if (verdict === "balanced" && hasPendingItems(report)) {
|
|
28724
28728
|
lines.push("");
|
|
28725
28729
|
lines.push(CORE_MESSAGES[CoreMessage.PendingItemsOutstanding]);
|
|
28726
28730
|
}
|
|
@@ -32236,7 +32240,7 @@ function ledgerTableLines(claims, columns, stepsByQualityCheckKind) {
|
|
|
32236
32240
|
function renderReport(report, inputNames, exitCodeOf2) {
|
|
32237
32241
|
return SECTIONS.flatMap((section) => section(report, inputNames, exitCodeOf2)).join("\n");
|
|
32238
32242
|
}
|
|
32239
|
-
var reported, RESULT_MESSAGE, titleSection, runIntegritySection,
|
|
32243
|
+
var reported, RESULT_MESSAGE, titleSection, runIntegritySection, summarySection, EVIDENCE_RECONCILIATION_COLUMNS, EVIDENCE_RECONCILIATION_TERMS, evidenceReconciliationSection, byFeatureSection, ledgerSection, SECTIONS;
|
|
32240
32244
|
var init_markdown = __esm({
|
|
32241
32245
|
"../core/dist/render/markdown.js"() {
|
|
32242
32246
|
"use strict";
|
|
@@ -32267,11 +32271,9 @@ var init_markdown = __esm({
|
|
|
32267
32271
|
};
|
|
32268
32272
|
titleSection = () => [CORE_MESSAGES[CoreMessage.ReportTitle], ""];
|
|
32269
32273
|
runIntegritySection = (report) => {
|
|
32270
|
-
if (!hasBrokenEvidence(
|
|
32274
|
+
if (!hasBrokenEvidence(report))
|
|
32271
32275
|
return [];
|
|
32272
|
-
const brokenObservations = brokenItemsOf(
|
|
32273
|
-
claimReconciliations: report.ledger.claimReconciliations
|
|
32274
|
-
}).flatMap((line) => line.evidenceObservation ?? []);
|
|
32276
|
+
const brokenObservations = brokenItemsOf(report).flatMap((line) => line.evidenceObservation ?? []);
|
|
32275
32277
|
const count = brokenObservations.length;
|
|
32276
32278
|
const proofs = count === 1 ? CORE_MESSAGES[CoreMessage.OneProofNeverRan] : CORE_MESSAGES[CoreMessage.ProofsNeverRan](count);
|
|
32277
32279
|
const lines = [
|
|
@@ -32289,7 +32291,7 @@ var init_markdown = __esm({
|
|
|
32289
32291
|
}
|
|
32290
32292
|
return lines;
|
|
32291
32293
|
};
|
|
32292
|
-
|
|
32294
|
+
summarySection = () => [CORE_MESSAGES[CoreMessage.SummaryHeading], ""];
|
|
32293
32295
|
EVIDENCE_RECONCILIATION_COLUMNS = [
|
|
32294
32296
|
CORE_MESSAGES[CoreMessage.SubjectColumn],
|
|
32295
32297
|
CORE_MESSAGES[CoreMessage.TotalColumn],
|
|
@@ -32338,7 +32340,7 @@ var init_markdown = __esm({
|
|
|
32338
32340
|
return lines;
|
|
32339
32341
|
};
|
|
32340
32342
|
byFeatureSection = (report) => {
|
|
32341
|
-
const rows = report.
|
|
32343
|
+
const rows = report.claimReconciliations;
|
|
32342
32344
|
const scenarios = rows.filter(isScenario);
|
|
32343
32345
|
const groups = report.summary.outOfBalanceByFeature ?? [];
|
|
32344
32346
|
const ungrouped = ungroupedOutOfBalance(report.summary.evidenceReconciliation.claimReconciliations);
|
|
@@ -32354,9 +32356,9 @@ var init_markdown = __esm({
|
|
|
32354
32356
|
];
|
|
32355
32357
|
};
|
|
32356
32358
|
ledgerSection = (report) => {
|
|
32357
|
-
const scenarioRows = report.
|
|
32358
|
-
const phantomClaimRows2 = report.
|
|
32359
|
-
const unnamedClaimRows2 = report.
|
|
32359
|
+
const scenarioRows = report.claimReconciliations.filter(isScenario);
|
|
32360
|
+
const phantomClaimRows2 = report.claimReconciliations.filter(isPhantomClaim);
|
|
32361
|
+
const unnamedClaimRows2 = report.claimReconciliations.filter(isUnnamedClaim);
|
|
32360
32362
|
const claims = [...scenarioRows, ...phantomClaimRows2, ...unnamedClaimRows2];
|
|
32361
32363
|
const columns = report.summary.evidenceObservations !== void 0 ? evidenceColumns(claims) : [];
|
|
32362
32364
|
return [
|
|
@@ -32375,7 +32377,7 @@ var init_markdown = __esm({
|
|
|
32375
32377
|
provenanceSection,
|
|
32376
32378
|
errorsInTheInputsSection,
|
|
32377
32379
|
runIntegritySection,
|
|
32378
|
-
|
|
32380
|
+
summarySection,
|
|
32379
32381
|
(report, _inputNames, exitCodeOf2) => runVerdictSection(report, exitCodeOf2),
|
|
32380
32382
|
scenarioCodesCleanStatement,
|
|
32381
32383
|
evidenceReconciliationSection,
|
|
@@ -32868,7 +32870,15 @@ var init_inputShapes = __esm({
|
|
|
32868
32870
|
},
|
|
32869
32871
|
required: ["evidenceReconciliation", "evidenceObservations"]
|
|
32870
32872
|
},
|
|
32871
|
-
|
|
32873
|
+
claimReconciliations: {
|
|
32874
|
+
list: {
|
|
32875
|
+
fields: {
|
|
32876
|
+
qualityCheckReconciliations: {
|
|
32877
|
+
list: { fields: { evidenceObligation: { fields: { qualityCheckKind: "anything" }, required: ["qualityCheckKind"] } } }
|
|
32878
|
+
}
|
|
32879
|
+
}
|
|
32880
|
+
}
|
|
32881
|
+
},
|
|
32872
32882
|
errors: {
|
|
32873
32883
|
fields: {
|
|
32874
32884
|
scenarioCodes: { list: "anything" },
|
|
@@ -32885,7 +32895,7 @@ var init_inputShapes = __esm({
|
|
|
32885
32895
|
},
|
|
32886
32896
|
scenarioCodes: { fields: {} }
|
|
32887
32897
|
},
|
|
32888
|
-
required: ["runProvenance", "summary", "
|
|
32898
|
+
required: ["runProvenance", "summary", "claimReconciliations"]
|
|
32889
32899
|
};
|
|
32890
32900
|
TOP = { kind: "top" };
|
|
32891
32901
|
}
|
|
@@ -59,14 +59,17 @@
|
|
|
59
59
|
"runVerdict"
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
|
-
"
|
|
63
|
-
"
|
|
62
|
+
"claimReconciliations": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"$ref": "#/definitions/ClaimReconciliation"
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
68
|
},
|
|
66
69
|
"required": [
|
|
67
70
|
"runProvenance",
|
|
68
71
|
"summary",
|
|
69
|
-
"
|
|
72
|
+
"claimReconciliations"
|
|
70
73
|
],
|
|
71
74
|
"additionalProperties": false
|
|
72
75
|
},
|
|
@@ -777,21 +780,6 @@
|
|
|
777
780
|
],
|
|
778
781
|
"additionalProperties": false
|
|
779
782
|
},
|
|
780
|
-
"Ledger": {
|
|
781
|
-
"type": "object",
|
|
782
|
-
"properties": {
|
|
783
|
-
"claimReconciliations": {
|
|
784
|
-
"type": "array",
|
|
785
|
-
"items": {
|
|
786
|
-
"$ref": "#/definitions/ClaimReconciliation"
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
"required": [
|
|
791
|
-
"claimReconciliations"
|
|
792
|
-
],
|
|
793
|
-
"additionalProperties": false
|
|
794
|
-
},
|
|
795
783
|
"ClaimReconciliation": {
|
|
796
784
|
"type": "object",
|
|
797
785
|
"properties": {
|
|
@@ -852,7 +840,7 @@
|
|
|
852
840
|
"$ref": "#/definitions/Outcome"
|
|
853
841
|
},
|
|
854
842
|
"evidenceObligation": {
|
|
855
|
-
"$ref": "#/definitions/
|
|
843
|
+
"$ref": "#/definitions/ReconciledEvidenceObligation"
|
|
856
844
|
},
|
|
857
845
|
"evidenceObservations": {
|
|
858
846
|
"type": "array",
|
|
@@ -881,17 +869,28 @@
|
|
|
881
869
|
"both-missing"
|
|
882
870
|
]
|
|
883
871
|
},
|
|
884
|
-
"
|
|
872
|
+
"ReconciledEvidenceObligation": {
|
|
885
873
|
"type": "object",
|
|
886
874
|
"properties": {
|
|
887
875
|
"qualityCheckKind": {
|
|
888
|
-
"
|
|
876
|
+
"anyOf": [
|
|
877
|
+
{
|
|
878
|
+
"$ref": "#/definitions/QualityCheckKind"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"type": "null"
|
|
882
|
+
}
|
|
883
|
+
]
|
|
889
884
|
},
|
|
890
885
|
"pending": {
|
|
891
886
|
"type": "boolean"
|
|
892
887
|
}
|
|
893
888
|
},
|
|
894
|
-
"
|
|
889
|
+
"required": [
|
|
890
|
+
"qualityCheckKind"
|
|
891
|
+
],
|
|
892
|
+
"additionalProperties": false,
|
|
893
|
+
"description": "The evidence obligation a Quality Check Reconciliation holds: an obligation that states no kind of quality check holds null."
|
|
895
894
|
},
|
|
896
895
|
"ReconciledEvidenceObservation": {
|
|
897
896
|
"anyOf": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.217",
|
|
4
4
|
"description": "Reconcile the behaviour your scenarios name against the evidence that actually ran — the deterministic `balance` CLI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"reconciliation",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fast-xml-parser": "^5.11.2",
|
|
27
27
|
"ts-json-schema-generator": "^2.9.0",
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
|
-
"@3f-consulting/spec-controller-core": "0.1.
|
|
29
|
+
"@3f-consulting/spec-controller-core": "0.1.217"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|