spec-controller 0.1.248 → 0.1.250
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 +44 -24
- package/dist/spec-reconciliation.schema.json +31 -0
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -11439,7 +11439,7 @@ var init_featureCode = __esm({
|
|
|
11439
11439
|
"../core/dist/domain/featureCode.js"() {
|
|
11440
11440
|
"use strict";
|
|
11441
11441
|
FEATURE_PART_SOURCE = "[A-Z0-9]{2,5}";
|
|
11442
|
-
CLAIM_CODE_PREFIXES = ["CLM"
|
|
11442
|
+
CLAIM_CODE_PREFIXES = ["CLM"];
|
|
11443
11443
|
PREFIX_SOURCE = `(?:${CLAIM_CODE_PREFIXES.join("|")})`;
|
|
11444
11444
|
CLAIM_CODE_SOURCE = `${PREFIX_SOURCE}-${FEATURE_PART_SOURCE}-\\d+`;
|
|
11445
11445
|
CLAIM_CODE = new RegExp(`^${CLAIM_CODE_SOURCE}$`);
|
|
@@ -11461,7 +11461,7 @@ var init_attribution = __esm({
|
|
|
11461
11461
|
}
|
|
11462
11462
|
});
|
|
11463
11463
|
|
|
11464
|
-
// ../core/dist/domain/
|
|
11464
|
+
// ../core/dist/domain/claimCodes.js
|
|
11465
11465
|
function foreignCodeCarriersOf(error) {
|
|
11466
11466
|
const [first, ...rest] = error.namedFeatureFiles;
|
|
11467
11467
|
return first === void 0 ? { kind: "none" } : { kind: "carried", files: [first, ...rest] };
|
|
@@ -11470,7 +11470,7 @@ function hasClaimCodeErrors(reconciliation) {
|
|
|
11470
11470
|
return (reconciliation.claimCodeErrors ?? []).length > 0;
|
|
11471
11471
|
}
|
|
11472
11472
|
function claimCodeErrorsAre(errors) {
|
|
11473
|
-
const several = errors.filter((error) => error.kind === "several-claim-codes").length;
|
|
11473
|
+
const several = errors.filter((error) => error.kind === "several-claim-codes" || error.kind === "claim-code-beside-clm-column").length;
|
|
11474
11474
|
if (several === 0)
|
|
11475
11475
|
return "misfilings";
|
|
11476
11476
|
return several === errors.length ? "several-codes" : "both";
|
|
@@ -11559,6 +11559,14 @@ function severalClaimCodes(features) {
|
|
|
11559
11559
|
];
|
|
11560
11560
|
}));
|
|
11561
11561
|
}
|
|
11562
|
+
function claimCodesBesideClmColumn(features) {
|
|
11563
|
+
return features.flatMap((feature) => feature.scenarios.filter(({ clmColumn }) => clmColumn === true).map(({ name, tags }) => ({
|
|
11564
|
+
kind: "claim-code-beside-clm-column",
|
|
11565
|
+
files: [feature.file],
|
|
11566
|
+
scenario: name,
|
|
11567
|
+
codes: [...new Set(tags.filter((tag) => CLAIM_CODE.test(tag)))]
|
|
11568
|
+
})));
|
|
11569
|
+
}
|
|
11562
11570
|
function claimCodePopulationOf(features) {
|
|
11563
11571
|
return { featureFiles: features.length, featureCodes: headerFilesByCode(features).size };
|
|
11564
11572
|
}
|
|
@@ -11567,11 +11575,12 @@ function claimCodeErrorsOf(features) {
|
|
|
11567
11575
|
...duplicateFeatureCodes(features),
|
|
11568
11576
|
...foreignClaimCodes(features),
|
|
11569
11577
|
...noFeatureCodeFiles(features),
|
|
11570
|
-
...severalClaimCodes(features)
|
|
11578
|
+
...severalClaimCodes(features),
|
|
11579
|
+
...claimCodesBesideClmColumn(features)
|
|
11571
11580
|
];
|
|
11572
11581
|
}
|
|
11573
|
-
var
|
|
11574
|
-
"../core/dist/domain/
|
|
11582
|
+
var init_claimCodes = __esm({
|
|
11583
|
+
"../core/dist/domain/claimCodes.js"() {
|
|
11575
11584
|
"use strict";
|
|
11576
11585
|
init_attribution();
|
|
11577
11586
|
init_featureCode();
|
|
@@ -11705,6 +11714,9 @@ function rowCodeOf(cell) {
|
|
|
11705
11714
|
function rowClaimsOf(outline, outlineTags) {
|
|
11706
11715
|
if (!outline.examples.some((examples) => claimColumnOf(examples) >= 0))
|
|
11707
11716
|
return null;
|
|
11717
|
+
const tags = [...outlineTags, ...outline.examples.flatMap((examples) => examples.tags.map((tag) => bareTerm(tag.name)))];
|
|
11718
|
+
if (tags.some((tag) => CLAIM_CODE.test(tag)))
|
|
11719
|
+
return [{ name: outline.name, tags, clmColumn: true }];
|
|
11708
11720
|
return outline.examples.flatMap((examples) => {
|
|
11709
11721
|
const column = claimColumnOf(examples);
|
|
11710
11722
|
const blockTags = examples.tags.map((tag) => bareTerm(tag.name));
|
|
@@ -11764,9 +11776,9 @@ function claimCodesAtOf(features) {
|
|
|
11764
11776
|
function scenariosByClaimCodeOf({ scenarios }) {
|
|
11765
11777
|
const taggedScenarios = [];
|
|
11766
11778
|
const untaggedScenarios = [];
|
|
11767
|
-
for (const { name, tags } of scenarios) {
|
|
11779
|
+
for (const { name, tags, clmColumn } of scenarios) {
|
|
11768
11780
|
const { claimCode, severalCodes } = claimCodesOf(tags);
|
|
11769
|
-
if (severalCodes !== void 0)
|
|
11781
|
+
if (clmColumn === true || severalCodes !== void 0)
|
|
11770
11782
|
continue;
|
|
11771
11783
|
if (claimCode === null)
|
|
11772
11784
|
untaggedScenarios.push(name);
|
|
@@ -11806,7 +11818,7 @@ var init_scenarios = __esm({
|
|
|
11806
11818
|
init_dist2();
|
|
11807
11819
|
init_bareTerm();
|
|
11808
11820
|
init_featureCode();
|
|
11809
|
-
|
|
11821
|
+
init_claimCodes();
|
|
11810
11822
|
init_corpusCounts();
|
|
11811
11823
|
init_scenarioObligations();
|
|
11812
11824
|
init_sourceParse();
|
|
@@ -12702,7 +12714,7 @@ function nameCitationsOf(name) {
|
|
|
12702
12714
|
return segmentsLeafFirst.map((segment) => claimCodeCitationsOf(segment)).find((codes) => codes.length > 0) ?? [];
|
|
12703
12715
|
}
|
|
12704
12716
|
function claimCodePropertyValues(testcase) {
|
|
12705
|
-
return (testcase.properties?.property ?? []).filter((property) =>
|
|
12717
|
+
return (testcase.properties?.property ?? []).filter((property) => property.name === CLAIM_CODE_PROPERTY).map((property) => property.value ?? "");
|
|
12706
12718
|
}
|
|
12707
12719
|
function citedCode(value) {
|
|
12708
12720
|
return CLAIM_CODE.test(value) ? value : null;
|
|
@@ -12761,7 +12773,7 @@ var init_junit = __esm({
|
|
|
12761
12773
|
init_attribution();
|
|
12762
12774
|
init_claimCodeCitation();
|
|
12763
12775
|
init_journal();
|
|
12764
|
-
CLAIM_CODE_PROPERTY =
|
|
12776
|
+
CLAIM_CODE_PROPERTY = "clm";
|
|
12765
12777
|
GO_BUILD_FAILURE_TESTCASE = "TestMain";
|
|
12766
12778
|
GO_BUILD_FAILURE_MARK = "[build failed]";
|
|
12767
12779
|
}
|
|
@@ -27998,7 +28010,7 @@ var init_runVerdict = __esm({
|
|
|
27998
28010
|
"../core/dist/domain/runVerdict.js"() {
|
|
27999
28011
|
"use strict";
|
|
28000
28012
|
init_ledger();
|
|
28001
|
-
|
|
28013
|
+
init_claimCodes();
|
|
28002
28014
|
}
|
|
28003
28015
|
});
|
|
28004
28016
|
|
|
@@ -28349,7 +28361,7 @@ var init_evidenceReconciliationFromSources = __esm({
|
|
|
28349
28361
|
init_ciStepRecord();
|
|
28350
28362
|
init_runningFitnessFunctions();
|
|
28351
28363
|
init_targetCorpus();
|
|
28352
|
-
|
|
28364
|
+
init_claimCodes();
|
|
28353
28365
|
init_scenarios();
|
|
28354
28366
|
init_corpusCounts();
|
|
28355
28367
|
init_stepNames();
|
|
@@ -28419,14 +28431,15 @@ var init_messages_en2 = __esm({
|
|
|
28419
28431
|
"unnamed-claim-ci-steps": "{count, plural, one {{count} CI step} other {{count} CI steps}}",
|
|
28420
28432
|
"unnamed-claim-ci-steps-named": "{count, plural, one {{count} CI step} other {{count} CI steps}}: {list}",
|
|
28421
28433
|
"claim-code-errors-framing": "{count} \u2014 each misfiles a claim code, so the by-feature cut below cannot be trusted, and the run fails (exit 1). Every account still reconciles as it would if the code were filed correctly.",
|
|
28422
|
-
"several-claim-codes-framing": "{count} \u2014 each is a scenario carrying more than one claim code, so no account was raised for it under any of them, and the run fails (exit 1).",
|
|
28423
|
-
"misfiled-and-several-claim-codes-framing": "{count} \u2014 each either misfiles a claim code, so the by-feature cut below cannot be trusted, or is a scenario carrying more than one claim code, so no account was raised for it under any of them. The run fails (exit 1).",
|
|
28434
|
+
"several-claim-codes-framing": "{count} \u2014 each is a scenario carrying more than one claim code, or a claim code beside a clm column, so no account was raised for it under any of them, and the run fails (exit 1).",
|
|
28435
|
+
"misfiled-and-several-claim-codes-framing": "{count} \u2014 each either misfiles a claim code, so the by-feature cut below cannot be trusted, or is a scenario carrying more than one claim code, or a claim code beside a clm column, so no account was raised for it under any of them. The run fails (exit 1).",
|
|
28424
28436
|
"duplicate-claim-code-not-listed": `A duplicated claim code is not listed here: it is reported on its account's rows, as "{outcome}".`,
|
|
28425
28437
|
"duplicate-feature-code": "the feature code @{code} is carried by {fileCount} feature files \u2014 {files}. A feature code names exactly one feature file: a reconciliation's by-feature cut groups on it, so two files sharing a code report as one row and attribute one file's scenarios to the other. Give one of them a code of its own.",
|
|
28426
28438
|
"foreign-claim-code-carried": "{file} carries the feature code @{featureCode}, but holds the scenario @{claimCode}, whose feature part names {named}. A reconciliation's by-feature cut groups on the id, so it counts this scenario under {carrierCount, plural, one {{carriers}'s row, not {file}'s. Re-code the scenario for @{featureCode}, or move it to {carriers}.} other {the one row for {named}, which {carrierCount} feature files carry \u2014 {carriers} \u2014 so that row cannot say which of them it belongs to. Re-code the scenario for @{featureCode}, or move it once a single file carries {named}.}}",
|
|
28427
28439
|
"foreign-claim-code-no-carrier": "{file} carries the feature code @{featureCode}, but holds the scenario @{claimCode}, whose feature part names {named}. A reconciliation's by-feature cut groups on the id, so it opens a row for {named}, which no feature file carries as its header code, so that row stands for no file. Re-code the scenario for @{featureCode}.",
|
|
28428
28440
|
"no-feature-code": "{file} carries no feature code, but its scenarios carry claim codes. A feature file is the class its scenarios' codes are filed under: give it a header code of its own, and code its scenarios for it.",
|
|
28429
28441
|
"several-claim-codes": `{file}'s scenario "{scenario}" carries {codeCount} claim codes \u2014 {codes}. A scenario is one account, so it raises its evidence obligations under none of them, and a test citing any of them cites a code no scenario carries. Give it one code.`,
|
|
28442
|
+
"claim-code-beside-clm-column": `{file}'s Outline "{scenario}" carries {codeCount, plural, one {the claim code} other {the claim codes}} {codes} beside a clm column. An Outline is one claim under the code it carries or one claim for each row under the code in its clm cell, never both, so it raises no evidence obligations, and a test citing its code or a row's cites a code no scenario carries. Take the code off the Outline, or drop its clm column.`,
|
|
28430
28443
|
"report-title": "Evidence Reconciliation",
|
|
28431
28444
|
"run-provenance-heading": "Run provenance",
|
|
28432
28445
|
"provenance-target-repo": "Target repo: {target}",
|
|
@@ -28450,8 +28463,8 @@ var init_messages_en2 = __esm({
|
|
|
28450
28463
|
"verdict-exit": "exit {code}",
|
|
28451
28464
|
"claim-code-errors-headline": "**CLAIM CODE ERRORS**",
|
|
28452
28465
|
"claim-code-errors-gloss": "the corpus files a claim code under the wrong feature, so the by-feature grouping cannot be trusted. Read `{heading}` above.{alsoOutOfBalance} This run FAILED.",
|
|
28453
|
-
"several-claim-codes-gloss": "a scenario in the corpus carries more than one claim code, so no account was raised for it under any of them. Read `{heading}` above.{alsoOutOfBalance} This run FAILED.",
|
|
28454
|
-
"misfiled-and-several-claim-codes-gloss": "the corpus files a claim code under the wrong feature, so the by-feature grouping cannot be trusted, and a scenario in it carries more than one claim code, so no account was raised for it under any of them. Read `{heading}` above.{alsoOutOfBalance} This run FAILED.",
|
|
28466
|
+
"several-claim-codes-gloss": "a scenario in the corpus carries more than one claim code, or a claim code beside a clm column, so no account was raised for it under any of them. Read `{heading}` above.{alsoOutOfBalance} This run FAILED.",
|
|
28467
|
+
"misfiled-and-several-claim-codes-gloss": "the corpus files a claim code under the wrong feature, so the by-feature grouping cannot be trusted, and a scenario in it carries more than one claim code, or a claim code beside a clm column, so no account was raised for it under any of them. Read `{heading}` above.{alsoOutOfBalance} This run FAILED.",
|
|
28455
28468
|
"also-out-of-balance": " The accounts do not agree either: at least one Claim Reconciliation carries a reconciling item.",
|
|
28456
28469
|
"out-of-balance-headline": "**OUT-OF-BALANCE**",
|
|
28457
28470
|
"out-of-balance-gloss": "the accounts do not agree. At least one Claim Reconciliation carries a reconciling item. This run FAILED.",
|
|
@@ -31385,6 +31398,7 @@ var init_messages4 = __esm({
|
|
|
31385
31398
|
CoreMessage2["ForeignClaimCodeNoCarrier"] = "foreign-claim-code-no-carrier";
|
|
31386
31399
|
CoreMessage2["NoFeatureCode"] = "no-feature-code";
|
|
31387
31400
|
CoreMessage2["ScenarioSeveralClaimCodes"] = "several-claim-codes";
|
|
31401
|
+
CoreMessage2["ClaimCodeBesideClmColumn"] = "claim-code-beside-clm-column";
|
|
31388
31402
|
CoreMessage2["RunnerKeyNotALayer"] = "runner-key-not-a-layer";
|
|
31389
31403
|
CoreMessage2["NotChecksEntryMatchesNoStep"] = "not-checks-entry-matches-no-step";
|
|
31390
31404
|
CoreMessage2["NotChecksEntryNotAStepName"] = "not-checks-entry-not-a-step-name";
|
|
@@ -31530,6 +31544,7 @@ var init_messages4 = __esm({
|
|
|
31530
31544
|
CoreError2["ForeignClaimCode"] = "foreign-claim-code";
|
|
31531
31545
|
CoreError2["NoFeatureCode"] = "no-feature-code";
|
|
31532
31546
|
CoreError2["SeveralClaimCodes"] = "several-claim-codes";
|
|
31547
|
+
CoreError2["ClaimCodeBesideClmColumn"] = "claim-code-beside-clm-column";
|
|
31533
31548
|
})(CoreError || (CoreError = {}));
|
|
31534
31549
|
}
|
|
31535
31550
|
});
|
|
@@ -31662,7 +31677,7 @@ var init_runVerdict2 = __esm({
|
|
|
31662
31677
|
"../core/dist/render/runVerdict.js"() {
|
|
31663
31678
|
"use strict";
|
|
31664
31679
|
init_ledger();
|
|
31665
|
-
|
|
31680
|
+
init_claimCodes();
|
|
31666
31681
|
init_messages4();
|
|
31667
31682
|
init_coreText();
|
|
31668
31683
|
init_heading();
|
|
@@ -31748,7 +31763,7 @@ function worded(error) {
|
|
|
31748
31763
|
return foreignWorded(error);
|
|
31749
31764
|
if (error.kind === "no-feature-code")
|
|
31750
31765
|
return coreMessage(CoreMessage.NoFeatureCode, { file: error.files.join(", ") });
|
|
31751
|
-
return coreMessage(
|
|
31766
|
+
return coreMessage(NO_ACCOUNT_MESSAGE_OF[error.kind], {
|
|
31752
31767
|
file: error.files.join(", "),
|
|
31753
31768
|
scenario: error.scenario,
|
|
31754
31769
|
codeCount: error.codes.length,
|
|
@@ -31769,11 +31784,11 @@ function foreignWorded(error) {
|
|
|
31769
31784
|
});
|
|
31770
31785
|
}
|
|
31771
31786
|
}
|
|
31772
|
-
var CODE_OF, claimCodeErrorsSection, claimCodesCleanStatement;
|
|
31787
|
+
var CODE_OF, NO_ACCOUNT_MESSAGE_OF, claimCodeErrorsSection, claimCodesCleanStatement;
|
|
31773
31788
|
var init_claimCodeErrorsSection = __esm({
|
|
31774
31789
|
"../core/dist/render/claimCodeErrorsSection.js"() {
|
|
31775
31790
|
"use strict";
|
|
31776
|
-
|
|
31791
|
+
init_claimCodes();
|
|
31777
31792
|
init_messages4();
|
|
31778
31793
|
init_coreText();
|
|
31779
31794
|
init_heading();
|
|
@@ -31782,7 +31797,12 @@ var init_claimCodeErrorsSection = __esm({
|
|
|
31782
31797
|
"duplicate-feature-code": CoreError.DuplicateFeatureCode,
|
|
31783
31798
|
"foreign-claim-code": CoreError.ForeignClaimCode,
|
|
31784
31799
|
"no-feature-code": CoreError.NoFeatureCode,
|
|
31785
|
-
"several-claim-codes": CoreError.SeveralClaimCodes
|
|
31800
|
+
"several-claim-codes": CoreError.SeveralClaimCodes,
|
|
31801
|
+
"claim-code-beside-clm-column": CoreError.ClaimCodeBesideClmColumn
|
|
31802
|
+
};
|
|
31803
|
+
NO_ACCOUNT_MESSAGE_OF = {
|
|
31804
|
+
"several-claim-codes": CoreMessage.ScenarioSeveralClaimCodes,
|
|
31805
|
+
"claim-code-beside-clm-column": CoreMessage.ClaimCodeBesideClmColumn
|
|
31786
31806
|
};
|
|
31787
31807
|
claimCodeErrorsSection = (report) => {
|
|
31788
31808
|
const errors = report.errorsInTheInputs?.claimCodeErrors;
|
|
@@ -32624,7 +32644,7 @@ var init_dist3 = __esm({
|
|
|
32624
32644
|
init_scenarios();
|
|
32625
32645
|
init_corpusCounts();
|
|
32626
32646
|
init_evidenceReconciliation();
|
|
32627
|
-
|
|
32647
|
+
init_claimCodes();
|
|
32628
32648
|
init_ledger();
|
|
32629
32649
|
init_pendingItems();
|
|
32630
32650
|
init_claimCodeAllocation();
|
|
@@ -33006,7 +33026,7 @@ var init_inputShapes = __esm({
|
|
|
33006
33026
|
}
|
|
33007
33027
|
}
|
|
33008
33028
|
},
|
|
33009
|
-
retired: {
|
|
33029
|
+
retired: { configuration: "configurationNotRead" }
|
|
33010
33030
|
}
|
|
33011
33031
|
},
|
|
33012
33032
|
required: ["runProvenance", "summary", "claimReconciliations"],
|
|
@@ -254,6 +254,37 @@
|
|
|
254
254
|
"codes"
|
|
255
255
|
],
|
|
256
256
|
"additionalProperties": false
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "object",
|
|
260
|
+
"properties": {
|
|
261
|
+
"kind": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"const": "claim-code-beside-clm-column"
|
|
264
|
+
},
|
|
265
|
+
"files": {
|
|
266
|
+
"type": "array",
|
|
267
|
+
"items": {
|
|
268
|
+
"type": "string"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"scenario": {
|
|
272
|
+
"type": "string"
|
|
273
|
+
},
|
|
274
|
+
"codes": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"items": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"required": [
|
|
282
|
+
"kind",
|
|
283
|
+
"files",
|
|
284
|
+
"scenario",
|
|
285
|
+
"codes"
|
|
286
|
+
],
|
|
287
|
+
"additionalProperties": false
|
|
257
288
|
}
|
|
258
289
|
]
|
|
259
290
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.250",
|
|
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.250"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|