spec-controller 0.1.216 → 0.1.218

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
@@ -11459,14 +11459,14 @@ var init_scnTags = __esm({
11459
11459
  });
11460
11460
 
11461
11461
  // ../core/dist/domain/corpusCounts.js
11462
- function untaggedScenarioId({ feature, scenario }) {
11463
- return `${feature} : ${scenario}`;
11462
+ function untaggedScenarioId({ feature, title }) {
11463
+ return `${feature} : ${title}`;
11464
11464
  }
11465
11465
  function sharedScnCodesOf(files) {
11466
11466
  const byCode = /* @__PURE__ */ new Map();
11467
11467
  for (const { feature, taggedScenarios } of files) {
11468
11468
  for (const { scnId, name } of taggedScenarios) {
11469
- byCode.set(scnId, [...byCode.get(scnId) ?? [], { feature, scenario: name }]);
11469
+ byCode.set(scnId, [...byCode.get(scnId) ?? [], { feature, title: name }]);
11470
11470
  }
11471
11471
  }
11472
11472
  return [...byCode].filter(([, scenarios]) => scenarios.length > 1).map(([scnId, scenarios]) => ({ scnId, scenarios })).sort((a, b) => a.scnId.localeCompare(b.scnId));
@@ -11475,7 +11475,7 @@ function corpusCountsOf(files) {
11475
11475
  const raw = files.reduce((n, f) => n + f.rawScnOccurrences, 0);
11476
11476
  const scenarioCount = files.reduce((n, f) => n + f.taggedScenarios.length, 0);
11477
11477
  const tagOccurrences = files.reduce((n, f) => n + f.tagScnOccurrences, 0);
11478
- const untagged = files.flatMap(({ feature, untaggedScenarios }) => untaggedScenarios.map((scenario) => ({ feature, scenario }))).sort((a, b) => a.feature.localeCompare(b.feature) || a.scenario.localeCompare(b.scenario));
11478
+ const untagged = files.flatMap(({ feature, untaggedScenarios }) => untaggedScenarios.map((title) => ({ feature, title }))).sort((a, b) => a.feature.localeCompare(b.feature) || a.title.localeCompare(b.title));
11479
11479
  return evidenceObligations(raw, scenarioCount, untagged, sharedScnCodesOf(files), tagOccurrences);
11480
11480
  }
11481
11481
  function evidenceObligations(raw, scenarioCount, untaggedScenarios = [], sharedScnCodes = [], tagOccurrences = scenarioCount) {
@@ -11818,7 +11818,7 @@ function reconcileEvidenceObligation(scnId, obligation, evidenceObservations) {
11818
11818
  return makeQualityCheckReconciliation({
11819
11819
  qualityCheckKind: obligation.qualityCheckKind,
11820
11820
  ...answered ? {} : { outcome: "missing" },
11821
- evidenceObligation: obligation,
11821
+ evidenceObligation: { ...obligation, qualityCheckKind: obligation.qualityCheckKind ?? null },
11822
11822
  ...observationsField(linesFor(citing, "evidence-obligation"))
11823
11823
  });
11824
11824
  }
@@ -11839,7 +11839,7 @@ function unnamedClaimReconciliationsOf(observations) {
11839
11839
  return reconciliationsByQualityCheckKind(observations, "unnamed-claim");
11840
11840
  }
11841
11841
  function noScnCodeReconciliations() {
11842
- return [makeQualityCheckReconciliation({ outcome: "no-scn-code", evidenceObligation: {} })];
11842
+ return [makeQualityCheckReconciliation({ outcome: "no-scn-code", evidenceObligation: { qualityCheckKind: null } })];
11843
11843
  }
11844
11844
  function duplicateScnCodeReconciliationsOf(obligations, scenario) {
11845
11845
  const naming = scenario === void 0 ? {} : { scenario };
@@ -11850,9 +11850,14 @@ function duplicateScnCodeReconciliationsOf(obligations, scenario) {
11850
11850
  }
11851
11851
  }
11852
11852
  if (firstNaming.size === 0) {
11853
- return [makeQualityCheckReconciliation({ outcome: "duplicate-scn-code", evidenceObligation: {}, ...naming })];
11853
+ return [makeQualityCheckReconciliation({ outcome: "duplicate-scn-code", evidenceObligation: { qualityCheckKind: null }, ...naming })];
11854
11854
  }
11855
- return [...firstNaming].map(([qualityCheckKind, evidenceObligation]) => makeQualityCheckReconciliation({ qualityCheckKind, outcome: "duplicate-scn-code", evidenceObligation, ...naming }));
11855
+ return [...firstNaming].map(([qualityCheckKind, evidenceObligation]) => makeQualityCheckReconciliation({
11856
+ qualityCheckKind,
11857
+ outcome: "duplicate-scn-code",
11858
+ evidenceObligation: { ...evidenceObligation, qualityCheckKind },
11859
+ ...naming
11860
+ }));
11856
11861
  }
11857
11862
  function bothMissingReconciliation() {
11858
11863
  return makeQualityCheckReconciliation({ outcome: "both-missing" });
@@ -11924,7 +11929,7 @@ function observationsOf(row) {
11924
11929
  return row.qualityCheckReconciliations.flatMap((reconciliation) => reconciliation.evidenceObservations ?? []);
11925
11930
  }
11926
11931
  function obligationsOf(row) {
11927
- return row.qualityCheckReconciliations.flatMap(({ evidenceObligation }) => evidenceObligation?.qualityCheckKind === void 0 ? [] : [evidenceObligation]);
11932
+ return row.qualityCheckReconciliations.flatMap(({ evidenceObligation }) => evidenceObligation?.qualityCheckKind == null ? [] : [evidenceObligation]);
11928
11933
  }
11929
11934
  function isScenario(row) {
11930
11935
  return row.kind === "scenario";
@@ -28103,7 +28108,7 @@ function pipelineReadings(input) {
28103
28108
  };
28104
28109
  }
28105
28110
  function untaggedScenariosAmong(features) {
28106
- return features.flatMap((parsed) => untaggedScenariosOf(parsed).map((scenario) => untaggedScenarioId({ feature: parsed.file, scenario })));
28111
+ return features.flatMap((parsed) => untaggedScenariosOf(parsed).map((title) => untaggedScenarioId({ feature: parsed.file, title })));
28107
28112
  }
28108
28113
  function evidenceReconciliationFromSources(input) {
28109
28114
  const { packageJson } = input;
@@ -32211,7 +32216,7 @@ function sharedScnCodeLines(shared, scenarios) {
32211
32216
  return [];
32212
32217
  return [
32213
32218
  `- ${CORE_MESSAGES[CoreMessage.SharedScnCodes](scenarios, shared.length)}`,
32214
- ...shared.map((code) => ` - ${code.scnId}: ${code.scenarios.map((s) => `${s.feature} : ${s.scenario}`).join("; ")}`)
32219
+ ...shared.map((code) => ` - ${code.scnId}: ${code.scenarios.map((s) => `${s.feature} : ${s.title}`).join("; ")}`)
32215
32220
  ];
32216
32221
  }
32217
32222
  function ledgerTableLines(claims, columns, stepsByQualityCheckKind) {
@@ -32784,7 +32789,7 @@ function entriesFault(record, shape, where) {
32784
32789
  }
32785
32790
  return null;
32786
32791
  }
32787
- var VITEST_REPORT, JUNIT_REPORT, RSPEC_REPORT, CUCUMBER_REPORT, CI_STEP_RECORD, PACKAGE_MANIFEST, SAVED_RECONCILIATION, TOP;
32792
+ var VITEST_REPORT, JUNIT_REPORT, RSPEC_REPORT, CUCUMBER_REPORT, CI_STEP_RECORD, PACKAGE_MANIFEST, SCENARIO_NAME, SAVED_RECONCILIATION, TOP;
32788
32793
  var init_inputShapes = __esm({
32789
32794
  "src/ingest/inputShapes.ts"() {
32790
32795
  "use strict";
@@ -32847,6 +32852,7 @@ var init_inputShapes = __esm({
32847
32852
  keys: (key) => featureCodeOf(key) !== null
32848
32853
  };
32849
32854
  PACKAGE_MANIFEST = { fields: { scripts: { entries: "string" } } };
32855
+ SCENARIO_NAME = { fields: { title: "string" }, required: ["title"] };
32850
32856
  SAVED_RECONCILIATION = {
32851
32857
  fields: {
32852
32858
  runProvenance: { fields: { corpus: "string" }, required: ["corpus"] },
@@ -32865,7 +32871,15 @@ var init_inputShapes = __esm({
32865
32871
  },
32866
32872
  required: ["evidenceReconciliation", "evidenceObservations"]
32867
32873
  },
32868
- claimReconciliations: { list: "anything" },
32874
+ claimReconciliations: {
32875
+ list: {
32876
+ fields: {
32877
+ qualityCheckReconciliations: {
32878
+ list: { fields: { evidenceObligation: { fields: { qualityCheckKind: "anything" }, required: ["qualityCheckKind"] } } }
32879
+ }
32880
+ }
32881
+ }
32882
+ },
32869
32883
  errors: {
32870
32884
  fields: {
32871
32885
  scenarioCodes: { list: "anything" },
@@ -32880,7 +32894,12 @@ var init_inputShapes = __esm({
32880
32894
  }
32881
32895
  }
32882
32896
  },
32883
- scenarioCodes: { fields: {} }
32897
+ scenarioCodes: {
32898
+ fields: {
32899
+ untaggedScenarios: { list: SCENARIO_NAME },
32900
+ sharedScnCodes: { list: { fields: { scenarios: { list: SCENARIO_NAME } } } }
32901
+ }
32902
+ }
32884
32903
  },
32885
32904
  required: ["runProvenance", "summary", "claimReconciliations"]
32886
32905
  };
@@ -347,7 +347,7 @@
347
347
  "untaggedScenarios": {
348
348
  "type": "array",
349
349
  "items": {
350
- "$ref": "#/definitions/UntaggedScenario"
350
+ "$ref": "#/definitions/ScenarioName"
351
351
  }
352
352
  },
353
353
  "sharedScnCodes": {
@@ -359,21 +359,22 @@
359
359
  },
360
360
  "additionalProperties": false
361
361
  },
362
- "UntaggedScenario": {
362
+ "ScenarioName": {
363
363
  "type": "object",
364
364
  "properties": {
365
365
  "feature": {
366
366
  "type": "string"
367
367
  },
368
- "scenario": {
368
+ "title": {
369
369
  "type": "string"
370
370
  }
371
371
  },
372
372
  "required": [
373
373
  "feature",
374
- "scenario"
374
+ "title"
375
375
  ],
376
- "additionalProperties": false
376
+ "additionalProperties": false,
377
+ "description": "A scenario, named by its feature file and its title."
377
378
  },
378
379
  "SharedScnCode": {
379
380
  "type": "object",
@@ -384,7 +385,7 @@
384
385
  "scenarios": {
385
386
  "type": "array",
386
387
  "items": {
387
- "$ref": "#/definitions/UntaggedScenario"
388
+ "$ref": "#/definitions/ScenarioName"
388
389
  }
389
390
  }
390
391
  },
@@ -840,7 +841,7 @@
840
841
  "$ref": "#/definitions/Outcome"
841
842
  },
842
843
  "evidenceObligation": {
843
- "$ref": "#/definitions/EvidenceObligation"
844
+ "$ref": "#/definitions/ReconciledEvidenceObligation"
844
845
  },
845
846
  "evidenceObservations": {
846
847
  "type": "array",
@@ -869,17 +870,28 @@
869
870
  "both-missing"
870
871
  ]
871
872
  },
872
- "EvidenceObligation": {
873
+ "ReconciledEvidenceObligation": {
873
874
  "type": "object",
874
875
  "properties": {
875
876
  "qualityCheckKind": {
876
- "$ref": "#/definitions/QualityCheckKind"
877
+ "anyOf": [
878
+ {
879
+ "$ref": "#/definitions/QualityCheckKind"
880
+ },
881
+ {
882
+ "type": "null"
883
+ }
884
+ ]
877
885
  },
878
886
  "pending": {
879
887
  "type": "boolean"
880
888
  }
881
889
  },
882
- "additionalProperties": false
890
+ "required": [
891
+ "qualityCheckKind"
892
+ ],
893
+ "additionalProperties": false,
894
+ "description": "The evidence obligation a Quality Check Reconciliation holds: an obligation that states no kind of quality check holds null."
883
895
  },
884
896
  "ReconciledEvidenceObservation": {
885
897
  "anyOf": [
@@ -1079,23 +1091,6 @@
1079
1091
  }
1080
1092
  ]
1081
1093
  },
1082
- "ScenarioName": {
1083
- "type": "object",
1084
- "properties": {
1085
- "feature": {
1086
- "type": "string"
1087
- },
1088
- "title": {
1089
- "type": "string"
1090
- }
1091
- },
1092
- "required": [
1093
- "feature",
1094
- "title"
1095
- ],
1096
- "additionalProperties": false,
1097
- "description": "The scenario a duplicate-scn-code reconciliation reconciles, by its feature file and title."
1098
- },
1099
1094
  "PendingItem": {
1100
1095
  "type": "object",
1101
1096
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.216",
3
+ "version": "0.1.218",
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.216"
29
+ "@3f-consulting/spec-controller-core": "0.1.218"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"