spec-controller 0.1.279 → 0.1.280

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
@@ -364,7 +364,7 @@ function inOrder(one, other) {
364
364
  }
365
365
  function claimReconciliationOf(claim, observations, codeShared) {
366
366
  const reconciled = executableReconciliations(claim, observations, codeShared);
367
- const qualityCheckReconciliations = reconciled.length > 0 ? [...reconciled].sort(inOrder) : [{ outcome: codeShared ? "duplicate-claim-code" : claim.claimCode === void 0 ? "no-claim-code" : "no-quality-check" }];
367
+ const qualityCheckReconciliations = reconciled.length > 0 ? [...reconciled].sort(inOrder) : [{ outcome: claim.claimCode === void 0 ? "no-claim-code" : "no-quality-check" }];
368
368
  return { claim, qualityCheckReconciliations, verdict: verdictOf(qualityCheckReconciliations) };
369
369
  }
370
370
  function citedClaimReconciliationOf(claim, observations) {
@@ -33757,13 +33757,24 @@ function cellOf({ claim, qualityCheckReconciliations }, kind) {
33757
33757
  const ran2 = observed.filter(({ result }) => result !== "never-ran").length;
33758
33758
  return `${asked ? kind[0].toUpperCase() : "-"}/${ran2 > 0 ? ran2 : "-"}`;
33759
33759
  }
33760
- function nameOf({ claim, qualityCheckReconciliations }) {
33760
+ function sharedCodesIn(claimReconciliations) {
33761
+ const seen = /* @__PURE__ */ new Set();
33762
+ const shared = /* @__PURE__ */ new Set();
33763
+ for (const { claim } of claimReconciliations) {
33764
+ if (!isExecutable(claim) || claim.claimCode === void 0)
33765
+ continue;
33766
+ const code = writtenClaimCode(claim.claimCode);
33767
+ (seen.has(code) ? shared : seen).add(code);
33768
+ }
33769
+ return shared;
33770
+ }
33771
+ function nameOf({ claim }, sharedCodes) {
33761
33772
  if (!isExecutable(claim))
33762
33773
  return claim.claimCode === void 0 ? coreText("unnamed-claim") : writtenClaimCode(claim.claimCode);
33763
33774
  if (claim.claimCode === void 0)
33764
33775
  return `${inCell(claim.file)} : ${inCell(claim.title)}`;
33765
33776
  const code = writtenClaimCode(claim.claimCode);
33766
- return qualityCheckReconciliations.some(({ outcome }) => outcome === "duplicate-claim-code") ? `${code} (${inCell(claim.file)})` : code;
33777
+ return sharedCodes.has(code) ? `${code} (${inCell(claim.file)})` : code;
33767
33778
  }
33768
33779
  function groupItemsOf(claimReconciliation) {
33769
33780
  return evidenceGroupsOf(claimReconciliation).map(({ kind, file, claimCode, qualityCheckReconciliations, ran: ran2, passed, failed: failed2, failures }) => {
@@ -33781,10 +33792,11 @@ function claimReconciliationsSection(claimReconciliations) {
33781
33792
  if (claimReconciliations.length === 0)
33782
33793
  return [...heading, coreText("claim-reconciliations-none")];
33783
33794
  const kinds = kindsIn(claimReconciliations);
33795
+ const sharedCodes = sharedCodesIn(claimReconciliations);
33784
33796
  return [
33785
33797
  ...heading,
33786
33798
  ...tableOf(["claim-column", ...kinds.map((kind) => `kind-column-${kind}`), "verdict-column", "items-column"], claimReconciliations.map((claimReconciliation) => [
33787
- nameOf(claimReconciliation),
33799
+ nameOf(claimReconciliation, sharedCodes),
33788
33800
  ...kinds.map((kind) => cellOf(claimReconciliation, kind)),
33789
33801
  claimReconciliation.verdict,
33790
33802
  itemsOf(claimReconciliation)
@@ -267,7 +267,6 @@
267
267
  "type": "string",
268
268
  "enum": [
269
269
  "no-claim-code",
270
- "duplicate-claim-code",
271
270
  "no-quality-check"
272
271
  ]
273
272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.279",
3
+ "version": "0.1.280",
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",
@@ -25,7 +25,7 @@
25
25
  "esbuild": "0.28.1",
26
26
  "ts-json-schema-generator": "^2.9.0",
27
27
  "yaml": "^2.9.0",
28
- "@3f-consulting/spec-controller-core": "0.1.279"
28
+ "@3f-consulting/spec-controller-core": "0.1.280"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"