@3f-consulting/spec-controller-core 0.1.0-alpha.7 → 0.1.0-alpha.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/assemble/evidenceReconciliationFromSources.d.ts +5 -40
- package/dist/assemble/evidenceReconciliationFromSources.d.ts.map +1 -1
- package/dist/assemble/evidenceReconciliationFromSources.js +30 -325
- package/dist/assemble/evidenceReconciliationFromSources.js.map +1 -1
- package/dist/assemble/renderInput.d.ts +7 -73
- package/dist/assemble/renderInput.d.ts.map +1 -1
- package/dist/assemble/renderInput.js +3 -45
- package/dist/assemble/renderInput.js.map +1 -1
- package/dist/census/evidenceObligations.d.ts +11 -46
- package/dist/census/evidenceObligations.d.ts.map +1 -1
- package/dist/census/evidenceObligations.js +19 -25
- package/dist/census/evidenceObligations.js.map +1 -1
- package/dist/domain/evidenceOrder.d.ts +3 -0
- package/dist/domain/evidenceOrder.d.ts.map +1 -0
- package/dist/domain/evidenceOrder.js +15 -0
- package/dist/domain/evidenceOrder.js.map +1 -0
- package/dist/domain/evidenceReconciliation.d.ts +21 -391
- package/dist/domain/evidenceReconciliation.d.ts.map +1 -1
- package/dist/domain/evidenceReconciliation.js +87 -382
- package/dist/domain/evidenceReconciliation.js.map +1 -1
- package/dist/domain/featureCode.d.ts +4 -0
- package/dist/domain/featureCode.d.ts.map +1 -0
- package/dist/domain/featureCode.js +12 -0
- package/dist/domain/featureCode.js.map +1 -0
- package/dist/domain/journal.d.ts +8 -393
- package/dist/domain/journal.d.ts.map +1 -1
- package/dist/domain/journal.js +6 -118
- package/dist/domain/journal.js.map +1 -1
- package/dist/domain/ledger.d.ts +8 -328
- package/dist/domain/ledger.d.ts.map +1 -1
- package/dist/domain/ledger.js +23 -326
- package/dist/domain/ledger.js.map +1 -1
- package/dist/domain/messages.d.ts +213 -0
- package/dist/domain/messages.d.ts.map +1 -0
- package/dist/domain/messages.js +313 -0
- package/dist/domain/messages.js.map +1 -0
- package/dist/domain/outcome.d.ts +3 -0
- package/dist/domain/outcome.d.ts.map +1 -0
- package/dist/domain/outcome.js +2 -0
- package/dist/domain/outcome.js.map +1 -0
- package/dist/domain/posting.d.ts +8 -105
- package/dist/domain/posting.d.ts.map +1 -1
- package/dist/domain/posting.js +4 -56
- package/dist/domain/posting.js.map +1 -1
- package/dist/domain/qualityCheckFault.d.ts +3 -43
- package/dist/domain/qualityCheckFault.d.ts.map +1 -1
- package/dist/domain/qualityCheckFault.js +0 -24
- package/dist/domain/qualityCheckFault.js.map +1 -1
- package/dist/domain/qualityCheckReconciliation.d.ts +7 -280
- package/dist/domain/qualityCheckReconciliation.d.ts.map +1 -1
- package/dist/domain/qualityCheckReconciliation.js +63 -463
- package/dist/domain/qualityCheckReconciliation.js.map +1 -1
- package/dist/domain/qualityCheckReconciliationFault.d.ts +0 -19
- package/dist/domain/qualityCheckReconciliationFault.d.ts.map +1 -1
- package/dist/domain/qualityCheckReconciliationFault.js +1 -24
- package/dist/domain/qualityCheckReconciliationFault.js.map +1 -1
- package/dist/domain/scenarioCodeError.d.ts +16 -0
- package/dist/domain/scenarioCodeError.d.ts.map +1 -0
- package/dist/domain/scenarioCodeError.js +4 -0
- package/dist/domain/scenarioCodeError.js.map +1 -0
- package/dist/domain/scenarioReconciliation.d.ts +2 -207
- package/dist/domain/scenarioReconciliation.d.ts.map +1 -1
- package/dist/domain/scenarioReconciliation.js +4 -101
- package/dist/domain/scenarioReconciliation.js.map +1 -1
- package/dist/domain/scnAllocation.d.ts +27 -0
- package/dist/domain/scnAllocation.d.ts.map +1 -0
- package/dist/domain/scnAllocation.js +33 -0
- package/dist/domain/scnAllocation.js.map +1 -0
- package/dist/domain/verdictCode.d.ts +10 -0
- package/dist/domain/verdictCode.d.ts.map +1 -0
- package/dist/domain/verdictCode.js +16 -0
- package/dist/domain/verdictCode.js.map +1 -0
- package/dist/index.d.ts +14 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -88
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +3 -27
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +3 -94
- package/dist/internal.js.map +1 -1
- package/dist/lib/bareTerm.d.ts +0 -39
- package/dist/lib/bareTerm.d.ts.map +1 -1
- package/dist/lib/bareTerm.js +0 -39
- package/dist/lib/bareTerm.js.map +1 -1
- package/dist/lib/portablePath.d.ts.map +1 -1
- package/dist/lib/portablePath.js +2 -16
- package/dist/lib/portablePath.js.map +1 -1
- package/dist/lib/scnCitation.d.ts +0 -32
- package/dist/lib/scnCitation.d.ts.map +1 -1
- package/dist/lib/scnCitation.js +2 -42
- package/dist/lib/scnCitation.js.map +1 -1
- package/dist/model.d.ts +0 -23
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +0 -23
- package/dist/model.js.map +1 -1
- package/dist/parse/checkScriptsRunInCI.d.ts +5 -168
- package/dist/parse/checkScriptsRunInCI.d.ts.map +1 -1
- package/dist/parse/checkScriptsRunInCI.js +11 -171
- package/dist/parse/checkScriptsRunInCI.js.map +1 -1
- package/dist/parse/ciStepRecord.d.ts +4 -118
- package/dist/parse/ciStepRecord.d.ts.map +1 -1
- package/dist/parse/ciStepRecord.js +18 -225
- package/dist/parse/ciStepRecord.js.map +1 -1
- package/dist/parse/commandRuns.d.ts +0 -39
- package/dist/parse/commandRuns.d.ts.map +1 -1
- package/dist/parse/commandRuns.js +6 -67
- package/dist/parse/commandRuns.js.map +1 -1
- package/dist/parse/cucumber.d.ts +0 -53
- package/dist/parse/cucumber.d.ts.map +1 -1
- package/dist/parse/cucumber.js +42 -146
- package/dist/parse/cucumber.js.map +1 -1
- package/dist/parse/discoveryScope.d.ts +1 -46
- package/dist/parse/discoveryScope.d.ts.map +1 -1
- package/dist/parse/discoveryScope.js +2 -57
- package/dist/parse/discoveryScope.js.map +1 -1
- package/dist/parse/fitnessCitations.d.ts +1 -72
- package/dist/parse/fitnessCitations.d.ts.map +1 -1
- package/dist/parse/fitnessCitations.js +3 -55
- package/dist/parse/fitnessCitations.js.map +1 -1
- package/dist/parse/reconcilerSteps.d.ts +0 -46
- package/dist/parse/reconcilerSteps.d.ts.map +1 -1
- package/dist/parse/reconcilerSteps.js +2 -64
- package/dist/parse/reconcilerSteps.js.map +1 -1
- package/dist/parse/runningFitnessFunctions.d.ts +9 -0
- package/dist/parse/runningFitnessFunctions.d.ts.map +1 -0
- package/dist/parse/runningFitnessFunctions.js +57 -0
- package/dist/parse/runningFitnessFunctions.js.map +1 -0
- package/dist/parse/scenarioCodeErrors.d.ts +11 -0
- package/dist/parse/scenarioCodeErrors.d.ts.map +1 -0
- package/dist/parse/scenarioCodeErrors.js +78 -0
- package/dist/parse/scenarioCodeErrors.js.map +1 -0
- package/dist/parse/scenarios.d.ts +3 -228
- package/dist/parse/scenarios.d.ts.map +1 -1
- package/dist/parse/scenarios.js +20 -457
- package/dist/parse/scenarios.js.map +1 -1
- package/dist/parse/stepAccounting.d.ts +0 -46
- package/dist/parse/stepAccounting.d.ts.map +1 -1
- package/dist/parse/stepAccounting.js +1 -55
- package/dist/parse/stepAccounting.js.map +1 -1
- package/dist/parse/stepExclusions.d.ts +0 -47
- package/dist/parse/stepExclusions.d.ts.map +1 -1
- package/dist/parse/stepExclusions.js +2 -50
- package/dist/parse/stepExclusions.js.map +1 -1
- package/dist/parse/stepNames.d.ts +0 -27
- package/dist/parse/stepNames.d.ts.map +1 -1
- package/dist/parse/stepNames.js +0 -27
- package/dist/parse/stepNames.js.map +1 -1
- package/dist/parse/targetCorpus.d.ts +1 -78
- package/dist/parse/targetCorpus.d.ts.map +1 -1
- package/dist/parse/targetCorpus.js +4 -46
- package/dist/parse/targetCorpus.js.map +1 -1
- package/dist/parse/targetManifest.d.ts +8 -146
- package/dist/parse/targetManifest.d.ts.map +1 -1
- package/dist/parse/targetManifest.js +48 -198
- package/dist/parse/targetManifest.js.map +1 -1
- package/dist/parse/vitest.d.ts +0 -60
- package/dist/parse/vitest.d.ts.map +1 -1
- package/dist/parse/vitest.js +4 -83
- package/dist/parse/vitest.js.map +1 -1
- package/dist/provenance/provenance.d.ts +2 -110
- package/dist/provenance/provenance.d.ts.map +1 -1
- package/dist/provenance/provenance.js +2 -58
- package/dist/provenance/provenance.js.map +1 -1
- package/dist/render/behaviouralRunners.d.ts +0 -29
- package/dist/render/behaviouralRunners.d.ts.map +1 -1
- package/dist/render/behaviouralRunners.js +6 -69
- package/dist/render/behaviouralRunners.js.map +1 -1
- package/dist/render/configurationNotRead.d.ts +3 -0
- package/dist/render/configurationNotRead.d.ts.map +1 -0
- package/dist/render/configurationNotRead.js +17 -0
- package/dist/render/configurationNotRead.js.map +1 -0
- package/dist/render/discoveryScope.d.ts +0 -37
- package/dist/render/discoveryScope.d.ts.map +1 -1
- package/dist/render/discoveryScope.js +3 -39
- package/dist/render/discoveryScope.js.map +1 -1
- package/dist/render/evidenceGrid.d.ts +1 -35
- package/dist/render/evidenceGrid.d.ts.map +1 -1
- package/dist/render/evidenceGrid.js +21 -103
- package/dist/render/evidenceGrid.js.map +1 -1
- package/dist/render/excludedSteps.d.ts +0 -26
- package/dist/render/excludedSteps.d.ts.map +1 -1
- package/dist/render/excludedSteps.js +4 -32
- package/dist/render/excludedSteps.js.map +1 -1
- package/dist/render/fitnessFunctions.d.ts +3 -0
- package/dist/render/fitnessFunctions.d.ts.map +1 -0
- package/dist/render/fitnessFunctions.js +12 -0
- package/dist/render/fitnessFunctions.js.map +1 -0
- package/dist/render/json.d.ts +0 -11
- package/dist/render/json.d.ts.map +1 -1
- package/dist/render/json.js +0 -11
- package/dist/render/json.js.map +1 -1
- package/dist/render/markdown.d.ts +1 -55
- package/dist/render/markdown.d.ts.map +1 -1
- package/dist/render/markdown.js +128 -467
- package/dist/render/markdown.js.map +1 -1
- package/dist/render/provenanceSection.d.ts +0 -22
- package/dist/render/provenanceSection.d.ts.map +1 -1
- package/dist/render/provenanceSection.js +10 -53
- package/dist/render/provenanceSection.js.map +1 -1
- package/dist/render/reconcilerSteps.d.ts +0 -25
- package/dist/render/reconcilerSteps.d.ts.map +1 -1
- package/dist/render/reconcilerSteps.js +5 -30
- package/dist/render/reconcilerSteps.js.map +1 -1
- package/dist/render/runVerdict.d.ts +0 -38
- package/dist/render/runVerdict.d.ts.map +1 -1
- package/dist/render/runVerdict.js +62 -129
- package/dist/render/runVerdict.js.map +1 -1
- package/dist/render/scenarioCodeErrorsSection.d.ts +3 -0
- package/dist/render/scenarioCodeErrorsSection.d.ts.map +1 -0
- package/dist/render/scenarioCodeErrorsSection.js +45 -0
- package/dist/render/scenarioCodeErrorsSection.js.map +1 -0
- package/dist/render/stepAccounting.d.ts +0 -36
- package/dist/render/stepAccounting.d.ts.map +1 -1
- package/dist/render/stepAccounting.js +5 -49
- package/dist/render/stepAccounting.js.map +1 -1
- package/dist/render/testVolume.d.ts +0 -25
- package/dist/render/testVolume.d.ts.map +1 -1
- package/dist/render/testVolume.js +4 -35
- package/dist/render/testVolume.js.map +1 -1
- package/package.json +4 -1
- package/dist/domain/checkCharacteristics.d.ts +0 -88
- package/dist/domain/checkCharacteristics.d.ts.map +0 -1
- package/dist/domain/checkCharacteristics.js +0 -109
- package/dist/domain/checkCharacteristics.js.map +0 -1
- package/dist/domain/fitnessChecks.d.ts +0 -79
- package/dist/domain/fitnessChecks.d.ts.map +0 -1
- package/dist/domain/fitnessChecks.js +0 -81
- package/dist/domain/fitnessChecks.js.map +0 -1
- package/dist/domain/qualityCheckFaultMessages.d.ts +0 -43
- package/dist/domain/qualityCheckFaultMessages.d.ts.map +0 -1
- package/dist/domain/qualityCheckFaultMessages.js +0 -38
- package/dist/domain/qualityCheckFaultMessages.js.map +0 -1
- package/dist/lib/featureCode.d.ts +0 -21
- package/dist/lib/featureCode.d.ts.map +0 -1
- package/dist/lib/featureCode.js +0 -24
- package/dist/lib/featureCode.js.map +0 -1
- package/dist/parse/corpusCodeFaults.d.ts +0 -76
- package/dist/parse/corpusCodeFaults.d.ts.map +0 -1
- package/dist/parse/corpusCodeFaults.js +0 -121
- package/dist/parse/corpusCodeFaults.js.map +0 -1
- package/dist/parse/corpusFaults.d.ts +0 -124
- package/dist/parse/corpusFaults.d.ts.map +0 -1
- package/dist/parse/corpusFaults.js +0 -72
- package/dist/parse/corpusFaults.js.map +0 -1
- package/dist/parse/corpusGrammarFaults.d.ts +0 -71
- package/dist/parse/corpusGrammarFaults.d.ts.map +0 -1
- package/dist/parse/corpusGrammarFaults.js +0 -292
- package/dist/parse/corpusGrammarFaults.js.map +0 -1
- package/dist/parse/runningStaticChecks.d.ts +0 -125
- package/dist/parse/runningStaticChecks.d.ts.map +0 -1
- package/dist/parse/runningStaticChecks.js +0 -316
- package/dist/parse/runningStaticChecks.js.map +0 -1
- package/dist/render/staticChecks.d.ts +0 -23
- package/dist/render/staticChecks.d.ts.map +0 -1
- package/dist/render/staticChecks.js +0 -69
- package/dist/render/staticChecks.js.map +0 -1
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE GRAMMAR RULES of `spec-controller tags` — everything about whether a TAG on a scenario
|
|
3
|
-
* means anything. Its sibling holds the other question: `corpusCodeFaults.ts` whether a feature
|
|
4
|
-
* code binds to one feature file. `corpusFaults.ts` composes the two and is the only entry point
|
|
5
|
-
* either of them has.
|
|
6
|
-
*
|
|
7
|
-
* THE SEAM, STATED FROM THIS SIDE. A grammar rule asks *is this word part of the `@SCN` scheme*,
|
|
8
|
-
* and the answer is assembled from places that are not this module's: the engine's own
|
|
9
|
-
* quality-check maps, the `SCN-<FFF>-<NNN>` spelling `featureCodeOf` owns, and the target's own
|
|
10
|
-
* manifest. A code rule needs none of those; it reads the corpus's shape. Two questions, two
|
|
11
|
-
* modules; the split happened when the joined module reached the 400-line `max-lines` ceiling
|
|
12
|
-
* with four more grammar clauses still to land (@SCN-FIT-001, and never an exception entry). The
|
|
13
|
-
* claim rule that once made a third sibling left with the measured axis (3F-3516): once the axis
|
|
14
|
-
* word is the only word that names a check, no scenario can claim two.
|
|
15
|
-
*
|
|
16
|
-
* AND THE TARGET'S HALF IS RESOLVED HERE, NOT HANDED IN RESOLVED. The composition hands this
|
|
17
|
-
* module a manifest rather than an answer, so the read lives beside the rule that uses it — the
|
|
18
|
-
* arrangement the parent's Design settled for the check-tag union and applied here first, because
|
|
19
|
-
* the whole reason the floor and the obligation rule once disagreed about a set was that each
|
|
20
|
-
* assembled its own. The composition passes bytes and policy; what a word MEANS is decided in one
|
|
21
|
-
* place.
|
|
22
|
-
*
|
|
23
|
-
* NOTHING HERE IS RESTATED. The recognised set is the whole subject of this module, and every
|
|
24
|
-
* member of it is DERIVED from the place that already owns it — a list written out here would
|
|
25
|
-
* agree with its source by diligence and then drift, and the check that then reds is the one
|
|
26
|
-
* telling authors which words are legitimate.
|
|
27
|
-
*/
|
|
28
|
-
import { featureCodeOf } from "../lib/featureCode.js";
|
|
29
|
-
import { FITNESS_AXIS_TAG, PENDING_QUALITY_CHECK_TAGS, RUNTIME_QUALITY_CHECK_TAGS, parseTaggedScenarios, } from "./scenarios.js";
|
|
30
|
-
import { resolveDeferralTags } from "./targetManifest.js";
|
|
31
|
-
/**
|
|
32
|
-
* The tier tags an unrecognised tag is measured against, and the set that answers whether a tag
|
|
33
|
-
* NAMES a tier at all.
|
|
34
|
-
*
|
|
35
|
-
* DERIVED, NEVER RESTATED, which is the whole reason this rule could ship. The words live in the
|
|
36
|
-
* engine's own quality-check maps; a list written out here would agree with them by diligence and
|
|
37
|
-
* then drift the first time a tier is added — and the check that then reds is the one telling
|
|
38
|
-
* authors which words are legitimate.
|
|
39
|
-
*
|
|
40
|
-
* BARE `lint` IS ONE OF THEM and is not in either map, because `@lint` is not a runtime tier: it
|
|
41
|
-
* is the style-lint check, a flat peer of `@complexity`, which raises a `lint` obligation without
|
|
42
|
-
* a runtime observation. It is named here rather than pushed into `TAG_TO_QUALITY_CHECK`, where
|
|
43
|
-
* it would start raising runtime obligations for every scenario that carries it.
|
|
44
|
-
*
|
|
45
|
-
* `lintpending` ARRIVES WITH THE PENDING LIST, and that is one word wider than the private check
|
|
46
|
-
* this rule moved out of. That check kept its own four-member tier list, so `@lintpending` was
|
|
47
|
-
* unrecognised there while the engine beside it read the same tag as a deferred `lint`
|
|
48
|
-
* obligation — two readers of one corpus disagreeing about one word, which is precisely the
|
|
49
|
-
* second reading this module exists to end. Taking the engine's own lexicon closes it.
|
|
50
|
-
*/
|
|
51
|
-
const TIER_TAGS = [
|
|
52
|
-
...RUNTIME_QUALITY_CHECK_TAGS,
|
|
53
|
-
"lint",
|
|
54
|
-
...PENDING_QUALITY_CHECK_TAGS,
|
|
55
|
-
];
|
|
56
|
-
/**
|
|
57
|
-
* Every word that NAMES A CHECK on this target (@SCN-STG-005) — the set the grammar admits
|
|
58
|
-
* beside the scheme's own tier tags.
|
|
59
|
-
*
|
|
60
|
-
* ONE ASSEMBLY, AND THAT IS THE WHOLE POINT OF ITS BEING HERE. The tier floor this rule
|
|
61
|
-
* replaced assembled its own copy at a private CLI while the obligation rule assembled another
|
|
62
|
-
* in the engine, and the two coming to disagree about this set cost a slice (3F-3126). Resolving
|
|
63
|
-
* it beside the rule that asks the question means the words this command calls legitimate are
|
|
64
|
-
* the words the engine beside it raises obligations from — there is no second answer to fall
|
|
65
|
-
* behind the first, and no package boundary for one to be resolved on either side of.
|
|
66
|
-
*
|
|
67
|
-
* NO BARE TAG NAMES A CHECK ANY LONGER (3F-3161). The target's own check registry used to be
|
|
68
|
-
* read here as the TARGET's answer for which bare words meant a check; that reading is retired,
|
|
69
|
-
* and a bare check tag is grammar nowhere now, registered or not. The measured tags read off the
|
|
70
|
-
* target's own thresholds left with the measured axis (3F-3516), so the one word this function
|
|
71
|
-
* admits beside the scheme's own tiers is the converted axis word — and it reads no manifest to
|
|
72
|
-
* find it, because the word is the model's. A target still writing a bare check tag is read
|
|
73
|
-
* nowhere by this assembly, which is the whole of what @SCN-STG-005 changed.
|
|
74
|
-
*
|
|
75
|
-
* AND THE AXIS WORD IS NOT THE TARGET'S TO GRANT (3F-3138, 3F-3149). A CONVERTED check carries
|
|
76
|
-
* one word for the whole axis and puts its CHARACTERISTIC on a configured row, so the retired
|
|
77
|
-
* registry names it nowhere and never will. Which words name a CHECK is the target's
|
|
78
|
-
* answer; which axis a scenario is ON is the model's, exactly as `unit` is — so the word is
|
|
79
|
-
* admitted whatever the manifest holds, and a target that has converted nothing does not get to
|
|
80
|
-
* spell it differently. It arrives as `FITNESS_AXIS_TAG`, the one spelling of it, because a
|
|
81
|
-
* literal written out here would be a second answer travelling under the first's name.
|
|
82
|
-
*
|
|
83
|
-
* A CONVERTED SCENARIO NO CONFIGURED ROW NAMES IS ADMITTED, deliberately: that IS a corpus
|
|
84
|
-
* fault, and it is @SCN-LNT-020's, which names the scenario by id and leaves the one remedy
|
|
85
|
-
* there is. Redding it here too would print half of one fault in a second place with the wrong
|
|
86
|
-
* remedy attached — *this word means nothing here*, said to an author whose scenario names the
|
|
87
|
-
* one axis the model has.
|
|
88
|
-
*/
|
|
89
|
-
function checkTagsOf() {
|
|
90
|
-
return [FITNESS_AXIS_TAG];
|
|
91
|
-
}
|
|
92
|
-
/** Levenshtein distance, uncapped — the strings here are tag-length. */
|
|
93
|
-
function editDistance(a, b) {
|
|
94
|
-
let previous = Array.from({ length: b.length + 1 }, (_, i) => i);
|
|
95
|
-
for (let i = 1; i <= a.length; i += 1) {
|
|
96
|
-
const current = [i];
|
|
97
|
-
for (let j = 1; j <= b.length; j += 1) {
|
|
98
|
-
const substitution = previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
99
|
-
current[j] = Math.min(current[j - 1] + 1, previous[j] + 1, substitution);
|
|
100
|
-
}
|
|
101
|
-
previous = current;
|
|
102
|
-
}
|
|
103
|
-
return previous[b.length];
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* The tier an unrecognised tag was probably meant to be, or undefined when none is close.
|
|
107
|
-
*
|
|
108
|
-
* A COURTESY, NEVER THE VERDICT. The tag reds whether or not a suggestion is found, so a wrong
|
|
109
|
-
* guess costs a poor message and nothing else. A guess that DECIDED the outcome would make the
|
|
110
|
-
* command only as good as its edit distance.
|
|
111
|
-
*
|
|
112
|
-
* Distance 2 rather than 1 catches the drop-plus-transpose shapes (`@untegration`); wider than
|
|
113
|
-
* that and `@e2e` starts attracting every short tag in the corpus.
|
|
114
|
-
*/
|
|
115
|
-
function nearestTier(bare) {
|
|
116
|
-
let best;
|
|
117
|
-
let bestDistance = 3;
|
|
118
|
-
for (const tier of TIER_TAGS) {
|
|
119
|
-
const distance = editDistance(bare.toLowerCase(), tier);
|
|
120
|
-
if (distance < bestDistance) {
|
|
121
|
-
bestDistance = distance;
|
|
122
|
-
best = tier;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return best;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* The bare tag a group-prefixed tag should have been (@SCN-STG-004), or undefined where the tag
|
|
129
|
-
* carries no value to strip a group from.
|
|
130
|
-
*
|
|
131
|
-
* `fitness=complexity` spells into the tag what the model already holds. There is no
|
|
132
|
-
* `behavioural=unit`, so there is no `fitness=complexity` (canon 2026-08-07, the bare-tags
|
|
133
|
-
* Correction) — and the author's intent survives the mistake intact: drop the group and what is
|
|
134
|
-
* left is the tag they wanted.
|
|
135
|
-
*
|
|
136
|
-
* NO LIST OF GROUP NAMES IS CONSULTED, because there is nothing to list. The words a codebase
|
|
137
|
-
* might reach for are not enumerable, and a list of the ones canon happens to name would green the
|
|
138
|
-
* first group name nobody thought of. So the SHAPE is the whole of the rule: a value means a group
|
|
139
|
-
* was spelled in, whatever the group is called.
|
|
140
|
-
*
|
|
141
|
-
* AND THE RETIRED `lint=<handle>` FORM REACHES IT, served by the same rule rather than carved out.
|
|
142
|
-
* That form raises no Evidence Obligation (@SCN-LNT-007), so admitting it as a tier would let a
|
|
143
|
-
* scenario look tiered while owing nothing — which is the silent slip these rules exist to close,
|
|
144
|
-
* re-opened by the one shape a reader would most expect to be excused. The private check this rule
|
|
145
|
-
* replaced did carve it out, for as long as the form was live; nothing here has to remember to
|
|
146
|
-
* take that clause away again.
|
|
147
|
-
*
|
|
148
|
-
* IT DECIDES NOTHING, WHICH IS WHY IT IS SAFE TO BE THIS BROAD. `isGrammar` has already answered
|
|
149
|
-
* the verdict by the time this is asked; a tag reaching here reds whatever this returns.
|
|
150
|
-
*/
|
|
151
|
-
function groupPrefixedMember(tag) {
|
|
152
|
-
return /^[^=]+=(.+)$/.exec(tag)?.[1];
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Why an unrecognised tag is unrecognised, and what to write instead — the clause following
|
|
156
|
-
* `carries @<tag>,` in the message.
|
|
157
|
-
*
|
|
158
|
-
* TWO SHAPES, ONE VERDICT, TWO MESSAGES. A group-prefixed tag resembles no tier, so edit distance
|
|
159
|
-
* has nothing to offer it (@SCN-STG-004); what it has instead is a legible intent, and the message
|
|
160
|
-
* names the bare tag rather than leaving the author to work out which half of their tag was the
|
|
161
|
-
* mistake. Every other unrecognised tag falls back to the near-miss courtesy, which stays a
|
|
162
|
-
* courtesy and never the verdict (@SCN-STG-002). Collapsing the two would print one fault's remedy
|
|
163
|
-
* at the other's author — the wrong-message failure the fault kinds were split to avoid.
|
|
164
|
-
*/
|
|
165
|
-
function unrecognisedTagFault(tag) {
|
|
166
|
-
const member = groupPrefixedMember(tag);
|
|
167
|
-
if (member !== undefined) {
|
|
168
|
-
return (`which spells a group into the tag — a check is named bare, its group living in the ` +
|
|
169
|
-
`model — so this should have been @${member}`);
|
|
170
|
-
}
|
|
171
|
-
const suggestion = nearestTier(tag);
|
|
172
|
-
return (`which is neither an evidence tier nor a recognised deferral tag` +
|
|
173
|
-
(suggestion === undefined ? "" : ` — did you mean @${suggestion}?`));
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Is this tag part of the `@SCN` scheme's grammar, on a scenario in this file?
|
|
177
|
-
*
|
|
178
|
-
* SIX CLAUSES, AND ONE OF THEM CARRIES THE WHOLE CHECK-TAG SET. What this rule reaches is the
|
|
179
|
-
* scheme's own words, the target's deferral set, and `checkTagsOf`'s one word — the axis word (a
|
|
180
|
-
* bare check tag is grammar nowhere now, 3F-3161, and the measured tags left with the measured
|
|
181
|
-
* axis, 3F-3516). That the set grew and then shrank to one source changed nothing here, which is
|
|
182
|
-
* the point of assembling it there: a clause reading one source at a time would have had to move
|
|
183
|
-
* with it.
|
|
184
|
-
*
|
|
185
|
-
* THE FILE'S HEADER CODE IS GRAMMAR, and that clause is new rather than moved. `@TGT` sits on the
|
|
186
|
-
* `Feature:` line and `parseTaggedScenarios` inherits it onto every scenario beneath, exactly as
|
|
187
|
-
* cucumber does — so without this clause the rule reds every scenario in every coded file:
|
|
188
|
-
* measured over this repository's own corpus, 253 scenario/tag pairs across 28 codes. The private
|
|
189
|
-
* scan this rule replaced never met the case because it read a scenario's own tag block and
|
|
190
|
-
* nothing above it, which is the second reading `parseTaggedScenarios` was extracted to end.
|
|
191
|
-
*
|
|
192
|
-
* A WELL-FORMED `@SCN` ID IS GRAMMAR WHEREVER IT SITS — `featureCodeOf` is the one owner of that
|
|
193
|
-
* spelling, so an id it parses is recognised here without a second regex. An id it CANNOT parse
|
|
194
|
-
* is not this fault: `no-scn-code` raises it, names it, and would print a different remedy.
|
|
195
|
-
*
|
|
196
|
-
* A WORD THAT NAMES A CHECK IS GRAMMAR (@SCN-STG-005), steps or none. A fitness check is named
|
|
197
|
-
* by a BARE tag — a flat peer of the behavioural tiers, not a member of some group — so it
|
|
198
|
-
* matches nothing in `TIER_TAGS` and would otherwise red every fitness scenario in a corpus:
|
|
199
|
-
* measured over this repository's own, ten findings and exit 1 on the commit before this clause
|
|
200
|
-
* landed. The set is `checkTagsOf`'s and is resolved once, before the walk.
|
|
201
|
-
*
|
|
202
|
-
* AND STEPS ARE NOT CONSULTED, WHICH IS STRUCTURAL RATHER THAN REMEMBERED (3F-3126). The tier
|
|
203
|
-
* floor this rule replaced once keyed on steplessness, and a rule keyed on that correlate reds
|
|
204
|
-
* the first converted check for writing exactly the shape the obligation rule asks for. Here
|
|
205
|
-
* there is no clause to remove: the walk reads a scenario's TAGS, so the stepped and the
|
|
206
|
-
* stepless row are one case rather than two that agree.
|
|
207
|
-
*
|
|
208
|
-
* A RECOGNISED DEFERRAL TAG IS GRAMMAR (@SCN-STG-003), and it is the first clause here whose
|
|
209
|
-
* answer is the TARGET'S rather than the scheme's. Reding every tag outside the tier set would red
|
|
210
|
-
* `@skip` — a tag spec-controller itself recognises, honours as a deferral signal, and lets a
|
|
211
|
-
* target extend by config. A check that condemns what the product accepts is not stricter, it is
|
|
212
|
-
* wrong. The set arrives RESOLVED and is never restated, so there is no second list here to fall
|
|
213
|
-
* behind the first; and this module names no community tag of its own, because which words the
|
|
214
|
-
* community recognises is product policy handed in from the application layer.
|
|
215
|
-
*/
|
|
216
|
-
function isGrammar(tag, scenarioId, featureCode, deferralTags, checkTags) {
|
|
217
|
-
if (tag === scenarioId)
|
|
218
|
-
return true;
|
|
219
|
-
if (featureCodeOf(tag) !== null)
|
|
220
|
-
return true;
|
|
221
|
-
if (featureCode !== null && tag === featureCode)
|
|
222
|
-
return true;
|
|
223
|
-
if (deferralTags.includes(tag))
|
|
224
|
-
return true;
|
|
225
|
-
if (checkTags.includes(tag))
|
|
226
|
-
return true;
|
|
227
|
-
return TIER_TAGS.includes(tag);
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* A tag on an `@SCN` scenario that means nothing here (@SCN-STG-002, @SCN-STG-003, @SCN-STG-004).
|
|
231
|
-
*
|
|
232
|
-
* ONE VERDICT, AND THE DIAGNOSIS IS SEPARATE FROM IT. Whether a tag is grammar is decided by
|
|
233
|
-
* `isGrammar` alone; what the message then SAYS about it is `unrecognisedTagFault`'s. Keeping the
|
|
234
|
-
* two apart is what lets the group-prefixed reading be as broad as it is (@SCN-STG-004) without
|
|
235
|
-
* ever widening or narrowing what reds.
|
|
236
|
-
*
|
|
237
|
-
* THE TYPO THE REST OF THE MODEL CANNOT SEE, measured rather than argued. `@untit` ALONE
|
|
238
|
-
* reconciles both-missing, so half of this fault a reconciliation does cover. Planted beside a
|
|
239
|
-
* real tier — `@unit @untit` — the only reconciling item is the absent unit Evidence Observation:
|
|
240
|
-
* the typo contributes nothing and is named nowhere, in any cell, at any exit status.
|
|
241
|
-
*
|
|
242
|
-
* PER TAG, NOT PER SCENARIO, because two junk tags are two things to fix and a finding naming one
|
|
243
|
-
* of them leaves the author to re-run the command to discover the other.
|
|
244
|
-
*
|
|
245
|
-
* ONLY `@SCN` SCENARIOS ARE ASKED, which comes free from `parseTaggedScenarios` — it yields
|
|
246
|
-
* nothing for a scenario carrying no id. That is the same scope the tier floor drew and it is
|
|
247
|
-
* drawn for the same reason: a corpus mid-adoption has scenarios the scheme has not reached yet,
|
|
248
|
-
* and policing their tag lines would make adopting the scheme a whole-corpus edit.
|
|
249
|
-
*
|
|
250
|
-
* AND A PARKED SCENARIO IS ASKED TOO (@SCN-STG-003). There is no clause anywhere below that
|
|
251
|
-
* excuses a scenario for carrying a deferral tag, and that absence is the discipline rather than
|
|
252
|
-
* an oversight: parking defers what a scenario OWES, never whether its tags are spelled right.
|
|
253
|
-
* This very set is what lets the walk recognise the parking tag, so excusing the walk on a parked
|
|
254
|
-
* scenario would hide `@wip @untit` — a check whose teeth come off by writing one more tag. The
|
|
255
|
-
* resolve happens once, before the walk, for that reason as much as for the cost.
|
|
256
|
-
*
|
|
257
|
-
* @param features the target's discovered feature files, read once at the edge.
|
|
258
|
-
* @param packageJson the TARGET's manifest, read HERE through the same resolvers the ingest edge
|
|
259
|
-
* reads it with — one reading of `specController.deferralTags` (@SCN-PND-021), so the words this
|
|
260
|
-
* rule calls legitimate are exactly the words the engine beside it honours as a skip.
|
|
261
|
-
* The target's own check registry is retired and read nowhere in this assembly (@SCN-STG-005,
|
|
262
|
-
* 3F-3161). A set handed in already resolved would have been a second answer travelling under the
|
|
263
|
-
* first's name.
|
|
264
|
-
* @param starterDeferralTags the APPLICATION layer's starter set, which a target's config may only
|
|
265
|
-
* extend and never replace. It is a parameter because it is product policy — an evolvable list of
|
|
266
|
-
* strings — and a copy held in core would be a second statement of it. Pass none and this clause
|
|
267
|
-
* recognises nothing it was not given, which is the difference between owning a policy and
|
|
268
|
-
* hard-coding someone else's.
|
|
269
|
-
*/
|
|
270
|
-
export function unrecognisedTags(features, packageJson, starterDeferralTags) {
|
|
271
|
-
const deferralTags = resolveDeferralTags(packageJson, starterDeferralTags);
|
|
272
|
-
// Both sets are resolved ONCE, before the walk, rather than per tag: the manifest cannot change
|
|
273
|
-
// mid-corpus, and one resolution is what makes "the same set the obligation rule reads" a fact
|
|
274
|
-
// about this run rather than about each tag's turn through it.
|
|
275
|
-
const checkTags = checkTagsOf();
|
|
276
|
-
const faults = [];
|
|
277
|
-
for (const file of features) {
|
|
278
|
-
for (const scenario of parseTaggedScenarios(file.source)) {
|
|
279
|
-
for (const tag of scenario.tags) {
|
|
280
|
-
if (isGrammar(tag, scenario.scnId, file.featureCode, deferralTags, checkTags))
|
|
281
|
-
continue;
|
|
282
|
-
faults.push({
|
|
283
|
-
kind: "unrecognised-tag",
|
|
284
|
-
message: `unrecognised-tag: ${file.slug}.feature scenario @${scenario.scnId} carries @${tag}, ` +
|
|
285
|
-
unrecognisedTagFault(tag),
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
return faults;
|
|
291
|
-
}
|
|
292
|
-
//# sourceMappingURL=corpusGrammarFaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"corpusGrammarFaults.js","sourceRoot":"","sources":["../../src/parse/corpusGrammarFaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAA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,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,125 +0,0 @@
|
|
|
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";
|
|
58
|
-
import { type CiWorkflowStep, type PackageJsonScripts } from "./checkScriptsRunInCI.js";
|
|
59
|
-
import type { BehaviouralRunner } from "../domain/evidenceReconciliation.js";
|
|
60
|
-
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
|
-
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
|
-
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
|
-
*/
|
|
124
|
-
export declare function recognisedRunners(ciSources: readonly string[], packageJson: PackageJsonScripts, runners: Readonly<Record<string, string | null>>): BehaviouralRunner[];
|
|
125
|
-
//# sourceMappingURL=runningStaticChecks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runningStaticChecks.d.ts","sourceRoot":"","sources":["../../src/parse/runningStaticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,KAAK,EAAE,wBAAwB,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