@3f-consulting/spec-controller-core 0.1.0-alpha.5 → 0.1.0-alpha.50

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 (245) hide show
  1. package/README.md +6 -4
  2. package/dist/assemble/evidenceReconciliationFromSources.d.ts +5 -40
  3. package/dist/assemble/evidenceReconciliationFromSources.d.ts.map +1 -1
  4. package/dist/assemble/evidenceReconciliationFromSources.js +31 -319
  5. package/dist/assemble/evidenceReconciliationFromSources.js.map +1 -1
  6. package/dist/assemble/renderInput.d.ts +6 -72
  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 +10 -46
  11. package/dist/census/evidenceObligations.d.ts.map +1 -1
  12. package/dist/census/evidenceObligations.js +15 -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 +16 -386
  19. package/dist/domain/evidenceReconciliation.d.ts.map +1 -1
  20. package/dist/domain/evidenceReconciliation.js +79 -375
  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 +7 -392
  27. package/dist/domain/journal.d.ts.map +1 -1
  28. package/dist/domain/journal.js +6 -118
  29. package/dist/domain/journal.js.map +1 -1
  30. package/dist/domain/ledger.d.ts +4 -328
  31. package/dist/domain/ledger.d.ts.map +1 -1
  32. package/dist/domain/ledger.js +11 -317
  33. package/dist/domain/ledger.js.map +1 -1
  34. package/dist/domain/outcome.d.ts +3 -0
  35. package/dist/domain/outcome.d.ts.map +1 -0
  36. package/dist/domain/outcome.js +2 -0
  37. package/dist/domain/outcome.js.map +1 -0
  38. package/dist/domain/posting.d.ts +5 -102
  39. package/dist/domain/posting.d.ts.map +1 -1
  40. package/dist/domain/posting.js +3 -55
  41. package/dist/domain/posting.js.map +1 -1
  42. package/dist/domain/qualityCheckFault.d.ts +1 -41
  43. package/dist/domain/qualityCheckFault.d.ts.map +1 -1
  44. package/dist/domain/qualityCheckFault.js +0 -24
  45. package/dist/domain/qualityCheckFault.js.map +1 -1
  46. package/dist/domain/qualityCheckFaultMessages.d.ts +0 -35
  47. package/dist/domain/qualityCheckFaultMessages.d.ts.map +1 -1
  48. package/dist/domain/qualityCheckFaultMessages.js +0 -28
  49. package/dist/domain/qualityCheckFaultMessages.js.map +1 -1
  50. package/dist/domain/qualityCheckReconciliation.d.ts +5 -278
  51. package/dist/domain/qualityCheckReconciliation.d.ts.map +1 -1
  52. package/dist/domain/qualityCheckReconciliation.js +53 -453
  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 +0 -23
  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 +0 -205
  63. package/dist/domain/scenarioReconciliation.d.ts.map +1 -1
  64. package/dist/domain/scenarioReconciliation.js +1 -98
  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 +12 -38
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +6 -86
  77. package/dist/index.js.map +1 -1
  78. package/dist/internal.d.ts +3 -25
  79. package/dist/internal.d.ts.map +1 -1
  80. package/dist/internal.js +3 -93
  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 +0 -14
  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 +3 -151
  98. package/dist/parse/checkScriptsRunInCI.d.ts.map +1 -1
  99. package/dist/parse/checkScriptsRunInCI.js +5 -143
  100. package/dist/parse/checkScriptsRunInCI.js.map +1 -1
  101. package/dist/parse/ciStepRecord.d.ts +2 -117
  102. package/dist/parse/ciStepRecord.d.ts.map +1 -1
  103. package/dist/parse/ciStepRecord.js +12 -218
  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 +0 -58
  108. package/dist/parse/commandRuns.js.map +1 -1
  109. package/dist/parse/cucumber.d.ts +0 -52
  110. package/dist/parse/cucumber.d.ts.map +1 -1
  111. package/dist/parse/cucumber.js +37 -143
  112. package/dist/parse/cucumber.js.map +1 -1
  113. package/dist/parse/discoveryScope.d.ts +0 -45
  114. package/dist/parse/discoveryScope.d.ts.map +1 -1
  115. package/dist/parse/discoveryScope.js +0 -55
  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 +0 -63
  124. package/dist/parse/reconcilerSteps.js.map +1 -1
  125. package/dist/parse/runningStaticChecks.d.ts +2 -118
  126. package/dist/parse/runningStaticChecks.d.ts.map +1 -1
  127. package/dist/parse/runningStaticChecks.js +14 -273
  128. package/dist/parse/runningStaticChecks.js.map +1 -1
  129. package/dist/parse/scenarioCodeErrors.d.ts +12 -0
  130. package/dist/parse/scenarioCodeErrors.d.ts.map +1 -0
  131. package/dist/parse/scenarioCodeErrors.js +88 -0
  132. package/dist/parse/scenarioCodeErrors.js.map +1 -0
  133. package/dist/parse/scenarios.d.ts +3 -228
  134. package/dist/parse/scenarios.d.ts.map +1 -1
  135. package/dist/parse/scenarios.js +11 -447
  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 +0 -54
  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 +0 -45
  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 +1 -78
  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 +47 -198
  156. package/dist/parse/targetManifest.js.map +1 -1
  157. package/dist/parse/vitest.d.ts +0 -60
  158. package/dist/parse/vitest.d.ts.map +1 -1
  159. package/dist/parse/vitest.js +1 -81
  160. package/dist/parse/vitest.js.map +1 -1
  161. package/dist/provenance/provenance.d.ts +2 -110
  162. package/dist/provenance/provenance.d.ts.map +1 -1
  163. package/dist/provenance/provenance.js +2 -58
  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 +0 -64
  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 +0 -37
  176. package/dist/render/discoveryScope.js.map +1 -1
  177. package/dist/render/evidenceGrid.d.ts +1 -35
  178. package/dist/render/evidenceGrid.d.ts.map +1 -1
  179. package/dist/render/evidenceGrid.js +18 -100
  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 +0 -29
  184. package/dist/render/excludedSteps.js.map +1 -1
  185. package/dist/render/json.d.ts +0 -11
  186. package/dist/render/json.d.ts.map +1 -1
  187. package/dist/render/json.js +0 -11
  188. package/dist/render/json.js.map +1 -1
  189. package/dist/render/markdown.d.ts +0 -54
  190. package/dist/render/markdown.d.ts.map +1 -1
  191. package/dist/render/markdown.js +88 -426
  192. package/dist/render/markdown.js.map +1 -1
  193. package/dist/render/provenanceSection.d.ts +0 -22
  194. package/dist/render/provenanceSection.d.ts.map +1 -1
  195. package/dist/render/provenanceSection.js +0 -44
  196. package/dist/render/provenanceSection.js.map +1 -1
  197. package/dist/render/reconcilerSteps.d.ts +0 -25
  198. package/dist/render/reconcilerSteps.d.ts.map +1 -1
  199. package/dist/render/reconcilerSteps.js +0 -26
  200. package/dist/render/reconcilerSteps.js.map +1 -1
  201. package/dist/render/runVerdict.d.ts +0 -38
  202. package/dist/render/runVerdict.d.ts.map +1 -1
  203. package/dist/render/runVerdict.js +68 -127
  204. package/dist/render/runVerdict.js.map +1 -1
  205. package/dist/render/scenarioCodeErrorsSection.d.ts +3 -0
  206. package/dist/render/scenarioCodeErrorsSection.d.ts.map +1 -0
  207. package/dist/render/scenarioCodeErrorsSection.js +42 -0
  208. package/dist/render/scenarioCodeErrorsSection.js.map +1 -0
  209. package/dist/render/staticChecks.d.ts +0 -20
  210. package/dist/render/staticChecks.d.ts.map +1 -1
  211. package/dist/render/staticChecks.js +1 -59
  212. package/dist/render/staticChecks.js.map +1 -1
  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 +0 -44
  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 +0 -32
  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/lib/featureCode.d.ts +0 -21
  231. package/dist/lib/featureCode.d.ts.map +0 -1
  232. package/dist/lib/featureCode.js +0 -24
  233. package/dist/lib/featureCode.js.map +0 -1
  234. package/dist/parse/corpusCodeFaults.d.ts +0 -76
  235. package/dist/parse/corpusCodeFaults.d.ts.map +0 -1
  236. package/dist/parse/corpusCodeFaults.js +0 -121
  237. package/dist/parse/corpusCodeFaults.js.map +0 -1
  238. package/dist/parse/corpusFaults.d.ts +0 -124
  239. package/dist/parse/corpusFaults.d.ts.map +0 -1
  240. package/dist/parse/corpusFaults.js +0 -72
  241. package/dist/parse/corpusFaults.js.map +0 -1
  242. package/dist/parse/corpusGrammarFaults.d.ts +0 -71
  243. package/dist/parse/corpusGrammarFaults.d.ts.map +0 -1
  244. package/dist/parse/corpusGrammarFaults.js +0 -292
  245. package/dist/parse/corpusGrammarFaults.js.map +0 -1
@@ -1,67 +1,10 @@
1
- /**
2
- * THE RECONCILER'S OWN STEPS (@SCN-USG-014, 3F-3343) — which steps of a target's pipeline are this
3
- * reconciliation rather than something it reconciles, and how the report says so.
4
- *
5
- * THE SECOND EXCLUSION, AND THE ONLY ONE NOBODY CONFIGURES. A behavioural runner is excluded by a
6
- * rule over what the target named and a non-check by the consumer's own list; this one is excluded
7
- * BY CONSTRUCTION, because the run that computes the books cannot be a row in them. The
8
- * distinction is not a nicety: a `notChecks` pair produces the identical report over the identical
9
- * pipeline, and the two answers part company only at the consumer who has written nothing — whose
10
- * very first run would otherwise report their own reconciler as an uncited fitness check, and go
11
- * on doing so until they learned to configure it away.
12
- *
13
- * A CITATION ON EITHER IS UNSATISFIABLE, WHICH IS WHAT MAKES IT CONSTRUCTION RATHER THAN JUDGEMENT.
14
- * The step record is written BEFORE the reconciliation reads it — necessarily, since that record
15
- * is its input — so no run's record can ever carry the reconciling step's own outcome, and no
16
- * scenario can ever be shown to have been answered by it. A demand nothing could satisfy is not a
17
- * check somebody failed to cite. It is not a check.
18
- *
19
- * TWO HALVES, RECOGNISED TWO WAYS, AND NEITHER IS A LIST OF NAMES.
20
- *
21
- * - THE RUN: a step whose command runs this tool's own reconciling invocation, compared as whole
22
- * adjacent shell tokens and followed through the manifest scripts a step invokes — the runner
23
- * rule's own comparison (`parse/commandRuns`), because a pipeline invokes a binary through a
24
- * script alias far more often than it writes its name. ADJACENT is what keeps the same binary
25
- * run for another purpose a candidate: this repository's own pipeline runs `spec-controller
26
- * tags` beside its balance step, and that is an ordinary step of the pipeline being reconciled.
27
- * - THE RECORD: a step carrying GitHub's own step-record expression, which is the only way that
28
- * record can be produced. Read off the step's `env:` and its command, wherever the consumer
29
- * wrote it, and not off its title — a step called `Dump this run's step record` that produces
30
- * no record is an ordinary step, and one called anything at all that produces the record is
31
- * the dump.
32
- *
33
- * THE INVOCATION IS INJECTED, NEVER ASSUMED. How this product is invoked at a consumer's command
34
- * line is a fact the application edge holds (`ingest/ingestQualityChecks.ts`), like the script
35
- * prefixes and the workflow names beside it; the core is handed it as data. A run told no
36
- * invocation recognises no reconciling step, which is the safe direction — a candidate too many,
37
- * visible on the report, rather than a step taken off the books by a rule nobody supplied.
38
- *
39
- * THE ACCOUNT AND THE SEAM COME OFF ONE RULE. `isReconciler` re-asks the same question of a single
40
- * step rather than consulting the list this module built, so the account the report prints and the
41
- * steps discovery skipped cannot come to disagree — a step named on the report as the reconciler
42
- * while its check sits on the books is a report that contradicts itself in one page.
43
- */
44
1
  import { ciWorkflowSteps } from "./checkScriptsRunInCI.js";
45
2
  import { commandRuns } from "./commandRuns.js";
46
3
  import { qualifiedStepName } from "./stepNames.js";
47
- /**
48
- * GitHub'S OWN EXPRESSION FOR THE RUN'S STEP RECORD, whitespace-stripped and lowercased to compare
49
- * against — its function names are case-insensitive and its expressions tolerate spacing, so
50
- * `${{ toJSON(steps) }}` and `${{tojson(steps)}}` are one expression and get one answer.
51
- */
52
4
  const STEP_RECORD_EXPRESSION = "tojson(steps)";
53
- /** Does this step produce the run's own step record — the input the reconciliation reads? */
54
5
  function producesTheStepRecord(step) {
55
6
  return [...step.env, ...("runs" in step ? [step.runs] : [])].some((written) => written.replace(/\s+/g, "").toLowerCase().includes(STEP_RECORD_EXPRESSION));
56
7
  }
57
- /**
58
- * Which half of the reconciler this step is, or nothing at all.
59
- *
60
- * THE RUN IS ASKED FIRST, so a step that both reconciles and dumps is named as the reconciliation
61
- * rather than as its input. Either way it is off the books; what the order settles is only which
62
- * of the two sentences the report prints, and the stronger fact about such a step is that it runs
63
- * the reconciliation.
64
- */
65
8
  function roleOf(step, invocation, scripts) {
66
9
  if ("runs" in step && commandRuns(step.runs, invocation, scripts))
67
10
  return "reconciles";
@@ -70,14 +13,8 @@ function roleOf(step, invocation, scripts) {
70
13
  export function reconcilerSteps(ciSources, ciSourceNames, invocation, packageJson) {
71
14
  const scripts = packageJson.scripts ?? {};
72
15
  return {
73
- // THE WALK, of which every other reader on this axis takes its own projection (3F-3352) — the
74
- // same parse, so the step this account names is the step discovery skipped.
75
16
  steps: ciWorkflowSteps(ciSources).flatMap((step) => {
76
17
  const role = roleOf(step, invocation, scripts);
77
- // NAMED BY ITS IDENTITY WHERE ITS SOURCE HAS NO NAME. The recognition never depended on the
78
- // name — a citation on this step is unsatisfiable whatever file it lives in — so a run given
79
- // no name for a source must not go quiet about a step it set aside. It says which step, in
80
- // the string GitHub itself displays, and only the qualification is missing.
81
18
  return role === undefined
82
19
  ? []
83
20
  : [{ step: qualifiedStepName(step, ciSourceNames) ?? step.identity, role }];
@@ -1 +1 @@
1
- {"version":3,"file":"reconcilerSteps.js","sourceRoot":"","sources":["../../src/parse/reconcilerSteps.ts"],"names":[],"mappings":"AAAA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,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC;QAAE,OAAO,YAAY,CAAC;IACvF,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,SAA4B,EAC5B,aAAgC,EAChC,UAAkB,EAClB,WAAiD;IAEjD,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC;IAC1C,OAAO;QACL,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACjD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YAC/C,OAAO,IAAI,KAAK,SAAS;gBACvB,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAChF,CAAC,CAAC;QACF,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,KAAK,SAAS;KACxE,CAAC;AACJ,CAAC"}
@@ -1,125 +1,9 @@
1
- /**
2
- * The running-check observer — emit a `GuardEvidenceObservation` for EVERY static check CI runs,
3
- * not just the obliged ones. This is the static analogue of the runner emitting every test result:
4
- * CI publishes no static check manifest, so the running set is DERIVED from the target's own
5
- * pipeline (@SCN-USG-001). It completes the static stream so the one reconcile engine sees every
6
- * running static check (a named one matches its `@lint` obligation; a no-evidence-obligation one
7
- * folds to the suspense row) — no derive-and-diff patch.
8
- *
9
- * WHAT A CANDIDATE IS, AND IT IS SAID BY SUBTRACTION (@SCN-USG-004, 3F-3343). A step of the
10
- * pipeline is a candidate fitness check UNLESS it runs a behavioural runner the target's manifest
11
- * named, or something took it out of discovery entirely. There is no rule about what a check is
12
- * CALLED, because the set of names a quality check might be given belongs to the consumer and is
13
- * unbounded: this observer used to read a target's scripts through an observed prefix set
14
- * (`lint:`, `guard:`), which is a sample of that set, and a pipeline whose scripts are `lint`,
15
- * `typecheck`, `audit` was one the reader could not see and said nothing about. The prefix set is
16
- * gone, and nothing shaped like it replaced it.
17
- *
18
- * AND THERE IS NO RULE ABOUT WHAT FORM A CHECK TAKES EITHER (@SCN-USG-013). A `uses:` step is a
19
- * candidate on exactly the same terms as a `run:` one: a quality check can be an action, so a
20
- * reader keyed on a step's shape would drop real checks as silently as one keyed on their names —
21
- * the same guess, one layer along. What names such a step is the action reference GitHub displays
22
- * for it, because it invokes no script of the consumer's to be named by.
23
- *
24
- * THE FAILURE DIRECTION IS DELIBERATE AND IS THE WHOLE ARGUMENT. Under the retired rule silence
25
- * hid checks a consumer HAS, and a false negative is invisible. Under this one nothing is hidden:
26
- * a step that reaches this reader leaves it as an observation, as a named runner, or as a step
27
- * something took out — each of which the report says out loud — so a false POSITIVE is visible and
28
- * correctable in one line of the consumer's own configuration.
29
- *
30
- * THE ONLY STATIC-CHECK OBSERVER THE RECONCILIATION COMPOSITION WIRES IN (3F-3397). Discovery and
31
- * attribution are one reader now: every running check reaches the books here, and the `citedScn`
32
- * seam below stamps the credit's row as the step is observed — there is no second, obligation-side
33
- * reader left to keep in agreement with it — and since 3F-3410 there is no such reader ANYWHERE:
34
- * the obligation-side observer this sentence used to point at has been deleted, so this is the only
35
- * static-check observer there is, not merely the only one wired in. The CI-parse walk still
36
- * comes from `checkScriptsRunInCI` (`ciWorkflowSteps`, of which `ciRunSteps` and `ciRunCommands`
37
- * are the projections / `commandInvokesScript`).
38
- *
39
- * `exists: true` BY CONSTRUCTION — a step the pipeline runs is a check that is there to be run.
40
- * `enforcedOverRealSource` is READ, not assumed (@SCN-LNT-032): a step whose red its job survives
41
- * runs, reds and leaves the pipeline green, so being invoked is not being enforced. The named
42
- * static checks' OTHER watermelon detail — a static check that does not run at all — is the OTHER
43
- * observer's job. `qualityCheck: "lint"` is the static-check AXIS name, and never a convention.
44
- *
45
- * AND A STEP THIS READER IS NOT LOOKING AT IS NOT READ AT ALL (@SCN-USG-015, @SCN-USG-014). Two
46
- * different facts take a step out of discovery — the consumer named it a non-check, or it is the
47
- * reconciler itself — and they reach this observer as the ONE `isExcludedFromDiscovery` seam
48
- * below, asked BEFORE the walk is used for anything: such a step carries no check onto the books,
49
- * is not consulted for a check's enforcement, and supplies no citation. What keeps that from being
50
- * a new silence is that the step is NAMED on the report, under whichever of the two it was — the
51
- * disposition is said out loud, and this reader never has to know which one it was.
52
- *
53
- * Parent: @SCN-USG-001 (the uncited static-check); @SCN-USG-004 (the inverted membership rule);
54
- * @SCN-USG-011 (the runner recognition); @SCN-USG-015 (the consumer's own exclusions);
55
- * @SCN-USG-014 (the reconciler's own steps).
56
- */
57
- import type { GuardEvidenceObservation } from "../model.js";
1
+ import type { FitnessEvidenceObservation } from "../model.js";
58
2
  import { type CiWorkflowStep, type PackageJsonScripts } from "./checkScriptsRunInCI.js";
59
3
  import type { BehaviouralRunner } from "../domain/evidenceReconciliation.js";
60
4
  import type { ScriptCitation } from "./fitnessCitations.js";
61
- /**
62
- * IS THIS STEP A CANDIDATE FITNESS CHECK — the membership rule itself, asked of one step.
63
- *
64
- * ONE RULE, TWO READERS, for the reason `namedRunnersAt` above is one function. The observer below
65
- * posts a check for every step this answers yes to, and the scope census (`parse/discoveryScope`,
66
- * @SCN-USG-020) reports how many of each job's steps it answered yes to. A census re-deriving the
67
- * rule for itself would be measuring its own arithmetic: it would go on agreeing with the report
68
- * while disagreeing with the books beneath it, which is the one disagreement a reader of a scope
69
- * section has no way to see.
70
- *
71
- * SAID BY SUBTRACTION, which is the inversion in one line (@SCN-USG-004). A step is a candidate
72
- * unless something took it out of discovery entirely, or it runs a behavioural runner the target
73
- * named. There is no third condition and nothing here reads a step's name.
74
- *
75
- * ASKED IN THAT ORDER. A step this reader is not looking at is not a step it decided against, so
76
- * the exclusion is asked before anything is read off the step for the runner rule.
77
- */
78
5
  export declare function isCandidateStep(step: CiWorkflowStep, packageJson: PackageJsonScripts, runners: Readonly<Record<string, string | null>>, isExcludedFromDiscovery: (step: CiWorkflowStep) => boolean): boolean;
79
- /**
80
- * DOES THIS STEP RUN A RUNNER THE TARGET NAMED — rule D as a yes or no (@SCN-USG-011).
81
- *
82
- * THE SAME COMPARISON A THIRD TIME, AND STILL ONLY ONE OF THEM. The membership rule above asks it,
83
- * the report's recognised-runner cut asks it, and the accounting identity (`parse/stepAccounting`,
84
- * @SCN-USG-018) asks it to say which disposition a step got. A count that decided "is this a
85
- * runner" out of its own reading of the rule could report every step accounted for while the books
86
- * beneath it had posted one of them twice, or not at all — and a total that agrees with itself is
87
- * exactly the reassurance the identity exists to refuse.
88
- *
89
- * WHICH TIERS IS THE OTHER QUESTION and is not this one. The report names the tier a step was
90
- * recognised for, and one step can be two tiers' runner; a count of dispositions wants the step,
91
- * once, whatever it was recognised as.
92
- */
93
6
  export declare function runsNamedRunner(step: CiWorkflowStep, packageJson: PackageJsonScripts, runners: Readonly<Record<string, string | null>>): boolean;
94
- export declare function runningStaticChecks(ciSources: readonly string[], packageJson: PackageJsonScripts, runners: Readonly<Record<string, string | null>>, citedScn?: (script: string, citedByStep?: string) => ScriptCitation | null, isExcludedFromDiscovery?: (step: CiWorkflowStep) => boolean): GuardEvidenceObservation[];
95
- /**
96
- * RULE D (@SCN-USG-011, 3F-3343) — the steps of a target's pipeline that run the behavioural
97
- * runners its manifest named, each with the tier it was named for and the step it was found at.
98
- *
99
- * IT IS THE ACCOUNT, AND SINCE @SCN-USG-004 THE SAME COMPARISON IS ALSO THE VERDICT. This reader
100
- * REPORTS which step ran which named runner; the membership rule above ASKS the same question of
101
- * each step and takes a runner's step out of discovery. Both go through `namedRunnersAt`, so the
102
- * report and the books cannot come to disagree — a step named here as the unit runner is the same
103
- * step that is not on the books as a fitness check.
104
- *
105
- * AND BEING NAMED IS WHAT LETS THE RULE BE THIS SIMPLE. A step recognised as a runner leaves the
106
- * reader NAMED rather than silent, so what the recognition gets wrong is visible in the report and
107
- * correctable in one line of the consumer's own configuration — the safe direction, in the one
108
- * place where the unsafe one would be invisible.
109
- *
110
- * `run:` STEPS ONLY, because the rule is about a COMMAND. A `uses:` step runs an action and states
111
- * no command for a runner to be a token of; what such a step is instead is a question for the
112
- * disposition rule, not for this one.
113
- *
114
- * ONE ENTRY PER TIER PER STEP. Two tiers sharing a runner is the ordinary case — `@integration` and
115
- * `@e2e` are both `cucumber-js` in three portfolio repositories — and each tier is a separate thing
116
- * the consumer said, so collapsing them would answer for a tier nobody asked about.
117
- *
118
- * A TIER THE TARGET SAYS HAS NONE FALLS OUT IN `namedRunnersAt` (@SCN-USG-016), and falls out
119
- * silently, which is right: there is no name for a whole-token match to be run against, so no step
120
- * can be its runner. The statement itself is not lost — the resolver keeps it, and the report says
121
- * it — but this reader answers only "which step runs which named runner", and a null is not an
122
- * answer to that.
123
- */
7
+ export declare function runningStaticChecks(ciSources: readonly string[], packageJson: PackageJsonScripts, runners: Readonly<Record<string, string | null>>, citedScn?: (script: string, citedByStep?: string) => ScriptCitation | null, isExcludedFromDiscovery?: (step: CiWorkflowStep) => boolean): FitnessEvidenceObservation[];
124
8
  export declare function recognisedRunners(ciSources: readonly string[], packageJson: PackageJsonScripts, runners: Readonly<Record<string, string | null>>): BehaviouralRunner[];
125
9
  //# sourceMappingURL=runningStaticChecks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runningStaticChecks.d.ts","sourceRoot":"","sources":["../../src/parse/runningStaticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,0BA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IAAI,CAAC,CAAC,GAC/C,iBAAiB,EAAE,CASrB"}
@@ -1,312 +1,53 @@
1
- /**
2
- * The running-check observer — emit a `GuardEvidenceObservation` for EVERY static check CI runs,
3
- * not just the obliged ones. This is the static analogue of the runner emitting every test result:
4
- * CI publishes no static check manifest, so the running set is DERIVED from the target's own
5
- * pipeline (@SCN-USG-001). It completes the static stream so the one reconcile engine sees every
6
- * running static check (a named one matches its `@lint` obligation; a no-evidence-obligation one
7
- * folds to the suspense row) — no derive-and-diff patch.
8
- *
9
- * WHAT A CANDIDATE IS, AND IT IS SAID BY SUBTRACTION (@SCN-USG-004, 3F-3343). A step of the
10
- * pipeline is a candidate fitness check UNLESS it runs a behavioural runner the target's manifest
11
- * named, or something took it out of discovery entirely. There is no rule about what a check is
12
- * CALLED, because the set of names a quality check might be given belongs to the consumer and is
13
- * unbounded: this observer used to read a target's scripts through an observed prefix set
14
- * (`lint:`, `guard:`), which is a sample of that set, and a pipeline whose scripts are `lint`,
15
- * `typecheck`, `audit` was one the reader could not see and said nothing about. The prefix set is
16
- * gone, and nothing shaped like it replaced it.
17
- *
18
- * AND THERE IS NO RULE ABOUT WHAT FORM A CHECK TAKES EITHER (@SCN-USG-013). A `uses:` step is a
19
- * candidate on exactly the same terms as a `run:` one: a quality check can be an action, so a
20
- * reader keyed on a step's shape would drop real checks as silently as one keyed on their names —
21
- * the same guess, one layer along. What names such a step is the action reference GitHub displays
22
- * for it, because it invokes no script of the consumer's to be named by.
23
- *
24
- * THE FAILURE DIRECTION IS DELIBERATE AND IS THE WHOLE ARGUMENT. Under the retired rule silence
25
- * hid checks a consumer HAS, and a false negative is invisible. Under this one nothing is hidden:
26
- * a step that reaches this reader leaves it as an observation, as a named runner, or as a step
27
- * something took out — each of which the report says out loud — so a false POSITIVE is visible and
28
- * correctable in one line of the consumer's own configuration.
29
- *
30
- * THE ONLY STATIC-CHECK OBSERVER THE RECONCILIATION COMPOSITION WIRES IN (3F-3397). Discovery and
31
- * attribution are one reader now: every running check reaches the books here, and the `citedScn`
32
- * seam below stamps the credit's row as the step is observed — there is no second, obligation-side
33
- * reader left to keep in agreement with it — and since 3F-3410 there is no such reader ANYWHERE:
34
- * the obligation-side observer this sentence used to point at has been deleted, so this is the only
35
- * static-check observer there is, not merely the only one wired in. The CI-parse walk still
36
- * comes from `checkScriptsRunInCI` (`ciWorkflowSteps`, of which `ciRunSteps` and `ciRunCommands`
37
- * are the projections / `commandInvokesScript`).
38
- *
39
- * `exists: true` BY CONSTRUCTION — a step the pipeline runs is a check that is there to be run.
40
- * `enforcedOverRealSource` is READ, not assumed (@SCN-LNT-032): a step whose red its job survives
41
- * runs, reds and leaves the pipeline green, so being invoked is not being enforced. The named
42
- * static checks' OTHER watermelon detail — a static check that does not run at all — is the OTHER
43
- * observer's job. `qualityCheck: "lint"` is the static-check AXIS name, and never a convention.
44
- *
45
- * AND A STEP THIS READER IS NOT LOOKING AT IS NOT READ AT ALL (@SCN-USG-015, @SCN-USG-014). Two
46
- * different facts take a step out of discovery — the consumer named it a non-check, or it is the
47
- * reconciler itself — and they reach this observer as the ONE `isExcludedFromDiscovery` seam
48
- * below, asked BEFORE the walk is used for anything: such a step carries no check onto the books,
49
- * is not consulted for a check's enforcement, and supplies no citation. What keeps that from being
50
- * a new silence is that the step is NAMED on the report, under whichever of the two it was — the
51
- * disposition is said out loud, and this reader never has to know which one it was.
52
- *
53
- * Parent: @SCN-USG-001 (the uncited static-check); @SCN-USG-004 (the inverted membership rule);
54
- * @SCN-USG-011 (the runner recognition); @SCN-USG-015 (the consumer's own exclusions);
55
- * @SCN-USG-014 (the reconciler's own steps).
56
- */
57
1
  import { commandRuns } from "./commandRuns.js";
58
2
  import { ciWorkflowSteps, commandInvokesScript, } from "./checkScriptsRunInCI.js";
59
- /**
60
- * WHICH TIERS' NAMED RUNNER THIS STEP RUNS — rule D asked of one step (@SCN-USG-011).
61
- *
62
- * ONE COMPARISON, TWO READERS. The recognition is REPORTED by `recognisedRunners` below and is
63
- * ASKED by the membership rule above, and a second implementation of it would be a second chance
64
- * for the report and the books to disagree about which step ran a runner — a step named as the
65
- * unit runner in one section and posted as an uncited fitness check in another.
66
- *
67
- * A TIER THE TARGET SAYS HAS NONE FALLS OUT HERE (@SCN-USG-016), and falls out silently: there is
68
- * no name for a whole-token match to be run against, so no step can be its runner. The statement
69
- * itself is not lost — the resolver keeps it and the report says it — but this reader answers only
70
- * "which named runner does this step run".
71
- */
3
+ const UP_TO_LAST_PIPE = /^.*(?<!\|)\|(?!\|)/;
4
+ function finalStages(command) {
5
+ return command
6
+ .replace(/\\\r?\n/g, " ")
7
+ .split(/\r?\n/)
8
+ .map((line) => line.replace(UP_TO_LAST_PIPE, ""))
9
+ .join("\n");
10
+ }
72
11
  function namedRunnersAt(step, scripts, runners) {
73
12
  if (!("runs" in step))
74
13
  return [];
75
- const command = step.runs;
76
- return Object.entries(runners).filter((entry) => entry[1] !== null && commandRuns(command, entry[1], scripts));
14
+ const command = finalStages(step.runs);
15
+ const unpiped = Object.fromEntries(Object.entries(scripts).map(([name, body]) => [name, finalStages(body)]));
16
+ return Object.entries(runners).filter((entry) => entry[1] !== null && commandRuns(command, entry[1], unpiped));
77
17
  }
78
- /**
79
- * WHAT THIS CANDIDATE IS CALLED — the runnable handle a report row and a reconciling credit carry.
80
- *
81
- * THE SCRIPT IT INVOKES, WHERE IT INVOKES ONE (3F-3397). A handle is where-to-fix: the thing a
82
- * consumer runs to reproduce the check, and the vocabulary the citation seam already speaks — the
83
- * `citedScn` callback below resolves a run through the target's registry to a bare check tag, and
84
- * a handle spelled the same way is what lets a report row and a reconciling credit name the same
85
- * check. A step that reaches its check through the consumer's own manifest has that name
86
- * available, so it is used.
87
- *
88
- * OTHERWISE THE STEP'S OWN IDENTITY, which is GitHub's (`checkScriptsRunInCI`) and therefore the
89
- * string already in the consumer's run log. `pnpm exec eslint` and a bare `run: ruff` invoke no
90
- * script of theirs and so have no handle to be named by; inventing one out of the command's shape
91
- * would be a convention, which is the thing this rule exists without. Naming the step is the
92
- * honest answer and the one a consumer can act on.
93
- *
94
- * AND AN ACTION STEP IS ALWAYS THAT SECOND CASE (@SCN-USG-013). A `uses:` step states no command
95
- * at all, so there is nothing for the manifest hop to be asked about and no script of the
96
- * consumer's to reach — its identity is the action reference GitHub displays for it, or the
97
- * `name:` its author gave it. The branch is not a special case for actions: it is the same
98
- * fallback a command invoking no script of theirs already takes, arrived at one step earlier.
99
- */
100
18
  function handleOf(step, scripts) {
101
19
  if (!("runs" in step))
102
20
  return step.identity;
103
21
  const invoked = Object.keys(scripts).filter((name) => commandInvokesScript(step.runs, name));
104
22
  return invoked[0] ?? step.identity;
105
23
  }
106
- /**
107
- * IS THIS STEP A CANDIDATE FITNESS CHECK — the membership rule itself, asked of one step.
108
- *
109
- * ONE RULE, TWO READERS, for the reason `namedRunnersAt` above is one function. The observer below
110
- * posts a check for every step this answers yes to, and the scope census (`parse/discoveryScope`,
111
- * @SCN-USG-020) reports how many of each job's steps it answered yes to. A census re-deriving the
112
- * rule for itself would be measuring its own arithmetic: it would go on agreeing with the report
113
- * while disagreeing with the books beneath it, which is the one disagreement a reader of a scope
114
- * section has no way to see.
115
- *
116
- * SAID BY SUBTRACTION, which is the inversion in one line (@SCN-USG-004). A step is a candidate
117
- * unless something took it out of discovery entirely, or it runs a behavioural runner the target
118
- * named. There is no third condition and nothing here reads a step's name.
119
- *
120
- * ASKED IN THAT ORDER. A step this reader is not looking at is not a step it decided against, so
121
- * the exclusion is asked before anything is read off the step for the runner rule.
122
- */
123
24
  export function isCandidateStep(step, packageJson, runners, isExcludedFromDiscovery) {
124
25
  return !isExcludedFromDiscovery(step) && !runsNamedRunner(step, packageJson, runners);
125
26
  }
126
- /**
127
- * DOES THIS STEP RUN A RUNNER THE TARGET NAMED — rule D as a yes or no (@SCN-USG-011).
128
- *
129
- * THE SAME COMPARISON A THIRD TIME, AND STILL ONLY ONE OF THEM. The membership rule above asks it,
130
- * the report's recognised-runner cut asks it, and the accounting identity (`parse/stepAccounting`,
131
- * @SCN-USG-018) asks it to say which disposition a step got. A count that decided "is this a
132
- * runner" out of its own reading of the rule could report every step accounted for while the books
133
- * beneath it had posted one of them twice, or not at all — and a total that agrees with itself is
134
- * exactly the reassurance the identity exists to refuse.
135
- *
136
- * WHICH TIERS IS THE OTHER QUESTION and is not this one. The report names the tier a step was
137
- * recognised for, and one step can be two tiers' runner; a count of dispositions wants the step,
138
- * once, whatever it was recognised as.
139
- */
140
27
  export function runsNamedRunner(step, packageJson, runners) {
141
28
  return namedRunnersAt(step, packageJson.scripts ?? {}, runners).length > 0;
142
29
  }
143
- export function runningStaticChecks(ciSources, packageJson,
144
- // @SCN-USG-004 (3F-3343) — THE TARGET'S DECLARED BEHAVIOURAL RUNNERS, which is what decides
145
- // membership now that nothing decides it by name. This argument replaces the observed prefix
146
- // set that used to sit here, and the replacement is the inversion in one line: the tool no
147
- // longer guesses at the open set of things a check might be called, it is told the closed set of
148
- // things that are not checks — one command per canon tier, named once by the consumer.
149
- //
150
- // THE PARTITION, NOT THE WHOLE BLOCK (@SCN-USG-019). Only entries keyed by a canon tier reach
151
- // rule D; a key outside the four is reported rather than honoured, and the caller resolves that
152
- // (`resolveRunners`) so a consumer cannot take their own checks out of discovery one invented
153
- // key at a time.
154
- //
155
- // AN EMPTY RECORD IS A REAL AND SUPPORTED STATE (@SCN-USG-017). A target that has named no
156
- // runners has every step of its pipeline reported as a candidate, which is exactly the report
157
- // `new-client` is sold on: a first run that says what your pipeline ran, out loud, before you
158
- // have configured anything at all.
159
- runners,
160
- // @SCN-LNT-001 (3F-2568) — THE OBSERVER STAMPS THE CITATION. Citation-routing inverts what
161
- // name-match relied on: the DEBIT used to cite, so a run never had to know which scenario it
162
- // belonged to. Now the CREDIT cites, and the only moment a run and the corpus are both in hand
163
- // is the moment the run is observed — so the `@SCN` is stamped here rather than recovered
164
- // downstream from the handle, which is the lookup name-match already proved cannot be trusted.
165
- //
166
- // The seam arrives as a FUNCTION rather than as the registry and the corpus map, because what
167
- // this reader needs is one answer per handle. Passing the two structures would put the
168
- // composition (`citationOfScript`) inside an observer that has no business knowing a registry's
169
- // shape — and where a registry is AUTHORED is still open (increment D).
170
- //
171
- // BOTH TERMS, not just the @SCN. The seam already resolves the bare check tag on its way to the
172
- // scenario, and the observation needs it: the @SCN says which ROW the credit posts to, the tag
173
- // says which OBLIGATION on that row it answers. A row carrying two bare check tags raises two
174
- // fitness obligations and is cited by two runs, so the @SCN alone cannot tell their credits
175
- // apart (@SCN-LNT-012). Resolved once at the seam rather than looked up again here, which would
176
- // give this reader an opinion about a registry's shape.
177
- //
178
- // Defaults to citing NOTHING, so a target that has registered nothing observes exactly what it
179
- // observed before. What such a target's credits then DO has changed: every one of them cites
180
- // nothing, so every one posts to suspense and answers no obligation. No name-match remains to
181
- // catch them (3F-2590 removed the posting arm; 3F-2625 the by-handle half in
182
- // `domain/qualityCheckReconciliation`, which was still live for a prefix-less check whose handle
183
- // and bare tag are the same word).
184
- //
185
- // IT IS ASKED ABOUT THE STEP AS WELL AS THE HANDLE (@SCN-LNT-031, 3F-3273). A consumer's own
186
- // citation is written on the CI step, so a seam handed only the handle cannot see the one thing
187
- // the consumer said — and the widening is what lets the citation come off the ROW that code
188
- // names rather than out of the handle's spelling. The second argument is optional and every
189
- // existing caller supplies a one-argument function, which JavaScript is free to keep passing two
190
- // arguments to: the seams that resolve a handle go on answering exactly as they did.
191
- citedScn = () => null,
192
- // @SCN-USG-015 / @SCN-USG-014 (3F-3343) — WHETHER THIS STEP IS ONE THIS READER LOOKS AT, asked of
193
- // every step before it is read for anything. Such a step carries no check into this observer, is
194
- // not consulted for a check's enforcement, and cannot supply a citation: it is not a step this
195
- // reader is looking at, which is a different thing from a step whose check it decided against.
196
- //
197
- // TWO FACTS, ONE ANSWER, AND THE COMPOSITION IS THE CALLER'S. The consumer named the step a
198
- // non-check (`parse/stepExclusions`), or it is the reconciler itself (`parse/reconcilerSteps`) —
199
- // by construction and by configuration, which the REPORT tells apart because a consumer needs to
200
- // know which of them took a step out. This reader does not: what it needs is one answer per step,
201
- // and asking it two questions would put the precedence between them in an observer that has no
202
- // business holding it, in a second place, free to disagree with the account the report prints.
203
- //
204
- // A FUNCTION, and the exclusion seam's own module states why (`parse/stepExclusions`): taking
205
- // the entry list instead would put the file-and-job qualification rule inside an observer with
206
- // no business restating it.
207
- //
208
- // THE EXCLUSION IS ABOUT A STEP, NEVER ABOUT A SCRIPT. A check the consumer excluded at one step
209
- // and still runs at another is a check their pipeline runs, and reading the entry as being about
210
- // the script would delete it from the report on the strength of something they did not say.
211
- //
212
- // Trailing and optional: a target that names no non-checks observes exactly what it observed
213
- // before, byte for byte.
214
- isExcludedFromDiscovery = () => false) {
30
+ export function runningStaticChecks(ciSources, packageJson, runners, citedScn = () => null, isExcludedFromDiscovery = () => false) {
215
31
  const scripts = packageJson.scripts ?? {};
216
- // THE STEPS, NOT THEIR COMMANDS, AND THE WHOLE-PIPELINE WALK RATHER THAN ITS `run:` PROJECTION.
217
- // `ciRunSteps` is that projection and was what this reader took until @SCN-USG-015; the wider
218
- // reading is taken here because a step is taken out of discovery by its IDENTITY, the job it
219
- // belongs to and — for the reconciler's dump — the expression its `env:` carries, and the
220
- // projection drops all three. It is the SAME parse either way — the projection is built from
221
- // this walk — so no second reading of the workflow enters.
222
- //
223
- // EVERY STEP, WHATEVER FORM IT TAKES (@SCN-USG-013). This filter read `run:` steps alone until
224
- // now, and the narrowing was never principled: a quality check can be an ACTION — CodeQL's
225
- // analyse step, a dependency review — so a rule discarding every `uses:` step drops real checks
226
- // and drops them silently, which is the prefix rule arriving one layer along in a parse
227
- // limitation's clothes. It is also the shape a non-Node consumer arrives in: a pipeline whose
228
- // static analysis is an action has no manifest script for it, and a `run:`-only reading hands
229
- // them the same empty report the Node-shaped limit used to.
230
- //
231
- // NOTHING ELSE IN THIS READER NEEDED WIDENING, which is what says the narrowing was incidental.
232
- // The runner rule already answers "no" for a step stating no command, the exclusion seam already
233
- // takes a step of either form, and the handle already falls back to the step's own identity —
234
- // so what is deleted here is a condition, not a case.
235
- //
236
- // THE RULE ITSELF IS `isCandidateStep` ABOVE, and it is a named function rather than this
237
- // filter's body because the scope census asks it too (@SCN-USG-020). Two statements of "is this
238
- // a candidate" would be free to disagree, and the report would then name a number of candidates
239
- // per job that the books beneath it did not post.
240
32
  const candidates = ciWorkflowSteps(ciSources).filter((step) => isCandidateStep(step, packageJson, runners, isExcludedFromDiscovery));
241
33
  return candidates
242
34
  .map((step) => {
243
35
  const staticCheck = handleOf(step, scripts);
244
- // AND THE SEAM IS ASKED WITH THE STEP (@SCN-LNT-031). Read as an INPUT to the citation and
245
- // not only as a refinement of one: the code the consumer wrote on the step names the
246
- // configured row, and that row is where the check tag a CI step cannot state comes from.
247
36
  const citation = citedScn(staticCheck, step.id);
248
37
  return {
249
- qualityCheck: "lint",
38
+ qualityCheck: "fitness",
250
39
  staticCheck,
251
40
  exists: true,
252
- // WHETHER THE JOB'S VERDICT DEPENDS ON THIS STEP (@SCN-LNT-032), read off the step that
253
- // ran it rather than folded across every step that runs the same script. A candidate IS a
254
- // step now, so a check run twice — once severed, once not — is two observations with two
255
- // honest answers, where the fold had to pick one and would have vouched for the severed
256
- // one on the strength of its sibling.
257
41
  enforcedOverRealSource: step.abortsJob,
258
- // Spread rather than two `?? undefined` assignments, so an observation that cites nothing
259
- // carries neither key and its JSON stays byte-identical. Both terms or neither — a
260
- // half-citation would be a shape no reader knows how to read, and the bare check tag is
261
- // the term a CI step CANNOT state: `id:` names the row, never the characteristic the
262
- // ledger reconciles on. So a step's `id:` refines which row a citation posts to; it does
263
- // not manufacture a citation where the seam reached no check tag at all — that target has
264
- // registered nothing, which is `new-client`, and its observations belong in suspense.
265
42
  ...(citation !== null
266
- ? { scnId: step.id ?? citation.scnId, checkTag: citation.checkTag }
43
+ ? { scnId: step.id ?? citation.scnId }
267
44
  : {}),
268
45
  };
269
46
  })
270
- // BY HANDLE, which is the order this observer has always emitted in and the order a reader of
271
- // the report expects. Stable, so two steps sharing a handle stay in the order their pipeline
272
- // runs them.
273
47
  .sort((a, b) => a.staticCheck.localeCompare(b.staticCheck));
274
48
  }
275
- /**
276
- * RULE D (@SCN-USG-011, 3F-3343) — the steps of a target's pipeline that run the behavioural
277
- * runners its manifest named, each with the tier it was named for and the step it was found at.
278
- *
279
- * IT IS THE ACCOUNT, AND SINCE @SCN-USG-004 THE SAME COMPARISON IS ALSO THE VERDICT. This reader
280
- * REPORTS which step ran which named runner; the membership rule above ASKS the same question of
281
- * each step and takes a runner's step out of discovery. Both go through `namedRunnersAt`, so the
282
- * report and the books cannot come to disagree — a step named here as the unit runner is the same
283
- * step that is not on the books as a fitness check.
284
- *
285
- * AND BEING NAMED IS WHAT LETS THE RULE BE THIS SIMPLE. A step recognised as a runner leaves the
286
- * reader NAMED rather than silent, so what the recognition gets wrong is visible in the report and
287
- * correctable in one line of the consumer's own configuration — the safe direction, in the one
288
- * place where the unsafe one would be invisible.
289
- *
290
- * `run:` STEPS ONLY, because the rule is about a COMMAND. A `uses:` step runs an action and states
291
- * no command for a runner to be a token of; what such a step is instead is a question for the
292
- * disposition rule, not for this one.
293
- *
294
- * ONE ENTRY PER TIER PER STEP. Two tiers sharing a runner is the ordinary case — `@integration` and
295
- * `@e2e` are both `cucumber-js` in three portfolio repositories — and each tier is a separate thing
296
- * the consumer said, so collapsing them would answer for a tier nobody asked about.
297
- *
298
- * A TIER THE TARGET SAYS HAS NONE FALLS OUT IN `namedRunnersAt` (@SCN-USG-016), and falls out
299
- * silently, which is right: there is no name for a whole-token match to be run against, so no step
300
- * can be its runner. The statement itself is not lost — the resolver keeps it, and the report says
301
- * it — but this reader answers only "which step runs which named runner", and a null is not an
302
- * answer to that.
303
- */
304
49
  export function recognisedRunners(ciSources, packageJson, runners) {
305
50
  const scripts = packageJson.scripts ?? {};
306
- // THE WIDENED WALK, of which the observer above's `ciRunSteps` is the `run:`-only projection
307
- // (3F-3352) — the SAME parse, so this reader and that one cannot come to disagree about which
308
- // steps a workflow runs. It is read here for the step's IDENTITY, which is the string a consumer
309
- // reads in their own run log and therefore the only useful way to name a step back to them.
310
51
  return ciWorkflowSteps(ciSources).flatMap((step) => namedRunnersAt(step, scripts, runners).map(([tier, runner]) => ({
311
52
  tier,
312
53
  runner,
@@ -1 +1 @@
1
- {"version":3,"file":"runningStaticChecks.js","sourceRoot":"","sources":["../../src/parse/runningStaticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,oBAAoB,GAGrB,MAAM,0BAA0B,CAAC;AAIlC;;;;;;;;;;;;GAYG;AACH,SAAS,cAAc,CACrB,IAAoB,EACpB,OAAyC,EACzC,OAAgD;IAEhD,IAAI,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CACnC,CAAC,KAAK,EAA6B,EAAE,CACnC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAC/D,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAS,QAAQ,CAAC,IAAoB,EAAE,OAAyC;IAC/E,IAAI,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;IAC5C,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7F,OAAO,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CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAChD,OAAO;YACL,YAAY,EAAE,SAAkB;YAChC,WAAW;YACX,MAAM,EAAE,IAAI;YACZ,sBAAsB,EAAE,IAAI,CAAC,SAAS;YACtC,GAAG,CAAC,QAAQ,KAAK,IAAI;gBACnB,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,QAAQ,CAAC,KAAK,EAAE;gBACtC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,SAA4B,EAC5B,WAA+B,EAC/B,OAAgD;IAEhD,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC;IAC1C,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACjD,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9D,IAAI;QACJ,MAAM;QACN,IAAI,EAAE,IAAI,CAAC,QAAQ;KACpB,CAAC,CAAC,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ScenarioCodeError, ScenarioCodePopulation } from "../domain/scenarioCodeError.js";
2
+ export interface CorpusFile {
3
+ slug: string;
4
+ featureCode: string | null;
5
+ source: string;
6
+ }
7
+ export declare function duplicateFeatureCodes(features: readonly CorpusFile[]): ScenarioCodeError[];
8
+ export declare function foreignScenarioCodes(features: readonly CorpusFile[]): ScenarioCodeError[];
9
+ export declare function uncodedFeatureFiles(features: readonly CorpusFile[]): ScenarioCodeError[];
10
+ export declare function scenarioCodePopulationOf(features: readonly CorpusFile[]): ScenarioCodePopulation;
11
+ export declare function scenarioCodeErrorsOf(features: readonly CorpusFile[]): ScenarioCodeError[];
12
+ //# sourceMappingURL=scenarioCodeErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenarioCodeErrors.d.ts","sourceRoot":"","sources":["../../src/parse/scenarioCodeErrors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAGhG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAe1F;AAmCD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAoBzF;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAWxF;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAAG,sBAAsB,CAEhG;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAMzF"}