spec-controller 0.1.134 → 0.1.136

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 +22 -11
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -28543,16 +28543,16 @@ var init_messages4 = __esm({
28543
28543
  [CoreMessage.PendingItemsOutstanding]: "Pending Items are outstanding \u2014 deferred, not out-of-balance, so the verdict stands. A run that treats a deferral as a failure gives exit 3 under `--strict`.",
28544
28544
  [CoreMessage.EvidenceReconciliationHeading]: "### Evidence reconciliation",
28545
28545
  [CoreMessage.EvidenceReconciliationClaimReconciliationTerm]: "A Claim Reconciliation is one row of the ledger: the evidence for one claim, a scenario, a phantom claim or the unnamed claim, reconciled quality check by quality check.",
28546
- [CoreMessage.EvidenceReconciliationQualityCheckReconciliationTerm]: "A Quality Check Reconciliation is one quality check's evidence within a claim. A claim holds one for each quality check its evidence names, so a scenario tagged both unit and integration adds one to the Claim Reconciliation total and two to the Quality Check Reconciliation total.",
28547
- [CoreMessage.EvidenceReconciliationEvidenceObligationTerm]: "An Evidence Obligation is what a scenario asks for: one for each quality check its tags name, met by Evidence Observations.",
28548
- [CoreMessage.EvidenceReconciliationEvidenceObservationTerm]: "An Evidence Observation is a test or a fitness function that ran, attributed to the scenario it cites.",
28546
+ [CoreMessage.EvidenceReconciliationQualityCheckReconciliationTerm]: "A Reconciliation line is one line of a Quality Check Reconciliation, the evidence of one quality check within a claim, with its own outcome: each Evidence Observation it holds is one, so is its Evidence Obligation when no Evidence Observation that ran answers it, and so is a scenario's quality check that has neither. A scenario whose one Evidence Obligation two passing tests answer adds one to the Claim Reconciliation total and two to the Reconciliation line total.",
28547
+ [CoreMessage.EvidenceReconciliationEvidenceObligationTerm]: "An Evidence Obligation is what a scenario asks for: one for each quality check its tags name, met by Evidence Observations. A quality check its tags name as pending raises none.",
28548
+ [CoreMessage.EvidenceReconciliationEvidenceObservationTerm]: "An Evidence Observation is one reported result of a test or a fitness function, attributed by the code it cites: to that scenario, to a phantom claim when no scenario carries the code, or to the unnamed claim when it cites none. One that never reached its assertions is broken: it was reported, but did not run to a result.",
28549
28549
  [CoreMessage.SubjectColumn]: "Subject",
28550
28550
  [CoreMessage.TotalColumn]: "Total",
28551
28551
  [CoreMessage.BalancedColumn]: "Balanced",
28552
28552
  [CoreMessage.OutOfBalanceColumn]: "Out-of-balance",
28553
28553
  [CoreMessage.DetailColumn]: "Detail",
28554
28554
  [CoreMessage.ClaimReconciliationSubject]: "Claim Reconciliation",
28555
- [CoreMessage.QualityCheckReconciliationSubject]: "Quality Check Reconciliation",
28555
+ [CoreMessage.QualityCheckReconciliationSubject]: "Reconciliation line",
28556
28556
  [CoreMessage.PendingTally]: (pending) => `${pending} Pending Item(s) \u2014 deferred, tallied apart from balanced and out-of-balance.`,
28557
28557
  [CoreMessage.EvidenceObservationsHeading]: "### Evidence observations",
28558
28558
  [CoreMessage.EvidenceObservationsSum]: (total, onScenario, onPhantomClaim, onUnnamedClaim) => `${total} evidence observations = ${onScenario} on scenarios + ${onPhantomClaim} on ${CITED_WITH_NO_SCENARIO} + ${onUnnamedClaim} citing no scenario.`,
@@ -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.136",
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.136"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"