spec-controller 0.1.214 → 0.1.216
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 +22 -25
- package/dist/spec-reconciliation.schema.json +6 -18
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -27899,7 +27899,7 @@ function assembleRenderInput(evidenceReconciliation, ctx, evidenceObligations2,
|
|
|
27899
27899
|
scenarioCodeErrors: evidenceReconciliation.scenarioCodeErrors,
|
|
27900
27900
|
strict: ctx.strict === true
|
|
27901
27901
|
}),
|
|
27902
|
-
|
|
27902
|
+
claimReconciliations: evidenceReconciliation.ledger.claimReconciliations
|
|
27903
27903
|
};
|
|
27904
27904
|
}
|
|
27905
27905
|
var init_renderInput2 = __esm({
|
|
@@ -28205,7 +28205,7 @@ function assembleSavedReport(saved, strictGiven) {
|
|
|
28205
28205
|
...saved,
|
|
28206
28206
|
runProvenance: { ...saved.runProvenance, strict },
|
|
28207
28207
|
summary: concludedSummary(saved.summary, {
|
|
28208
|
-
ledger: saved.
|
|
28208
|
+
ledger: { claimReconciliations: saved.claimReconciliations },
|
|
28209
28209
|
scenarioCodeErrors: saved.errors?.scenarioCodes,
|
|
28210
28210
|
strict
|
|
28211
28211
|
})
|
|
@@ -28230,7 +28230,7 @@ var init_model = __esm({
|
|
|
28230
28230
|
});
|
|
28231
28231
|
|
|
28232
28232
|
// ../core/dist/render/messages.js
|
|
28233
|
-
var QUALITY_CHECK_FAULT_MESSAGES, CoreMessage, CoreError, SATISFIED, MISSING, DUPLICATE_SCN_CODE, CITED_WITH_NO_SCENARIO,
|
|
28233
|
+
var QUALITY_CHECK_FAULT_MESSAGES, CoreMessage, CoreError, SATISFIED, MISSING, DUPLICATE_SCN_CODE, CITED_WITH_NO_SCENARIO, NO_ONE_SCENARIO_CAN_TAKE, RUNNERS_PLACE, IN_ITS_FILE, CORE_MESSAGES;
|
|
28234
28234
|
var init_messages4 = __esm({
|
|
28235
28235
|
"../core/dist/render/messages.js"() {
|
|
28236
28236
|
"use strict";
|
|
@@ -28274,7 +28274,7 @@ var init_messages4 = __esm({
|
|
|
28274
28274
|
CoreMessage2[CoreMessage2["ThemPronoun"] = 31] = "ThemPronoun";
|
|
28275
28275
|
CoreMessage2[CoreMessage2["HoldsVerb"] = 32] = "HoldsVerb";
|
|
28276
28276
|
CoreMessage2[CoreMessage2["HoldVerb"] = 33] = "HoldVerb";
|
|
28277
|
-
CoreMessage2[CoreMessage2["
|
|
28277
|
+
CoreMessage2[CoreMessage2["SummaryHeading"] = 34] = "SummaryHeading";
|
|
28278
28278
|
CoreMessage2[CoreMessage2["RunVerdictHeading"] = 35] = "RunVerdictHeading";
|
|
28279
28279
|
CoreMessage2[CoreMessage2["VerdictExit"] = 36] = "VerdictExit";
|
|
28280
28280
|
CoreMessage2[CoreMessage2["ScenarioCodeErrorsHeadline"] = 37] = "ScenarioCodeErrorsHeadline";
|
|
@@ -28418,7 +28418,7 @@ var init_messages4 = __esm({
|
|
|
28418
28418
|
MISSING = "Evidence Observation is missing";
|
|
28419
28419
|
DUPLICATE_SCN_CODE = "Evidence Obligation's @SCN code is carried by another Scenario";
|
|
28420
28420
|
CITED_WITH_NO_SCENARIO = "cited scenario ids with no real scenario";
|
|
28421
|
-
|
|
28421
|
+
NO_ONE_SCENARIO_CAN_TAKE = "evidence observations no one scenario can take";
|
|
28422
28422
|
RUNNERS_PLACE = "`specController.runners` in its `package.json`";
|
|
28423
28423
|
IN_ITS_FILE = "every coded scenario sits in the file its code names";
|
|
28424
28424
|
CORE_MESSAGES = {
|
|
@@ -28456,7 +28456,7 @@ var init_messages4 = __esm({
|
|
|
28456
28456
|
[CoreMessage.ThemPronoun]: "them",
|
|
28457
28457
|
[CoreMessage.HoldsVerb]: "holds",
|
|
28458
28458
|
[CoreMessage.HoldVerb]: "hold",
|
|
28459
|
-
[CoreMessage.
|
|
28459
|
+
[CoreMessage.SummaryHeading]: "## Summary",
|
|
28460
28460
|
[CoreMessage.RunVerdictHeading]: "### Run verdict",
|
|
28461
28461
|
[CoreMessage.VerdictExit]: (code) => `exit ${code}`,
|
|
28462
28462
|
[CoreMessage.ScenarioCodeErrorsHeadline]: "**SCENARIO CODE ERRORS**",
|
|
@@ -28489,7 +28489,7 @@ var init_messages4 = __esm({
|
|
|
28489
28489
|
[CoreMessage.ReconciliationLineSubject]: "Reconciliation line",
|
|
28490
28490
|
[CoreMessage.PendingTally]: (pending) => `${pending} Pending Item(s) \u2014 deferred, tallied apart from balanced and out-of-balance.`,
|
|
28491
28491
|
[CoreMessage.EvidenceObservationsHeading]: "### Evidence observations",
|
|
28492
|
-
[CoreMessage.EvidenceObservationsSum]: (total, onScenario, onPhantomClaim, onUnnamedClaim) => `${total} evidence observations = ${onScenario} on scenarios + ${onPhantomClaim} on ${CITED_WITH_NO_SCENARIO} + ${onUnnamedClaim}
|
|
28492
|
+
[CoreMessage.EvidenceObservationsSum]: (total, onScenario, onPhantomClaim, onUnnamedClaim) => `${total} evidence observations = ${onScenario} on scenarios + ${onPhantomClaim} on ${CITED_WITH_NO_SCENARIO} + ${onUnnamedClaim} that no one scenario can take.`,
|
|
28493
28493
|
[CoreMessage.EvidenceObservationsTableHeader]: "| Kind of quality check | Evidence observations | Runner | CI step |",
|
|
28494
28494
|
[CoreMessage.FitnessRunner]: "each fitness function's check step",
|
|
28495
28495
|
[CoreMessage.FitnessCiStep]: (steps) => `${steps} step(s), each named on its fitness function's row of Claim Reconciliations.`,
|
|
@@ -28519,14 +28519,14 @@ var init_messages4 = __esm({
|
|
|
28519
28519
|
[CoreMessage.GroupedByFeature]: ", grouped by feature",
|
|
28520
28520
|
[CoreMessage.NotGroupedByFeature]: (ungrouped) => `${ungrouped} out of balance, not grouped by feature (no feature file names them)`,
|
|
28521
28521
|
[CoreMessage.PhantomClaimReconciliations]: (count) => `${count} Claim Reconciliation(s) for ${CITED_WITH_NO_SCENARIO}`,
|
|
28522
|
-
[CoreMessage.UnnamedClaimReconciliations]: (count) => `${count} Claim Reconciliation(s) for ${
|
|
28522
|
+
[CoreMessage.UnnamedClaimReconciliations]: (count) => `${count} Claim Reconciliation(s) for ${NO_ONE_SCENARIO_CAN_TAKE}`,
|
|
28523
28523
|
[CoreMessage.AndJoiner]: " and ",
|
|
28524
28524
|
[CoreMessage.ByFeatureTableHeader]: "| Feature | Count | Out-of-balance `@SCN` ids |",
|
|
28525
28525
|
[CoreMessage.NoScnCodeScenarios]: (count) => `${count} with no \`@SCN\` code`,
|
|
28526
28526
|
[CoreMessage.ClaimReconciliationsHeading]: "## Claim Reconciliations",
|
|
28527
28527
|
[CoreMessage.ClaimReconciliationTally]: (total, balanced, outOfBalance) => `${total} Claim Reconciliation(s): ${balanced} balanced, ${outOfBalance} out-of-balance.`,
|
|
28528
28528
|
[CoreMessage.PhantomClaimTally]: (count) => `${count} Claim Reconciliation(s) for ${CITED_WITH_NO_SCENARIO}.`,
|
|
28529
|
-
[CoreMessage.UnnamedClaimTally]: (count) => `${count} Claim Reconciliation(s) for ${
|
|
28529
|
+
[CoreMessage.UnnamedClaimTally]: (count) => `${count} Claim Reconciliation(s) for ${NO_ONE_SCENARIO_CAN_TAKE}, aggregated into "${UNNAMED_CLAIM_ID}".`,
|
|
28530
28530
|
[CoreMessage.ExcludedScnOccurrences]: (count) => `${count} @SCN ids seen in non-tag context, excluded: each is an @SCN code written in a feature file's prose, a comment or step text rather than as a tag, so it marks no scenario and raises no claim`,
|
|
28531
28531
|
[CoreMessage.UntaggedScenarios]: (count) => `${count} scenario(s) carry no @SCN code`,
|
|
28532
28532
|
[CoreMessage.SharedScnCodes]: (scenarios, codes) => `The corpus holds ${scenarios} scenarios \u2014 ${codes} @SCN code(s) carried by more than one scenario, each scenario named as \`feature file : scenario title\`:`,
|
|
@@ -28715,12 +28715,11 @@ var init_runVerdict2 = __esm({
|
|
|
28715
28715
|
gloss: CORE_MESSAGES[CoreMessage.BalancedGloss]
|
|
28716
28716
|
};
|
|
28717
28717
|
runVerdictSection = (report, exitCodeOf2) => {
|
|
28718
|
-
const reconciliation = { claimReconciliations: report.ledger.claimReconciliations };
|
|
28719
28718
|
const verdict = report.summary.runVerdict;
|
|
28720
|
-
const line = verdictFor2(verdict,
|
|
28719
|
+
const line = verdictFor2(verdict, report, report.runProvenance.corpus, report.errors?.scenarioCodes ?? []);
|
|
28721
28720
|
const exit = CORE_MESSAGES[CoreMessage.VerdictExit](exitCodeOf2(verdict));
|
|
28722
28721
|
const lines = [CORE_MESSAGES[CoreMessage.RunVerdictHeading], "", `${line.headline} \u2014 ${line.gloss} (${exit})`];
|
|
28723
|
-
if (verdict === "balanced" && hasPendingItems(
|
|
28722
|
+
if (verdict === "balanced" && hasPendingItems(report)) {
|
|
28724
28723
|
lines.push("");
|
|
28725
28724
|
lines.push(CORE_MESSAGES[CoreMessage.PendingItemsOutstanding]);
|
|
28726
28725
|
}
|
|
@@ -32236,7 +32235,7 @@ function ledgerTableLines(claims, columns, stepsByQualityCheckKind) {
|
|
|
32236
32235
|
function renderReport(report, inputNames, exitCodeOf2) {
|
|
32237
32236
|
return SECTIONS.flatMap((section) => section(report, inputNames, exitCodeOf2)).join("\n");
|
|
32238
32237
|
}
|
|
32239
|
-
var reported, RESULT_MESSAGE, titleSection, runIntegritySection,
|
|
32238
|
+
var reported, RESULT_MESSAGE, titleSection, runIntegritySection, summarySection, EVIDENCE_RECONCILIATION_COLUMNS, EVIDENCE_RECONCILIATION_TERMS, evidenceReconciliationSection, byFeatureSection, ledgerSection, SECTIONS;
|
|
32240
32239
|
var init_markdown = __esm({
|
|
32241
32240
|
"../core/dist/render/markdown.js"() {
|
|
32242
32241
|
"use strict";
|
|
@@ -32267,11 +32266,9 @@ var init_markdown = __esm({
|
|
|
32267
32266
|
};
|
|
32268
32267
|
titleSection = () => [CORE_MESSAGES[CoreMessage.ReportTitle], ""];
|
|
32269
32268
|
runIntegritySection = (report) => {
|
|
32270
|
-
if (!hasBrokenEvidence(
|
|
32269
|
+
if (!hasBrokenEvidence(report))
|
|
32271
32270
|
return [];
|
|
32272
|
-
const brokenObservations = brokenItemsOf(
|
|
32273
|
-
claimReconciliations: report.ledger.claimReconciliations
|
|
32274
|
-
}).flatMap((line) => line.evidenceObservation ?? []);
|
|
32271
|
+
const brokenObservations = brokenItemsOf(report).flatMap((line) => line.evidenceObservation ?? []);
|
|
32275
32272
|
const count = brokenObservations.length;
|
|
32276
32273
|
const proofs = count === 1 ? CORE_MESSAGES[CoreMessage.OneProofNeverRan] : CORE_MESSAGES[CoreMessage.ProofsNeverRan](count);
|
|
32277
32274
|
const lines = [
|
|
@@ -32289,7 +32286,7 @@ var init_markdown = __esm({
|
|
|
32289
32286
|
}
|
|
32290
32287
|
return lines;
|
|
32291
32288
|
};
|
|
32292
|
-
|
|
32289
|
+
summarySection = () => [CORE_MESSAGES[CoreMessage.SummaryHeading], ""];
|
|
32293
32290
|
EVIDENCE_RECONCILIATION_COLUMNS = [
|
|
32294
32291
|
CORE_MESSAGES[CoreMessage.SubjectColumn],
|
|
32295
32292
|
CORE_MESSAGES[CoreMessage.TotalColumn],
|
|
@@ -32338,7 +32335,7 @@ var init_markdown = __esm({
|
|
|
32338
32335
|
return lines;
|
|
32339
32336
|
};
|
|
32340
32337
|
byFeatureSection = (report) => {
|
|
32341
|
-
const rows = report.
|
|
32338
|
+
const rows = report.claimReconciliations;
|
|
32342
32339
|
const scenarios = rows.filter(isScenario);
|
|
32343
32340
|
const groups = report.summary.outOfBalanceByFeature ?? [];
|
|
32344
32341
|
const ungrouped = ungroupedOutOfBalance(report.summary.evidenceReconciliation.claimReconciliations);
|
|
@@ -32354,9 +32351,9 @@ var init_markdown = __esm({
|
|
|
32354
32351
|
];
|
|
32355
32352
|
};
|
|
32356
32353
|
ledgerSection = (report) => {
|
|
32357
|
-
const scenarioRows = report.
|
|
32358
|
-
const phantomClaimRows2 = report.
|
|
32359
|
-
const unnamedClaimRows2 = report.
|
|
32354
|
+
const scenarioRows = report.claimReconciliations.filter(isScenario);
|
|
32355
|
+
const phantomClaimRows2 = report.claimReconciliations.filter(isPhantomClaim);
|
|
32356
|
+
const unnamedClaimRows2 = report.claimReconciliations.filter(isUnnamedClaim);
|
|
32360
32357
|
const claims = [...scenarioRows, ...phantomClaimRows2, ...unnamedClaimRows2];
|
|
32361
32358
|
const columns = report.summary.evidenceObservations !== void 0 ? evidenceColumns(claims) : [];
|
|
32362
32359
|
return [
|
|
@@ -32375,7 +32372,7 @@ var init_markdown = __esm({
|
|
|
32375
32372
|
provenanceSection,
|
|
32376
32373
|
errorsInTheInputsSection,
|
|
32377
32374
|
runIntegritySection,
|
|
32378
|
-
|
|
32375
|
+
summarySection,
|
|
32379
32376
|
(report, _inputNames, exitCodeOf2) => runVerdictSection(report, exitCodeOf2),
|
|
32380
32377
|
scenarioCodesCleanStatement,
|
|
32381
32378
|
evidenceReconciliationSection,
|
|
@@ -32868,7 +32865,7 @@ var init_inputShapes = __esm({
|
|
|
32868
32865
|
},
|
|
32869
32866
|
required: ["evidenceReconciliation", "evidenceObservations"]
|
|
32870
32867
|
},
|
|
32871
|
-
|
|
32868
|
+
claimReconciliations: { list: "anything" },
|
|
32872
32869
|
errors: {
|
|
32873
32870
|
fields: {
|
|
32874
32871
|
scenarioCodes: { list: "anything" },
|
|
@@ -32885,7 +32882,7 @@ var init_inputShapes = __esm({
|
|
|
32885
32882
|
},
|
|
32886
32883
|
scenarioCodes: { fields: {} }
|
|
32887
32884
|
},
|
|
32888
|
-
required: ["runProvenance", "summary", "
|
|
32885
|
+
required: ["runProvenance", "summary", "claimReconciliations"]
|
|
32889
32886
|
};
|
|
32890
32887
|
TOP = { kind: "top" };
|
|
32891
32888
|
}
|
|
@@ -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": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.216",
|
|
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.216"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|