spec-controller 0.1.0-alpha.4 → 0.1.0-alpha.40

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 (114) hide show
  1. package/README.md +34 -6
  2. package/dist/cli-allocate/cli.d.ts +2 -0
  3. package/dist/cli-allocate/cli.d.ts.map +1 -0
  4. package/dist/cli-allocate/cli.js +57 -0
  5. package/dist/cli-allocate/cli.js.map +1 -0
  6. package/dist/cli-allocate/readHistory.d.ts +29 -0
  7. package/dist/cli-allocate/readHistory.d.ts.map +1 -0
  8. package/dist/cli-allocate/readHistory.js +136 -0
  9. package/dist/cli-allocate/readHistory.js.map +1 -0
  10. package/dist/cli-allocate/readParts.d.ts +3 -0
  11. package/dist/cli-allocate/readParts.d.ts.map +1 -0
  12. package/dist/cli-allocate/readParts.js +28 -0
  13. package/dist/cli-allocate/readParts.js.map +1 -0
  14. package/dist/cli-allocate/readTree.d.ts +16 -0
  15. package/dist/cli-allocate/readTree.d.ts.map +1 -0
  16. package/dist/cli-allocate/readTree.js +106 -0
  17. package/dist/cli-allocate/readTree.js.map +1 -0
  18. package/dist/cli-allocate/refStore.d.ts +3 -0
  19. package/dist/cli-allocate/refStore.d.ts.map +1 -0
  20. package/dist/cli-allocate/refStore.js +47 -0
  21. package/dist/cli-allocate/refStore.js.map +1 -0
  22. package/dist/cli-allocate/request.d.ts +11 -0
  23. package/dist/cli-allocate/request.d.ts.map +1 -0
  24. package/dist/cli-allocate/request.js +29 -0
  25. package/dist/cli-allocate/request.js.map +1 -0
  26. package/dist/cli-allocate/stderr.d.ts +14 -0
  27. package/dist/cli-allocate/stderr.d.ts.map +1 -0
  28. package/dist/cli-allocate/stderr.js +33 -0
  29. package/dist/cli-allocate/stderr.js.map +1 -0
  30. package/dist/cli-allocate/unreadable.d.ts +24 -0
  31. package/dist/cli-allocate/unreadable.d.ts.map +1 -0
  32. package/dist/cli-allocate/unreadable.js +43 -0
  33. package/dist/cli-allocate/unreadable.js.map +1 -0
  34. package/dist/cli-args.d.ts +73 -18
  35. package/dist/cli-args.d.ts.map +1 -1
  36. package/dist/cli-args.js +244 -22
  37. package/dist/cli-args.js.map +1 -1
  38. package/dist/cli-balance/cli.d.ts +31 -13
  39. package/dist/cli-balance/cli.d.ts.map +1 -1
  40. package/dist/cli-balance/cli.js +205 -251
  41. package/dist/cli-balance/cli.js.map +1 -1
  42. package/dist/cli-balance/emit/writer.d.ts +8 -23
  43. package/dist/cli-balance/emit/writer.d.ts.map +1 -1
  44. package/dist/cli-balance/emit/writer.js +24 -32
  45. package/dist/cli-balance/emit/writer.js.map +1 -1
  46. package/dist/cli-balance/exitStatus.d.ts +3 -0
  47. package/dist/cli-balance/exitStatus.d.ts.map +1 -0
  48. package/dist/cli-balance/exitStatus.js +12 -0
  49. package/dist/cli-balance/exitStatus.js.map +1 -0
  50. package/dist/cli-balance/reRender.d.ts +22 -0
  51. package/dist/cli-balance/reRender.d.ts.map +1 -0
  52. package/dist/cli-balance/reRender.js +36 -0
  53. package/dist/cli-balance/reRender.js.map +1 -0
  54. package/dist/cli-balance/unreadableInputs.d.ts +35 -0
  55. package/dist/cli-balance/unreadableInputs.d.ts.map +1 -0
  56. package/dist/cli-balance/unreadableInputs.js +101 -0
  57. package/dist/cli-balance/unreadableInputs.js.map +1 -0
  58. package/dist/cli-registry.d.ts +28 -0
  59. package/dist/cli-registry.d.ts.map +1 -1
  60. package/dist/cli-registry.js +40 -35
  61. package/dist/cli-registry.js.map +1 -1
  62. package/dist/cli.d.ts +4 -5
  63. package/dist/cli.d.ts.map +1 -1
  64. package/dist/cli.js +37 -21
  65. package/dist/cli.js.map +1 -1
  66. package/dist/host.d.ts +28 -3
  67. package/dist/host.d.ts.map +1 -1
  68. package/dist/host.js +137 -17
  69. package/dist/host.js.map +1 -1
  70. package/dist/ingest/gherkinValidation.d.ts +3 -7
  71. package/dist/ingest/gherkinValidation.d.ts.map +1 -1
  72. package/dist/ingest/gherkinValidation.js +3 -7
  73. package/dist/ingest/gherkinValidation.js.map +1 -1
  74. package/dist/ingest/ingestQualityChecks.d.ts +25 -54
  75. package/dist/ingest/ingestQualityChecks.d.ts.map +1 -1
  76. package/dist/ingest/ingestQualityChecks.js +112 -145
  77. package/dist/ingest/ingestQualityChecks.js.map +1 -1
  78. package/dist/ingest/ingestScenarios.d.ts +11 -17
  79. package/dist/ingest/ingestScenarios.d.ts.map +1 -1
  80. package/dist/ingest/ingestScenarios.js +52 -62
  81. package/dist/ingest/ingestScenarios.js.map +1 -1
  82. package/dist/ingest/inputShapes.d.ts +47 -0
  83. package/dist/ingest/inputShapes.d.ts.map +1 -0
  84. package/dist/ingest/inputShapes.js +143 -0
  85. package/dist/ingest/inputShapes.js.map +1 -0
  86. package/dist/outputLocation.d.ts +15 -0
  87. package/dist/outputLocation.d.ts.map +1 -0
  88. package/dist/outputLocation.js +39 -0
  89. package/dist/outputLocation.js.map +1 -0
  90. package/dist/run-management/keptRun.d.ts +27 -25
  91. package/dist/run-management/keptRun.d.ts.map +1 -1
  92. package/dist/run-management/keptRun.js +20 -21
  93. package/dist/run-management/keptRun.js.map +1 -1
  94. package/dist/storedRun.d.ts +27 -0
  95. package/dist/storedRun.d.ts.map +1 -0
  96. package/dist/storedRun.js +49 -0
  97. package/dist/storedRun.js.map +1 -0
  98. package/package.json +2 -2
  99. package/dist/corpus/cli.d.ts +0 -34
  100. package/dist/corpus/cli.d.ts.map +0 -1
  101. package/dist/corpus/cli.js +0 -128
  102. package/dist/corpus/cli.js.map +0 -1
  103. package/dist/mutation-ratchet/index.d.ts +0 -51
  104. package/dist/mutation-ratchet/index.d.ts.map +0 -1
  105. package/dist/mutation-ratchet/index.js +0 -51
  106. package/dist/mutation-ratchet/index.js.map +0 -1
  107. package/dist/mutation-ratchet/record.d.ts +0 -178
  108. package/dist/mutation-ratchet/record.d.ts.map +0 -1
  109. package/dist/mutation-ratchet/record.js +0 -314
  110. package/dist/mutation-ratchet/record.js.map +0 -1
  111. package/dist/mutation-ratchet/report.d.ts +0 -109
  112. package/dist/mutation-ratchet/report.d.ts.map +0 -1
  113. package/dist/mutation-ratchet/report.js +0 -156
  114. package/dist/mutation-ratchet/report.js.map +0 -1
@@ -15,24 +15,20 @@
15
15
  * files under a temp root + the repo untouched — never a planner re-run).
16
16
  *
17
17
  * The store root is an INJECTED parameter — never hardcoded — so the scaffold is
18
- * location-agnostic (proven against a temp root; the repo is never written). RMG-001 is
19
- * the dir + the routed outputs; the `run.yaml` stamp (RMG-002) and the `--run-id` mnemonic
20
- * override (RMG-003) land in later sub-issues.
21
- *
22
- * Parent: @SCN-RMG-001 — the run-management layer.
18
+ * location-agnostic (proven against a temp root; the repo is never written).
23
19
  */
24
20
  /** The two artefact filenames a kept run routes the tool's outputs into. */
25
21
  export declare const RECONCILIATION_DOCUMENT = "spec-reconciliation.md";
26
22
  /**
27
- * The machine artefact filename (@SCN-RMD-001) — renamed `ledger.json` →
23
+ * The machine artefact filename — renamed `ledger.json` →
28
24
  * `spec-reconciliation.json` (parity with `spec-reconciliation.md`): it is the machine form
29
25
  * of the WHOLE reconciliation document, not just the ledger.
30
26
  */
31
27
  export declare const RECONCILIATION_JSON = "spec-reconciliation.json";
32
- /** The manifest filename a kept run stamps in the run dir (RMG-002). */
28
+ /** The manifest filename a kept run stamps in the run dir. */
33
29
  export declare const RUN_MANIFEST = "run.yaml";
34
30
  /**
35
- * The run.yaml schema version this scaffold stamps. Bumped 1 → 2 by 3F-1916, which added
31
+ * The run.yaml schema version this scaffold stamps. Bumped 1 → 2 when it added
36
32
  * the tool identity (`tool_sha` / `tool_version`) — so a reader can tell a run that
37
33
  * predates tool-identity recording (schema 1) from one that should carry it (schema 2).
38
34
  * run.yaml is write-only (no production reader), so the bump breaks no read path.
@@ -47,7 +43,7 @@ export type RunMode = "balance" | "analyse" | "migrate";
47
43
  export interface RunManifestMeta {
48
44
  readonly sourceSha: string;
49
45
  /**
50
- * The TOOL's own git SHA — which spec-controller produced this run (3F-1916), distinct
46
+ * The TOOL's own git SHA — which spec-controller produced this run, distinct
51
47
  * from the target's `sourceSha`. A string ("unknown" when the tool is not a git
52
48
  * checkout), mirroring `sourceSha`'s own "unknown" fallback — so run.yaml is internally
53
49
  * consistent (both facts use the same absent-marker, never a bare null).
@@ -73,7 +69,7 @@ export interface RunManifest {
73
69
  readonly run_id: string;
74
70
  readonly target: string;
75
71
  readonly source_sha: string;
76
- /** The TOOL's identity (3F-1916) — which spec-controller produced the run. */
72
+ /** The TOOL's identity — which spec-controller produced the run. */
77
73
  readonly tool_sha: string;
78
74
  readonly tool_version: string;
79
75
  readonly mode: RunMode;
@@ -98,12 +94,16 @@ export interface KeptRunPlan {
98
94
  readonly reconciliationJsonPath: string;
99
95
  }
100
96
  /**
101
- * Invokes the reconciliation tool with the given `--format <fmt>:<path>` specs. INJECTED so
102
- * the scaffold stays the tool's black-box caller (the real CLI subprocess in the
103
- * `@integration` arm) and holds no opinion on HOW the tool is run — only WHERE its outputs
104
- * land (the two file-dest paths the runner hands it).
97
+ * Invokes the reconciliation tool with the given `--format <fmt>:<path>` specs, and answers
98
+ * whether it wrote the report those specs name. INJECTED so the scaffold stays the tool's
99
+ * black-box caller (the real CLI subprocess in the `@integration` arm) and holds no opinion on
100
+ * HOW the tool is run — only WHERE its outputs land (the two file-dest paths the runner hands it).
101
+ *
102
+ * The answer is the command's own, and positive: only the command knows it wrote its report. The
103
+ * files' existence afterwards cannot say so, because an earlier run under the same run-id may
104
+ * have left them there.
105
105
  */
106
- export type RouteOutputs = (formatSpecs: readonly string[]) => void;
106
+ export type RouteOutputs = (formatSpecs: readonly string[]) => boolean;
107
107
  /**
108
108
  * PURE planner: yield the run dir `<storeRoot>/<target>/<runId>/` and the two file-dest
109
109
  * paths (`<dir>/spec-reconciliation.md`, `<dir>/spec-reconciliation.json`) from the spec. No
@@ -112,7 +112,7 @@ export type RouteOutputs = (formatSpecs: readonly string[]) => void;
112
112
  */
113
113
  export declare function planKeptRun(spec: KeptRunSpec): KeptRunPlan;
114
114
  /**
115
- * Options for the pure run-id resolver (RMG-003): the operator's OPTIONAL `--run-id` mnemonic
115
+ * Options for the pure run-id resolver: the operator's OPTIONAL `--run-id` mnemonic
116
116
  * and the INJECTED clock instant the default timestamp derives from.
117
117
  */
118
118
  export interface ResolveRunIdOptions {
@@ -129,14 +129,14 @@ export interface ResolveRunIdOptions {
129
129
  * run-id naming the run dir (feeds `KeptRunSpec.runId`). No `--run-id` → an ISO-8601 UTC
130
130
  * timestamp derived from the INJECTED `now` (filesystem-safe: no colons, no millis — matching
131
131
  * the existing store run dir); `--run-id <mnemonic>` → that mnemonic verbatim (`acme-q3`, `e1`
132
- * — an earlier precedent), which ignores the clock. No IO — proven `@unit` (RMG-003).
132
+ * — an earlier precedent), which ignores the clock. No IO — proven `@unit`.
133
133
  * The clock is injected (never a bare `new Date()`) so the default timestamp is deterministic
134
134
  * under test (the discipline the old `formatRunTimestamp` used). Just default-vs-override — no
135
135
  * sanitisation / collision policy (deferred).
136
136
  */
137
137
  export declare function resolveRunId(options: ResolveRunIdOptions): string;
138
138
  /**
139
- * PURE: build the run.yaml manifest object from the run metadata (RMG-002). `purpose` and
139
+ * PURE: build the run.yaml manifest object from the run metadata. `purpose` and
140
140
  * `links` are stamped EMPTY (the ad-hoc default; slugs are added by operator hand-edit of
141
141
  * run.yaml afterward — the documented curation convention); `artefacts` carry the decided
142
142
  * filenames. No IO — proven `@unit`.
@@ -145,12 +145,14 @@ export declare function planRunManifest(input: RunManifestInput): RunManifest;
145
145
  /** PURE: serialise the manifest to YAML text the impure runner writes verbatim. */
146
146
  export declare function serialiseRunManifest(manifest: RunManifest): string;
147
147
  /**
148
- * IMPURE runner: `mkdir -p` the run dir, route the tool's `--format` outputs into the two
149
- * files via the injected `route` — the document as `md:<documentPath>`, the reconciliation
150
- * JSON as `json:<reconciliationJsonPath>` — and stamp `run.yaml` with the manifest built from the spec + `meta`
151
- * (RMG-002). Returns the plan it realised. The only IO. The `mkdir` is load-bearing: the
152
- * tool's writer uses `writeFileSync`, which needs the parent dir to exist — so the scaffold
153
- * creates the dir the location-agnostic tool writes into.
148
+ * IMPURE runner: `mkdir -p` the run dir, route the tool's `--format` outputs into the two files
149
+ * via the injected `route` — the document as `md:<documentPath>`, the reconciliation JSON as
150
+ * `json:<reconciliationJsonPath>` — and, only when the route answers that it wrote them, stamp
151
+ * `run.yaml` from the spec + `meta` and return the plan it realised. A route that wrote nothing
152
+ * gets no manifest and no plan back, so nothing names a run that did not happen, and an earlier
153
+ * run's manifest under the same run-id is left as it was. The `mkdir` is load-bearing: the tool's
154
+ * writer creates no directories, so the scaffold creates the one the location-agnostic tool
155
+ * writes into.
154
156
  */
155
- export declare function executeKeptRun(spec: KeptRunSpec, meta: RunManifestMeta, route: RouteOutputs): KeptRunPlan;
157
+ export declare function executeKeptRun(spec: KeptRunSpec, meta: RunManifestMeta, route: RouteOutputs): KeptRunPlan | undefined;
156
158
  //# sourceMappingURL=keptRun.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keptRun.d.ts","sourceRoot":"","sources":["../../src/run-management/keptRun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAMH,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,wEAAwE;AACxE,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,8CAA8C;AAC9C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QA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CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAO1D;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,mGAAmG;IACnG,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAOjE;AAYD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAmBpE;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAElE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,YAAY,GAClB,WAAW,GAAG,SAAS,CAYzB"}
@@ -15,27 +15,24 @@
15
15
  * files under a temp root + the repo untouched — never a planner re-run).
16
16
  *
17
17
  * The store root is an INJECTED parameter — never hardcoded — so the scaffold is
18
- * location-agnostic (proven against a temp root; the repo is never written). RMG-001 is
19
- * the dir + the routed outputs; the `run.yaml` stamp (RMG-002) and the `--run-id` mnemonic
20
- * override (RMG-003) land in later sub-issues.
21
- *
22
- * Parent: @SCN-RMG-001 — the run-management layer.
18
+ * location-agnostic (proven against a temp root; the repo is never written).
23
19
  */
24
20
  import { mkdirSync, writeFileSync } from "node:fs";
25
21
  import { join } from "node:path";
26
22
  import { stringify } from "yaml";
23
+ import { writeOrRefuse } from "../outputLocation.js";
27
24
  /** The two artefact filenames a kept run routes the tool's outputs into. */
28
25
  export const RECONCILIATION_DOCUMENT = "spec-reconciliation.md";
29
26
  /**
30
- * The machine artefact filename (@SCN-RMD-001) — renamed `ledger.json` →
27
+ * The machine artefact filename — renamed `ledger.json` →
31
28
  * `spec-reconciliation.json` (parity with `spec-reconciliation.md`): it is the machine form
32
29
  * of the WHOLE reconciliation document, not just the ledger.
33
30
  */
34
31
  export const RECONCILIATION_JSON = "spec-reconciliation.json";
35
- /** The manifest filename a kept run stamps in the run dir (RMG-002). */
32
+ /** The manifest filename a kept run stamps in the run dir. */
36
33
  export const RUN_MANIFEST = "run.yaml";
37
34
  /**
38
- * The run.yaml schema version this scaffold stamps. Bumped 1 → 2 by 3F-1916, which added
35
+ * The run.yaml schema version this scaffold stamps. Bumped 1 → 2 when it added
39
36
  * the tool identity (`tool_sha` / `tool_version`) — so a reader can tell a run that
40
37
  * predates tool-identity recording (schema 1) from one that should carry it (schema 2).
41
38
  * run.yaml is write-only (no production reader), so the bump breaks no read path.
@@ -60,7 +57,7 @@ export function planKeptRun(spec) {
60
57
  * run-id naming the run dir (feeds `KeptRunSpec.runId`). No `--run-id` → an ISO-8601 UTC
61
58
  * timestamp derived from the INJECTED `now` (filesystem-safe: no colons, no millis — matching
62
59
  * the existing store run dir); `--run-id <mnemonic>` → that mnemonic verbatim (`acme-q3`, `e1`
63
- * — an earlier precedent), which ignores the clock. No IO — proven `@unit` (RMG-003).
60
+ * — an earlier precedent), which ignores the clock. No IO — proven `@unit`.
64
61
  * The clock is injected (never a bare `new Date()`) so the default timestamp is deterministic
65
62
  * under test (the discipline the old `formatRunTimestamp` used). Just default-vs-override — no
66
63
  * sanitisation / collision policy (deferred).
@@ -83,7 +80,7 @@ function formatRunTimestamp(instant) {
83
80
  return instant.toISOString().replace(/\.\d+Z$/, "Z").replace(/:/g, "-");
84
81
  }
85
82
  /**
86
- * PURE: build the run.yaml manifest object from the run metadata (RMG-002). `purpose` and
83
+ * PURE: build the run.yaml manifest object from the run metadata. `purpose` and
87
84
  * `links` are stamped EMPTY (the ad-hoc default; slugs are added by operator hand-edit of
88
85
  * run.yaml afterward — the documented curation convention); `artefacts` carry the decided
89
86
  * filenames. No IO — proven `@unit`.
@@ -113,21 +110,23 @@ export function serialiseRunManifest(manifest) {
113
110
  return stringify(manifest);
114
111
  }
115
112
  /**
116
- * IMPURE runner: `mkdir -p` the run dir, route the tool's `--format` outputs into the two
117
- * files via the injected `route` — the document as `md:<documentPath>`, the reconciliation
118
- * JSON as `json:<reconciliationJsonPath>` — and stamp `run.yaml` with the manifest built from the spec + `meta`
119
- * (RMG-002). Returns the plan it realised. The only IO. The `mkdir` is load-bearing: the
120
- * tool's writer uses `writeFileSync`, which needs the parent dir to exist — so the scaffold
121
- * creates the dir the location-agnostic tool writes into.
113
+ * IMPURE runner: `mkdir -p` the run dir, route the tool's `--format` outputs into the two files
114
+ * via the injected `route` — the document as `md:<documentPath>`, the reconciliation JSON as
115
+ * `json:<reconciliationJsonPath>` — and, only when the route answers that it wrote them, stamp
116
+ * `run.yaml` from the spec + `meta` and return the plan it realised. A route that wrote nothing
117
+ * gets no manifest and no plan back, so nothing names a run that did not happen, and an earlier
118
+ * run's manifest under the same run-id is left as it was. The `mkdir` is load-bearing: the tool's
119
+ * writer creates no directories, so the scaffold creates the one the location-agnostic tool
120
+ * writes into.
122
121
  */
123
122
  export function executeKeptRun(spec, meta, route) {
124
123
  const plan = planKeptRun(spec);
125
- mkdirSync(plan.runDir, { recursive: true });
126
- route([`md:${plan.documentPath}`, `json:${plan.reconciliationJsonPath}`]);
127
- // Stamp run.yaml from the spec's run-id/target (so it can't drift from the run dir) + the
128
- // manifest-only meta. The serialised YAML is valid — the @integration parses it back.
124
+ writeOrRefuse("The stored run's directory could not be created", plan.runDir, () => mkdirSync(plan.runDir, { recursive: true }));
125
+ if (!route([`md:${plan.documentPath}`, `json:${plan.reconciliationJsonPath}`]))
126
+ return undefined;
129
127
  const manifest = planRunManifest({ runId: spec.runId, target: spec.target, ...meta });
130
- writeFileSync(join(plan.runDir, RUN_MANIFEST), serialiseRunManifest(manifest));
128
+ const manifestPath = join(plan.runDir, RUN_MANIFEST);
129
+ writeOrRefuse("The stored run's run.yaml could not be written", manifestPath, () => writeFileSync(manifestPath, serialiseRunManifest(manifest)));
131
130
  return plan;
132
131
  }
133
132
  //# sourceMappingURL=keptRun.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keptRun.js","sourceRoot":"","sources":["../../src/run-management/keptRun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAChE;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D,wEAAwE;AACxE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AA2E7C;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,IAAiB;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7D,OAAO;QACL,MAAM;QACN,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,uBAAuB,CAAC;QACnD,sBAAsB,EAAE,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC;KAC1D,CAAC;AACJ,CAAC;AAgBD;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,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AACH,MAAM,UAAU,cAAc,CAC5B,IAAiB,EACjB,IAAqB,EACrB,KAAmB;IAEnB,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,aAAa,CAAC,iDAAiD,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CACjF,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAC5C,CAAC;IACF,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACjG,MAAM,QAAQ,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IACtF,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACrD,aAAa,CAAC,gDAAgD,EAAE,YAAY,EAAE,GAAG,EAAE,CACjF,aAAa,CAAC,YAAY,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAC5D,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * What the host does with a command before a stored run starts: dispatch it unwrapped, or wrap it
3
+ * in the kept-run scaffold. Pure, so `cli.ts`'s dispatcher reads its answer rather than deciding.
4
+ */
5
+ import { type CommandSpec } from "./cli-registry.js";
6
+ import type { HostInvocation } from "./host.js";
7
+ /**
8
+ * True when the host dispatches the command itself, never inside a stored run: no store was asked
9
+ * for, or the command's help was, which is answered before the store is touched.
10
+ */
11
+ export declare function dispatchesUnstored(inv: HostInvocation): boolean;
12
+ /**
13
+ * The refusal for a re-render given a store or a run-id, else undefined: a re-render writes only to
14
+ * stdout and keeps no run. It is the host's to refuse, not `balance`'s, because a stored run hands
15
+ * `balance` a `--format` for each report file, and `balance` cannot tell that one from a `--format`
16
+ * the operator typed; only the host knows which host modifiers were given. It names only those, so a
17
+ * re-render given a run-id alone is never told to add the store it would refuse in turn.
18
+ */
19
+ export declare function storedReRenderRefusal(inv: HostInvocation): string | undefined;
20
+ /**
21
+ * The refusal for a run-id given with no store, before a command that keeps a run, else undefined.
22
+ * A run-id names a stored run, so with no store there is no run for it to name: dropping it without
23
+ * a word would leave the operator looking later for a run that was never kept. A request for the
24
+ * command's help is answered instead, since help keeps no run either.
25
+ */
26
+ export declare function unstoredRunIdRefusal(inv: HostInvocation, commands?: readonly CommandSpec[]): string | undefined;
27
+ //# sourceMappingURL=storedRun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storedRun.d.ts","sourceRoot":"","sources":["../src/storedRun.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAU7E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,cAAc,EACnB,QAAQ,GAAE,SAAS,WAAW,EAAyB,GACtD,MAAM,GAAG,SAAS,CASpB"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * What the host does with a command before a stored run starts: dispatch it unwrapped, or wrap it
3
+ * in the kept-run scaffold. Pure, so `cli.ts`'s dispatcher reads its answer rather than deciding.
4
+ */
5
+ import { asksForHelp } from "./cli-args.js";
6
+ import { cliRegistry } from "./cli-registry.js";
7
+ /**
8
+ * True when the host dispatches the command itself, never inside a stored run: no store was asked
9
+ * for, or the command's help was, which is answered before the store is touched.
10
+ */
11
+ export function dispatchesUnstored(inv) {
12
+ return inv.store === undefined || asksForHelp(inv.commandArgs);
13
+ }
14
+ /**
15
+ * The refusal for a re-render given a store or a run-id, else undefined: a re-render writes only to
16
+ * stdout and keeps no run. It is the host's to refuse, not `balance`'s, because a stored run hands
17
+ * `balance` a `--format` for each report file, and `balance` cannot tell that one from a `--format`
18
+ * the operator typed; only the host knows which host modifiers were given. It names only those, so a
19
+ * re-render given a run-id alone is never told to add the store it would refuse in turn.
20
+ */
21
+ export function storedReRenderRefusal(inv) {
22
+ if (inv.command !== "balance" || asksForHelp(inv.commandArgs))
23
+ return undefined;
24
+ if (!inv.commandArgs.includes("--render-from-json"))
25
+ return undefined;
26
+ const given = [inv.store === undefined ? [] : ["--store"], inv.runId === undefined ? [] : ["--run-id"]].flat();
27
+ if (given.length === 0)
28
+ return undefined;
29
+ return (`spec-controller: usage error — 'balance --render-from-json' re-renders a saved report to stdout and keeps no run, ` +
30
+ `and was given ${given.join(", ")}: a re-render is not stored.\n` +
31
+ `Run 'spec-controller balance --render-from-json <path>' without ${given.length === 1 ? "it" : "them"}.`);
32
+ }
33
+ /**
34
+ * The refusal for a run-id given with no store, before a command that keeps a run, else undefined.
35
+ * A run-id names a stored run, so with no store there is no run for it to name: dropping it without
36
+ * a word would leave the operator looking later for a run that was never kept. A request for the
37
+ * command's help is answered instead, since help keeps no run either.
38
+ */
39
+ export function unstoredRunIdRefusal(inv, commands = cliRegistry.commands) {
40
+ if (inv.runId === undefined || inv.store !== undefined || asksForHelp(inv.commandArgs))
41
+ return undefined;
42
+ const entry = commands.find((command) => command.name === inv.command);
43
+ if (entry === undefined || entry.acceptsHostModifiers === false)
44
+ return undefined;
45
+ return (`spec-controller: usage error — --run-id names a stored run, and was given '${inv.runId}' with no --store, ` +
46
+ `so no run is kept under it.\n` +
47
+ `To keep the run under that name, give --store <root> as well; otherwise run '${entry.name}' without --run-id.`);
48
+ }
49
+ //# sourceMappingURL=storedRun.js.map
@@ -0,0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,CAAC,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC;QAAE,OAAO,SAAS,CAAC;IACzG,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;IACvE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,oBAAoB,KAAK,KAAK;QAAE,OAAO,SAAS,CAAC;IAClF,OAAO,CACL,8EAA8E,GAAG,CAAC,KAAK,qBAAqB;QAC5G,+BAA+B;QAC/B,gFAAgF,KAAK,CAAC,IAAI,qBAAqB,CAChH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-controller",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.40",
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
  "@cucumber/gherkin": "^41.0.0",
26
26
  "@cucumber/messages": "^34.0.1",
27
27
  "yaml": "^2.9.0",
28
- "@3f-consulting/spec-controller-core": "0.1.0-alpha.4"
28
+ "@3f-consulting/spec-controller-core": "0.1.0-alpha.40"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
@@ -1,34 +0,0 @@
1
- /**
2
- * The `tags` command — `spec-controller tags`, the `@SCN` scheme policing itself over a
3
- * target's Gherkin corpus.
4
- *
5
- * THIS EDGE OWNS ONLY THE READS. The rule is `corpusFaults`, in core, reached through the ROOT
6
- * barrel and nothing else: `./internal` is dropped by `publishConfig.exports` at pack time, and
7
- * this module travels in the tarball. That is not a style preference — an installed
8
- * `balance --help` once threw ERR_PACKAGE_PATH_NOT_EXPORTED behind thirteen green gates because a
9
- * published module reached that subpath (3F-3086). So what happens here is: discover the corpus,
10
- * read the manifest, build the mutation-record reader, hand over the bytes.
11
- *
12
- * ITS OWN COMMAND RATHER THAN A `balance` FLAG. `balance`'s exit code IS its verdict — 0
13
- * balanced, 1 out of balance, 3 pending-under-strict, 4 unsound, 5 nothing to reconcile — and a
14
- * corpus FAULT is not a reconciliation verdict. A flag would either overload one of those codes or
15
- * add a further meaning to a status a consumer's CI branches on. A second command costs one registry entry and gives
16
- * the fault its own ladder:
17
- *
18
- * 0 — the corpus obeys the scheme.
19
- * 1 — findings; the corpus was read and it breaks a rule.
20
- * 2 — the corpus (or the manifest) could not be READ at all. Not a verdict, because nothing was
21
- * concluded. Sibling to @SCN-CLI-014/015/016 on `balance`, and the same argument: an input
22
- * the tool cannot read is a usage error, never a verdict.
23
- *
24
- * Usage:
25
- * spec-controller tags [--features <dir>] [--package-json <path>]
26
- */
27
- /**
28
- * Police a target's corpus against the `@SCN` scheme's own rules.
29
- *
30
- * `process.exitCode` RATHER THAN `process.exit`, so whatever has been written is flushed intact
31
- * rather than truncated mid-write — the convention `balance`'s own gate settled on.
32
- */
33
- export declare function runTags(argv: string[]): void;
34
- //# sourceMappingURL=cli.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/corpus/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAiEH;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAkD5C"}
@@ -1,128 +0,0 @@
1
- /**
2
- * The `tags` command — `spec-controller tags`, the `@SCN` scheme policing itself over a
3
- * target's Gherkin corpus.
4
- *
5
- * THIS EDGE OWNS ONLY THE READS. The rule is `corpusFaults`, in core, reached through the ROOT
6
- * barrel and nothing else: `./internal` is dropped by `publishConfig.exports` at pack time, and
7
- * this module travels in the tarball. That is not a style preference — an installed
8
- * `balance --help` once threw ERR_PACKAGE_PATH_NOT_EXPORTED behind thirteen green gates because a
9
- * published module reached that subpath (3F-3086). So what happens here is: discover the corpus,
10
- * read the manifest, build the mutation-record reader, hand over the bytes.
11
- *
12
- * ITS OWN COMMAND RATHER THAN A `balance` FLAG. `balance`'s exit code IS its verdict — 0
13
- * balanced, 1 out of balance, 3 pending-under-strict, 4 unsound, 5 nothing to reconcile — and a
14
- * corpus FAULT is not a reconciliation verdict. A flag would either overload one of those codes or
15
- * add a further meaning to a status a consumer's CI branches on. A second command costs one registry entry and gives
16
- * the fault its own ladder:
17
- *
18
- * 0 — the corpus obeys the scheme.
19
- * 1 — findings; the corpus was read and it breaks a rule.
20
- * 2 — the corpus (or the manifest) could not be READ at all. Not a verdict, because nothing was
21
- * concluded. Sibling to @SCN-CLI-014/015/016 on `balance`, and the same argument: an input
22
- * the tool cannot read is a usage error, never a verdict.
23
- *
24
- * Usage:
25
- * spec-controller tags [--features <dir>] [--package-json <path>]
26
- */
27
- import { existsSync, readFileSync } from "node:fs";
28
- import { corpusFaults } from "@3f-consulting/spec-controller-core";
29
- import { cliRegistry, renderCommandHelp } from "../cli-registry.js";
30
- import { checkUnknownFlags, parseArgs } from "../cli-args.js";
31
- import { DEFAULT_DEFERRAL_TAGS } from "../deferralTags.js";
32
- import { UnreadableFeatureCorpusError } from "../ingest/gherkinValidation.js";
33
- import { discoverFeatures } from "../ingest/ingestScenarios.js";
34
- import { killFloorReaderFor } from "../ingest/ingestQualityChecks.js";
35
- import { resolveTargetRoot, resolveToolIdentity } from "../run-management/resolveRunInputs.js";
36
- /**
37
- * Read everything the rule takes, or say why it could not be read.
38
- *
39
- * ONE PLACE, ONE STATUS, because it is one Rule. A corpus the Gherkin parser rejects, a features
40
- * directory that is not there, and a manifest that is not JSON are three spellings of "the tool
41
- * could not read its input" — and every one of them, left to escape, lands on Node's default exit
42
- * 1, which is this command's code for FINDINGS. A crashed invocation would then be
43
- * indistinguishable by status from a corpus that genuinely breaks a rule, which is exactly the
44
- * collision 3F-1742 closed on `balance`.
45
- *
46
- * THE PARSE REFUSAL IS INHERITED, NOT RESTATED (@SCN-GPG-001). `discoverFeatures` refuses a corpus
47
- * cucumber could not run rather than returning one, so this command gets that refusal by going
48
- * through the shared discovery — the same way `balance` does — and what is left here is turning
49
- * it into this command's status. Its message carries the parser's own words verbatim.
50
- *
51
- * THE SOURCES ARE READ HERE because the rule is pure and takes bytes. `DiscoveredFeature` carries
52
- * the header code and the scenario ids but not the file's text, and the grammar rules that follow
53
- * this one need the text to walk the tags.
54
- */
55
- function readCorpusInputs(featuresDir, manifestPath) {
56
- try {
57
- const discovered = featuresDir === undefined ? discoverFeatures() : discoverFeatures(featuresDir);
58
- return {
59
- ok: true,
60
- features: discovered.map((f) => ({
61
- slug: f.slug,
62
- featureCode: f.featureCode,
63
- source: readFileSync(f.path, "utf8"),
64
- })),
65
- packageJson: existsSync(manifestPath)
66
- ? JSON.parse(readFileSync(manifestPath, "utf8"))
67
- : {},
68
- root: resolveTargetRoot({ features: featuresDir }),
69
- };
70
- }
71
- catch (err) {
72
- if (err instanceof UnreadableFeatureCorpusError)
73
- return { ok: false, error: err.message };
74
- const failure = err instanceof Error ? err.message : String(err);
75
- return { ok: false, error: `The corpus could not be read: ${failure}` };
76
- }
77
- }
78
- /**
79
- * Police a target's corpus against the `@SCN` scheme's own rules.
80
- *
81
- * `process.exitCode` RATHER THAN `process.exit`, so whatever has been written is flushed intact
82
- * rather than truncated mid-write — the convention `balance`'s own gate settled on.
83
- */
84
- export function runTags(argv) {
85
- // Answer `--help`/`-h` from the registry BEFORE any parse, so it never falls through as a stray
86
- // flag while the command runs anyway. The registry is the single source, so a flag that exists
87
- // is a flag that appears in help — there is no hand-kept list here to drift.
88
- if (argv.includes("--help") || argv.includes("-h")) {
89
- process.stdout.write(renderCommandHelp(cliRegistry, "tags") + "\n");
90
- return;
91
- }
92
- const args = parseArgs(argv);
93
- // Registry-bounded parse (@SCN-CLI-009's rule, applied to this command's own scope): `tags`
94
- // accepts ONLY the flags its registry entry lists. By construction, not by assertion — the
95
- // helper is the one `balance` uses, given this command's name.
96
- const unknownFlagError = checkUnknownFlags(args, cliRegistry, "tags", resolveToolIdentity().toolVersion);
97
- if (unknownFlagError) {
98
- process.stderr.write(unknownFlagError + "\n");
99
- process.exitCode = 2;
100
- return;
101
- }
102
- // `--package-json` defaults to the manifest at the cwd, matching `balance`'s default: the
103
- // target is the tree you are standing in unless you say otherwise.
104
- const inputs = readCorpusInputs(args["features"], args["package-json"] ?? "package.json");
105
- if (!inputs.ok) {
106
- process.stderr.write(inputs.error + "\n");
107
- process.exitCode = 2;
108
- return;
109
- }
110
- const faults = corpusFaults({
111
- features: inputs.features,
112
- packageJson: inputs.packageJson,
113
- // The STARTER deferral set — the application layer's own policy, which a target's config may
114
- // only extend. Single-sourced here for the reason the reconcile composition takes it as a
115
- // parameter: which words the community recognises is the product's answer, not the engine's.
116
- deferralTags: DEFAULT_DEFERRAL_TAGS,
117
- killFloor: killFloorReaderFor(inputs.root),
118
- });
119
- if (faults.length === 0) {
120
- process.stdout.write("tags: OK — every feature code names one feature file, and every tag on the corpus obeys the @SCN scheme's own rules.\n");
121
- return;
122
- }
123
- process.stderr.write(`tags: FAILED — ${faults.length} finding(s):\n`);
124
- for (const fault of faults)
125
- process.stderr.write(` ${fault.message}\n`);
126
- process.exitCode = 1;
127
- }
128
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/corpus/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE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,MAAM,MAAM,GAAG,YAAY,CAAC;QAC1B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,6FAA6F;QAC7F,0FAA0F;QAC1F,6FAA6F;QAC7F,YAAY,EAAE,qBAAqB;QACnC,SAAS,EAAE,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;KAC3C,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wHAAwH,CACzH,CAAC;QACF,OAAO;IACT,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,MAAM,CAAC,MAAM,gBAAgB,CAAC,CAAC;IACtE,KAAK,MAAM,KAAK,IAAI,MAAM;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IACzE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
@@ -1,51 +0,0 @@
1
- /**
2
- * THE MODULE'S OWN SURFACE — curated symbol by symbol, never a re-export of the tree behind it
3
- * (3F-2804, 3F-3337).
4
- *
5
- * WHAT IS BEHIND THIS BARREL NOW IS TWO READERS, AND THE RATCHET THEY WERE BUILT FOR IS GONE
6
- * (3F-3337). `record.ts` reads a target's banked gate record and hands back the kill floor it
7
- * implies; `report.ts` counts a mutation report's own mutants into a measurement. What left with
8
- * the ratchet is everything that COMPARED the two — the verdicts, the up-only recorder, the
9
- * reconciliation entry and the command that ended on it — because this repository's gate is now a
10
- * per-mutant comparison the runner keeps, and nothing types a mutation count here any more.
11
- *
12
- * ITS TWO CONSUMERS ARE BOTH IN THIS TREE, AND THEY WANT DIFFERENT HALVES. `ingest/
13
- * ingestQualityChecks.ts` wants the RECORD half: the engine's `mutationGate` bar kind lets a target
14
- * author a fitness row naming a gate instead of a figure, which is a published capability decided
15
- * over a target's own record (@SCN-MUT-012, @SCN-MUT-013). `tests/checks/mutationScoreCli.ts` wants
16
- * the REPORT half: `pnpm mutation:score` takes the two counts out of a sweep's report and divides
17
- * them (@SCN-MUT-007, @SCN-MUT-008). Neither wants the other's, which is why both are named here
18
- * rather than the tree behind them being passed on wholesale.
19
- *
20
- * A BARREL THAT RE-EXPORTED EVERY MODULE WOULD BE A CONTRACT NOBODY WROTE. Each module below
21
- * exports what its own siblings need from it, and sibling-visibility is a much wider set than
22
- * consumer-visibility. Passing that set on wholesale would freeze every one of them as something a
23
- * caller may depend on, and the first refactor that moved one would be a breaking change nobody
24
- * meant to make. So this file names what a caller may hold and the omissions are decisions.
25
- *
26
- * THE KILL FLOOR IS THE BAR, AND IT IS NOT A SCORE (3F-2788). `killFloorOf` answers a ledger
27
- * holding a measured row to the figure a gate's own record implies, in mutants — a percentage would
28
- * fold the kill lost and the population grown into one number, which is the distinction a bar on
29
- * this axis exists to keep. A consumer that derived it instead would be the second place knowing
30
- * how an allowance is spent.
31
- *
32
- * THE TYPES ARE SPELLED FOR A CONSUMER'S NAMESPACE RATHER THAN FOR THIS MODULE'S. `GateRecord` is
33
- * unambiguous inside a directory about nothing else; imported into a repository that has gates of
34
- * several kinds it is not, so it crosses this line under the fuller name. The aliasing is
35
- * deliberate and one-directional: the internal spelling stays internal.
36
- *
37
- * AND NO DRIFT GUARD STANDS OVER IT, WHICH IS A DECISION RATHER THAN AN OPEN QUESTION. 3F-2859
38
- * stopped publishing this barrel: no manifest key resolves here, and no caller outside this
39
- * repository can spell the specifier at all. Freezing the list would make every refactor behind it
40
- * a change to a contract nobody holds.
41
- *
42
- * THE COMPARISON THIS PARAGRAPH USED TO DRAW IS GONE, AND SAYING SO IS THE POINT. It read: the
43
- * sibling core package's barrel IS reflected and compared against a frozen list in both directions,
44
- * so a symbol quietly added or dropped reds — that being what a PUBLISHED surface is owed, and this
45
- * one is not published. At 3F-3449 that arm was deleted with the rest of the packaging checks this
46
- * repository wrote for itself, so NEITHER barrel is guarded now and the contrast no longer carries
47
- * the argument. What still carries it is the second sentence above, which never depended on it.
48
- */
49
- export { floorOf, gateRecordFor, killFloorOf, MalformedRecordError, parseGateRecords, RECORD_FILE, type GateRecord as MutationGateRecord, } from "./record.js";
50
- export { measurementFromReport, readMutationReport, type MutationMeasurement, type MutationReportRead, } from "./report.js";
51
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutation-ratchet/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EACL,OAAO,EACP,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,KAAK,UAAU,IAAI,kBAAkB,GACtC,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC"}
@@ -1,51 +0,0 @@
1
- /**
2
- * THE MODULE'S OWN SURFACE — curated symbol by symbol, never a re-export of the tree behind it
3
- * (3F-2804, 3F-3337).
4
- *
5
- * WHAT IS BEHIND THIS BARREL NOW IS TWO READERS, AND THE RATCHET THEY WERE BUILT FOR IS GONE
6
- * (3F-3337). `record.ts` reads a target's banked gate record and hands back the kill floor it
7
- * implies; `report.ts` counts a mutation report's own mutants into a measurement. What left with
8
- * the ratchet is everything that COMPARED the two — the verdicts, the up-only recorder, the
9
- * reconciliation entry and the command that ended on it — because this repository's gate is now a
10
- * per-mutant comparison the runner keeps, and nothing types a mutation count here any more.
11
- *
12
- * ITS TWO CONSUMERS ARE BOTH IN THIS TREE, AND THEY WANT DIFFERENT HALVES. `ingest/
13
- * ingestQualityChecks.ts` wants the RECORD half: the engine's `mutationGate` bar kind lets a target
14
- * author a fitness row naming a gate instead of a figure, which is a published capability decided
15
- * over a target's own record (@SCN-MUT-012, @SCN-MUT-013). `tests/checks/mutationScoreCli.ts` wants
16
- * the REPORT half: `pnpm mutation:score` takes the two counts out of a sweep's report and divides
17
- * them (@SCN-MUT-007, @SCN-MUT-008). Neither wants the other's, which is why both are named here
18
- * rather than the tree behind them being passed on wholesale.
19
- *
20
- * A BARREL THAT RE-EXPORTED EVERY MODULE WOULD BE A CONTRACT NOBODY WROTE. Each module below
21
- * exports what its own siblings need from it, and sibling-visibility is a much wider set than
22
- * consumer-visibility. Passing that set on wholesale would freeze every one of them as something a
23
- * caller may depend on, and the first refactor that moved one would be a breaking change nobody
24
- * meant to make. So this file names what a caller may hold and the omissions are decisions.
25
- *
26
- * THE KILL FLOOR IS THE BAR, AND IT IS NOT A SCORE (3F-2788). `killFloorOf` answers a ledger
27
- * holding a measured row to the figure a gate's own record implies, in mutants — a percentage would
28
- * fold the kill lost and the population grown into one number, which is the distinction a bar on
29
- * this axis exists to keep. A consumer that derived it instead would be the second place knowing
30
- * how an allowance is spent.
31
- *
32
- * THE TYPES ARE SPELLED FOR A CONSUMER'S NAMESPACE RATHER THAN FOR THIS MODULE'S. `GateRecord` is
33
- * unambiguous inside a directory about nothing else; imported into a repository that has gates of
34
- * several kinds it is not, so it crosses this line under the fuller name. The aliasing is
35
- * deliberate and one-directional: the internal spelling stays internal.
36
- *
37
- * AND NO DRIFT GUARD STANDS OVER IT, WHICH IS A DECISION RATHER THAN AN OPEN QUESTION. 3F-2859
38
- * stopped publishing this barrel: no manifest key resolves here, and no caller outside this
39
- * repository can spell the specifier at all. Freezing the list would make every refactor behind it
40
- * a change to a contract nobody holds.
41
- *
42
- * THE COMPARISON THIS PARAGRAPH USED TO DRAW IS GONE, AND SAYING SO IS THE POINT. It read: the
43
- * sibling core package's barrel IS reflected and compared against a frozen list in both directions,
44
- * so a symbol quietly added or dropped reds — that being what a PUBLISHED surface is owed, and this
45
- * one is not published. At 3F-3449 that arm was deleted with the rest of the packaging checks this
46
- * repository wrote for itself, so NEITHER barrel is guarded now and the contrast no longer carries
47
- * the argument. What still carries it is the second sentence above, which never depended on it.
48
- */
49
- export { floorOf, gateRecordFor, killFloorOf, MalformedRecordError, parseGateRecords, RECORD_FILE, } from "./record.js";
50
- export { measurementFromReport, readMutationReport, } from "./report.js";
51
- //# sourceMappingURL=index.js.map