@3f-consulting/spec-controller-core 0.1.0-alpha.8 → 0.1.0-alpha.81

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 (257) hide show
  1. package/README.md +3 -3
  2. package/dist/assemble/evidenceReconciliationFromSources.d.ts +18 -53
  3. package/dist/assemble/evidenceReconciliationFromSources.d.ts.map +1 -1
  4. package/dist/assemble/evidenceReconciliationFromSources.js +31 -326
  5. package/dist/assemble/evidenceReconciliationFromSources.js.map +1 -1
  6. package/dist/assemble/renderInput.d.ts +15 -81
  7. package/dist/assemble/renderInput.d.ts.map +1 -1
  8. package/dist/assemble/renderInput.js +3 -45
  9. package/dist/assemble/renderInput.js.map +1 -1
  10. package/dist/census/evidenceObligations.d.ts +18 -52
  11. package/dist/census/evidenceObligations.d.ts.map +1 -1
  12. package/dist/census/evidenceObligations.js +22 -25
  13. package/dist/census/evidenceObligations.js.map +1 -1
  14. package/dist/domain/evidenceOrder.d.ts +3 -0
  15. package/dist/domain/evidenceOrder.d.ts.map +1 -0
  16. package/dist/domain/evidenceOrder.js +15 -0
  17. package/dist/domain/evidenceOrder.js.map +1 -0
  18. package/dist/domain/evidenceReconciliation.d.ts +45 -410
  19. package/dist/domain/evidenceReconciliation.d.ts.map +1 -1
  20. package/dist/domain/evidenceReconciliation.js +74 -388
  21. package/dist/domain/evidenceReconciliation.js.map +1 -1
  22. package/dist/domain/featureCode.d.ts +4 -0
  23. package/dist/domain/featureCode.d.ts.map +1 -0
  24. package/dist/domain/featureCode.js +12 -0
  25. package/dist/domain/featureCode.js.map +1 -0
  26. package/dist/domain/journal.d.ts +27 -411
  27. package/dist/domain/journal.d.ts.map +1 -1
  28. package/dist/domain/journal.js +7 -118
  29. package/dist/domain/journal.js.map +1 -1
  30. package/dist/domain/ledger.d.ts +37 -357
  31. package/dist/domain/ledger.d.ts.map +1 -1
  32. package/dist/domain/ledger.js +43 -346
  33. package/dist/domain/ledger.js.map +1 -1
  34. package/dist/domain/messages.d.ts +224 -0
  35. package/dist/domain/messages.d.ts.map +1 -0
  36. package/dist/domain/messages.js +335 -0
  37. package/dist/domain/messages.js.map +1 -0
  38. package/dist/domain/outcome.d.ts +3 -0
  39. package/dist/domain/outcome.d.ts.map +1 -0
  40. package/dist/domain/outcome.js +2 -0
  41. package/dist/domain/outcome.js.map +1 -0
  42. package/dist/domain/posting.d.ts +24 -121
  43. package/dist/domain/posting.d.ts.map +1 -1
  44. package/dist/domain/posting.js +4 -56
  45. package/dist/domain/posting.js.map +1 -1
  46. package/dist/domain/qualityCheckFault.d.ts +4 -44
  47. package/dist/domain/qualityCheckFault.d.ts.map +1 -1
  48. package/dist/domain/qualityCheckFault.js +0 -24
  49. package/dist/domain/qualityCheckFault.js.map +1 -1
  50. package/dist/domain/qualityCheckReconciliation.d.ts +16 -288
  51. package/dist/domain/qualityCheckReconciliation.d.ts.map +1 -1
  52. package/dist/domain/qualityCheckReconciliation.js +84 -479
  53. package/dist/domain/qualityCheckReconciliation.js.map +1 -1
  54. package/dist/domain/qualityCheckReconciliationFault.d.ts +0 -19
  55. package/dist/domain/qualityCheckReconciliationFault.d.ts.map +1 -1
  56. package/dist/domain/qualityCheckReconciliationFault.js +1 -24
  57. package/dist/domain/qualityCheckReconciliationFault.js.map +1 -1
  58. package/dist/domain/scenarioCodeError.d.ts +16 -0
  59. package/dist/domain/scenarioCodeError.d.ts.map +1 -0
  60. package/dist/domain/scenarioCodeError.js +4 -0
  61. package/dist/domain/scenarioCodeError.js.map +1 -0
  62. package/dist/domain/scenarioReconciliation.d.ts +19 -216
  63. package/dist/domain/scenarioReconciliation.d.ts.map +1 -1
  64. package/dist/domain/scenarioReconciliation.js +29 -101
  65. package/dist/domain/scenarioReconciliation.js.map +1 -1
  66. package/dist/domain/scnAllocation.d.ts +27 -0
  67. package/dist/domain/scnAllocation.d.ts.map +1 -0
  68. package/dist/domain/scnAllocation.js +33 -0
  69. package/dist/domain/scnAllocation.js.map +1 -0
  70. package/dist/domain/verdictCode.d.ts +10 -0
  71. package/dist/domain/verdictCode.d.ts.map +1 -0
  72. package/dist/domain/verdictCode.js +16 -0
  73. package/dist/domain/verdictCode.js.map +1 -0
  74. package/dist/index.d.ts +14 -40
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +8 -88
  77. package/dist/index.js.map +1 -1
  78. package/dist/internal.d.ts +3 -27
  79. package/dist/internal.d.ts.map +1 -1
  80. package/dist/internal.js +3 -94
  81. package/dist/internal.js.map +1 -1
  82. package/dist/lib/bareTerm.d.ts +0 -39
  83. package/dist/lib/bareTerm.d.ts.map +1 -1
  84. package/dist/lib/bareTerm.js +0 -39
  85. package/dist/lib/bareTerm.js.map +1 -1
  86. package/dist/lib/portablePath.d.ts.map +1 -1
  87. package/dist/lib/portablePath.js +2 -16
  88. package/dist/lib/portablePath.js.map +1 -1
  89. package/dist/lib/scnCitation.d.ts +0 -32
  90. package/dist/lib/scnCitation.d.ts.map +1 -1
  91. package/dist/lib/scnCitation.js +2 -42
  92. package/dist/lib/scnCitation.js.map +1 -1
  93. package/dist/model.d.ts +0 -23
  94. package/dist/model.d.ts.map +1 -1
  95. package/dist/model.js +0 -23
  96. package/dist/model.js.map +1 -1
  97. package/dist/parse/checkScriptsRunInCI.d.ts +6 -169
  98. package/dist/parse/checkScriptsRunInCI.d.ts.map +1 -1
  99. package/dist/parse/checkScriptsRunInCI.js +11 -171
  100. package/dist/parse/checkScriptsRunInCI.js.map +1 -1
  101. package/dist/parse/ciStepRecord.d.ts +4 -118
  102. package/dist/parse/ciStepRecord.d.ts.map +1 -1
  103. package/dist/parse/ciStepRecord.js +20 -227
  104. package/dist/parse/ciStepRecord.js.map +1 -1
  105. package/dist/parse/commandRuns.d.ts +0 -39
  106. package/dist/parse/commandRuns.d.ts.map +1 -1
  107. package/dist/parse/commandRuns.js +6 -67
  108. package/dist/parse/commandRuns.js.map +1 -1
  109. package/dist/parse/cucumber.d.ts +13 -66
  110. package/dist/parse/cucumber.d.ts.map +1 -1
  111. package/dist/parse/cucumber.js +42 -146
  112. package/dist/parse/cucumber.js.map +1 -1
  113. package/dist/parse/discoveryScope.d.ts +1 -46
  114. package/dist/parse/discoveryScope.d.ts.map +1 -1
  115. package/dist/parse/discoveryScope.js +4 -61
  116. package/dist/parse/discoveryScope.js.map +1 -1
  117. package/dist/parse/fitnessCitations.d.ts +1 -72
  118. package/dist/parse/fitnessCitations.d.ts.map +1 -1
  119. package/dist/parse/fitnessCitations.js +3 -55
  120. package/dist/parse/fitnessCitations.js.map +1 -1
  121. package/dist/parse/reconcilerSteps.d.ts +0 -46
  122. package/dist/parse/reconcilerSteps.d.ts.map +1 -1
  123. package/dist/parse/reconcilerSteps.js +2 -64
  124. package/dist/parse/reconcilerSteps.js.map +1 -1
  125. package/dist/parse/runningFitnessFunctions.d.ts +9 -0
  126. package/dist/parse/runningFitnessFunctions.d.ts.map +1 -0
  127. package/dist/parse/runningFitnessFunctions.js +57 -0
  128. package/dist/parse/runningFitnessFunctions.js.map +1 -0
  129. package/dist/parse/scenarioCodeErrors.d.ts +11 -0
  130. package/dist/parse/scenarioCodeErrors.d.ts.map +1 -0
  131. package/dist/parse/scenarioCodeErrors.js +78 -0
  132. package/dist/parse/scenarioCodeErrors.js.map +1 -0
  133. package/dist/parse/scenarios.d.ts +5 -230
  134. package/dist/parse/scenarios.d.ts.map +1 -1
  135. package/dist/parse/scenarios.js +25 -467
  136. package/dist/parse/scenarios.js.map +1 -1
  137. package/dist/parse/stepAccounting.d.ts +0 -46
  138. package/dist/parse/stepAccounting.d.ts.map +1 -1
  139. package/dist/parse/stepAccounting.js +1 -55
  140. package/dist/parse/stepAccounting.js.map +1 -1
  141. package/dist/parse/stepExclusions.d.ts +0 -47
  142. package/dist/parse/stepExclusions.d.ts.map +1 -1
  143. package/dist/parse/stepExclusions.js +2 -50
  144. package/dist/parse/stepExclusions.js.map +1 -1
  145. package/dist/parse/stepNames.d.ts +0 -27
  146. package/dist/parse/stepNames.d.ts.map +1 -1
  147. package/dist/parse/stepNames.js +0 -27
  148. package/dist/parse/stepNames.js.map +1 -1
  149. package/dist/parse/targetCorpus.d.ts +3 -80
  150. package/dist/parse/targetCorpus.d.ts.map +1 -1
  151. package/dist/parse/targetCorpus.js +4 -46
  152. package/dist/parse/targetCorpus.js.map +1 -1
  153. package/dist/parse/targetManifest.d.ts +8 -146
  154. package/dist/parse/targetManifest.d.ts.map +1 -1
  155. package/dist/parse/targetManifest.js +48 -198
  156. package/dist/parse/targetManifest.js.map +1 -1
  157. package/dist/parse/vitest.d.ts +8 -68
  158. package/dist/parse/vitest.d.ts.map +1 -1
  159. package/dist/parse/vitest.js +4 -83
  160. package/dist/parse/vitest.js.map +1 -1
  161. package/dist/provenance/provenance.d.ts +30 -138
  162. package/dist/provenance/provenance.d.ts.map +1 -1
  163. package/dist/provenance/provenance.js +5 -65
  164. package/dist/provenance/provenance.js.map +1 -1
  165. package/dist/render/behaviouralRunners.d.ts +0 -29
  166. package/dist/render/behaviouralRunners.d.ts.map +1 -1
  167. package/dist/render/behaviouralRunners.js +8 -71
  168. package/dist/render/behaviouralRunners.js.map +1 -1
  169. package/dist/render/configurationNotRead.d.ts +3 -0
  170. package/dist/render/configurationNotRead.d.ts.map +1 -0
  171. package/dist/render/configurationNotRead.js +17 -0
  172. package/dist/render/configurationNotRead.js.map +1 -0
  173. package/dist/render/discoveryScope.d.ts +0 -37
  174. package/dist/render/discoveryScope.d.ts.map +1 -1
  175. package/dist/render/discoveryScope.js +3 -39
  176. package/dist/render/discoveryScope.js.map +1 -1
  177. package/dist/render/evidenceGrid.d.ts +3 -37
  178. package/dist/render/evidenceGrid.d.ts.map +1 -1
  179. package/dist/render/evidenceGrid.js +23 -107
  180. package/dist/render/evidenceGrid.js.map +1 -1
  181. package/dist/render/excludedSteps.d.ts +0 -26
  182. package/dist/render/excludedSteps.d.ts.map +1 -1
  183. package/dist/render/excludedSteps.js +4 -32
  184. package/dist/render/excludedSteps.js.map +1 -1
  185. package/dist/render/fitnessFunctions.d.ts +3 -0
  186. package/dist/render/fitnessFunctions.d.ts.map +1 -0
  187. package/dist/render/fitnessFunctions.js +12 -0
  188. package/dist/render/fitnessFunctions.js.map +1 -0
  189. package/dist/render/json.d.ts +0 -11
  190. package/dist/render/json.d.ts.map +1 -1
  191. package/dist/render/json.js +0 -11
  192. package/dist/render/json.js.map +1 -1
  193. package/dist/render/markdown.d.ts +1 -55
  194. package/dist/render/markdown.d.ts.map +1 -1
  195. package/dist/render/markdown.js +106 -487
  196. package/dist/render/markdown.js.map +1 -1
  197. package/dist/render/provenanceSection.d.ts +0 -22
  198. package/dist/render/provenanceSection.d.ts.map +1 -1
  199. package/dist/render/provenanceSection.js +10 -53
  200. package/dist/render/provenanceSection.js.map +1 -1
  201. package/dist/render/reconcilerSteps.d.ts +0 -25
  202. package/dist/render/reconcilerSteps.d.ts.map +1 -1
  203. package/dist/render/reconcilerSteps.js +5 -30
  204. package/dist/render/reconcilerSteps.js.map +1 -1
  205. package/dist/render/runVerdict.d.ts +0 -38
  206. package/dist/render/runVerdict.d.ts.map +1 -1
  207. package/dist/render/runVerdict.js +62 -129
  208. package/dist/render/runVerdict.js.map +1 -1
  209. package/dist/render/scenarioCodeErrorsSection.d.ts +3 -0
  210. package/dist/render/scenarioCodeErrorsSection.d.ts.map +1 -0
  211. package/dist/render/scenarioCodeErrorsSection.js +45 -0
  212. package/dist/render/scenarioCodeErrorsSection.js.map +1 -0
  213. package/dist/render/stepAccounting.d.ts +0 -36
  214. package/dist/render/stepAccounting.d.ts.map +1 -1
  215. package/dist/render/stepAccounting.js +5 -49
  216. package/dist/render/stepAccounting.js.map +1 -1
  217. package/dist/render/testVolume.d.ts +0 -25
  218. package/dist/render/testVolume.d.ts.map +1 -1
  219. package/dist/render/testVolume.js +4 -35
  220. package/dist/render/testVolume.js.map +1 -1
  221. package/package.json +4 -1
  222. package/dist/domain/checkCharacteristics.d.ts +0 -88
  223. package/dist/domain/checkCharacteristics.d.ts.map +0 -1
  224. package/dist/domain/checkCharacteristics.js +0 -109
  225. package/dist/domain/checkCharacteristics.js.map +0 -1
  226. package/dist/domain/fitnessChecks.d.ts +0 -79
  227. package/dist/domain/fitnessChecks.d.ts.map +0 -1
  228. package/dist/domain/fitnessChecks.js +0 -81
  229. package/dist/domain/fitnessChecks.js.map +0 -1
  230. package/dist/domain/qualityCheckFaultMessages.d.ts +0 -43
  231. package/dist/domain/qualityCheckFaultMessages.d.ts.map +0 -1
  232. package/dist/domain/qualityCheckFaultMessages.js +0 -38
  233. package/dist/domain/qualityCheckFaultMessages.js.map +0 -1
  234. package/dist/lib/featureCode.d.ts +0 -21
  235. package/dist/lib/featureCode.d.ts.map +0 -1
  236. package/dist/lib/featureCode.js +0 -24
  237. package/dist/lib/featureCode.js.map +0 -1
  238. package/dist/parse/corpusCodeFaults.d.ts +0 -76
  239. package/dist/parse/corpusCodeFaults.d.ts.map +0 -1
  240. package/dist/parse/corpusCodeFaults.js +0 -121
  241. package/dist/parse/corpusCodeFaults.js.map +0 -1
  242. package/dist/parse/corpusFaults.d.ts +0 -124
  243. package/dist/parse/corpusFaults.d.ts.map +0 -1
  244. package/dist/parse/corpusFaults.js +0 -72
  245. package/dist/parse/corpusFaults.js.map +0 -1
  246. package/dist/parse/corpusGrammarFaults.d.ts +0 -71
  247. package/dist/parse/corpusGrammarFaults.d.ts.map +0 -1
  248. package/dist/parse/corpusGrammarFaults.js +0 -292
  249. package/dist/parse/corpusGrammarFaults.js.map +0 -1
  250. package/dist/parse/runningStaticChecks.d.ts +0 -125
  251. package/dist/parse/runningStaticChecks.d.ts.map +0 -1
  252. package/dist/parse/runningStaticChecks.js +0 -316
  253. package/dist/parse/runningStaticChecks.js.map +0 -1
  254. package/dist/render/staticChecks.d.ts +0 -23
  255. package/dist/render/staticChecks.d.ts.map +0 -1
  256. package/dist/render/staticChecks.js +0 -69
  257. package/dist/render/staticChecks.js.map +0 -1
@@ -1,239 +1,14 @@
1
- /**
2
- * The SCENARIO reader — parse spec-controller's own `features/**\/*.feature` source
3
- * into evidence obligations: per scenario, `{ scnId, evidenceObligations }`, with
4
- * each (kind, level) drawn from the scenario's evidence tags (@unit → runtime/unit,
5
- * @integration → runtime/integration, @e2e → runtime/e2e, @performance →
6
- * runtime/performance — the evidence-obligation reading).
7
- *
8
- * One of the three separated inputs to the reconciler (obligations / observations /
9
- * static checks) — the embryonic obligation-side adapter, deliberately not a registry (v1).
10
- *
11
- * Approach: scan TAG LINES (a line whose first non-blank char is `@` and whose
12
- * every whitespace-separated token is a tag) for an @SCN-<FFF>-<NNN> id and any
13
- * co-located evidence-level tags. A scenario's @SCN id and its level tags sit on
14
- * the same accumulated tag block immediately above the Scenario keyword, so a tag
15
- * line carrying an @SCN id contributes that scenario's evidenceObligations from the level
16
- * tags found across the contiguous tag block.
17
- *
18
- * The `lint` quality-check is raised by a scenario's REGISTERED bare check tag, STEPS OR NONE
19
- * (`fitnessObligationsOf`, @SCN-LNT-006): the tag says which axis a scenario is on and the steps say
20
- * nothing about it (3F-3115). The retired `@lint=<guard>` form — where the scenario
21
- * named a runnable npm script and the run was matched back to it BY NAME — raises nothing
22
- * (@SCN-LNT-007): it supplies no citation, so anything it raised could never be credited under
23
- * the one posting rule and would read `missing` for ever. The form is inert in the READER, which
24
- * is what makes it retired rather than merely unused.
25
- *
26
- * Parent: @SCN-LDG-001.
27
- */
28
1
  import type { Scenario, QualityCheck } from "../model.js";
29
- import type { FitnessCheckIndex, UnspecifiedFitnessRow } from "../domain/fitnessChecks.js";
30
- /**
31
- * Recognise a `<quality-check>pending` tag (evidence-manifesto §11B) — return its deferred
32
- * quality-check, or `null` when the bare tag is not one of the five recognised `<qc>pending`
33
- * (a bare tier tag, an unknown `<x>pending`, or bare `pending`). The pure per-tag helper
34
- * `parseScenarios` uses to derive a pending obligation.
35
- */
2
+ export declare const SCN_CODE: RegExp;
36
3
  export declare function pendingQualityCheck(tag: string): QualityCheck | null;
37
- /**
38
- * Every recognised `<quality-check>pending` spelling, derived from the map above rather than
39
- * listed again (@SCN-STG-002, 3F-3302).
40
- *
41
- * WHY A LIST AND NOT JUST THE PREDICATE. `pendingQualityCheck` answers "is THIS tag one", which
42
- * is all an obligation needs. The tag-grammar rule needs the other direction too — the words to
43
- * measure an unrecognised tag AGAINST, so it can name the tier a typo resembles — and a list
44
- * written out over there would agree with this map by diligence and then drift the first time a
45
- * quality-check is added.
46
- */
47
- export declare const PENDING_QUALITY_CHECK_TAGS: readonly string[];
48
- /**
49
- * The bare tags that name a RUNTIME evidence tier, derived from the map above (@SCN-STG-002,
50
- * 3F-3302). Exported for the same reason as the pending list beside it, and kept beneath the map
51
- * it reads so the two can never be edited apart.
52
- */
53
- export declare const RUNTIME_QUALITY_CHECK_TAGS: readonly string[];
54
- /**
55
- * Count every raw `@SCN-FFF-NNN` occurrence across the WHOLE source — including the
56
- * non-tag-line context (prose, comments, step text) the tag-line `parseScenarios`
57
- * deliberately ignores. A sibling read over the same source; `parseScenarios` is
58
- * unchanged. Each scenario contributes exactly one tag-line occurrence, so
59
- * the delta against `parseScenarios(...).length` is precisely the ids seen in non-tag
60
- * context.
61
- */
62
4
  export declare function countScnOccurrences(source: string): number;
63
- /**
64
- * The PROSE-ONLY @SCN codes (@SCN-RPT-015) — codes that appear in non-tag
65
- * context (prose / comments / step text) but are NEVER an @SCN tag ANYWHERE in the
66
- * corpus: dangling references. A CROSS-CORPUS set difference `proseCodes − tagCodes`
67
- * over ALL sources (unique, sorted): per source each line is inspected — a tag line
68
- * contributes its @SCN tokens to the TAG set; any other line contributes its @SCN
69
- * matches (the leading `@` stripped) to the PROSE set. The union across files is
70
- * load-bearing: a code tagged in one file but mentioned in prose in another is NOT
71
- * prose-only. Distinct from `countScnOccurrences`'s raw count (occurrences, not unique
72
- * dangling codes). The bare code (e.g. `SCN-FOO-001`) is its own locator.
73
- */
74
- export declare function proseOnlyCodes(sources: string[]): string[];
75
- /**
76
- * Parse the UNTAGGED scenarios — Gherkin scenario headers whose preceding contiguous
77
- * tag block carries no `@SCN` id (@SCN-RPT-014). Mirrors `parseScenarios`'s
78
- * tag-block accumulation: a tag line accumulates the block; any non-tag line closes it.
79
- * At each scenario header, the just-accumulated block is checked for an `@SCN` — if it
80
- * has none, the scenario is untagged (returns its name). The obligation-side counterpart
81
- * to the evidenceObservations aggregate's anomaly terms: a scenario with no evidence anchor.
82
- */
83
5
  export declare function parseUntaggedScenarios(source: string): string[];
84
- /**
85
- * The one word a CONVERTED check's scenario carries — the axis, and nothing about the subject.
86
- *
87
- * It is a literal rather than a registered tag because it names no characteristic: `checkTags` is
88
- * the answer to "which words are checks here", and this word is the answer to "which axis is this
89
- * scenario on", which is the same question `unit` and `integration` answer for the other axis. A
90
- * target does not get to spell it differently for the reason nobody spells `@unit` differently.
91
- */
92
6
  export declare const FITNESS_AXIS_TAG = "fitness";
93
- /**
94
- * The scenarios ON the fitness axis that no configured row NAMES (@SCN-LNT-020) — a corpus that has
95
- * half-converted a check: the tag moved and the row was never written.
96
- *
97
- * IT RAISES NOTHING AND THAT IS NOT NEGOTIABLE. Such a scenario has said which axis it is on and
98
- * then said nothing about what it asserts; there is no characteristic to raise an obligation FOR,
99
- * and reaching for the nearest word is the near-match courtesy the portfolio roster already
100
- * refuses. So `convertedFitnessObligationsOf` above answers the empty list, and this reads the same
101
- * two facts — the axis tag, and the row's absence — to say WHO.
102
- *
103
- * THE RUN ALREADY REDS ON IT, through no rule of this function's. A converted check's scenario
104
- * carries the axis tag and its `@SCN` and nothing else, so a scenario no row names reconciles to
105
- * zero rows on BOTH sides and is out of balance through the degenerate `both-missing` item — canon's
106
- * row for exactly this profile (Scenario Exists, Evidence Obligation None, Evidence Observation
107
- * None). No outcome is minted here, and none is needed.
108
- *
109
- * WHAT IS ADDED IS THE SENTENCE. That degenerate item cannot say WHY: its own gloss is about a
110
- * scenario carrying no `@SCN`, and this one carries one. So the run NAMES these, count and id, where
111
- * it already names the other corpus-shape faults — facts only, no prescribed cure, and the reader
112
- * is left with the one remedy there is, which is to write the row.
113
- *
114
- * IT READS THE WALK IT IS HANDED rather than taking a source of its own, and it reads the same
115
- * `FITNESS_AXIS_TAG` and the same registry the obligation rule reads. A second walk would be free to
116
- * disagree about which scenario it is looking at, and a corpus naming one scenario while the rule
117
- * raised nothing for another is precisely the disagreement `parseTaggedScenarios` was extracted to
118
- * foreclose.
119
- *
120
- * NAMED ONCE however many of a scenario's effective tags name the axis (@SCN-LDG-020) — naming it
121
- * twice would put one remedy on the report twice and make the count say there are two
122
- * half-converted checks where there is one.
123
- */
124
- export declare function unconfiguredFitnessScenarios(scenarios: readonly TaggedScenario[], fitnessChecks: FitnessCheckIndex): string[];
125
- /**
126
- * THE CONFIGURED ROWS THE CORPUS CARRIES NO SCENARIO FOR (3F-3472, @SCN-LNT-027) — the mirror of
127
- * `unconfiguredFitnessScenarios` directly above, in MANIFEST order.
128
- *
129
- * THE RUN DOES NOT ALREADY RED ON IT, WHICH IS THE WHOLE DIFFERENCE BETWEEN THE TWO. Its mirror
130
- * adds only a sentence, because a scenario no row names already reconciles to zero rows on both
131
- * sides and is out of balance through the degenerate item. A row no scenario names raised NOTHING:
132
- * the obligations travel with the scenarios, so a row with no scenario contributed a characteristic
133
- * nobody asked for and the run read balanced over a check that was declared and never specified.
134
- * `double-entry-manifesto.md` names that shape exactly — a ledger catches a credit that never
135
- * arrived and is blind to a debit that was never raised.
136
- *
137
- * IT READS THE WALK IT IS HANDED, for its mirror's reason: a second walk would be free to disagree
138
- * about which scenarios the corpus holds, and a row raised against a corpus the obligations were
139
- * not taken from is the phantom-row fault (@SCN-LNT-009) reached from the manifest side.
140
- *
141
- * EVERY `@SCN`-CARRYING SCENARIO COUNTS, NOT THE `@fitness` ONES ALONE. The claim is that the
142
- * corpus carries no scenario for the row — so a scenario carrying the row's code and saying nothing
143
- * about the fitness axis is still a scenario somebody wrote under that code, and minting a debit
144
- * beside it would report a check nobody has specified where one has been started.
145
- */
146
- export declare function unspecifiedFitnessRows(scenarios: readonly TaggedScenario[], fitnessChecks: FitnessCheckIndex): UnspecifiedFitnessRow[];
147
- /**
148
- * One `@SCN`-carrying scenario as the corpus READS it, before any obligation rule is applied:
149
- * its id and its EFFECTIVE tag set (its own tags, then everything it inherits from its `Rule:`
150
- * and `Feature:`).
151
- *
152
- * Extracted so a second corpus reader cannot grow a second tag-inheritance walk. That walk is
153
- * where both of `parseScenarios`'s historical false-greens lived — the UNDER-READ (a hoisted
154
- * tier tag invisible, so its obligation was never raised) and the OVER-READ (a tag block above a
155
- * `Rule:` emitted as a scenario). A reader that re-derived "which tags does this scenario carry"
156
- * would be free to reproduce either one alone, silently, exactly as the retired hand-rolled scan
157
- * did beside cucumber's own parse.
158
- */
159
7
  export interface TaggedScenario {
160
- /** The bare scenario id, e.g. `SCN-LDG-001` (no leading @). */
161
- scnId: string;
162
- /** The scenario's OWN tags first, then its inherited ones — bare, no leading @. */
163
- tags: readonly string[];
164
- /**
165
- * The scenario's EXTENT in the source — 1-based and INCLUSIVE, so `lines.slice(startLine - 1,
166
- * endLine)` is exactly this scenario's text (@SCN-SSM-010, 3F-3044). It rides on this walk for the
167
- * reason the walk was extracted at all, sharpened by what an extent is FOR: a second pass over the
168
- * same file would be free to disagree with this one about which scenario it is looking at, and the
169
- * caller that wants an extent is asking which scenario some text belongs to — so a disagreeing
170
- * second pass is precisely how that question gets the neighbour's answer.
171
- *
172
- * `startLine` is the lesser of the scenario's first OWN tag line and its keyword line — an
173
- * inherited `Rule:`/`Feature:` tag is not part of this scenario's text. `endLine` is the line
174
- * before the next block starts (a scenario, a `Rule:` — or its first tag line — a `Background:`,
175
- * or EOF), TRIMMED BACK over trailing blank and comment lines.
176
- *
177
- * The trim is load-bearing rather than tidiness: without it a blank line or a comment sitting
178
- * between two scenarios belongs to the preceding one, and an edit there reads as a change to a
179
- * scenario it is not part of — neighbour-inheritance rebuilt at a smaller scale, which is the one
180
- * outcome @SCN-SSM-010 rules out.
181
- *
182
- * Derived from AST locations rather than from step positions, so docstrings, data tables and
183
- * `Examples:` blocks are covered with no special case.
184
- */
185
- startLine: number;
186
- /** The last line of this scenario's text — see `startLine`. 1-based, inclusive. */
187
- endLine: number;
8
+ readonly scnId: string;
9
+ readonly tags: readonly string[];
10
+ readonly name: string;
188
11
  }
189
- /**
190
- * Read every `@SCN`-carrying scenario with its EFFECTIVE tags — the corpus walk `parseScenarios`
191
- * is built on, and the same walk any other whole-corpus tag question is answered from.
192
- *
193
- * The obligation rule is deliberately NOT applied here: what a scenario TAGS and what it OWES are
194
- * different questions, and the second is `obligationsFromTags`'. Keeping them apart is what lets
195
- * the citation seam ask the first without inheriting a reading of the second.
196
- *
197
- * WHY THE WALK IS THE AST'S AND NOT A SCAN'S. This was a hand-rolled TAG-LINE SCAN that saw only
198
- * the contiguous tag block directly above a `Scenario:`. Gherkin does not work that way — a
199
- * scenario INHERITS the tags of its `Feature:` and of any enclosing `Rule:`. Two bugs followed,
200
- * and both were false-greens:
201
- *
202
- * UNDER-READ. An evidence tier hoisted to the Feature/Rule line — idiomatic, valid Gherkin,
203
- * exactly what an author does with a tier shared by every scenario beneath — was INVISIBLE. The
204
- * obligation was never RAISED, so its missing evidence could never reconcile `missing`, and the
205
- * run read BALANCED (exit 0) while cucumber named a tier nothing proved. Unlike the corrupt-
206
- * file false-green (3F-1767), this one fires on WELL-WRITTEN files — which makes it likelier.
207
- *
208
- * OVER-READ. Any non-tag line flushed the accumulated block, so a tag block above a `Rule:` was
209
- * emitted AS IF it were a scenario. The corpus did not merely miss scenarios — it INVENTED them.
210
- *
211
- * EVERY tag inherits, `@SCN` included: parity with cucumber is the goal, and excluding one would
212
- * invent a rule cucumber does not have. A hoisted `@SCN` therefore gives every scenario beneath it
213
- * the same id — a corpus-authoring fault, but a VISIBLE one (whether it should red is a deferred
214
- * policy question, 3F-1774's sibling).
215
- *
216
- * An UNPARSEABLE source THROWS, from `parseFeatureDocument` — it never yields an empty corpus, for
217
- * the reason recorded there.
218
- */
219
12
  export declare function parseTaggedScenarios(source: string): TaggedScenario[];
220
- /**
221
- * Parse the SCENARIO CORPUS — the ledger's DEBIT side — from the REAL Gherkin AST (@SCN-LDG-020,
222
- * 3F-1775), the same parser cucumber uses. So the scenarios spec-controller reconciles carry
223
- * EXACTLY the tags cucumber gives them: one reading of the file, not two.
224
- *
225
- * The corpus walk is `parseTaggedScenarios`'; this is the OBLIGATION rule applied over it. An
226
- * unparseable source still THROWS from the walk rather than yielding an empty corpus.
227
- *
228
- * `checkTags` — the registry's bare check tags (@SCN-LNT-006) — is ADDITIVE and defaults to none, so
229
- * `parseScenarios` keeps its place on the v1 barrel and every existing caller
230
- * reads exactly the corpus it read before. A target that has registered nothing raises no fitness
231
- * obligations, which is what lets the bare-tag reading land ahead of the corpus sweep that uses it.
232
- *
233
- * `fitnessChecks` — the target's CONFIGURED ROWS (@SCN-LNT-018) — is trailing and optional for the
234
- * same reason, and carries the scenario's own `scnId` into the obligation rule: a converted check's
235
- * characteristic is keyed by the row it is owed on, so the rule cannot be applied to a tag set
236
- * alone. Empty by default, so a target that has converted nothing raises nothing on this route.
237
- */
238
- export declare function parseScenarios(source: string, deferralTags?: readonly string[], checkTags?: readonly string[], fitnessChecks?: FitnessCheckIndex): Scenario[];
13
+ export declare function parseScenarios(source: string, deferralTags?: readonly string[]): Scenario[];
239
14
  //# sourceMappingURL=scenarios.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../../src/parse/scenarios.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAsB,YAAY,EAAuB,MAAM,aAAa,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAoB3F;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAEpE;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS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