spec-controller 0.1.154 → 0.1.156

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 CHANGED
@@ -27603,8 +27603,12 @@ function nonChecksApplied(steps, nameOf2, nonChecks) {
27603
27603
  }
27604
27604
  };
27605
27605
  }
27606
- function nonChecksMatchingNoStep({ unmatchedEntries }, workflowsRead) {
27607
- return unmatchedEntries.filter((entry) => !entry.includes(":") || workflowsRead.includes(entry.slice(0, entry.indexOf(":"))));
27606
+ function nonChecksNotApplied(unmatchedEntries, workflowsRead) {
27607
+ return {
27608
+ matchingNoStep: unmatchedEntries.filter((entry) => namesAStep(entry) && namesAWorkflowRead(entry, workflowsRead)),
27609
+ notAStepName: unmatchedEntries.filter((entry) => !namesAStep(entry)),
27610
+ namingAWorkflowNotRead: unmatchedEntries.filter((entry) => namesAStep(entry) && !namesAWorkflowRead(entry, workflowsRead))
27611
+ };
27608
27612
  }
27609
27613
  function exclusionOf(step, isReconciler, isNamedANonCheck) {
27610
27614
  if (isReconciler(step))
@@ -27682,10 +27686,12 @@ function recognisedRunners(steps, scripts, runners, shell) {
27682
27686
  step: step.identity
27683
27687
  })));
27684
27688
  }
27685
- var jobKeyOf, byWorkflowThenJob, COUNTED_AS, noStepsOf;
27689
+ var namesAWorkflowRead, namesAStep, jobKeyOf, byWorkflowThenJob, COUNTED_AS, noStepsOf;
27686
27690
  var init_uncitedFitnessFunctions = __esm({
27687
27691
  "../core/dist/domain/uncitedFitnessFunctions.js"() {
27688
27692
  "use strict";
27693
+ namesAWorkflowRead = (entry, workflowsRead) => workflowsRead.some((workflow) => entry.startsWith(`${workflow}:`));
27694
+ namesAStep = (entry) => entry.split(":").length > 2;
27689
27695
  jobKeyOf = (step) => `${step.workflow}:${step.job}`;
27690
27696
  byWorkflowThenJob = (a, b) => a.workflow.localeCompare(b.workflow) || a.job.localeCompare(b.job);
27691
27697
  COUNTED_AS = {
@@ -27856,7 +27862,8 @@ function errorsOf(scenarioCodeErrors, summary) {
27856
27862
  ...nonEmpty("keysNotRead", summary.configurationKeysNotRead),
27857
27863
  ...nonEmpty("ofWrongKind", summary.configurationOfWrongKind),
27858
27864
  ...nonEmpty("runnerKeysNotATier", summary.runnerKeysNotATier),
27859
- ...nonEmpty("nonChecksMatchingNoStep", summary.nonChecksMatchingNoStep)
27865
+ ...nonEmpty("nonChecksMatchingNoStep", summary.nonChecksMatchingNoStep),
27866
+ ...nonEmpty("nonChecksNotAStepName", summary.nonChecksNotAStepName)
27860
27867
  };
27861
27868
  const errors = {
27862
27869
  ...nonEmpty("scenarioCodes", scenarioCodeErrors),
@@ -27864,7 +27871,7 @@ function errorsOf(scenarioCodeErrors, summary) {
27864
27871
  };
27865
27872
  return Object.keys(errors).length > 0 ? errors : void 0;
27866
27873
  }
27867
- function summaryStatingNoFault({ configurationKeysNotRead: _keysNotRead, configurationOfWrongKind: _ofWrongKind, runnerKeysNotATier: _runnerKeysNotATier, nonChecksMatchingNoStep: _nonChecksMatchingNoStep, ...summary }) {
27874
+ function summaryStatingNoFault({ configurationKeysNotRead: _keysNotRead, configurationOfWrongKind: _ofWrongKind, runnerKeysNotATier: _runnerKeysNotATier, nonChecksMatchingNoStep: _nonChecksMatchingNoStep, nonChecksNotAStepName: _nonChecksNotAStepName, ...summary }) {
27868
27875
  return summary;
27869
27876
  }
27870
27877
  function nonEmpty(key, entries) {
@@ -28147,7 +28154,7 @@ function pipelineReadings(input) {
28147
28154
  return {
28148
28155
  steps,
28149
28156
  runners,
28150
- matchingNoStep: nonChecksMatchingNoStep(exclusions, input.ciWorkflows.map(({ file }) => file)),
28157
+ notApplied: nonChecksNotApplied(exclusions.unmatchedEntries, input.ciWorkflows.map(({ file }) => file)),
28151
28158
  reconciler,
28152
28159
  dispositionOf: stepDispositions({
28153
28160
  isReconciler: reconciler.isReconciler,
@@ -28162,10 +28169,10 @@ function untaggedScenariosAmong(features) {
28162
28169
  function evidenceReconciliationFromSources(input) {
28163
28170
  const { packageJson } = input;
28164
28171
  const corpus = readTargetCorpus(input.features, resolveDeferralTags(packageJson, input.deferralTags));
28165
- const { steps, runners, matchingNoStep, reconciler, dispositionOf } = pipelineReadings(input);
28172
+ const { steps, runners, notApplied, reconciler, dispositionOf } = pipelineReadings(input);
28166
28173
  const isCandidate = (step) => dispositionOf(step) === "candidate";
28167
28174
  const reconciliation = evidenceReconciliationOf(corpus.scenarios, observationStreams(input, steps, corpus, packageJson, isCandidate), untaggedScenariosAmong(input.features));
28168
- return withScenarioCodeErrors(withConfigurationAccount(withReaderAccounts(reconciliation, steps, packageJson, runners, matchingNoStep, reconciler, dispositionOf), packageJson), input);
28175
+ return withScenarioCodeErrors(withConfigurationAccount(withReaderAccounts(reconciliation, steps, packageJson, runners, notApplied, reconciler, dispositionOf), packageJson), input);
28169
28176
  }
28170
28177
  function withConfigurationAccount(reconciliation, packageJson) {
28171
28178
  const { wrongKinds, unknownKeys } = configurationNotRead(packageJson);
@@ -28185,26 +28192,31 @@ function withScenarioCodeErrors(reconciliation, input) {
28185
28192
  scenarioCodePopulation: scenarioCodePopulationOf(input.features)
28186
28193
  };
28187
28194
  }
28188
- function withReaderAccounts(reconciliation, steps, packageJson, runners, matchingNoStep, reconciler, dispositionOf) {
28189
- return withStepAccounting(withUnmatchedNonChecks(withRunnerAccount(reconciliation, steps, packageJson, runners), matchingNoStep), steps, dispositionOf, reconciler.roleOf);
28195
+ function withReaderAccounts(reconciliation, steps, packageJson, runners, notApplied, reconciler, dispositionOf) {
28196
+ return withStepAccounting(withUnmatchedNonChecks(withRunnerAccount(reconciliation, steps, packageJson, runners), notApplied), steps, dispositionOf, reconciler.roleOf, notApplied.namingAWorkflowNotRead);
28190
28197
  }
28191
- function withStepAccounting(reconciliation, steps, dispositionOf, roleOf) {
28198
+ function withStepAccounting(reconciliation, steps, dispositionOf, roleOf, namingAWorkflowNotRead) {
28192
28199
  if (steps.length === 0)
28193
28200
  return reconciliation;
28194
28201
  return {
28195
28202
  ...reconciliation,
28196
28203
  summary: {
28197
28204
  ...reconciliation.summary,
28198
- stepAccounting: stepAccountOf(steps, dispositionOf, qualifiedStepName, roleOf)
28205
+ stepAccounting: {
28206
+ ...stepAccountOf(steps, dispositionOf, qualifiedStepName, roleOf),
28207
+ ...namingAWorkflowNotRead.length > 0 ? { nonChecksNamingAWorkflowNotRead: namingAWorkflowNotRead } : {}
28208
+ }
28199
28209
  }
28200
28210
  };
28201
28211
  }
28202
- function withUnmatchedNonChecks(reconciliation, matchingNoStep) {
28203
- if (matchingNoStep.length === 0)
28204
- return reconciliation;
28212
+ function withUnmatchedNonChecks(reconciliation, { matchingNoStep, notAStepName }) {
28205
28213
  return {
28206
28214
  ...reconciliation,
28207
- summary: { ...reconciliation.summary, nonChecksMatchingNoStep: matchingNoStep }
28215
+ summary: {
28216
+ ...reconciliation.summary,
28217
+ ...matchingNoStep.length > 0 ? { nonChecksMatchingNoStep: matchingNoStep } : {},
28218
+ ...notAStepName.length > 0 ? { nonChecksNotAStepName: notAStepName } : {}
28219
+ }
28208
28220
  };
28209
28221
  }
28210
28222
  function withRunnerAccount(reconciliation, steps, packageJson, { tiers: runnerTiers, unrecognisedKeys }) {
@@ -28382,65 +28394,67 @@ var init_messages4 = __esm({
28382
28394
  CoreMessage2[CoreMessage2["ReconcilerRecords"] = 92] = "ReconcilerRecords";
28383
28395
  CoreMessage2[CoreMessage2["StepExcluded"] = 93] = "StepExcluded";
28384
28396
  CoreMessage2[CoreMessage2["NotChecksEntryMatchesNoStep"] = 94] = "NotChecksEntryMatchesNoStep";
28385
- CoreMessage2[CoreMessage2["StepAccountingHeading"] = 95] = "StepAccountingHeading";
28386
- CoreMessage2[CoreMessage2["StepAccountingTableHeader"] = 96] = "StepAccountingTableHeader";
28387
- CoreMessage2[CoreMessage2["StepAccountingTotal"] = 97] = "StepAccountingTotal";
28388
- CoreMessage2[CoreMessage2["StepAccountingRunnersLabel"] = 98] = "StepAccountingRunnersLabel";
28389
- CoreMessage2[CoreMessage2["StepAccountingReconcilerLabel"] = 99] = "StepAccountingReconcilerLabel";
28390
- CoreMessage2[CoreMessage2["StepAccountingExcludedLabel"] = 100] = "StepAccountingExcludedLabel";
28391
- CoreMessage2[CoreMessage2["StepAccountingPlumbingLabel"] = 101] = "StepAccountingPlumbingLabel";
28392
- CoreMessage2[CoreMessage2["OutOfBalanceByFeatureHeading"] = 102] = "OutOfBalanceByFeatureHeading";
28393
- CoreMessage2[CoreMessage2["ScenarioClaimReconciliationsOutOfBalance"] = 103] = "ScenarioClaimReconciliationsOutOfBalance";
28394
- CoreMessage2[CoreMessage2["GroupedByFeature"] = 104] = "GroupedByFeature";
28395
- CoreMessage2[CoreMessage2["NotGroupedByFeature"] = 105] = "NotGroupedByFeature";
28396
- CoreMessage2[CoreMessage2["PhantomClaimReconciliations"] = 106] = "PhantomClaimReconciliations";
28397
- CoreMessage2[CoreMessage2["UnnamedClaimReconciliations"] = 107] = "UnnamedClaimReconciliations";
28398
- CoreMessage2[CoreMessage2["AndJoiner"] = 108] = "AndJoiner";
28399
- CoreMessage2[CoreMessage2["ByFeatureTableHeader"] = 109] = "ByFeatureTableHeader";
28400
- CoreMessage2[CoreMessage2["NoScnCodeScenarios"] = 110] = "NoScnCodeScenarios";
28401
- CoreMessage2[CoreMessage2["ClaimReconciliationsHeading"] = 111] = "ClaimReconciliationsHeading";
28402
- CoreMessage2[CoreMessage2["ClaimReconciliationTally"] = 112] = "ClaimReconciliationTally";
28403
- CoreMessage2[CoreMessage2["PhantomClaimTally"] = 113] = "PhantomClaimTally";
28404
- CoreMessage2[CoreMessage2["UnnamedClaimTally"] = 114] = "UnnamedClaimTally";
28405
- CoreMessage2[CoreMessage2["ExcludedScnOccurrences"] = 115] = "ExcludedScnOccurrences";
28406
- CoreMessage2[CoreMessage2["UntaggedScenarios"] = 116] = "UntaggedScenarios";
28407
- CoreMessage2[CoreMessage2["SharedScnCodes"] = 117] = "SharedScnCodes";
28408
- CoreMessage2[CoreMessage2["SharedScnCodeScenario"] = 118] = "SharedScnCodeScenario";
28409
- CoreMessage2[CoreMessage2["ClaimColumn"] = 119] = "ClaimColumn";
28410
- CoreMessage2[CoreMessage2["VerdictColumn"] = 120] = "VerdictColumn";
28411
- CoreMessage2[CoreMessage2["ReconcilingItemsColumn"] = 121] = "ReconcilingItemsColumn";
28412
- CoreMessage2[CoreMessage2["CiStepsColumn"] = 122] = "CiStepsColumn";
28413
- CoreMessage2[CoreMessage2["EvidenceCellKey"] = 123] = "EvidenceCellKey";
28414
- CoreMessage2[CoreMessage2["PendingItem"] = 124] = "PendingItem";
28415
- CoreMessage2[CoreMessage2["PendingItemFor"] = 125] = "PendingItemFor";
28416
- CoreMessage2[CoreMessage2["CheckStepNoOutcome"] = 126] = "CheckStepNoOutcome";
28417
- CoreMessage2[CoreMessage2["CheckStepSkipped"] = 127] = "CheckStepSkipped";
28418
- CoreMessage2[CoreMessage2["CheckStepEnded"] = 128] = "CheckStepEnded";
28419
- CoreMessage2[CoreMessage2["AmbiguousNamedStep"] = 129] = "AmbiguousNamedStep";
28420
- CoreMessage2[CoreMessage2["AmbiguousUnnamedStep"] = 130] = "AmbiguousUnnamedStep";
28421
- CoreMessage2[CoreMessage2["ManifestKindList"] = 131] = "ManifestKindList";
28422
- CoreMessage2[CoreMessage2["ManifestKindObject"] = 132] = "ManifestKindObject";
28423
- CoreMessage2[CoreMessage2["ManifestKindString"] = 133] = "ManifestKindString";
28424
- CoreMessage2[CoreMessage2["ManifestKindStringOrNull"] = 134] = "ManifestKindStringOrNull";
28425
- CoreMessage2[CoreMessage2["ManifestKindOfType"] = 135] = "ManifestKindOfType";
28426
- CoreMessage2[CoreMessage2["OutcomeSatisfied"] = 136] = "OutcomeSatisfied";
28427
- CoreMessage2[CoreMessage2["OutcomeMissing"] = 137] = "OutcomeMissing";
28428
- CoreMessage2[CoreMessage2["OutcomeFailing"] = 138] = "OutcomeFailing";
28429
- CoreMessage2[CoreMessage2["OutcomeWatermelon"] = 139] = "OutcomeWatermelon";
28430
- CoreMessage2[CoreMessage2["OutcomeNoScnCode"] = 140] = "OutcomeNoScnCode";
28431
- CoreMessage2[CoreMessage2["OutcomeDuplicateScnCode"] = 141] = "OutcomeDuplicateScnCode";
28432
- CoreMessage2[CoreMessage2["OutcomeCitesUnknownScenario"] = 142] = "OutcomeCitesUnknownScenario";
28433
- CoreMessage2[CoreMessage2["OutcomeCitesNoScenario"] = 143] = "OutcomeCitesNoScenario";
28434
- CoreMessage2[CoreMessage2["OutcomeNoEvidenceObligation"] = 144] = "OutcomeNoEvidenceObligation";
28435
- CoreMessage2[CoreMessage2["OutcomeBroken"] = 145] = "OutcomeBroken";
28436
- CoreMessage2[CoreMessage2["OutcomeBothMissing"] = 146] = "OutcomeBothMissing";
28437
- CoreMessage2[CoreMessage2["ObservationPassed"] = 147] = "ObservationPassed";
28438
- CoreMessage2[CoreMessage2["ObservationFailed"] = 148] = "ObservationFailed";
28439
- CoreMessage2[CoreMessage2["UnnamedClaimGroupCounts"] = 149] = "UnnamedClaimGroupCounts";
28440
- CoreMessage2[CoreMessage2["UnnamedClaimCiSteps"] = 150] = "UnnamedClaimCiSteps";
28441
- CoreMessage2[CoreMessage2["UnnamedClaimFailedNames"] = 151] = "UnnamedClaimFailedNames";
28442
- CoreMessage2[CoreMessage2["SeveralScnCodes"] = 152] = "SeveralScnCodes";
28443
- CoreMessage2[CoreMessage2["SharedScnCode"] = 153] = "SharedScnCode";
28397
+ CoreMessage2[CoreMessage2["NotChecksEntryNotAStepName"] = 95] = "NotChecksEntryNotAStepName";
28398
+ CoreMessage2[CoreMessage2["StepAccountingHeading"] = 96] = "StepAccountingHeading";
28399
+ CoreMessage2[CoreMessage2["StepAccountingTableHeader"] = 97] = "StepAccountingTableHeader";
28400
+ CoreMessage2[CoreMessage2["StepAccountingTotal"] = 98] = "StepAccountingTotal";
28401
+ CoreMessage2[CoreMessage2["StepAccountingRunnersLabel"] = 99] = "StepAccountingRunnersLabel";
28402
+ CoreMessage2[CoreMessage2["StepAccountingReconcilerLabel"] = 100] = "StepAccountingReconcilerLabel";
28403
+ CoreMessage2[CoreMessage2["StepAccountingExcludedLabel"] = 101] = "StepAccountingExcludedLabel";
28404
+ CoreMessage2[CoreMessage2["StepAccountingNotAppliedLabel"] = 102] = "StepAccountingNotAppliedLabel";
28405
+ CoreMessage2[CoreMessage2["StepAccountingPlumbingLabel"] = 103] = "StepAccountingPlumbingLabel";
28406
+ CoreMessage2[CoreMessage2["OutOfBalanceByFeatureHeading"] = 104] = "OutOfBalanceByFeatureHeading";
28407
+ CoreMessage2[CoreMessage2["ScenarioClaimReconciliationsOutOfBalance"] = 105] = "ScenarioClaimReconciliationsOutOfBalance";
28408
+ CoreMessage2[CoreMessage2["GroupedByFeature"] = 106] = "GroupedByFeature";
28409
+ CoreMessage2[CoreMessage2["NotGroupedByFeature"] = 107] = "NotGroupedByFeature";
28410
+ CoreMessage2[CoreMessage2["PhantomClaimReconciliations"] = 108] = "PhantomClaimReconciliations";
28411
+ CoreMessage2[CoreMessage2["UnnamedClaimReconciliations"] = 109] = "UnnamedClaimReconciliations";
28412
+ CoreMessage2[CoreMessage2["AndJoiner"] = 110] = "AndJoiner";
28413
+ CoreMessage2[CoreMessage2["ByFeatureTableHeader"] = 111] = "ByFeatureTableHeader";
28414
+ CoreMessage2[CoreMessage2["NoScnCodeScenarios"] = 112] = "NoScnCodeScenarios";
28415
+ CoreMessage2[CoreMessage2["ClaimReconciliationsHeading"] = 113] = "ClaimReconciliationsHeading";
28416
+ CoreMessage2[CoreMessage2["ClaimReconciliationTally"] = 114] = "ClaimReconciliationTally";
28417
+ CoreMessage2[CoreMessage2["PhantomClaimTally"] = 115] = "PhantomClaimTally";
28418
+ CoreMessage2[CoreMessage2["UnnamedClaimTally"] = 116] = "UnnamedClaimTally";
28419
+ CoreMessage2[CoreMessage2["ExcludedScnOccurrences"] = 117] = "ExcludedScnOccurrences";
28420
+ CoreMessage2[CoreMessage2["UntaggedScenarios"] = 118] = "UntaggedScenarios";
28421
+ CoreMessage2[CoreMessage2["SharedScnCodes"] = 119] = "SharedScnCodes";
28422
+ CoreMessage2[CoreMessage2["SharedScnCodeScenario"] = 120] = "SharedScnCodeScenario";
28423
+ CoreMessage2[CoreMessage2["ClaimColumn"] = 121] = "ClaimColumn";
28424
+ CoreMessage2[CoreMessage2["VerdictColumn"] = 122] = "VerdictColumn";
28425
+ CoreMessage2[CoreMessage2["ReconcilingItemsColumn"] = 123] = "ReconcilingItemsColumn";
28426
+ CoreMessage2[CoreMessage2["CiStepsColumn"] = 124] = "CiStepsColumn";
28427
+ CoreMessage2[CoreMessage2["EvidenceCellKey"] = 125] = "EvidenceCellKey";
28428
+ CoreMessage2[CoreMessage2["PendingItem"] = 126] = "PendingItem";
28429
+ CoreMessage2[CoreMessage2["PendingItemFor"] = 127] = "PendingItemFor";
28430
+ CoreMessage2[CoreMessage2["CheckStepNoOutcome"] = 128] = "CheckStepNoOutcome";
28431
+ CoreMessage2[CoreMessage2["CheckStepSkipped"] = 129] = "CheckStepSkipped";
28432
+ CoreMessage2[CoreMessage2["CheckStepEnded"] = 130] = "CheckStepEnded";
28433
+ CoreMessage2[CoreMessage2["AmbiguousNamedStep"] = 131] = "AmbiguousNamedStep";
28434
+ CoreMessage2[CoreMessage2["AmbiguousUnnamedStep"] = 132] = "AmbiguousUnnamedStep";
28435
+ CoreMessage2[CoreMessage2["ManifestKindList"] = 133] = "ManifestKindList";
28436
+ CoreMessage2[CoreMessage2["ManifestKindObject"] = 134] = "ManifestKindObject";
28437
+ CoreMessage2[CoreMessage2["ManifestKindString"] = 135] = "ManifestKindString";
28438
+ CoreMessage2[CoreMessage2["ManifestKindStringOrNull"] = 136] = "ManifestKindStringOrNull";
28439
+ CoreMessage2[CoreMessage2["ManifestKindOfType"] = 137] = "ManifestKindOfType";
28440
+ CoreMessage2[CoreMessage2["OutcomeSatisfied"] = 138] = "OutcomeSatisfied";
28441
+ CoreMessage2[CoreMessage2["OutcomeMissing"] = 139] = "OutcomeMissing";
28442
+ CoreMessage2[CoreMessage2["OutcomeFailing"] = 140] = "OutcomeFailing";
28443
+ CoreMessage2[CoreMessage2["OutcomeWatermelon"] = 141] = "OutcomeWatermelon";
28444
+ CoreMessage2[CoreMessage2["OutcomeNoScnCode"] = 142] = "OutcomeNoScnCode";
28445
+ CoreMessage2[CoreMessage2["OutcomeDuplicateScnCode"] = 143] = "OutcomeDuplicateScnCode";
28446
+ CoreMessage2[CoreMessage2["OutcomeCitesUnknownScenario"] = 144] = "OutcomeCitesUnknownScenario";
28447
+ CoreMessage2[CoreMessage2["OutcomeCitesNoScenario"] = 145] = "OutcomeCitesNoScenario";
28448
+ CoreMessage2[CoreMessage2["OutcomeNoEvidenceObligation"] = 146] = "OutcomeNoEvidenceObligation";
28449
+ CoreMessage2[CoreMessage2["OutcomeBroken"] = 147] = "OutcomeBroken";
28450
+ CoreMessage2[CoreMessage2["OutcomeBothMissing"] = 148] = "OutcomeBothMissing";
28451
+ CoreMessage2[CoreMessage2["ObservationPassed"] = 149] = "ObservationPassed";
28452
+ CoreMessage2[CoreMessage2["ObservationFailed"] = 150] = "ObservationFailed";
28453
+ CoreMessage2[CoreMessage2["UnnamedClaimGroupCounts"] = 151] = "UnnamedClaimGroupCounts";
28454
+ CoreMessage2[CoreMessage2["UnnamedClaimCiSteps"] = 152] = "UnnamedClaimCiSteps";
28455
+ CoreMessage2[CoreMessage2["UnnamedClaimFailedNames"] = 153] = "UnnamedClaimFailedNames";
28456
+ CoreMessage2[CoreMessage2["SeveralScnCodes"] = 154] = "SeveralScnCodes";
28457
+ CoreMessage2[CoreMessage2["SharedScnCode"] = 155] = "SharedScnCode";
28444
28458
  })(CoreMessage || (CoreMessage = {}));
28445
28459
  SATISFIED = "Evidence Observation satisfies its Evidence Obligation";
28446
28460
  MISSING = "Evidence Observation is missing";
@@ -28546,13 +28560,15 @@ var init_messages4 = __esm({
28546
28560
  [CoreMessage.ReconcilerReconciles]: "this step runs the reconciliation this report is",
28547
28561
  [CoreMessage.ReconcilerRecords]: "this step writes the step record the reconciliation reads",
28548
28562
  [CoreMessage.StepExcluded]: (entry) => `${entry} \u2014 excluded: the target names this step a non-check.`,
28549
- [CoreMessage.NotChecksEntryMatchesNoStep]: (entry) => `\`specController.notChecks\` entry ${entry} matches no step of the workflows this run read, so it excludes nothing.`,
28563
+ [CoreMessage.NotChecksEntryMatchesNoStep]: (key, entry) => `${key} entry ${entry} matches no step of the workflows this run read, so it excludes nothing.`,
28564
+ [CoreMessage.NotChecksEntryNotAStepName]: (key, entry) => `${key} entry ${entry} does not name a step as \`<workflow file>:<job id>:<step name>\`, so it excludes nothing.`,
28550
28565
  [CoreMessage.StepAccountingHeading]: "### Step accounting",
28551
28566
  [CoreMessage.StepAccountingTableHeader]: "| Workflow | Job | Steps read | Candidates | Runners | Reconciler | Excluded | GitHub plumbing | Accounted for |",
28552
28567
  [CoreMessage.StepAccountingTotal]: "Total",
28553
28568
  [CoreMessage.StepAccountingRunnersLabel]: "Runners:",
28554
28569
  [CoreMessage.StepAccountingReconcilerLabel]: "Reconciler:",
28555
28570
  [CoreMessage.StepAccountingExcludedLabel]: "Excluded:",
28571
+ [CoreMessage.StepAccountingNotAppliedLabel]: (key, workflowsRead) => `Not applied, because each ${key} entry below names a workflow this run did not read (this run read ${workflowsRead}):`,
28556
28572
  [CoreMessage.StepAccountingPlumbingLabel]: "GitHub plumbing:",
28557
28573
  [CoreMessage.OutOfBalanceByFeatureHeading]: "### Out-of-balance by feature",
28558
28574
  [CoreMessage.ScenarioClaimReconciliationsOutOfBalance]: (outOfBalance, claimReconciliations) => `${outOfBalance} of ${claimReconciliations} Claim Reconciliation(s) of scenarios out of balance`,
@@ -28641,7 +28657,7 @@ var init_outcomeDescription = __esm({
28641
28657
 
28642
28658
  // ../core/dist/render/cellSafe.js
28643
28659
  function cellSafe(text) {
28644
- return text.replace(/\s+/g, " ").replace(/\|/g, "\\|").trim();
28660
+ return text.replace(/\s+/g, " ").replace(/[\\|]/g, "\\$&").trim();
28645
28661
  }
28646
28662
  var init_cellSafe = __esm({
28647
28663
  "../core/dist/render/cellSafe.js"() {
@@ -28870,6 +28886,19 @@ var init_provenanceSection = __esm({
28870
28886
  }
28871
28887
  });
28872
28888
 
28889
+ // ../core/dist/render/codeSpan.js
28890
+ function codeSpan(text) {
28891
+ const longestRun = Math.max(0, ...(text.match(/`+/g) ?? []).map((run3) => run3.length));
28892
+ const fence = "`".repeat(longestRun + 1);
28893
+ const pad = text.startsWith("`") || text.endsWith("`") ? " " : "";
28894
+ return `${fence}${pad}${text}${pad}${fence}`;
28895
+ }
28896
+ var init_codeSpan = __esm({
28897
+ "../core/dist/render/codeSpan.js"() {
28898
+ "use strict";
28899
+ }
28900
+ });
28901
+
28873
28902
  // ../core/dist/render/configurationNotRead.js
28874
28903
  function kindWords(kind) {
28875
28904
  switch (kind) {
@@ -28892,22 +28921,25 @@ var init_configurationNotRead = __esm({
28892
28921
  "../core/dist/render/configurationNotRead.js"() {
28893
28922
  "use strict";
28894
28923
  init_messages4();
28924
+ init_codeSpan();
28895
28925
  configurationNotReadSection = (report) => {
28896
28926
  const wrongKinds = report.errors?.configuration?.ofWrongKind ?? [];
28897
28927
  const unknownKeys = report.errors?.configuration?.keysNotRead ?? [];
28898
28928
  const runnerKeysNotATier = report.errors?.configuration?.runnerKeysNotATier ?? [];
28899
- const nonChecksMatchingNoStep2 = report.errors?.configuration?.nonChecksMatchingNoStep ?? [];
28900
- if (wrongKinds.length === 0 && unknownKeys.length === 0 && runnerKeysNotATier.length === 0 && nonChecksMatchingNoStep2.length === 0)
28929
+ const nonChecksMatchingNoStep = report.errors?.configuration?.nonChecksMatchingNoStep ?? [];
28930
+ const nonChecksNotAStepName = report.errors?.configuration?.nonChecksNotAStepName ?? [];
28931
+ if (wrongKinds.length === 0 && unknownKeys.length === 0 && runnerKeysNotATier.length === 0 && nonChecksMatchingNoStep.length === 0 && nonChecksNotAStepName.length === 0)
28901
28932
  return [];
28902
28933
  return [
28903
28934
  CORE_MESSAGES[CoreMessage.ConfigurationNotReadHeading],
28904
28935
  "",
28905
28936
  CORE_MESSAGES[CoreMessage.ConfigurationNotReadIntro],
28906
28937
  "",
28907
- ...wrongKinds.map(({ entry, is, reads }) => `- ${CORE_MESSAGES[CoreMessage.ConfigurationWrongKind](`\`${entry}\``, kindWords(is), kindWords(reads))}`),
28908
- ...unknownKeys.map((key) => `- ${CORE_MESSAGES[CoreMessage.ConfigurationUnknownKey](`\`specController.${key}\``)}`),
28909
- ...runnerKeysNotATier.map((key) => `- ${CORE_MESSAGES[CoreMessage.RunnerKeyNotATier](`\`specController.runners.${key}\``)}`),
28910
- ...nonChecksMatchingNoStep2.map((entry) => `- ${CORE_MESSAGES[CoreMessage.NotChecksEntryMatchesNoStep](`\`${entry}\``)}`),
28938
+ ...wrongKinds.map(({ entry, is, reads }) => `- ${CORE_MESSAGES[CoreMessage.ConfigurationWrongKind](codeSpan(entry), kindWords(is), kindWords(reads))}`),
28939
+ ...unknownKeys.map((key) => `- ${CORE_MESSAGES[CoreMessage.ConfigurationUnknownKey](codeSpan(`specController.${key}`))}`),
28940
+ ...runnerKeysNotATier.map((key) => `- ${CORE_MESSAGES[CoreMessage.RunnerKeyNotATier](codeSpan(`specController.runners.${key}`))}`),
28941
+ ...nonChecksMatchingNoStep.map((entry) => `- ${CORE_MESSAGES[CoreMessage.NotChecksEntryMatchesNoStep]("`specController.notChecks`", codeSpan(entry))}`),
28942
+ ...nonChecksNotAStepName.map((entry) => `- ${CORE_MESSAGES[CoreMessage.NotChecksEntryNotAStepName]("`specController.notChecks`", codeSpan(entry))}`),
28911
28943
  ""
28912
28944
  ];
28913
28945
  };
@@ -28932,12 +28964,13 @@ var init_errorsInTheInputs = __esm({
28932
28964
  });
28933
28965
 
28934
28966
  // ../core/dist/render/stepAccounting.js
28935
- var rowOf, jobRowsOf, totalRowOf, WHAT_IT_IS, runnersListOf, reconcilerListOf, excludedListOf, plumbingListOf, stepAccountingSection;
28967
+ var rowOf, jobRowsOf, totalRowOf, WHAT_IT_IS, runnersListOf, reconcilerListOf, excludedListOf, workflowsReadOf, notAppliedListOf, plumbingListOf, stepAccountingSection;
28936
28968
  var init_stepAccounting = __esm({
28937
28969
  "../core/dist/render/stepAccounting.js"() {
28938
28970
  "use strict";
28939
28971
  init_uncitedFitnessFunctions();
28940
28972
  init_messages4();
28973
+ init_codeSpan();
28941
28974
  rowOf = (cells) => `| ${cells.join(" | ")} |`;
28942
28975
  jobRowsOf = ({ byJob }) => byJob.map((row) => rowOf([
28943
28976
  row.workflow,
@@ -28987,6 +29020,17 @@ var init_stepAccounting = __esm({
28987
29020
  ""
28988
29021
  ];
28989
29022
  };
29023
+ workflowsReadOf = ({ byJob }) => [...new Set(byJob.map(({ workflow }) => workflow))].map((workflow) => `\`${workflow}\``).join(", ");
29024
+ notAppliedListOf = (accounting) => {
29025
+ const notApplied = accounting.nonChecksNamingAWorkflowNotRead ?? [];
29026
+ if (notApplied.length === 0)
29027
+ return [];
29028
+ return [
29029
+ CORE_MESSAGES[CoreMessage.StepAccountingNotAppliedLabel]("`specController.notChecks`", workflowsReadOf(accounting)),
29030
+ ...notApplied.map((entry) => `- ${codeSpan(entry)}`),
29031
+ ""
29032
+ ];
29033
+ };
28990
29034
  plumbingListOf = ({ steps }) => {
28991
29035
  const plumbing = steps.plumbing ?? [];
28992
29036
  if (plumbing.length === 0)
@@ -29008,6 +29052,7 @@ var init_stepAccounting = __esm({
29008
29052
  ...runnersListOf(accounting),
29009
29053
  ...reconcilerListOf(accounting),
29010
29054
  ...excludedListOf(accounting),
29055
+ ...notAppliedListOf(accounting),
29011
29056
  ...plumbingListOf(accounting)
29012
29057
  ];
29013
29058
  };
@@ -29115,6 +29160,10 @@ function remarkWordsOf({ message, notes = [] }) {
29115
29160
  const words = [...message === void 0 ? [] : [message], ...notes.map(noteWords)];
29116
29161
  return words.length === 0 ? void 0 : words.join(" ");
29117
29162
  }
29163
+ function remarkHeadlineOf({ message, notes = [] }) {
29164
+ const headline = message?.split("\n").map((line) => line.trim()).find((line) => line.length > 0);
29165
+ return remarkWordsOf({ ...headline === void 0 ? {} : { message: headline }, notes });
29166
+ }
29118
29167
  var init_remarkWords = __esm({
29119
29168
  "../core/dist/render/remarkWords.js"() {
29120
29169
  "use strict";
@@ -29130,19 +29179,15 @@ function sharedScnCodeOf(observation) {
29130
29179
  const [code = null] = (observation.notes ?? []).flatMap((note) => note.kind === "shared-scn-code" ? [note.code] : []);
29131
29180
  return code;
29132
29181
  }
29133
- function keyOf(observation) {
29134
- return JSON.stringify([observation.qualityCheck, observation.locator ?? null, sharedScnCodeOf(observation)]);
29135
- }
29136
29182
  function remarksOf(observations) {
29137
29183
  return observations.flatMap(({ message, notes = [] }) => {
29138
29184
  const kept = notes.filter((note) => note.kind !== "shared-scn-code");
29139
- return message === void 0 && kept.length === 0 ? [] : [{ ...message !== void 0 ? { message } : {}, notes: kept }];
29185
+ return message === void 0 && kept.length === 0 ? [] : [{ ...message !== void 0 ? { message } : {}, ...kept.length > 0 ? { notes: kept } : {} }];
29140
29186
  });
29141
29187
  }
29142
- function groupOf(observations) {
29188
+ function groupOf(sharedScnCode, observations) {
29143
29189
  const [first] = observations;
29144
29190
  const passed = observations.filter((o) => o.status === "passed").length;
29145
- const sharedScnCode = sharedScnCodeOf(first);
29146
29191
  return {
29147
29192
  qualityCheck: first.qualityCheck,
29148
29193
  locator: first.locator,
@@ -29170,10 +29215,11 @@ function unnamedClaimGroupsOf(lines) {
29170
29215
  for (const o of observations) {
29171
29216
  if (isFitnessObservation(o))
29172
29217
  continue;
29173
- const key = keyOf(o);
29174
- byFile.set(key, [...byFile.get(key) ?? [], o]);
29218
+ const code = sharedScnCodeOf(o);
29219
+ const key = JSON.stringify([o.qualityCheck, o.locator ?? null, code]);
29220
+ byFile.set(key, { code, members: [...byFile.get(key)?.members ?? [], o] });
29175
29221
  }
29176
- return [...[...byFile.values()].map(groupOf), ...stepsGroupsOf(observations)];
29222
+ return [...[...byFile.values()].map(({ code, members }) => groupOf(code, members)), ...stepsGroupsOf(observations)];
29177
29223
  }
29178
29224
  var init_unnamedClaimGroups = __esm({
29179
29225
  "../core/dist/domain/unnamedClaimGroups.js"() {
@@ -29197,7 +29243,7 @@ function renderLine(line) {
29197
29243
  return `${head}${line.outcome === "broken" ? brokenSuffix(observation) : observationSuffix(observation)}`;
29198
29244
  }
29199
29245
  function quotedSuffix(parts) {
29200
- const where = parts.flatMap((part) => cellSafe(part ?? "") || []).join(": ");
29246
+ const where = parts.flatMap((part) => part?.trim() || []).join(": ");
29201
29247
  return where === "" ? "" : ` (${where})`;
29202
29248
  }
29203
29249
  function namedSuffix(o) {
@@ -29207,31 +29253,25 @@ function scenarioClauseOf({ scenario }) {
29207
29253
  return scenario === void 0 ? "" : ` \u2014 ${CORE_MESSAGES[CoreMessage.SharedScnCodeScenario](scenario.feature, scenario.title)}`;
29208
29254
  }
29209
29255
  function brokenSuffix(o) {
29210
- const remark = remarkWordsOf(o);
29211
- const where = [o.locator, remark === void 0 ? void 0 : headlineOf(remark)].filter((part) => part !== void 0 && part.length > 0).join(": ");
29212
- return where.length > 0 ? ` (${cellSafe(where)})` : "";
29256
+ return quotedSuffix([o.locator, remarkHeadlineOf(o)]);
29213
29257
  }
29214
29258
  function observationSuffix(o) {
29215
- return `${quotedSuffix([isFitnessObservation(o) ? o.fitnessFunction : o.locator])}${resultOf(o)}`;
29259
+ return `${namedSuffix(o)}${resultOf(o)}`;
29216
29260
  }
29217
29261
  function resultOf(o) {
29218
29262
  return o.status === void 0 ? "" : ` \u2014 ${CORE_MESSAGES[RESULT_MESSAGE[o.status]]}`;
29219
29263
  }
29220
- function headlineOf(message) {
29221
- return message.split("\n").map((line) => line.trim()).find((line) => line.length > 0) ?? "";
29222
- }
29223
29264
  function renderPendingItem(item) {
29224
29265
  return item.qualityCheck === void 0 ? CORE_MESSAGES[CoreMessage.PendingItem] : CORE_MESSAGES[CoreMessage.PendingItemFor](item.qualityCheck);
29225
29266
  }
29226
29267
  function renderFileGroup(group) {
29227
- const remarks = group.remarks.flatMap((remark) => remarkWordsOf(remark) ?? []);
29228
- const code = group.sharedScnCode === void 0 ? [] : [cellSafe(CORE_MESSAGES[CoreMessage.SharedScnCode](group.sharedScnCode))];
29229
- const said = [.../* @__PURE__ */ new Set([...code, ...remarks.map((remark) => cellSafe(headlineOf(remark)))])].join(" / ");
29230
- const where = group.locator === void 0 ? "" : ` (${group.locator}${said === "" ? "" : `: ${said}`})`;
29268
+ const remarks = group.remarks.flatMap((remark) => remarkHeadlineOf(remark) ?? []);
29269
+ const code = group.sharedScnCode === void 0 ? [] : [CORE_MESSAGES[CoreMessage.SharedScnCode](group.sharedScnCode)];
29270
+ const said = [.../* @__PURE__ */ new Set([...code, ...remarks])].filter((part) => part !== "").join(" / ");
29231
29271
  const counts = CORE_MESSAGES[CoreMessage.UnnamedClaimGroupCounts](group.ran, group.passed, group.failed);
29232
- const names = group.failedNames.map(cellSafe).filter((name) => name !== "");
29272
+ const names = group.failedNames.map((name) => name.trim()).filter((name) => name !== "");
29233
29273
  const failed = names.length === 0 ? "" : ` ${CORE_MESSAGES[CoreMessage.UnnamedClaimFailedNames](names)}`;
29234
- return `${group.qualityCheck}: ${OUTCOME_DESCRIPTION["cites-no-scenario"]}${where} \u2014 ${counts}${failed}`;
29274
+ return `${group.qualityCheck}: ${OUTCOME_DESCRIPTION["cites-no-scenario"]}${quotedSuffix([group.locator, said])} \u2014 ${counts}${failed}`;
29235
29275
  }
29236
29276
  function renderUnnamedClaimGroup(group) {
29237
29277
  if (!("names" in group))
@@ -29246,7 +29286,7 @@ function renderUnnamedClaimItems(lines) {
29246
29286
  }
29247
29287
  function renderRowExceptions(s) {
29248
29288
  const items = isUnnamedClaim(s) ? renderUnnamedClaimItems(reconcilingItemsOf(s)) : reconcilingItemsOf(s).map(renderLine);
29249
- const reconciling = items.join("; ");
29289
+ const reconciling = items.map(cellSafe).join("; ");
29250
29290
  const pending = s.pendingItems.map(renderPendingItem).join("; ");
29251
29291
  const groups = [reconciling, pending].filter((g) => g.length > 0);
29252
29292
  return groups.length === 0 ? "\u2014" : groups.join("; ");
@@ -29766,7 +29806,8 @@ var init_inputShapes = __esm({
29766
29806
  keysNotRead: { list: "anything" },
29767
29807
  ofWrongKind: { list: "anything" },
29768
29808
  runnerKeysNotATier: { list: "anything" },
29769
- nonChecksMatchingNoStep: { list: "anything" }
29809
+ nonChecksMatchingNoStep: { list: "anything" },
29810
+ nonChecksNotAStepName: { list: "anything" }
29770
29811
  }
29771
29812
  }
29772
29813
  }
@@ -159,6 +159,12 @@
159
159
  "items": {
160
160
  "type": "string"
161
161
  }
162
+ },
163
+ "nonChecksNotAStepName": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
162
168
  }
163
169
  },
164
170
  "additionalProperties": false
@@ -628,6 +634,12 @@
628
634
  },
629
635
  "steps": {
630
636
  "$ref": "#/definitions/StepsBehindCounts"
637
+ },
638
+ "nonChecksNamingAWorkflowNotRead": {
639
+ "type": "array",
640
+ "items": {
641
+ "type": "string"
642
+ }
631
643
  }
632
644
  },
633
645
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.154",
3
+ "version": "0.1.156",
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.154"
29
+ "@3f-consulting/spec-controller-core": "0.1.156"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"