spec-controller 0.1.148 → 0.1.150

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 +16 -13
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -27603,6 +27603,9 @@ 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(":"))));
27608
+ }
27606
27609
  function exclusionOf(step, isReconciler, isNamedANonCheck) {
27607
27610
  if (isReconciler(step))
27608
27611
  return "reconciler";
@@ -28144,7 +28147,7 @@ function pipelineReadings(input) {
28144
28147
  return {
28145
28148
  steps,
28146
28149
  runners,
28147
- exclusions,
28150
+ matchingNoStep: nonChecksMatchingNoStep(exclusions, input.ciWorkflows.map(({ file }) => file)),
28148
28151
  reconciler,
28149
28152
  dispositionOf: stepDispositions({
28150
28153
  isReconciler: reconciler.isReconciler,
@@ -28159,10 +28162,10 @@ function untaggedScenariosAmong(features) {
28159
28162
  function evidenceReconciliationFromSources(input) {
28160
28163
  const { packageJson } = input;
28161
28164
  const corpus = readTargetCorpus(input.features, resolveDeferralTags(packageJson, input.deferralTags));
28162
- const { steps, runners, exclusions, reconciler, dispositionOf } = pipelineReadings(input);
28165
+ const { steps, runners, matchingNoStep, reconciler, dispositionOf } = pipelineReadings(input);
28163
28166
  const isCandidate = (step) => dispositionOf(step) === "candidate";
28164
28167
  const reconciliation = evidenceReconciliationOf(corpus.scenarios, observationStreams(input, steps, corpus, packageJson, isCandidate), untaggedScenariosAmong(input.features));
28165
- return withScenarioCodeErrors(withConfigurationAccount(withReaderAccounts(reconciliation, steps, packageJson, runners, exclusions, reconciler, dispositionOf), packageJson), input);
28168
+ return withScenarioCodeErrors(withConfigurationAccount(withReaderAccounts(reconciliation, steps, packageJson, runners, matchingNoStep, reconciler, dispositionOf), packageJson), input);
28166
28169
  }
28167
28170
  function withConfigurationAccount(reconciliation, packageJson) {
28168
28171
  const { wrongKinds, unknownKeys } = configurationNotRead(packageJson);
@@ -28182,8 +28185,8 @@ function withScenarioCodeErrors(reconciliation, input) {
28182
28185
  scenarioCodePopulation: scenarioCodePopulationOf(input.features)
28183
28186
  };
28184
28187
  }
28185
- function withReaderAccounts(reconciliation, steps, packageJson, runners, exclusions, reconciler, dispositionOf) {
28186
- return withStepAccounting(withUnmatchedNonChecks(withRunnerAccount(reconciliation, steps, packageJson, runners), exclusions), steps, dispositionOf, reconciler.roleOf);
28188
+ function withReaderAccounts(reconciliation, steps, packageJson, runners, matchingNoStep, reconciler, dispositionOf) {
28189
+ return withStepAccounting(withUnmatchedNonChecks(withRunnerAccount(reconciliation, steps, packageJson, runners), matchingNoStep), steps, dispositionOf, reconciler.roleOf);
28187
28190
  }
28188
28191
  function withStepAccounting(reconciliation, steps, dispositionOf, roleOf) {
28189
28192
  if (steps.length === 0)
@@ -28196,12 +28199,12 @@ function withStepAccounting(reconciliation, steps, dispositionOf, roleOf) {
28196
28199
  }
28197
28200
  };
28198
28201
  }
28199
- function withUnmatchedNonChecks(reconciliation, { unmatchedEntries }) {
28200
- if (unmatchedEntries.length === 0)
28202
+ function withUnmatchedNonChecks(reconciliation, matchingNoStep) {
28203
+ if (matchingNoStep.length === 0)
28201
28204
  return reconciliation;
28202
28205
  return {
28203
28206
  ...reconciliation,
28204
- summary: { ...reconciliation.summary, nonChecksMatchingNoStep: unmatchedEntries }
28207
+ summary: { ...reconciliation.summary, nonChecksMatchingNoStep: matchingNoStep }
28205
28208
  };
28206
28209
  }
28207
28210
  function withRunnerAccount(reconciliation, steps, packageJson, { tiers: runnerTiers, unrecognisedKeys }) {
@@ -28464,7 +28467,7 @@ var init_messages4 = __esm({
28464
28467
  [CoreMessage.ProvenanceToolVersion]: (version2) => `Tool version: ${version2}`,
28465
28468
  [CoreMessage.ErrorsInTheInputsHeading]: "## Errors in the inputs",
28466
28469
  [CoreMessage.ConfigurationNotReadHeading]: "### Configuration not read",
28467
- [CoreMessage.ConfigurationNotReadIntro]: "The target's package.json holds configuration this run could not use. Each entry below was read as absent, and every account in this report is the one the target gives without it.",
28470
+ [CoreMessage.ConfigurationNotReadIntro]: "The target's package.json holds configuration this run could not use. Each line below says what this run did with its entry, and every account in this report is the one the target gives without it.",
28468
28471
  [CoreMessage.ConfigurationWrongKind]: (entry, is, reads) => `${entry} is ${is} where ${reads} is read, so this run read it as absent.`,
28469
28472
  [CoreMessage.ConfigurationUnknownKey]: (key) => `${key} is not a key the specController block reads, so this run read nothing from it.`,
28470
28473
  [CoreMessage.RunIntegrityHeading]: "## Run integrity: unsound",
@@ -28543,7 +28546,7 @@ var init_messages4 = __esm({
28543
28546
  [CoreMessage.ReconcilerReconciles]: "this step runs the reconciliation this report is",
28544
28547
  [CoreMessage.ReconcilerRecords]: "this step writes the step record the reconciliation reads",
28545
28548
  [CoreMessage.StepExcluded]: (entry) => `${entry} \u2014 excluded: the target names this step a non-check.`,
28546
- [CoreMessage.NotChecksEntryMatchesNoStep]: (entry) => `${entry} \u2014 matches no step: the entry names nothing this run read.`,
28549
+ [CoreMessage.NotChecksEntryMatchesNoStep]: (entry) => `\`specController.notChecks\` entry ${entry} matches no step of the workflows this run read, so it excludes nothing.`,
28547
28550
  [CoreMessage.StepAccountingHeading]: "### Step accounting",
28548
28551
  [CoreMessage.StepAccountingTableHeader]: "| Workflow | Job | Steps read | Candidates | Runners | Reconciler | Excluded | GitHub plumbing | Accounted for |",
28549
28552
  [CoreMessage.StepAccountingTotal]: "Total",
@@ -28893,8 +28896,8 @@ var init_configurationNotRead = __esm({
28893
28896
  const wrongKinds = report.errors?.configuration?.ofWrongKind ?? [];
28894
28897
  const unknownKeys = report.errors?.configuration?.keysNotRead ?? [];
28895
28898
  const runnerKeysNotATier = report.errors?.configuration?.runnerKeysNotATier ?? [];
28896
- const nonChecksMatchingNoStep = report.errors?.configuration?.nonChecksMatchingNoStep ?? [];
28897
- if (wrongKinds.length === 0 && unknownKeys.length === 0 && runnerKeysNotATier.length === 0 && nonChecksMatchingNoStep.length === 0)
28899
+ const nonChecksMatchingNoStep2 = report.errors?.configuration?.nonChecksMatchingNoStep ?? [];
28900
+ if (wrongKinds.length === 0 && unknownKeys.length === 0 && runnerKeysNotATier.length === 0 && nonChecksMatchingNoStep2.length === 0)
28898
28901
  return [];
28899
28902
  return [
28900
28903
  CORE_MESSAGES[CoreMessage.ConfigurationNotReadHeading],
@@ -28904,7 +28907,7 @@ var init_configurationNotRead = __esm({
28904
28907
  ...wrongKinds.map(({ entry, is, reads }) => `- ${CORE_MESSAGES[CoreMessage.ConfigurationWrongKind](`\`${entry}\``, kindWords(is), kindWords(reads))}`),
28905
28908
  ...unknownKeys.map((key) => `- ${CORE_MESSAGES[CoreMessage.ConfigurationUnknownKey](`\`specController.${key}\``)}`),
28906
28909
  ...runnerKeysNotATier.map((key) => `- ${CORE_MESSAGES[CoreMessage.RunnerKeyNotATier](`\`specController.runners.${key}\``)}`),
28907
- ...nonChecksMatchingNoStep.map((entry) => `- ${CORE_MESSAGES[CoreMessage.NotChecksEntryMatchesNoStep](entry)}`),
28910
+ ...nonChecksMatchingNoStep2.map((entry) => `- ${CORE_MESSAGES[CoreMessage.NotChecksEntryMatchesNoStep](`\`${entry}\``)}`),
28908
28911
  ""
28909
28912
  ];
28910
28913
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.148",
3
+ "version": "0.1.150",
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.148"
29
+ "@3f-consulting/spec-controller-core": "0.1.150"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"