spec-controller 0.1.134 → 0.1.135

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 +18 -7
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -28637,7 +28637,7 @@ var init_messages4 = __esm({
28637
28637
  [CoreMessage.UnnamedClaimCiSteps]: (names) => `${names.length} CI step${names.length === 1 ? "" : "s"}: ${names.join(", ")}`,
28638
28638
  [CoreMessage.UnnamedClaimFailedNames]: (names) => `(failed: ${names.join(" / ")})`,
28639
28639
  [CoreMessage.SeveralScnCodes]: (codes) => `${codes.length} scenario codes cite ${codes.join(", ")} \u2014 a test cites exactly one scenario, so this one credits none of them.`,
28640
- [CoreMessage.SharedScnCode]: (code) => `${code} is carried by more than one scenario, so this test credits none of them.`
28640
+ [CoreMessage.SharedScnCode]: (code) => `${code} is carried by more than one scenario, so evidence citing it credits none of them.`
28641
28641
  };
28642
28642
  }
28643
28643
  });
@@ -29125,8 +29125,12 @@ var init_remarkWords = __esm({
29125
29125
  function citingNoScenario(lines) {
29126
29126
  return lines.filter((line) => line.outcome === "cites-no-scenario").flatMap((line) => line.evidenceObservation ?? []);
29127
29127
  }
29128
+ function sharedScnCodeOf(observation) {
29129
+ const [code = null] = (observation.notes ?? []).flatMap((note) => note.kind === "shared-scn-code" ? [note.code] : []);
29130
+ return code;
29131
+ }
29128
29132
  function keyOf(observation) {
29129
- return JSON.stringify([observation.qualityCheck, observation.locator ?? null]);
29133
+ return JSON.stringify([observation.qualityCheck, observation.locator ?? null, sharedScnCodeOf(observation)]);
29130
29134
  }
29131
29135
  function remarksOf(observations) {
29132
29136
  return observations.flatMap(({ message, notes }) => message === void 0 && notes === void 0 ? [] : [{ ...message !== void 0 ? { message } : {}, ...notes !== void 0 ? { notes } : {} }]);
@@ -29144,9 +29148,15 @@ function groupOf(observations) {
29144
29148
  failedNames: observations.flatMap((o) => o.status === "failed" && o.testName !== void 0 ? [o.testName] : [])
29145
29149
  };
29146
29150
  }
29147
- function stepsGroupOf(observations) {
29148
- const names = observations.flatMap((o) => isFitnessObservation(o) ? [o.fitnessFunction] : []);
29149
- return names.length === 0 ? [] : [{ names }];
29151
+ function stepsGroupsOf(observations) {
29152
+ const byCode = /* @__PURE__ */ new Map();
29153
+ for (const o of observations) {
29154
+ if (!isFitnessObservation(o))
29155
+ continue;
29156
+ const code = sharedScnCodeOf(o);
29157
+ byCode.set(code, [...byCode.get(code) ?? [], o.fitnessFunction]);
29158
+ }
29159
+ return [...byCode].map(([code, names]) => code === null ? { names } : { names, sharedScnCode: code });
29150
29160
  }
29151
29161
  function unnamedClaimGroupsOf(lines) {
29152
29162
  const observations = citingNoScenario(lines);
@@ -29157,7 +29167,7 @@ function unnamedClaimGroupsOf(lines) {
29157
29167
  const key = keyOf(o);
29158
29168
  byFile.set(key, [...byFile.get(key) ?? [], o]);
29159
29169
  }
29160
- return [...[...byFile.values()].map(groupOf), ...stepsGroupOf(observations)];
29170
+ return [...[...byFile.values()].map(groupOf), ...stepsGroupsOf(observations)];
29161
29171
  }
29162
29172
  var init_unnamedClaimGroups = __esm({
29163
29173
  "../core/dist/domain/unnamedClaimGroups.js"() {
@@ -29215,7 +29225,8 @@ function renderUnnamedClaimGroup(group) {
29215
29225
  if (!("names" in group))
29216
29226
  return renderFileGroup(group);
29217
29227
  const steps = CORE_MESSAGES[CoreMessage.UnnamedClaimCiSteps](group.names);
29218
- return `fitness: ${OUTCOME_DESCRIPTION["cites-no-scenario"]} \u2014 ${steps}`;
29228
+ const remark = group.sharedScnCode === void 0 ? "" : ` (${CORE_MESSAGES[CoreMessage.SharedScnCode](group.sharedScnCode)})`;
29229
+ return `fitness: ${OUTCOME_DESCRIPTION["cites-no-scenario"]}${remark} \u2014 ${steps}`;
29219
29230
  }
29220
29231
  function renderUnnamedClaimItems(lines) {
29221
29232
  const broken = lines.filter((line) => line.outcome === "broken");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.134",
3
+ "version": "0.1.135",
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.134"
29
+ "@3f-consulting/spec-controller-core": "0.1.135"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"