spec-controller 0.1.246 → 0.1.248

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 (2) hide show
  1. package/dist/cli.js +142 -142
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -11434,15 +11434,15 @@ function isFeaturePart(text) {
11434
11434
  function headerFeatureCode(featureTags) {
11435
11435
  return featureTags.find(isFeaturePart) ?? null;
11436
11436
  }
11437
- var FEATURE_PART_SOURCE, CLAIM_CODE_PREFIXES, PREFIX_SOURCE, SCN_ID_SOURCE, SCN_CODE, FEATURE_CODE_OF, FEATURE_PART;
11437
+ var FEATURE_PART_SOURCE, CLAIM_CODE_PREFIXES, PREFIX_SOURCE, CLAIM_CODE_SOURCE, CLAIM_CODE, FEATURE_CODE_OF, FEATURE_PART;
11438
11438
  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
11442
  CLAIM_CODE_PREFIXES = ["CLM", "SCN"];
11443
11443
  PREFIX_SOURCE = `(?:${CLAIM_CODE_PREFIXES.join("|")})`;
11444
- SCN_ID_SOURCE = `${PREFIX_SOURCE}-${FEATURE_PART_SOURCE}-\\d+`;
11445
- SCN_CODE = new RegExp(`^${SCN_ID_SOURCE}$`);
11444
+ CLAIM_CODE_SOURCE = `${PREFIX_SOURCE}-${FEATURE_PART_SOURCE}-\\d+`;
11445
+ CLAIM_CODE = new RegExp(`^${CLAIM_CODE_SOURCE}$`);
11446
11446
  FEATURE_CODE_OF = new RegExp(`^${PREFIX_SOURCE}-(${FEATURE_PART_SOURCE})-\\d+$`);
11447
11447
  FEATURE_PART = new RegExp(`^${FEATURE_PART_SOURCE}$`);
11448
11448
  }
@@ -11466,16 +11466,16 @@ function foreignCodeCarriersOf(error) {
11466
11466
  const [first, ...rest] = error.namedFeatureFiles;
11467
11467
  return first === void 0 ? { kind: "none" } : { kind: "carried", files: [first, ...rest] };
11468
11468
  }
11469
- function hasScenarioCodeErrors(reconciliation) {
11469
+ function hasClaimCodeErrors(reconciliation) {
11470
11470
  return (reconciliation.claimCodeErrors ?? []).length > 0;
11471
11471
  }
11472
- function scenarioCodeErrorsAre(errors) {
11472
+ function claimCodeErrorsAre(errors) {
11473
11473
  const several = errors.filter((error) => error.kind === "several-claim-codes").length;
11474
11474
  if (several === 0)
11475
11475
  return "misfilings";
11476
11476
  return several === errors.length ? "several-codes" : "both";
11477
11477
  }
11478
- function scenarioCodeCleanlinessOf({ featureFiles, featureCodes }) {
11478
+ function claimCodeCleanlinessOf({ featureFiles, featureCodes }) {
11479
11479
  if (featureFiles === 0)
11480
11480
  return { kind: "no-feature-file" };
11481
11481
  if (featureCodes === 0)
@@ -11484,8 +11484,8 @@ function scenarioCodeCleanlinessOf({ featureFiles, featureCodes }) {
11484
11484
  return { kind: "each-file-own-code", featureFiles, featureCodes };
11485
11485
  return { kind: "others-no-feature-code", featureFiles, featureCodes, noFeatureCode: featureFiles - featureCodes };
11486
11486
  }
11487
- function scenarioCodesOf(tags) {
11488
- return attributionOf(tags.filter((tag) => SCN_CODE.test(tag)));
11487
+ function claimCodesOf(tags) {
11488
+ return attributionOf(tags.filter((tag) => CLAIM_CODE.test(tag)));
11489
11489
  }
11490
11490
  function headerFilesByCode(features) {
11491
11491
  const filesByCode = /* @__PURE__ */ new Map();
@@ -11511,11 +11511,11 @@ function duplicateFeatureCodes(features) {
11511
11511
  }
11512
11512
  function codedScenarioIds(feature) {
11513
11513
  return feature.scenarios.flatMap(({ tags }) => {
11514
- const { claimCode } = scenarioCodesOf(tags);
11514
+ const { claimCode } = claimCodesOf(tags);
11515
11515
  return claimCode === null ? [] : [claimCode];
11516
11516
  });
11517
11517
  }
11518
- function foreignScenarioCodes(features) {
11518
+ function foreignClaimCodes(features) {
11519
11519
  const carriersByCode = headerFilesByCode(features);
11520
11520
  const faults = [];
11521
11521
  for (const feature of features) {
@@ -11544,9 +11544,9 @@ function noFeatureCodeFiles(features) {
11544
11544
  files: [feature.file]
11545
11545
  }));
11546
11546
  }
11547
- function severalScnCodes(features) {
11547
+ function severalClaimCodes(features) {
11548
11548
  return features.flatMap((feature) => feature.scenarios.flatMap(({ name, tags }) => {
11549
- const { severalCodes } = scenarioCodesOf(tags);
11549
+ const { severalCodes } = claimCodesOf(tags);
11550
11550
  if (severalCodes === void 0)
11551
11551
  return [];
11552
11552
  return [
@@ -11559,15 +11559,15 @@ function severalScnCodes(features) {
11559
11559
  ];
11560
11560
  }));
11561
11561
  }
11562
- function scenarioCodePopulationOf(features) {
11562
+ function claimCodePopulationOf(features) {
11563
11563
  return { featureFiles: features.length, featureCodes: headerFilesByCode(features).size };
11564
11564
  }
11565
- function scenarioCodeErrorsOf(features) {
11565
+ function claimCodeErrorsOf(features) {
11566
11566
  return [
11567
11567
  ...duplicateFeatureCodes(features),
11568
- ...foreignScenarioCodes(features),
11568
+ ...foreignClaimCodes(features),
11569
11569
  ...noFeatureCodeFiles(features),
11570
- ...severalScnCodes(features)
11570
+ ...severalClaimCodes(features)
11571
11571
  ];
11572
11572
  }
11573
11573
  var init_scnTags = __esm({
@@ -11582,7 +11582,7 @@ var init_scnTags = __esm({
11582
11582
  function untaggedScenarioId({ feature, title }) {
11583
11583
  return `${feature} : ${title}`;
11584
11584
  }
11585
- function sharedScnCodesOf(files) {
11585
+ function sharedClaimCodesOf(files) {
11586
11586
  const byCode = /* @__PURE__ */ new Map();
11587
11587
  for (const { feature, taggedScenarios } of files) {
11588
11588
  for (const { claimCode, name } of taggedScenarios) {
@@ -11592,15 +11592,15 @@ function sharedScnCodesOf(files) {
11592
11592
  return [...byCode].filter(([, scenarios]) => scenarios.length > 1).map(([claimCode, scenarios]) => ({ claimCode, scenarios })).sort((a, b) => a.claimCode.localeCompare(b.claimCode));
11593
11593
  }
11594
11594
  function corpusCountsOf(files) {
11595
- const raw = files.reduce((n, f) => n + f.rawScnOccurrences, 0);
11595
+ const raw = files.reduce((n, f) => n + f.rawClaimCodeOccurrences, 0);
11596
11596
  const scenarioCount = files.reduce((n, f) => n + f.taggedScenarios.length, 0);
11597
- const tagOccurrences = files.reduce((n, f) => n + f.tagScnOccurrences, 0);
11597
+ const tagOccurrences = files.reduce((n, f) => n + f.tagClaimCodeOccurrences, 0);
11598
11598
  const untagged = files.flatMap(({ feature, untaggedScenarios }) => untaggedScenarios.map((title) => ({ feature, title }))).sort((a, b) => a.feature.localeCompare(b.feature) || a.title.localeCompare(b.title));
11599
- return evidenceObligations(raw, scenarioCount, untagged, sharedScnCodesOf(files), tagOccurrences);
11599
+ return evidenceObligations(raw, scenarioCount, untagged, sharedClaimCodesOf(files), tagOccurrences);
11600
11600
  }
11601
11601
  function evidenceObligations(raw, scenarioCount, untaggedScenarios = [], sharedClaimCodes = [], tagOccurrences = scenarioCount) {
11602
11602
  return {
11603
- rawScnOccurrences: raw,
11603
+ rawClaimCodeOccurrences: raw,
11604
11604
  scenarioCount,
11605
11605
  excludedOccurrences: raw - tagOccurrences,
11606
11606
  untaggedScenarios,
@@ -11690,8 +11690,8 @@ var init_sourceParse = __esm({
11690
11690
  });
11691
11691
 
11692
11692
  // ../core/dist/parse/scenarios.js
11693
- function countScnOccurrences(source) {
11694
- return (source.match(SCN_OCCURRENCE) ?? []).length;
11693
+ function countClaimCodeOccurrences(source) {
11694
+ return (source.match(CLAIM_CODE_OCCURRENCE) ?? []).length;
11695
11695
  }
11696
11696
  function gherkinDocumentOf(source) {
11697
11697
  return new Parser(new AstBuilder(IdGenerator_exports2.uuid()), new GherkinClassicTokenMatcher()).parse(source);
@@ -11700,7 +11700,7 @@ function claimColumnOf(examples) {
11700
11700
  return examples.tableHeader?.cells.findIndex((cell) => cell.value === CLAIM_COLUMN) ?? -1;
11701
11701
  }
11702
11702
  function rowCodeOf(cell) {
11703
- return SCN_CODE.test(cell) ? [cell] : [];
11703
+ return CLAIM_CODE.test(cell) ? [cell] : [];
11704
11704
  }
11705
11705
  function rowClaimsOf(outline, outlineTags) {
11706
11706
  if (!outline.examples.some((examples) => claimColumnOf(examples) >= 0))
@@ -11716,13 +11716,13 @@ function rowClaimsOf(outline, outlineTags) {
11716
11716
  });
11717
11717
  }
11718
11718
  function contentOf({ feature }, source) {
11719
- const scnOccurrences = countScnOccurrences(source);
11719
+ const claimCodeOccurrences = countClaimCodeOccurrences(source);
11720
11720
  if (feature === void 0)
11721
- return { featureCode: null, scenarios: [], scnOccurrences, tagScnOccurrences: 0 };
11721
+ return { featureCode: null, scenarios: [], claimCodeOccurrences, tagClaimCodeOccurrences: 0 };
11722
11722
  const scenarios = [];
11723
- let tagScnOccurrences = 0;
11723
+ let tagClaimCodeOccurrences = 0;
11724
11724
  const countTags = (tags) => {
11725
- tagScnOccurrences += countScnOccurrences(tags.map((t) => t.name).join(" "));
11725
+ tagClaimCodeOccurrences += countClaimCodeOccurrences(tags.map((t) => t.name).join(" "));
11726
11726
  };
11727
11727
  const bare = (tags) => tags.map((t) => bareTerm(t.name));
11728
11728
  const collect = (children, inherited) => {
@@ -11748,24 +11748,24 @@ function contentOf({ feature }, source) {
11748
11748
  countTags(feature.tags);
11749
11749
  const featureTags = bare(feature.tags);
11750
11750
  collect(feature.children, featureTags);
11751
- return { featureCode: headerFeatureCode(featureTags), scenarios, scnOccurrences, tagScnOccurrences };
11751
+ return { featureCode: headerFeatureCode(featureTags), scenarios, claimCodeOccurrences, tagClaimCodeOccurrences };
11752
11752
  }
11753
11753
  function parseFeatureCorpus(sources) {
11754
11754
  return parseSources(sources, gherkinDocumentOf, contentOf);
11755
11755
  }
11756
11756
  function claimCodesAtOf(features) {
11757
- const rows = features.flatMap(({ file, scenarios }) => scenarios.map(({ line, tags }) => ({ file: `/${portable(file)}`, line, codes: tags.filter((tag) => SCN_CODE.test(tag)) })));
11757
+ const rows = features.flatMap(({ file, scenarios }) => scenarios.map(({ line, tags }) => ({ file: `/${portable(file)}`, line, codes: tags.filter((tag) => CLAIM_CODE.test(tag)) })));
11758
11758
  return (path, line) => {
11759
11759
  const reported2 = `/${portable(path)}`;
11760
11760
  const matching = rows.filter((row) => row.line === line && reported2.endsWith(row.file));
11761
11761
  return matching.sort((a, b) => b.file.length - a.file.length)[0]?.codes ?? [];
11762
11762
  };
11763
11763
  }
11764
- function scenariosByScnCodeOf({ scenarios }) {
11764
+ function scenariosByClaimCodeOf({ scenarios }) {
11765
11765
  const taggedScenarios = [];
11766
11766
  const untaggedScenarios = [];
11767
11767
  for (const { name, tags } of scenarios) {
11768
- const { claimCode, severalCodes } = scenarioCodesOf(tags);
11768
+ const { claimCode, severalCodes } = claimCodesOf(tags);
11769
11769
  if (severalCodes !== void 0)
11770
11770
  continue;
11771
11771
  if (claimCode === null)
@@ -11776,13 +11776,13 @@ function scenariosByScnCodeOf({ scenarios }) {
11776
11776
  return { taggedScenarios, untaggedScenarios };
11777
11777
  }
11778
11778
  function untaggedScenariosOf(feature) {
11779
- return scenariosByScnCodeOf(feature).untaggedScenarios;
11779
+ return scenariosByClaimCodeOf(feature).untaggedScenarios;
11780
11780
  }
11781
11781
  function featureCountsOf(feature) {
11782
- const { taggedScenarios, untaggedScenarios } = scenariosByScnCodeOf(feature);
11782
+ const { taggedScenarios, untaggedScenarios } = scenariosByClaimCodeOf(feature);
11783
11783
  return {
11784
- rawScnOccurrences: feature.scnOccurrences,
11785
- tagScnOccurrences: feature.tagScnOccurrences,
11784
+ rawClaimCodeOccurrences: feature.claimCodeOccurrences,
11785
+ tagClaimCodeOccurrences: feature.tagClaimCodeOccurrences,
11786
11786
  taggedScenarios,
11787
11787
  untaggedScenarios
11788
11788
  };
@@ -11791,14 +11791,14 @@ function corpusCountsOfFeatures(features) {
11791
11791
  return corpusCountsOf(features.map((parsed) => ({ feature: parsed.file, ...featureCountsOf(parsed) })));
11792
11792
  }
11793
11793
  function namedScenariosOf(feature, deferralTags = []) {
11794
- return scenariosByScnCodeOf(feature).taggedScenarios.map((scenario) => ({
11794
+ return scenariosByClaimCodeOf(feature).taggedScenarios.map((scenario) => ({
11795
11795
  claimCode: scenario.claimCode,
11796
11796
  evidenceObligations: obligationsRaisedBy(scenario.tags, deferralTags),
11797
11797
  feature: feature.file,
11798
11798
  title: scenario.name
11799
11799
  }));
11800
11800
  }
11801
- var SCN_OCCURRENCE, CLAIM_COLUMN, portable;
11801
+ var CLAIM_CODE_OCCURRENCE, CLAIM_COLUMN, portable;
11802
11802
  var init_scenarios = __esm({
11803
11803
  "../core/dist/parse/scenarios.js"() {
11804
11804
  "use strict";
@@ -11810,7 +11810,7 @@ var init_scenarios = __esm({
11810
11810
  init_corpusCounts();
11811
11811
  init_scenarioObligations();
11812
11812
  init_sourceParse();
11813
- SCN_OCCURRENCE = new RegExp(`@${SCN_ID_SOURCE}`, "g");
11813
+ CLAIM_CODE_OCCURRENCE = new RegExp(`@${CLAIM_CODE_SOURCE}`, "g");
11814
11814
  CLAIM_COLUMN = "clm";
11815
11815
  portable = (path) => path.replaceAll("\\", "/");
11816
11816
  }
@@ -11992,10 +11992,10 @@ function citesUnknownScenarioReconciliationsOf(observations) {
11992
11992
  function unnamedClaimReconciliationsOf(observations) {
11993
11993
  return reconciliationsByQualityCheckKind(observations, "unnamed-claim");
11994
11994
  }
11995
- function noScnCodeReconciliations() {
11995
+ function noClaimCodeReconciliations() {
11996
11996
  return [makeQualityCheckReconciliation({ outcome: "no-claim-code", evidenceObligation: { qualityCheckKind: null } })];
11997
11997
  }
11998
- function duplicateScnCodeReconciliationsOf(obligations, scenario) {
11998
+ function duplicateClaimCodeReconciliationsOf(obligations, scenario) {
11999
11999
  const naming = scenario === void 0 ? {} : { scenario };
12000
12000
  const kinds = /* @__PURE__ */ new Set();
12001
12001
  for (const obligation of obligations) {
@@ -12099,7 +12099,7 @@ function isOutOfBalance(row) {
12099
12099
  function outOfBalanceCountOf(rows) {
12100
12100
  return rows.filter(isOutOfBalance).length;
12101
12101
  }
12102
- function carriesNoScnCode(row) {
12102
+ function carriesNoClaimCode(row) {
12103
12103
  return reconcilingItemsOf(row).some((item) => item.outcome === "no-claim-code");
12104
12104
  }
12105
12105
  function ranObservationsOf(row) {
@@ -12328,18 +12328,18 @@ var init_evidenceOrder = __esm({
12328
12328
 
12329
12329
  // ../core/dist/domain/evidenceReconciliation.js
12330
12330
  function citationIndex() {
12331
- const byScn = /* @__PURE__ */ new Map();
12331
+ const byClaimCode = /* @__PURE__ */ new Map();
12332
12332
  const phantomClaimIds = [];
12333
12333
  return {
12334
12334
  file(posting, observation) {
12335
- const list = byScn.get(posting.claimCode) ?? [];
12335
+ const list = byClaimCode.get(posting.claimCode) ?? [];
12336
12336
  list.push(observation);
12337
- byScn.set(posting.claimCode, list);
12337
+ byClaimCode.set(posting.claimCode, list);
12338
12338
  if (posting.kind === "phantom-claim" && !phantomClaimIds.includes(posting.claimCode)) {
12339
12339
  phantomClaimIds.push(posting.claimCode);
12340
12340
  }
12341
12341
  },
12342
- observationsFor: (claimCode) => byScn.get(claimCode) ?? [],
12342
+ observationsFor: (claimCode) => byClaimCode.get(claimCode) ?? [],
12343
12343
  phantomClaimIds
12344
12344
  };
12345
12345
  }
@@ -12385,8 +12385,8 @@ function accountsByCode(scenarios) {
12385
12385
  }
12386
12386
  return [...byCode.values()];
12387
12387
  }
12388
- function duplicateScnCodeRow(sharer) {
12389
- const items = duplicateScnCodeReconciliationsOf(sharer.evidenceObligations, scenarioNameOf(sharer));
12388
+ function duplicateClaimCodeRow(sharer) {
12389
+ const items = duplicateClaimCodeReconciliationsOf(sharer.evidenceObligations, scenarioNameOf(sharer));
12390
12390
  return {
12391
12391
  claim: sharer.claimCode,
12392
12392
  kind: "scenario",
@@ -12427,7 +12427,7 @@ function unnamedClaimRows({ onUnnamedClaim }) {
12427
12427
  function untaggedScenarioRows(untaggedScenarios) {
12428
12428
  const rows = [];
12429
12429
  for (const name of untaggedScenarios) {
12430
- const items = noScnCodeReconciliations();
12430
+ const items = noClaimCodeReconciliations();
12431
12431
  rows.push({
12432
12432
  claim: name,
12433
12433
  kind: "scenario",
@@ -12447,7 +12447,7 @@ function reconcile(scenarios, evidenceObservations, untaggedScenarios = []) {
12447
12447
  const { citations, ...unnamed } = routeObservations(observations, scenarioIds, sharedClaimCodes);
12448
12448
  return {
12449
12449
  claimReconciliations: [
12450
- ...accounts.flatMap((sharers) => sharers.length === 1 ? [scenarioRow(sharers[0], observations, citations, evidenceObligationPairs)] : sharers.map(duplicateScnCodeRow)),
12450
+ ...accounts.flatMap((sharers) => sharers.length === 1 ? [scenarioRow(sharers[0], observations, citations, evidenceObligationPairs)] : sharers.map(duplicateClaimCodeRow)),
12451
12451
  ...phantomClaimRows(citations),
12452
12452
  ...unnamedClaimRows(unnamed),
12453
12453
  ...untaggedScenarioRows(untaggedScenarios)
@@ -12522,7 +12522,7 @@ var init_pendingItems = __esm({
12522
12522
  }
12523
12523
  });
12524
12524
 
12525
- // ../core/dist/domain/scnAllocation.js
12525
+ // ../core/dist/domain/claimCodeAllocation.js
12526
12526
  function numberOf(code) {
12527
12527
  return Number(code.slice(code.lastIndexOf("-") + 1));
12528
12528
  }
@@ -12533,7 +12533,7 @@ function outranks(code, occurrence, highest) {
12533
12533
  function highestOf(part, occurrences) {
12534
12534
  let highest = null;
12535
12535
  for (const occurrence of occurrences) {
12536
- for (const [code] of occurrence.text.matchAll(SCN_CODES)) {
12536
+ for (const [code] of occurrence.text.matchAll(CLAIM_CODES)) {
12537
12537
  if (featureCodeOf(code) !== part)
12538
12538
  continue;
12539
12539
  if (highest === null || outranks(code, occurrence, highest))
@@ -12542,7 +12542,7 @@ function highestOf(part, occurrences) {
12542
12542
  }
12543
12543
  return highest;
12544
12544
  }
12545
- function nextScnCode(request, occurrences) {
12545
+ function nextClaimCode(request, occurrences) {
12546
12546
  const headed = request.headerCodes.includes(request.part);
12547
12547
  if (!headed && request.isNew !== true) {
12548
12548
  return { kind: "unknown-part", part: request.part, headerCodes: [...new Set(request.headerCodes)].sort() };
@@ -12556,13 +12556,13 @@ function unknownPartCarried(unknown) {
12556
12556
  const [first, ...rest] = unknown.headerCodes;
12557
12557
  return first === void 0 ? { kind: "none" } : { kind: "some", headerCodes: [first, ...rest] };
12558
12558
  }
12559
- var NUMBER_WIDTH, SCN_CODES;
12560
- var init_scnAllocation = __esm({
12561
- "../core/dist/domain/scnAllocation.js"() {
12559
+ var NUMBER_WIDTH, CLAIM_CODES;
12560
+ var init_claimCodeAllocation = __esm({
12561
+ "../core/dist/domain/claimCodeAllocation.js"() {
12562
12562
  "use strict";
12563
12563
  init_featureCode();
12564
12564
  NUMBER_WIDTH = 3;
12565
- SCN_CODES = new RegExp(SCN_ID_SOURCE, "g");
12565
+ CLAIM_CODES = new RegExp(CLAIM_CODE_SOURCE, "g");
12566
12566
  }
12567
12567
  });
12568
12568
 
@@ -12582,16 +12582,16 @@ var init_portablePath = __esm({
12582
12582
  }
12583
12583
  });
12584
12584
 
12585
- // ../core/dist/lib/scnCitation.js
12586
- function scnCitationsOf(text) {
12587
- return [...text.matchAll(SCN_CITATION)].map((match) => match[1]);
12585
+ // ../core/dist/lib/claimCodeCitation.js
12586
+ function claimCodeCitationsOf(text) {
12587
+ return [...text.matchAll(CLAIM_CODE_CITATION)].map((match) => match[1]);
12588
12588
  }
12589
- var SCN_CITATION;
12590
- var init_scnCitation = __esm({
12591
- "../core/dist/lib/scnCitation.js"() {
12589
+ var CLAIM_CODE_CITATION;
12590
+ var init_claimCodeCitation = __esm({
12591
+ "../core/dist/lib/claimCodeCitation.js"() {
12592
12592
  "use strict";
12593
12593
  init_featureCode();
12594
- SCN_CITATION = new RegExp(`\\[(${SCN_ID_SOURCE})\\]`, "g");
12594
+ CLAIM_CODE_CITATION = new RegExp(`\\[(${CLAIM_CODE_SOURCE})\\]`, "g");
12595
12595
  }
12596
12596
  });
12597
12597
 
@@ -12632,8 +12632,8 @@ function parseVitestEvidenceObservations(report, root) {
12632
12632
  return results;
12633
12633
  }
12634
12634
  function citingCodesOf(assertion) {
12635
- const leafCodes = scnCitationsOf(assertion.title ?? "");
12636
- return leafCodes.length > 0 ? leafCodes : scnCitationsOf(assertion.fullName ?? "");
12635
+ const leafCodes = claimCodeCitationsOf(assertion.title ?? "");
12636
+ return leafCodes.length > 0 ? leafCodes : claimCodeCitationsOf(assertion.fullName ?? "");
12637
12637
  }
12638
12638
  function runResultOf(status) {
12639
12639
  return status === "passed" || status === "failed" ? status : "inconclusive";
@@ -12642,7 +12642,7 @@ var init_vitest = __esm({
12642
12642
  "../core/dist/parse/vitest.js"() {
12643
12643
  "use strict";
12644
12644
  init_portablePath();
12645
- init_scnCitation();
12645
+ init_claimCodeCitation();
12646
12646
  init_attribution();
12647
12647
  init_journal();
12648
12648
  }
@@ -12694,18 +12694,18 @@ function observationOf(suite, testcase, evidence, layer) {
12694
12694
  };
12695
12695
  }
12696
12696
  function citingCodesOf2(testcase) {
12697
- const ownCodes = [...scnPropertyValues(testcase), ...nameCitationsOf(testcase.name ?? "")];
12698
- return ownCodes.length > 0 ? ownCodes : scnCitationsOf(testcase.classname ?? "").slice(-1);
12697
+ const ownCodes = [...claimCodePropertyValues(testcase), ...nameCitationsOf(testcase.name ?? "")];
12698
+ return ownCodes.length > 0 ? ownCodes : claimCodeCitationsOf(testcase.classname ?? "").slice(-1);
12699
12699
  }
12700
12700
  function nameCitationsOf(name) {
12701
12701
  const segmentsLeafFirst = name.split("/").reverse();
12702
- return segmentsLeafFirst.map((segment) => scnCitationsOf(segment)).find((codes) => codes.length > 0) ?? [];
12702
+ return segmentsLeafFirst.map((segment) => claimCodeCitationsOf(segment)).find((codes) => codes.length > 0) ?? [];
12703
12703
  }
12704
- function scnPropertyValues(testcase) {
12705
- return (testcase.properties?.property ?? []).filter((property) => SCN_PROPERTY.has(property.name)).map((property) => property.value ?? "");
12704
+ function claimCodePropertyValues(testcase) {
12705
+ return (testcase.properties?.property ?? []).filter((property) => CLAIM_CODE_PROPERTY.has(property.name)).map((property) => property.value ?? "");
12706
12706
  }
12707
12707
  function citedCode(value) {
12708
- return SCN_CODE.test(value) ? value : null;
12708
+ return CLAIM_CODE.test(value) ? value : null;
12709
12709
  }
12710
12710
  function isCollectionFailure(testcase) {
12711
12711
  return testcase.error !== void 0 && !testcase.classname;
@@ -12753,15 +12753,15 @@ function failureTextOf(testcase) {
12753
12753
  function errorTextOf(testcase) {
12754
12754
  return testcase.error?.["#text"] ?? testcase.error?.message;
12755
12755
  }
12756
- var SCN_PROPERTY, GO_BUILD_FAILURE_TESTCASE, GO_BUILD_FAILURE_MARK;
12756
+ var CLAIM_CODE_PROPERTY, GO_BUILD_FAILURE_TESTCASE, GO_BUILD_FAILURE_MARK;
12757
12757
  var init_junit = __esm({
12758
12758
  "../core/dist/parse/junit.js"() {
12759
12759
  "use strict";
12760
12760
  init_featureCode();
12761
12761
  init_attribution();
12762
- init_scnCitation();
12762
+ init_claimCodeCitation();
12763
12763
  init_journal();
12764
- SCN_PROPERTY = /* @__PURE__ */ new Set(["scn", "clm"]);
12764
+ CLAIM_CODE_PROPERTY = /* @__PURE__ */ new Set(["scn", "clm"]);
12765
12765
  GO_BUILD_FAILURE_TESTCASE = "TestMain";
12766
12766
  GO_BUILD_FAILURE_MARK = "[build failed]";
12767
12767
  }
@@ -12811,8 +12811,8 @@ function locatorOf(filePath, root) {
12811
12811
  return relativizeToRoot(filePath.replace(/^\.\//, ""), root);
12812
12812
  }
12813
12813
  function citingCodesOf3(example) {
12814
- const ownCodes = scnCitationsOf(example.description ?? "");
12815
- return ownCodes.length > 0 ? ownCodes : scnCitationsOf(example.full_description ?? "");
12814
+ const ownCodes = claimCodeCitationsOf(example.description ?? "");
12815
+ return ownCodes.length > 0 ? ownCodes : claimCodeCitationsOf(example.full_description ?? "");
12816
12816
  }
12817
12817
  function runResultOf3(status) {
12818
12818
  return status === "passed" || status === "failed" ? status : "inconclusive";
@@ -12822,7 +12822,7 @@ var init_rspec = __esm({
12822
12822
  "../core/dist/parse/rspec.js"() {
12823
12823
  "use strict";
12824
12824
  init_portablePath();
12825
- init_scnCitation();
12825
+ init_claimCodeCitation();
12826
12826
  init_attribution();
12827
12827
  init_journal();
12828
12828
  LOADED_FILE = /^\s*(?:While loading (.+?) a |An error occurred while loading (.+?)\.(?:\n|$))/;
@@ -12847,7 +12847,7 @@ function parseCucumberEvidenceObservations(report, root, claimCodesAt = () => []
12847
12847
  return results;
12848
12848
  }
12849
12849
  function citedCodesOf(tagNames) {
12850
- return tagNames.map((name) => SCN_TAG.exec(name)).filter((m) => m !== null).map((m) => m[1]);
12850
+ return tagNames.map((name) => CLAIM_CODE_TAG.exec(name)).filter((m) => m !== null).map((m) => m[1]);
12851
12851
  }
12852
12852
  function scenarioObservations(scenario, locator, rowCodes) {
12853
12853
  const tagNames = (scenario.tags ?? []).map((t) => withoutSigil(t.name ?? ""));
@@ -12890,7 +12890,7 @@ function runResultOf4(steps) {
12890
12890
  return "passed";
12891
12891
  return "inconclusive";
12892
12892
  }
12893
- var SCN_TAG;
12893
+ var CLAIM_CODE_TAG;
12894
12894
  var init_cucumber = __esm({
12895
12895
  "../core/dist/parse/cucumber.js"() {
12896
12896
  "use strict";
@@ -12899,7 +12899,7 @@ var init_cucumber = __esm({
12899
12899
  init_featureCode();
12900
12900
  init_attribution();
12901
12901
  init_journal();
12902
- SCN_TAG = new RegExp(`^(${SCN_ID_SOURCE})$`);
12902
+ CLAIM_CODE_TAG = new RegExp(`^(${CLAIM_CODE_SOURCE})$`);
12903
12903
  }
12904
12904
  });
12905
12905
 
@@ -27942,7 +27942,7 @@ var init_provenance = __esm({
27942
27942
  });
27943
27943
 
27944
27944
  // ../core/dist/domain/renderInput.js
27945
- function scenarioCodesOf2(population, obligations) {
27945
+ function claimCodesOf2(population, obligations) {
27946
27946
  if (!population && !obligations)
27947
27947
  return void 0;
27948
27948
  return {
@@ -27986,7 +27986,7 @@ function runVerdict(run3) {
27986
27986
  return "nothing-to-reconcile";
27987
27987
  if (hasBrokenEvidence(run3.ledger))
27988
27988
  return "unsound";
27989
- if (hasScenarioCodeErrors(run3))
27989
+ if (hasClaimCodeErrors(run3))
27990
27990
  return "claim-code-errors";
27991
27991
  if (!isBalanced(run3.ledger))
27992
27992
  return "out-of-balance";
@@ -28011,23 +28011,23 @@ function outOfBalanceByFeature(rows, untagged, featureNames) {
28011
28011
  for (const s of rows) {
28012
28012
  if (!isScenario(s) || !isOutOfBalance(s))
28013
28013
  continue;
28014
- const noScnCode = carriesNoScnCode(s);
28015
- const key = (noScnCode ? featureOf.get(s.claim) : featureCodeOf(s.claim)) ?? s.claim;
28016
- const group = groups.get(key) ?? { claims: [], noScnCode: 0 };
28017
- if (noScnCode)
28018
- group.noScnCode += 1;
28014
+ const noClaimCode = carriesNoClaimCode(s);
28015
+ const key = (noClaimCode ? featureOf.get(s.claim) : featureCodeOf(s.claim)) ?? s.claim;
28016
+ const group = groups.get(key) ?? { claims: [], noClaimCode: 0 };
28017
+ if (noClaimCode)
28018
+ group.noClaimCode += 1;
28019
28019
  else
28020
28020
  group.claims.push(s.claim);
28021
28021
  groups.set(key, group);
28022
28022
  }
28023
- return [...groups].map(([feature, { claims, noScnCode }]) => {
28023
+ return [...groups].map(([feature, { claims, noClaimCode }]) => {
28024
28024
  const featureFile = fileOfCode.get(feature);
28025
28025
  return {
28026
28026
  feature,
28027
28027
  ...featureFile ? { featureFile } : {},
28028
- count: claims.length + noScnCode,
28028
+ count: claims.length + noClaimCode,
28029
28029
  claims,
28030
- ...noScnCode > 0 ? { scenariosWithNoClaimCode: noScnCode } : {}
28030
+ ...noClaimCode > 0 ? { scenariosWithNoClaimCode: noClaimCode } : {}
28031
28031
  };
28032
28032
  });
28033
28033
  }
@@ -28047,7 +28047,7 @@ function concludedSummary(summary, verdictInputs) {
28047
28047
  }
28048
28048
  function assembleRenderInput(evidenceReconciliation, ctx, evidenceObligations2, featureNames) {
28049
28049
  const errorsInTheInputs = errorsOf(evidenceReconciliation.claimCodeErrors, evidenceReconciliation.summary);
28050
- const claimCodes = scenarioCodesOf2(evidenceReconciliation.scenarioCodePopulation, evidenceObligations2);
28050
+ const claimCodes = claimCodesOf2(evidenceReconciliation.claimCodePopulation, evidenceObligations2);
28051
28051
  const byFeature = outOfBalanceByFeature(evidenceReconciliation.ledger.claimReconciliations, claimCodes?.untaggedScenarios ?? [], Object.fromEntries(featureNames ?? []));
28052
28052
  return {
28053
28053
  runProvenance: provenanceObject(ctx),
@@ -28085,7 +28085,7 @@ function reportOf(outcome) {
28085
28085
  function recordedCheckStepsOf(record) {
28086
28086
  if (record === void 0)
28087
28087
  return void 0;
28088
- return Object.entries(record).filter(([citedClaimCode]) => SCN_CODE.test(citedClaimCode)).map(([citedClaimCode, step]) => ({
28088
+ return Object.entries(record).filter(([citedClaimCode]) => CLAIM_CODE.test(citedClaimCode)).map(([citedClaimCode, step]) => ({
28089
28089
  citedClaimCode,
28090
28090
  report: reportOf(step.outcome),
28091
28091
  ...step.outcome === void 0 ? {} : { said: step.outcome }
@@ -28107,7 +28107,7 @@ function citationOfCitedRow(citedClaimCode) {
28107
28107
  if (citedClaimCode === void 0)
28108
28108
  return null;
28109
28109
  const claimCode = bareTerm(citedClaimCode);
28110
- return SCN_CODE.test(claimCode) ? { claimCode } : null;
28110
+ return CLAIM_CODE.test(claimCode) ? { claimCode } : null;
28111
28111
  }
28112
28112
  var init_fitnessCitations = __esm({
28113
28113
  "../core/dist/parse/fitnessCitations.js"() {
@@ -28274,7 +28274,7 @@ function evidenceReconciliationFromSources(input) {
28274
28274
  const { steps, dispositionOf } = readings;
28275
28275
  const isCandidate = (step) => dispositionOf(step) === "candidate";
28276
28276
  const reconciliation = evidenceReconciliationOf(corpus.scenarios, observationStreams(input, steps, corpus, packageJson, isCandidate), untaggedScenariosAmong(input.features));
28277
- return withScenarioCodeErrors(withConfigurationAccount(withReaderAccounts(reconciliation, packageJson, readings), packageJson), input);
28277
+ return withClaimCodeErrors(withConfigurationAccount(withReaderAccounts(reconciliation, packageJson, readings), packageJson), input);
28278
28278
  }
28279
28279
  function withConfigurationAccount(reconciliation, packageJson) {
28280
28280
  const { wrongKinds, unknownKeys } = configurationNotRead(packageJson);
@@ -28287,11 +28287,11 @@ function withConfigurationAccount(reconciliation, packageJson) {
28287
28287
  }
28288
28288
  };
28289
28289
  }
28290
- function withScenarioCodeErrors(reconciliation, input) {
28290
+ function withClaimCodeErrors(reconciliation, input) {
28291
28291
  return {
28292
28292
  ...reconciliation,
28293
- claimCodeErrors: scenarioCodeErrorsOf(input.features),
28294
- scenarioCodePopulation: scenarioCodePopulationOf(input.features)
28293
+ claimCodeErrors: claimCodeErrorsOf(input.features),
28294
+ claimCodePopulation: claimCodePopulationOf(input.features)
28295
28295
  };
28296
28296
  }
28297
28297
  function withReaderAccounts(reconciliation, packageJson, { steps, runners, notApplied, workflowsRead, reconciler, dispositionOf }) {
@@ -28413,9 +28413,9 @@ var init_messages_en2 = __esm({
28413
28413
  "proofs-never-ran": "{count, plural, one {{count} Evidence Observation never ran to a result, so the behaviour it proves was never exercised.} other {{count} Evidence Observations never ran to a result, so the behaviours they prove were never exercised.}}",
28414
28414
  "claim-code-error-count": "{count, plural, one {{count} claim code error} other {{count} claim code errors}}",
28415
28415
  "no-feature-file-judged": "No feature file was judged, so no claim code is vouched for.",
28416
- "clean-no-coded-scenario": "Claim codes are clean over {featureFiles, plural, one {{featureFiles} feature file} other {{featureFiles} feature files}} carrying 0 feature codes (a feature code is the tag heading a feature file, the `<FFF>` that each `@SCN-<FFF>-<NNN>` code in that file repeats): no scenario in {featureFiles, plural, one {it} other {them}} carries a claim code to misfile.",
28417
- "clean-each-file-own-code": "Claim codes are clean over {featureFiles, plural, one {{featureFiles} feature file} other {{featureFiles} feature files}} carrying {featureCodes, plural, one {{featureCodes} feature code} other {{featureCodes} feature codes}} (a feature code is the tag heading a feature file, the `<FFF>` that each `@SCN-<FFF>-<NNN>` code in that file repeats): each file carries a code of its own, and every coded scenario sits in the file its code names.",
28418
- "clean-others-no-feature-code": "Claim codes are clean over {featureFiles, plural, one {{featureFiles} feature file} other {{featureFiles} feature files}} carrying {featureCodes, plural, one {{featureCodes} feature code} other {{featureCodes} feature codes}} (a feature code is the tag heading a feature file, the `<FFF>` that each `@SCN-<FFF>-<NNN>` code in that file repeats): each code is carried by exactly one file, every coded scenario sits in the file its code names, and the other {noFeatureCode} {noFeatureCode, plural, one {holds} other {hold}} no coded scenario.",
28416
+ "clean-no-coded-scenario": "Claim codes are clean over {featureFiles, plural, one {{featureFiles} feature file} other {{featureFiles} feature files}} carrying 0 feature codes (a feature code is the tag heading a feature file, the `<FFF>` that each `@CLM-<FFF>-<NNN>` code in that file repeats): no scenario in {featureFiles, plural, one {it} other {them}} carries a claim code to misfile.",
28417
+ "clean-each-file-own-code": "Claim codes are clean over {featureFiles, plural, one {{featureFiles} feature file} other {{featureFiles} feature files}} carrying {featureCodes, plural, one {{featureCodes} feature code} other {{featureCodes} feature codes}} (a feature code is the tag heading a feature file, the `<FFF>` that each `@CLM-<FFF>-<NNN>` code in that file repeats): each file carries a code of its own, and every coded scenario sits in the file its code names.",
28418
+ "clean-others-no-feature-code": "Claim codes are clean over {featureFiles, plural, one {{featureFiles} feature file} other {{featureFiles} feature files}} carrying {featureCodes, plural, one {{featureCodes} feature code} other {{featureCodes} feature codes}} (a feature code is the tag heading a feature file, the `<FFF>` that each `@CLM-<FFF>-<NNN>` code in that file repeats): each code is carried by exactly one file, every coded scenario sits in the file its code names, and the other {noFeatureCode} {noFeatureCode, plural, one {holds} other {hold}} no coded scenario.",
28419
28419
  "unnamed-claim-ci-steps": "{count, plural, one {{count} CI step} other {{count} CI steps}}",
28420
28420
  "unnamed-claim-ci-steps-named": "{count, plural, one {{count} CI step} other {{count} CI steps}}: {list}",
28421
28421
  "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.",
@@ -28551,8 +28551,8 @@ var init_messages_en2 = __esm({
28551
28551
  "unnamed-claim-failed-names": "(failed: {names})",
28552
28552
  "several-claim-codes-cited": "{count} claim codes cite {codes} \u2014 a test cites exactly one scenario, so this one credits none of them.",
28553
28553
  "shared-claim-code": "{code} is carried by more than one scenario, so evidence citing it credits none of them.",
28554
- "evidence-obligation-diverges-from-outcome": 'QualityCheckReconciliation invariant (@SCN-LDG-030): outcome "{outcome}" has the evidence obligation (debit) side {presenceForOutcome} for that outcome, but it was {presenceFound}.',
28555
- "evidence-observation-diverges-from-outcome": 'QualityCheckReconciliation invariant (@SCN-LDG-030): outcome "{outcome}" has the evidence observation side {presenceForOutcome} for that outcome, but it was {presenceFound}.'
28554
+ "evidence-obligation-diverges-from-outcome": 'QualityCheckReconciliation invariant (@CLM-LDG-030): outcome "{outcome}" has the evidence obligation (debit) side {presenceForOutcome} for that outcome, but it was {presenceFound}.',
28555
+ "evidence-observation-diverges-from-outcome": 'QualityCheckReconciliation invariant (@CLM-LDG-030): outcome "{outcome}" has the evidence observation side {presenceForOutcome} for that outcome, but it was {presenceFound}.'
28556
28556
  };
28557
28557
  }
28558
28558
  });
@@ -31617,9 +31617,9 @@ var init_heading = __esm({
31617
31617
  });
31618
31618
 
31619
31619
  // ../core/dist/render/runVerdict.js
31620
- function scenarioCodeErrorsGloss(errors, alsoOutOfBalance) {
31620
+ function claimCodeErrorsGloss(errors, alsoOutOfBalance) {
31621
31621
  const values = { heading: markdownHeading(3, coreMessage(CoreMessage.ClaimCodeErrorsHeading)), alsoOutOfBalance };
31622
- switch (scenarioCodeErrorsAre(errors)) {
31622
+ switch (claimCodeErrorsAre(errors)) {
31623
31623
  case "misfilings":
31624
31624
  return coreMessage(CoreMessage.ClaimCodeErrorsGloss, values);
31625
31625
  case "several-codes":
@@ -31628,11 +31628,11 @@ function scenarioCodeErrorsGloss(errors, alsoOutOfBalance) {
31628
31628
  return coreMessage(CoreMessage.MisfiledAndSeveralClaimCodesGloss, values);
31629
31629
  }
31630
31630
  }
31631
- function scenarioCodeErrorsVerdict(ledger, errors) {
31631
+ function claimCodeErrorsVerdict(ledger, errors) {
31632
31632
  const alsoOutOfBalance = isBalanced(ledger) ? "" : coreMessage(CoreMessage.AlsoOutOfBalance);
31633
31633
  return {
31634
31634
  headline: coreMessage(CoreMessage.ClaimCodeErrorsHeadline),
31635
- gloss: scenarioCodeErrorsGloss(errors, alsoOutOfBalance)
31635
+ gloss: claimCodeErrorsGloss(errors, alsoOutOfBalance)
31636
31636
  };
31637
31637
  }
31638
31638
  function nothingToReconcile(corpusDir) {
@@ -31648,7 +31648,7 @@ function verdictFor2(verdict, ledger, corpusDir, codeErrors) {
31648
31648
  case "unsound":
31649
31649
  return UNSOUND;
31650
31650
  case "claim-code-errors":
31651
- return scenarioCodeErrorsVerdict(ledger, codeErrors);
31651
+ return claimCodeErrorsVerdict(ledger, codeErrors);
31652
31652
  case "out-of-balance":
31653
31653
  return OUT_OF_BALANCE;
31654
31654
  case "pending":
@@ -31706,9 +31706,9 @@ var init_errorEntry = __esm({
31706
31706
  }
31707
31707
  });
31708
31708
 
31709
- // ../core/dist/render/scenarioCodeErrorsSection.js
31710
- function scenarioCodeErrorsFraming(errors, count) {
31711
- switch (scenarioCodeErrorsAre(errors)) {
31709
+ // ../core/dist/render/claimCodeErrorsSection.js
31710
+ function claimCodeErrorsFraming(errors, count) {
31711
+ switch (claimCodeErrorsAre(errors)) {
31712
31712
  case "misfilings":
31713
31713
  return coreMessage(CoreMessage.ClaimCodeErrorsFraming, { count });
31714
31714
  case "several-codes":
@@ -31769,9 +31769,9 @@ function foreignWorded(error) {
31769
31769
  });
31770
31770
  }
31771
31771
  }
31772
- var CODE_OF, scenarioCodeErrorsSection, scenarioCodesCleanStatement;
31773
- var init_scenarioCodeErrorsSection = __esm({
31774
- "../core/dist/render/scenarioCodeErrorsSection.js"() {
31772
+ var CODE_OF, claimCodeErrorsSection, claimCodesCleanStatement;
31773
+ var init_claimCodeErrorsSection = __esm({
31774
+ "../core/dist/render/claimCodeErrorsSection.js"() {
31775
31775
  "use strict";
31776
31776
  init_scnTags();
31777
31777
  init_messages4();
@@ -31784,7 +31784,7 @@ var init_scenarioCodeErrorsSection = __esm({
31784
31784
  "no-feature-code": CoreError.NoFeatureCode,
31785
31785
  "several-claim-codes": CoreError.SeveralClaimCodes
31786
31786
  };
31787
- scenarioCodeErrorsSection = (report) => {
31787
+ claimCodeErrorsSection = (report) => {
31788
31788
  const errors = report.errorsInTheInputs?.claimCodeErrors;
31789
31789
  if (errors === void 0)
31790
31790
  return [];
@@ -31792,7 +31792,7 @@ var init_scenarioCodeErrorsSection = __esm({
31792
31792
  return [
31793
31793
  markdownHeading(3, coreMessage(CoreMessage.ClaimCodeErrorsHeading)),
31794
31794
  "",
31795
- scenarioCodeErrorsFraming(errors, count),
31795
+ claimCodeErrorsFraming(errors, count),
31796
31796
  "",
31797
31797
  ...errors.map((error) => errorEntry(CODE_OF[error.kind], worded(error))),
31798
31798
  "",
@@ -31800,13 +31800,13 @@ var init_scenarioCodeErrorsSection = __esm({
31800
31800
  ""
31801
31801
  ];
31802
31802
  };
31803
- scenarioCodesCleanStatement = (report) => {
31803
+ claimCodesCleanStatement = (report) => {
31804
31804
  if (report.errorsInTheInputs?.claimCodeErrors !== void 0)
31805
31805
  return [];
31806
31806
  const { featureFiles, featureCodes } = report.summary.claimCodes ?? {};
31807
31807
  if (typeof featureFiles !== "number" || typeof featureCodes !== "number")
31808
31808
  return [];
31809
- return [cleanStatement(scenarioCodeCleanlinessOf({ featureFiles, featureCodes })), ""];
31809
+ return [cleanStatement(claimCodeCleanlinessOf({ featureFiles, featureCodes })), ""];
31810
31810
  };
31811
31811
  }
31812
31812
  });
@@ -31935,12 +31935,12 @@ var init_errorsInTheInputs = __esm({
31935
31935
  "../core/dist/render/errorsInTheInputs.js"() {
31936
31936
  "use strict";
31937
31937
  init_configurationNotRead();
31938
- init_scenarioCodeErrorsSection();
31938
+ init_claimCodeErrorsSection();
31939
31939
  init_messages4();
31940
31940
  init_coreText();
31941
31941
  init_heading();
31942
31942
  errorsInTheInputsSection = (report) => {
31943
- const parts = [...scenarioCodeErrorsSection(report), ...configurationNotReadSection(report)];
31943
+ const parts = [...claimCodeErrorsSection(report), ...configurationNotReadSection(report)];
31944
31944
  if (parts.length === 0)
31945
31945
  return [];
31946
31946
  return [markdownHeading(2, coreMessage(CoreMessage.ErrorsInTheInputsHeading)), "", ...parts];
@@ -32215,7 +32215,7 @@ var init_remarkWords = __esm({
32215
32215
  function citingNoScenario(lines) {
32216
32216
  return lines.filter((line) => line.outcome === "cites-no-scenario").flatMap((line) => line.evidenceObservation ?? []);
32217
32217
  }
32218
- function sharedScnCodeOf(observation) {
32218
+ function sharedClaimCodeOf(observation) {
32219
32219
  const [code = null] = (observation.notes ?? []).flatMap((note) => note.kind === "shared-claim-code" ? [note.code] : []);
32220
32220
  return code;
32221
32221
  }
@@ -32225,13 +32225,13 @@ function remarksOf(observations) {
32225
32225
  return message2 === void 0 && kept.length === 0 ? [] : [{ ...message2 !== void 0 ? { message: message2 } : {}, ...kept.length > 0 ? { notes: kept } : {} }];
32226
32226
  });
32227
32227
  }
32228
- function groupOf(sharedScnCode, observations) {
32228
+ function groupOf(sharedClaimCode, observations) {
32229
32229
  const [first] = observations;
32230
32230
  const passed = observations.filter((o) => o.status === "passed").length;
32231
32231
  return {
32232
32232
  qualityCheckKind: first.qualityCheckKind,
32233
32233
  locator: first.locator,
32234
- ...sharedScnCode === null ? {} : { sharedScnCode },
32234
+ ...sharedClaimCode === null ? {} : { sharedClaimCode },
32235
32235
  remarks: remarksOf(observations),
32236
32236
  ran: observations.length,
32237
32237
  passed,
@@ -32244,10 +32244,10 @@ function stepsGroupsOf(observations) {
32244
32244
  for (const o of observations) {
32245
32245
  if (!isFitnessObservation(o))
32246
32246
  continue;
32247
- const code = sharedScnCodeOf(o);
32247
+ const code = sharedClaimCodeOf(o);
32248
32248
  byCode.set(code, [...byCode.get(code) ?? [], o.step ?? o.fitnessFunction]);
32249
32249
  }
32250
- return [...byCode].map(([code, names]) => code === null ? { names } : { names, sharedScnCode: code });
32250
+ return [...byCode].map(([code, names]) => code === null ? { names } : { names, sharedClaimCode: code });
32251
32251
  }
32252
32252
  function unnamedClaimGroupsOf(lines) {
32253
32253
  const observations = citingNoScenario(lines);
@@ -32255,7 +32255,7 @@ function unnamedClaimGroupsOf(lines) {
32255
32255
  for (const o of observations) {
32256
32256
  if (isFitnessObservation(o))
32257
32257
  continue;
32258
- const code = sharedScnCodeOf(o);
32258
+ const code = sharedClaimCodeOf(o);
32259
32259
  const key = JSON.stringify([o.qualityCheckKind, o.locator ?? null, code]);
32260
32260
  byFile.set(key, { code, members: [...byFile.get(key)?.members ?? [], o] });
32261
32261
  }
@@ -32307,7 +32307,7 @@ function renderPendingItem(item) {
32307
32307
  }
32308
32308
  function renderFileGroup(group) {
32309
32309
  const remarks = group.remarks.flatMap((remark) => remarkHeadlineOf(remark, reportedName) ?? []);
32310
- const code = group.sharedScnCode === void 0 ? [] : [coreMessage(CoreMessage.SharedClaimCode, { code: group.sharedScnCode })];
32310
+ const code = group.sharedClaimCode === void 0 ? [] : [coreMessage(CoreMessage.SharedClaimCode, { code: group.sharedClaimCode })];
32311
32311
  const said = [.../* @__PURE__ */ new Set([...code, ...remarks])].filter((part) => part !== "").join(" / ");
32312
32312
  const counts = coreMessage(CoreMessage.UnnamedClaimGroupCounts, { ran: group.ran, passed: group.passed, failed: group.failed });
32313
32313
  const names = group.failedNames.map(reportedName).filter((name) => name !== "");
@@ -32330,7 +32330,7 @@ function renderUnnamedClaimGroup(group) {
32330
32330
  if (!("names" in group))
32331
32331
  return renderFileGroup(group);
32332
32332
  const steps = unnamedClaimCiSteps(unnamedClaimCiStepsViewOf(group.names.map(reportedName)));
32333
- const remark = group.sharedScnCode === void 0 ? "" : ` (${coreMessage(CoreMessage.SharedClaimCode, { code: group.sharedScnCode })})`;
32333
+ const remark = group.sharedClaimCode === void 0 ? "" : ` (${coreMessage(CoreMessage.SharedClaimCode, { code: group.sharedClaimCode })})`;
32334
32334
  return `fitness: ${outcomeDescription("cites-no-scenario")}${remark} \u2014 ${steps}`;
32335
32335
  }
32336
32336
  function renderUnnamedClaimItems(lines) {
@@ -32365,15 +32365,15 @@ function byFeatureTableLines(groups) {
32365
32365
  return lines;
32366
32366
  }
32367
32367
  function idsCell(group) {
32368
- const noScnCodeCount = group.scenariosWithNoClaimCode ?? 0;
32369
- if (noScnCodeCount === 0)
32368
+ const noClaimCodeCount = group.scenariosWithNoClaimCode ?? 0;
32369
+ if (noClaimCodeCount === 0)
32370
32370
  return codeList(group.claims);
32371
32371
  const view = outOfBalanceCodesOf(group);
32372
32372
  switch (view.kind) {
32373
32373
  case "none":
32374
- return coreMessage(CoreMessage.NoClaimCodeScenarios, { count: noScnCodeCount });
32374
+ return coreMessage(CoreMessage.NoClaimCodeScenarios, { count: noClaimCodeCount });
32375
32375
  case "some":
32376
- return coreMessage(CoreMessage.CodesAndNoClaimCodeScenarios, { codes: codeList(view.codes), count: noScnCodeCount });
32376
+ return coreMessage(CoreMessage.CodesAndNoClaimCodeScenarios, { codes: codeList(view.codes), count: noClaimCodeCount });
32377
32377
  }
32378
32378
  }
32379
32379
  function ungroupedOutOfBalance(totals) {
@@ -32402,7 +32402,7 @@ function ledgerTallyLines(totals) {
32402
32402
  }
32403
32403
  return lines;
32404
32404
  }
32405
- function sharedScnCodeLines(shared, scenarios) {
32405
+ function sharedClaimCodeLines(shared, scenarios) {
32406
32406
  if (shared.length === 0)
32407
32407
  return [];
32408
32408
  return [
@@ -32431,7 +32431,7 @@ function ledgerTableLines(claims, columns, stepsByQualityCheckKind) {
32431
32431
  function renderReport(report, inputNames, exitCodeOf2) {
32432
32432
  return SECTIONS.flatMap((section) => section(report, inputNames, exitCodeOf2)).join("\n");
32433
32433
  }
32434
- var reported, RESULT_MESSAGE, titleSection, runIntegritySection, summarySection, RECONCILIATION_TOTALS_COLUMNS, RECONCILIATION_TOTALS_TERMS, reconciliationTotalsSection, byFeatureSection, outOfBalanceCodesOf, codeList, ledgerSection, scenarioCodeFactsSection, SECTIONS;
32434
+ var reported, RESULT_MESSAGE, titleSection, runIntegritySection, summarySection, RECONCILIATION_TOTALS_COLUMNS, RECONCILIATION_TOTALS_TERMS, reconciliationTotalsSection, byFeatureSection, outOfBalanceCodesOf, codeList, ledgerSection, claimCodeFactsSection, SECTIONS;
32435
32435
  var init_markdown = __esm({
32436
32436
  "../core/dist/render/markdown.js"() {
32437
32437
  "use strict";
@@ -32445,7 +32445,7 @@ var init_markdown = __esm({
32445
32445
  init_claimReconciliation();
32446
32446
  init_ledger();
32447
32447
  init_runVerdict2();
32448
- init_scenarioCodeErrorsSection();
32448
+ init_claimCodeErrorsSection();
32449
32449
  init_provenanceSection();
32450
32450
  init_errorsInTheInputs();
32451
32451
  init_stepAccounting();
@@ -32570,7 +32570,7 @@ var init_markdown = __esm({
32570
32570
  ""
32571
32571
  ];
32572
32572
  };
32573
- scenarioCodeFactsSection = (report) => {
32573
+ claimCodeFactsSection = (report) => {
32574
32574
  const codes = report.summary.claimCodes;
32575
32575
  if (codes?.excludedOccurrences === void 0)
32576
32576
  return [];
@@ -32578,7 +32578,7 @@ var init_markdown = __esm({
32578
32578
  const untagged = (codes.untaggedScenarios ?? []).length;
32579
32579
  if (untagged > 0)
32580
32580
  lines.push(`- ${coreMessage(CoreMessage.UntaggedScenarios, { count: untagged })}`);
32581
- lines.push(...sharedScnCodeLines(codes.sharedClaimCodes ?? [], report.claimReconciliations.filter(isScenario).length));
32581
+ lines.push(...sharedClaimCodeLines(codes.sharedClaimCodes ?? [], report.claimReconciliations.filter(isScenario).length));
32582
32582
  return [...lines, ""];
32583
32583
  };
32584
32584
  SECTIONS = [
@@ -32588,8 +32588,8 @@ var init_markdown = __esm({
32588
32588
  runIntegritySection,
32589
32589
  summarySection,
32590
32590
  (report, _inputNames, exitCodeOf2) => runVerdictSection(report, exitCodeOf2),
32591
- scenarioCodesCleanStatement,
32592
- scenarioCodeFactsSection,
32591
+ claimCodesCleanStatement,
32592
+ claimCodeFactsSection,
32593
32593
  reconciliationTotalsSection,
32594
32594
  evidenceObservationsSection,
32595
32595
  stepAccountingSection,
@@ -32627,7 +32627,7 @@ var init_dist3 = __esm({
32627
32627
  init_scnTags();
32628
32628
  init_ledger();
32629
32629
  init_pendingItems();
32630
- init_scnAllocation();
32630
+ init_claimCodeAllocation();
32631
32631
  init_vitest();
32632
32632
  init_junit();
32633
32633
  init_rspec();
@@ -39255,7 +39255,7 @@ function answerRequest({ part, isNew }) {
39255
39255
  const cwd = readOrRefuse("working-directory" /* WorkingDirectory */, "", () => process.cwd());
39256
39256
  const top = repositoryTop(cwd);
39257
39257
  const headerCodes = readHeaderCodes(join10(top ?? cwd, DEFAULT_FEATURES_DIR));
39258
- const answer = nextScnCode({ part, headerCodes, isNew }, occurrencesFrom(cwd, part, top));
39258
+ const answer = nextClaimCode({ part, headerCodes, isNew }, occurrencesFrom(cwd, part, top));
39259
39259
  if (answer.kind === "unknown-part") {
39260
39260
  refuseUsage(unknownPartRefusal(answer));
39261
39261
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.246",
3
+ "version": "0.1.248",
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.246"
29
+ "@3f-consulting/spec-controller-core": "0.1.248"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"