@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,166 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
* The TARGET's `specController.*` configuration, read into the rows and mints the
|
|
3
|
-
* reconciler takes — the `resolve*` family, moved here from the app's ingest edge (3F-3087).
|
|
4
|
-
*
|
|
5
|
-
* WHY THEY LIVE IN THE ENGINE. Every one of them is a pure function of a manifest object
|
|
6
|
-
* somebody else already read off disk, and every one of them is the ONE reading of the key it
|
|
7
|
-
* names — `fitnessChecksOf` and `bareTerm` are both core's, so the reader and the
|
|
8
|
-
* thing it reads through belonged on the same side of the package boundary. Sitting at the app
|
|
9
|
-
* edge they were the reason a PUBLISHED module imported core's unpublished `/internal` subpath,
|
|
10
|
-
* which is the fault 3F-3086 repairs; nothing about reading a parsed manifest ever needed the
|
|
11
|
-
* edge that produced it.
|
|
12
|
-
*
|
|
13
|
-
* WHAT THE EDGE STILL OWES THEM, AND WHY IT IS A PARAMETER. One of these readings depends on
|
|
14
|
-
* something the engine must not know: the deferral-tag STARTER SET is product policy the
|
|
15
|
-
* application layer single-sources (`DEFAULT_DEFERRAL_TAGS`). It arrives as an argument, as data,
|
|
16
|
-
* so the engine keeps knowing nothing about files (`lint:boundaries`' `core-imports-io` rule,
|
|
17
|
-
* which was @SCN-EPG-001's `io-import` arm until 3F-3437; and 3F-2841's pattern: a project-owned
|
|
18
|
-
* term arrives as an input).
|
|
19
|
-
*
|
|
20
|
-
* DEFENSIVE THROUGHOUT, AND THAT IS THE FAMILY'S STANCE RATHER THAN LOCAL CHOICES PER RESOLVER.
|
|
21
|
-
* Config is data from outside: a missing, non-object or array-shaped value resolves EMPTY, and a
|
|
22
|
-
* malformed entry is dropped by the reading function it is handed to rather than thrown. A check
|
|
23
|
-
* that throws on a typo produces no verdict at all.
|
|
24
|
-
*/
|
|
25
|
-
import { type FitnessCheckIndex } from "../domain/fitnessChecks.js";
|
|
26
|
-
/**
|
|
27
|
-
* The steps the TARGET names NON-CHECKS (@SCN-USG-015, 3F-3343) — `specController.notChecks`, read
|
|
28
|
-
* as the fully-qualified `<workflow file>:<job id>:<step name>` entries the target wrote.
|
|
29
|
-
*
|
|
30
|
-
* IT IS THE CONSUMER'S OWN LIST, and that is the whole reason it may exist at all. Not everything
|
|
31
|
-
* that is not a behavioural runner is a fitness check — a checkout, a dependency install, a deploy
|
|
32
|
-
* — and this axis's standing rule is that a list of check NAMES is the drift. A list of the
|
|
33
|
-
* consumer's own STEPS is the opposite thing: it is about their pipeline, it is written once, and
|
|
34
|
-
* nothing in this tree has an opinion about what is on it.
|
|
35
|
-
*
|
|
36
|
-
* The seventh of this family's `specController.*` resolvers, and defensive like the six above it:
|
|
37
|
-
* a missing or non-array value resolves EMPTY and a non-string entry is dropped rather than
|
|
38
|
-
* thrown. Deduplicated, as the configured-static-check list beside it is, so a target that wrote
|
|
39
|
-
* one line twice is reported one line — the account below is per ENTRY, and the same entry twice
|
|
40
|
-
* is one thing the consumer said.
|
|
41
|
-
*
|
|
42
|
-
* WHAT AN ENTRY MEANS IS NOT DECIDED HERE. This reader takes the list off the manifest; matching it
|
|
43
|
-
* against a pipeline, and saying which entries matched nothing, is `parse/stepExclusions`.
|
|
44
|
-
*/
|
|
1
|
+
import type { WrongKindEntry } from "../domain/evidenceReconciliation.js";
|
|
45
2
|
export declare function resolveNotChecks(packageJson: {
|
|
46
3
|
specController?: {
|
|
47
4
|
notChecks?: unknown;
|
|
48
5
|
};
|
|
49
6
|
}): readonly string[];
|
|
50
|
-
/**
|
|
51
|
-
* Resolve the recognised deferral-tag set for the target (@SCN-PND-021) — the app's single-sourced
|
|
52
|
-
* starter set EXTENDED by the target `package.json`'s `specController.deferralTags`. Config
|
|
53
|
-
* EXTENDS, never replaces: a project cannot un-recognise a built-in (`@wip` always defers).
|
|
54
|
-
* Configured tags are bare names, `@`-stripped, consistent with the starter set; non-string /
|
|
55
|
-
* non-array config is ignored defensively. `parseScenarios` then takes the union as its injected
|
|
56
|
-
* `deferralTags` param.
|
|
57
|
-
*
|
|
58
|
-
* THE STARTER SET ARRIVES AS AN ARGUMENT AND IS NOT THE ENGINE'S TO HOLD (3F-3087). Which
|
|
59
|
-
* community tags defer is product policy — an evolvable list of strings the application layer
|
|
60
|
-
* single-sources as `DEFAULT_DEFERRAL_TAGS` — and a core-held copy would be a second statement of
|
|
61
|
-
* it. So the union is computed here, where the config read is, and the policy is handed in.
|
|
62
|
-
*/
|
|
63
7
|
export declare function resolveDeferralTags(packageJson: {
|
|
64
8
|
specController?: {
|
|
65
9
|
deferralTags?: unknown;
|
|
66
10
|
};
|
|
67
|
-
},
|
|
68
|
-
/** The application layer's starter set — the built-ins a target's config may only extend. */
|
|
69
|
-
starterTags: readonly string[]): readonly string[];
|
|
70
|
-
/**
|
|
71
|
-
* The TARGET's CONFIGURED FITNESS ROWS (@SCN-LNT-018) — `specController.fitnessChecks`, read as
|
|
72
|
-
* `@SCN → the characteristic that scenario asserts` through the engine's own `fitnessChecksOf`.
|
|
73
|
-
*
|
|
74
|
-
* THE DEBIT SIDE OF A CONVERTED CHECK. A converted scenario carries `@fitness` and nothing about
|
|
75
|
-
* its subject, so the characteristic it owes comes from here — and from the row whose `scn` is that
|
|
76
|
-
* scenario's own, which is what removes the registry hop an unconverted static check needs.
|
|
77
|
-
*
|
|
78
|
-
* IT IS THE TARGET'S, for the reason the check registry and the ceilings are (@SCN-LNT-005): a
|
|
79
|
-
* characteristic means what the target says it means, and a row resolved from this tool's own
|
|
80
|
-
* manifest would put an obligation on a target's books under a word it never wrote.
|
|
81
|
-
*
|
|
82
|
-
* The fifth of this family's `specController.*` resolvers, and defensive like the four above it: a
|
|
83
|
-
* missing or wrongly-shaped config resolves EMPTY, and a malformed row is dropped by
|
|
84
|
-
* `fitnessChecksOf` rather than thrown. There is no starter set: a target that has converted
|
|
85
|
-
* nothing owes nothing on this route, which is what keeps the reading inert on an unswept corpus.
|
|
86
|
-
*/
|
|
87
|
-
export declare function resolveFitnessChecks(packageJson: {
|
|
88
|
-
specController?: {
|
|
89
|
-
fitnessChecks?: unknown;
|
|
90
|
-
};
|
|
91
|
-
}): FitnessCheckIndex;
|
|
92
|
-
/**
|
|
93
|
-
* WHAT A TARGET'S RUNNER BLOCK YIELDED — the entries keyed by a canon tier, and the keys that are
|
|
94
|
-
* not one (@SCN-USG-019).
|
|
95
|
-
*
|
|
96
|
-
* TWO HALVES RATHER THAN ONE RECORD, because the two are used for opposite things and neither may
|
|
97
|
-
* be reached for the other. `tiers` is what a recognition can be run against; `unrecognisedKeys` is
|
|
98
|
-
* what the report has to SAY, and it recognises nothing by construction — there is no tier for it
|
|
99
|
-
* to be the runner of. Returning one record and filtering downstream would leave every caller free
|
|
100
|
-
* to honour a key the block's closure rules out, which is the fault this partition forecloses.
|
|
101
|
-
*/
|
|
11
|
+
}, starterTags: readonly string[]): readonly string[];
|
|
102
12
|
export interface ResolvedRunners {
|
|
103
|
-
/** The runner named for each canon tier the block names one for — `null` where it says it has none. */
|
|
104
13
|
readonly tiers: Readonly<Record<string, string | null>>;
|
|
105
|
-
/** The block's keys that are not one of the four canon tiers, in the order the manifest wrote them. */
|
|
106
14
|
readonly unrecognisedKeys: readonly string[];
|
|
107
15
|
}
|
|
108
|
-
/**
|
|
109
|
-
* The TARGET's BEHAVIOURAL RUNNERS (@SCN-USG-011, 3F-3343) — `specController.runners`, read as
|
|
110
|
-
* `tier → the name of the binary that tier's suite runs under`.
|
|
111
|
-
*
|
|
112
|
-
* THE SMALL CLOSED THING, NAMED, so the open one can be inferred. The set of names a quality check
|
|
113
|
-
* might go by is unbounded and belongs to the consumer; the set of behavioural runners is one per
|
|
114
|
-
* tier tag and the tiers are canon. Naming the closed set and deriving the rest is the move the
|
|
115
|
-
* `@fitness` collapse already made one level in (3F-3139), and it cannot go stale by omission.
|
|
116
|
-
*
|
|
117
|
-
* IT IS THE TARGET'S, for the reason the check registry and the ceilings are (@SCN-LNT-005): which
|
|
118
|
-
* command runs a repository's unit suite is a fact about that repository, and a runner resolved
|
|
119
|
-
* from this tool's own manifest would answer for a pipeline this run never looked at.
|
|
120
|
-
*
|
|
121
|
-
* The sixth of this family's `specController.*` resolvers, and defensive like the five above it: a
|
|
122
|
-
* missing, non-object or array-shaped config resolves EMPTY, and an entry whose value is neither a
|
|
123
|
-
* runner's NAME nor `null` is dropped rather than thrown. A manifest naming no runners is not an
|
|
124
|
-
* error — it is a `new-client`, which is the state this axis is sold on.
|
|
125
|
-
*
|
|
126
|
-
* A NULL IS KEPT, AND IT IS THE THIRD STATE (@SCN-USG-016, 3F-3343). `"performance": null` is
|
|
127
|
-
* something the target SAID — we have no performance suite — and a tier the block omits is
|
|
128
|
-
* something it never said. Dropping the null folds the first into the second and loses a fact we
|
|
129
|
-
* were given, in the one direction nothing downstream can recover: after the fold, silence and a
|
|
130
|
-
* stated absence are indistinguishable. Nothing else in this reader's contract moves — a null
|
|
131
|
-
* recognises no step, exactly as a missing key recognises none — so the ONLY place the two can be
|
|
132
|
-
* told apart is this return value and the report rendered off it.
|
|
133
|
-
*
|
|
134
|
-
* THE KEY SET IS CLOSED, AND THE PARTITION IS THIS READER'S (@SCN-USG-019, 3F-3343). The block is
|
|
135
|
-
* keyed by TIER and the tiers are canon, which is exactly what makes the whole inversion possible:
|
|
136
|
-
* the closed set is named because it is enumerable, and the open one is inferred from what is left.
|
|
137
|
-
* A key outside the four is therefore not a runner for anything, and both obvious answers to it are
|
|
138
|
-
* wrong. HONOURING it is the smuggling the closure forbids — `"lint": "eslint"` is a consumer taking
|
|
139
|
-
* their own checks out of discovery one key at a time, and it reinstates the silence this axis
|
|
140
|
-
* exists to remove. DROPPING it silently is the same class of fault one layer along: the consumer
|
|
141
|
-
* wrote something, believes it took effect, and has no line anywhere to correct it from. So the key
|
|
142
|
-
* is partitioned out of the runners AND handed back to be named, and the run is not aborted over it.
|
|
143
|
-
*
|
|
144
|
-
* THE FOUR TIERS ARE READ, NEVER RESTATED. `RUNTIME_QUALITY_CHECKS` is the ledger's own enumeration
|
|
145
|
-
* of the runtime tiers; a second copy here would agree with it by coincidence, and a list of names
|
|
146
|
-
* is the drift this ticket is about.
|
|
147
|
-
*
|
|
148
|
-
* THE PARTITION IS ON THE KEY AND THE DEFENSIVE DROP IS ON THE VALUE, and the two are different
|
|
149
|
-
* questions kept apart. A canon tier whose value is neither a runner's NAME nor `null` is malformed
|
|
150
|
-
* config and is dropped, which is this family's stance about data from outside. A key that is not a
|
|
151
|
-
* tier at all is not malformed — there is no tier for any value of it to name a runner for — so its
|
|
152
|
-
* value is beside the point and the key is the fact worth reporting, whatever it was set to.
|
|
153
|
-
*/
|
|
154
16
|
export declare function resolveRunners(packageJson: {
|
|
155
17
|
specController?: {
|
|
156
18
|
runners?: unknown;
|
|
157
19
|
};
|
|
158
20
|
}): ResolvedRunners;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
export declare function
|
|
21
|
+
export interface ConfigurationNotRead {
|
|
22
|
+
readonly wrongKinds: readonly WrongKindEntry[];
|
|
23
|
+
readonly unknownKeys: readonly string[];
|
|
24
|
+
}
|
|
25
|
+
export declare function configurationNotRead(packageJson: {
|
|
164
26
|
specController?: unknown;
|
|
165
|
-
}):
|
|
27
|
+
}): ConfigurationNotRead;
|
|
166
28
|
//# sourceMappingURL=targetManifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"targetManifest.d.ts","sourceRoot":"","sources":["../../src/parse/targetManifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"targetManifest.d.ts","sourceRoot":"","sources":["../../src/parse/targetManifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAa1E,wBAAgB,gBAAgB,CAAC,WAAW,EAAE;IAC5C,cAAc,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC1C,GAAG,SAAS,MAAM,EAAE,CAIpB;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE;IACX,cAAc,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC7C,EACD,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,SAAS,MAAM,EAAE,CASnB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE;IAC1C,cAAc,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACxC,GAAG,eAAe,CAWlB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAiCD,wBAAgB,oBAAoB,CAAC,WAAW,EAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,oBAAoB,CAUpG"}
|
|
@@ -1,227 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The TARGET's `specController.*` configuration, read into the rows and mints the
|
|
3
|
-
* reconciler takes — the `resolve*` family, moved here from the app's ingest edge (3F-3087).
|
|
4
|
-
*
|
|
5
|
-
* WHY THEY LIVE IN THE ENGINE. Every one of them is a pure function of a manifest object
|
|
6
|
-
* somebody else already read off disk, and every one of them is the ONE reading of the key it
|
|
7
|
-
* names — `fitnessChecksOf` and `bareTerm` are both core's, so the reader and the
|
|
8
|
-
* thing it reads through belonged on the same side of the package boundary. Sitting at the app
|
|
9
|
-
* edge they were the reason a PUBLISHED module imported core's unpublished `/internal` subpath,
|
|
10
|
-
* which is the fault 3F-3086 repairs; nothing about reading a parsed manifest ever needed the
|
|
11
|
-
* edge that produced it.
|
|
12
|
-
*
|
|
13
|
-
* WHAT THE EDGE STILL OWES THEM, AND WHY IT IS A PARAMETER. One of these readings depends on
|
|
14
|
-
* something the engine must not know: the deferral-tag STARTER SET is product policy the
|
|
15
|
-
* application layer single-sources (`DEFAULT_DEFERRAL_TAGS`). It arrives as an argument, as data,
|
|
16
|
-
* so the engine keeps knowing nothing about files (`lint:boundaries`' `core-imports-io` rule,
|
|
17
|
-
* which was @SCN-EPG-001's `io-import` arm until 3F-3437; and 3F-2841's pattern: a project-owned
|
|
18
|
-
* term arrives as an input).
|
|
19
|
-
*
|
|
20
|
-
* DEFENSIVE THROUGHOUT, AND THAT IS THE FAMILY'S STANCE RATHER THAN LOCAL CHOICES PER RESOLVER.
|
|
21
|
-
* Config is data from outside: a missing, non-object or array-shaped value resolves EMPTY, and a
|
|
22
|
-
* malformed entry is dropped by the reading function it is handed to rather than thrown. A check
|
|
23
|
-
* that throws on a typo produces no verdict at all.
|
|
24
|
-
*/
|
|
25
1
|
import { bareTerm } from "../lib/bareTerm.js";
|
|
26
|
-
import { fitnessChecksOf } from "../domain/fitnessChecks.js";
|
|
27
|
-
// THE FOUR CANON TIERS, read from the ledger's own enumeration rather than restated here
|
|
28
|
-
// (@SCN-USG-019). A second list of the same four would agree by coincidence, and this axis's
|
|
29
|
-
// whole argument is that a list of names is the drift.
|
|
30
2
|
import { RUNTIME_QUALITY_CHECKS } from "../domain/ledger.js";
|
|
31
|
-
|
|
3
|
+
import { CORE_MESSAGES, CoreMessage } from "../domain/messages.js";
|
|
32
4
|
function isBlock(value) {
|
|
33
5
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34
6
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* IT IS THE CONSUMER'S OWN LIST, and that is the whole reason it may exist at all. Not everything
|
|
40
|
-
* that is not a behavioural runner is a fitness check — a checkout, a dependency install, a deploy
|
|
41
|
-
* — and this axis's standing rule is that a list of check NAMES is the drift. A list of the
|
|
42
|
-
* consumer's own STEPS is the opposite thing: it is about their pipeline, it is written once, and
|
|
43
|
-
* nothing in this tree has an opinion about what is on it.
|
|
44
|
-
*
|
|
45
|
-
* The seventh of this family's `specController.*` resolvers, and defensive like the six above it:
|
|
46
|
-
* a missing or non-array value resolves EMPTY and a non-string entry is dropped rather than
|
|
47
|
-
* thrown. Deduplicated, as the configured-static-check list beside it is, so a target that wrote
|
|
48
|
-
* one line twice is reported one line — the account below is per ENTRY, and the same entry twice
|
|
49
|
-
* is one thing the consumer said.
|
|
50
|
-
*
|
|
51
|
-
* WHAT AN ENTRY MEANS IS NOT DECIDED HERE. This reader takes the list off the manifest; matching it
|
|
52
|
-
* against a pipeline, and saying which entries matched nothing, is `parse/stepExclusions`.
|
|
53
|
-
*/
|
|
7
|
+
const isTier = (key) => RUNTIME_QUALITY_CHECKS.includes(key);
|
|
8
|
+
const isRunner = (value) => typeof value === "string" || value === null;
|
|
9
|
+
const isListEntry = (value) => typeof value === "string";
|
|
54
10
|
export function resolveNotChecks(packageJson) {
|
|
55
11
|
const configured = packageJson.specController?.notChecks;
|
|
56
12
|
if (!Array.isArray(configured))
|
|
57
13
|
return [];
|
|
58
|
-
return [...new Set(configured.filter(
|
|
14
|
+
return [...new Set(configured.filter(isListEntry))];
|
|
59
15
|
}
|
|
60
|
-
|
|
61
|
-
* Resolve the recognised deferral-tag set for the target (@SCN-PND-021) — the app's single-sourced
|
|
62
|
-
* starter set EXTENDED by the target `package.json`'s `specController.deferralTags`. Config
|
|
63
|
-
* EXTENDS, never replaces: a project cannot un-recognise a built-in (`@wip` always defers).
|
|
64
|
-
* Configured tags are bare names, `@`-stripped, consistent with the starter set; non-string /
|
|
65
|
-
* non-array config is ignored defensively. `parseScenarios` then takes the union as its injected
|
|
66
|
-
* `deferralTags` param.
|
|
67
|
-
*
|
|
68
|
-
* THE STARTER SET ARRIVES AS AN ARGUMENT AND IS NOT THE ENGINE'S TO HOLD (3F-3087). Which
|
|
69
|
-
* community tags defer is product policy — an evolvable list of strings the application layer
|
|
70
|
-
* single-sources as `DEFAULT_DEFERRAL_TAGS` — and a core-held copy would be a second statement of
|
|
71
|
-
* it. So the union is computed here, where the config read is, and the policy is handed in.
|
|
72
|
-
*/
|
|
73
|
-
export function resolveDeferralTags(packageJson,
|
|
74
|
-
/** The application layer's starter set — the built-ins a target's config may only extend. */
|
|
75
|
-
starterTags) {
|
|
16
|
+
export function resolveDeferralTags(packageJson, starterTags) {
|
|
76
17
|
const configured = packageJson.specController?.deferralTags;
|
|
77
18
|
const extras = Array.isArray(configured)
|
|
78
19
|
? configured
|
|
79
|
-
.filter(
|
|
80
|
-
// Through the ONE reading of what a term bare is (@SCN-TRM-001). This port had no trim at
|
|
81
|
-
// all, so `"@wip "` failed as well as `" @wip"`, and a term that is nothing but
|
|
82
|
-
// whitespace and a sigil is dropped here as an empty one already is.
|
|
20
|
+
.filter(isListEntry)
|
|
83
21
|
.map(bareTerm)
|
|
84
22
|
.filter((tag) => tag !== "")
|
|
85
23
|
: [];
|
|
86
|
-
// Union: the starter set FIRST (extends, never replaces — a project cannot un-recognise a
|
|
87
|
-
// built-in), then the configured extras; de-duplicated to keep the set clean.
|
|
88
24
|
return [...new Set([...starterTags, ...extras])];
|
|
89
25
|
}
|
|
90
|
-
/**
|
|
91
|
-
* The TARGET's CONFIGURED FITNESS ROWS (@SCN-LNT-018) — `specController.fitnessChecks`, read as
|
|
92
|
-
* `@SCN → the characteristic that scenario asserts` through the engine's own `fitnessChecksOf`.
|
|
93
|
-
*
|
|
94
|
-
* THE DEBIT SIDE OF A CONVERTED CHECK. A converted scenario carries `@fitness` and nothing about
|
|
95
|
-
* its subject, so the characteristic it owes comes from here — and from the row whose `scn` is that
|
|
96
|
-
* scenario's own, which is what removes the registry hop an unconverted static check needs.
|
|
97
|
-
*
|
|
98
|
-
* IT IS THE TARGET'S, for the reason the check registry and the ceilings are (@SCN-LNT-005): a
|
|
99
|
-
* characteristic means what the target says it means, and a row resolved from this tool's own
|
|
100
|
-
* manifest would put an obligation on a target's books under a word it never wrote.
|
|
101
|
-
*
|
|
102
|
-
* The fifth of this family's `specController.*` resolvers, and defensive like the four above it: a
|
|
103
|
-
* missing or wrongly-shaped config resolves EMPTY, and a malformed row is dropped by
|
|
104
|
-
* `fitnessChecksOf` rather than thrown. There is no starter set: a target that has converted
|
|
105
|
-
* nothing owes nothing on this route, which is what keeps the reading inert on an unswept corpus.
|
|
106
|
-
*/
|
|
107
|
-
export function resolveFitnessChecks(packageJson) {
|
|
108
|
-
return fitnessChecksOf(packageJson.specController?.fitnessChecks);
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* The TARGET's BEHAVIOURAL RUNNERS (@SCN-USG-011, 3F-3343) — `specController.runners`, read as
|
|
112
|
-
* `tier → the name of the binary that tier's suite runs under`.
|
|
113
|
-
*
|
|
114
|
-
* THE SMALL CLOSED THING, NAMED, so the open one can be inferred. The set of names a quality check
|
|
115
|
-
* might go by is unbounded and belongs to the consumer; the set of behavioural runners is one per
|
|
116
|
-
* tier tag and the tiers are canon. Naming the closed set and deriving the rest is the move the
|
|
117
|
-
* `@fitness` collapse already made one level in (3F-3139), and it cannot go stale by omission.
|
|
118
|
-
*
|
|
119
|
-
* IT IS THE TARGET'S, for the reason the check registry and the ceilings are (@SCN-LNT-005): which
|
|
120
|
-
* command runs a repository's unit suite is a fact about that repository, and a runner resolved
|
|
121
|
-
* from this tool's own manifest would answer for a pipeline this run never looked at.
|
|
122
|
-
*
|
|
123
|
-
* The sixth of this family's `specController.*` resolvers, and defensive like the five above it: a
|
|
124
|
-
* missing, non-object or array-shaped config resolves EMPTY, and an entry whose value is neither a
|
|
125
|
-
* runner's NAME nor `null` is dropped rather than thrown. A manifest naming no runners is not an
|
|
126
|
-
* error — it is a `new-client`, which is the state this axis is sold on.
|
|
127
|
-
*
|
|
128
|
-
* A NULL IS KEPT, AND IT IS THE THIRD STATE (@SCN-USG-016, 3F-3343). `"performance": null` is
|
|
129
|
-
* something the target SAID — we have no performance suite — and a tier the block omits is
|
|
130
|
-
* something it never said. Dropping the null folds the first into the second and loses a fact we
|
|
131
|
-
* were given, in the one direction nothing downstream can recover: after the fold, silence and a
|
|
132
|
-
* stated absence are indistinguishable. Nothing else in this reader's contract moves — a null
|
|
133
|
-
* recognises no step, exactly as a missing key recognises none — so the ONLY place the two can be
|
|
134
|
-
* told apart is this return value and the report rendered off it.
|
|
135
|
-
*
|
|
136
|
-
* THE KEY SET IS CLOSED, AND THE PARTITION IS THIS READER'S (@SCN-USG-019, 3F-3343). The block is
|
|
137
|
-
* keyed by TIER and the tiers are canon, which is exactly what makes the whole inversion possible:
|
|
138
|
-
* the closed set is named because it is enumerable, and the open one is inferred from what is left.
|
|
139
|
-
* A key outside the four is therefore not a runner for anything, and both obvious answers to it are
|
|
140
|
-
* wrong. HONOURING it is the smuggling the closure forbids — `"lint": "eslint"` is a consumer taking
|
|
141
|
-
* their own checks out of discovery one key at a time, and it reinstates the silence this axis
|
|
142
|
-
* exists to remove. DROPPING it silently is the same class of fault one layer along: the consumer
|
|
143
|
-
* wrote something, believes it took effect, and has no line anywhere to correct it from. So the key
|
|
144
|
-
* is partitioned out of the runners AND handed back to be named, and the run is not aborted over it.
|
|
145
|
-
*
|
|
146
|
-
* THE FOUR TIERS ARE READ, NEVER RESTATED. `RUNTIME_QUALITY_CHECKS` is the ledger's own enumeration
|
|
147
|
-
* of the runtime tiers; a second copy here would agree with it by coincidence, and a list of names
|
|
148
|
-
* is the drift this ticket is about.
|
|
149
|
-
*
|
|
150
|
-
* THE PARTITION IS ON THE KEY AND THE DEFENSIVE DROP IS ON THE VALUE, and the two are different
|
|
151
|
-
* questions kept apart. A canon tier whose value is neither a runner's NAME nor `null` is malformed
|
|
152
|
-
* config and is dropped, which is this family's stance about data from outside. A key that is not a
|
|
153
|
-
* tier at all is not malformed — there is no tier for any value of it to name a runner for — so its
|
|
154
|
-
* value is beside the point and the key is the fact worth reporting, whatever it was set to.
|
|
155
|
-
*/
|
|
156
26
|
export function resolveRunners(packageJson) {
|
|
157
27
|
const configured = packageJson.specController?.runners;
|
|
158
28
|
if (!isBlock(configured))
|
|
159
29
|
return { tiers: {}, unrecognisedKeys: [] };
|
|
160
|
-
const isTier = (key) => RUNTIME_QUALITY_CHECKS.includes(key);
|
|
161
30
|
return {
|
|
162
|
-
tiers: Object.fromEntries(Object.entries(configured).filter((entry) => isTier(entry[0]) && (
|
|
31
|
+
tiers: Object.fromEntries(Object.entries(configured).filter((entry) => isTier(entry[0]) && isRunner(entry[1]))),
|
|
163
32
|
unrecognisedKeys: Object.keys(configured).filter((key) => !isTier(key)),
|
|
164
33
|
};
|
|
165
34
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
* does what they think, with nothing on the report to correct it from — the same fault as a
|
|
175
|
-
* dropped step, reached from the retirement side rather than the discovery side.
|
|
176
|
-
*
|
|
177
|
-
* APPEND-ONLY, the family's own append-only key set (RUNTIME_QUALITY_CHECKS beside it). A key
|
|
178
|
-
* retires once and is never re-read; the set only grows as this reader retires more of them
|
|
179
|
-
* (`checkRegistry` first, 3F-3398; `staticChecks` second, 3F-3399 — the tiebreak
|
|
180
|
-
* `parse/runningStaticChecks.ts`'s `handleOf` used to settle among several invoked scripts,
|
|
181
|
-
* 3F-3396 deleted; `thresholds` third, 3F-3517 — the ceilings the measured axis held a scenario
|
|
182
|
-
* to, 3F-3516 deleted).
|
|
183
|
-
*
|
|
184
|
-
* DEFENSIVE LIKE THE READERS ABOVE IT: a missing or non-object `specController` names no
|
|
185
|
-
* retired key, never throws.
|
|
186
|
-
*/
|
|
187
|
-
const RETIRED_SPEC_CONTROLLER_KEYS = ["checkRegistry", "staticChecks", "thresholds"];
|
|
188
|
-
/**
|
|
189
|
-
* THE BAR A CONFIGURED ROW STILL CARRIES (@SCN-LNT-035) — the row-level keys this reader has
|
|
190
|
-
* retired, append-only like the top-level set above. Nothing reads a row's bar since 3F-3510: a
|
|
191
|
-
* row is credited by its own step's outcome, so a bar left on it holds the check to nothing. A
|
|
192
|
-
* `mutationGate` is a value of `atLeast`, so the key it sits under is what names it.
|
|
193
|
-
*
|
|
194
|
-
* NAMED WITH ITS ROW, `fitnessChecks[<@SCN>].<key>`, because a row-level key alone says nothing a
|
|
195
|
-
* consumer could find it by. A row stating no usable `@SCN` names no bar: the row reader drops it
|
|
196
|
-
* whole, and there is no handle to name its bar by.
|
|
197
|
-
*/
|
|
198
|
-
const RETIRED_ROW_KEYS = ["atLeast", "atMost"];
|
|
199
|
-
function retiredRowKeysOf(rows) {
|
|
200
|
-
if (!Array.isArray(rows))
|
|
201
|
-
return [];
|
|
202
|
-
return rows.flatMap((row) => {
|
|
203
|
-
if (!isBlock(row) || typeof row["scn"] !== "string")
|
|
204
|
-
return [];
|
|
205
|
-
const scnId = bareTerm(row["scn"]);
|
|
206
|
-
if (scnId === "")
|
|
207
|
-
return [];
|
|
208
|
-
return Object.keys(row)
|
|
209
|
-
.filter((key) => RETIRED_ROW_KEYS.includes(key))
|
|
210
|
-
.map((key) => `fitnessChecks[${scnId}].${key}`);
|
|
211
|
-
});
|
|
35
|
+
function kindOf(value) {
|
|
36
|
+
if (value === null)
|
|
37
|
+
return "null";
|
|
38
|
+
if (Array.isArray(value))
|
|
39
|
+
return CORE_MESSAGES[CoreMessage.ManifestKindList];
|
|
40
|
+
if (typeof value === "object")
|
|
41
|
+
return CORE_MESSAGES[CoreMessage.ManifestKindObject];
|
|
42
|
+
return CORE_MESSAGES[CoreMessage.ManifestKindOfType](typeof value);
|
|
212
43
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (!
|
|
220
|
-
return [];
|
|
221
|
-
return
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
44
|
+
const wrongKind = (entry, value, reads) => ({
|
|
45
|
+
entry,
|
|
46
|
+
is: kindOf(value),
|
|
47
|
+
reads,
|
|
48
|
+
});
|
|
49
|
+
function wrongKindsInList(value, at) {
|
|
50
|
+
if (!Array.isArray(value))
|
|
51
|
+
return [wrongKind(at, value, CORE_MESSAGES[CoreMessage.ManifestKindList])];
|
|
52
|
+
return value.flatMap((entry, i) => (isListEntry(entry) ? [] : [wrongKind(`${at}[${i}]`, entry, CORE_MESSAGES[CoreMessage.ManifestKindString])]));
|
|
53
|
+
}
|
|
54
|
+
function wrongKindsInRunners(value, at) {
|
|
55
|
+
if (!isBlock(value))
|
|
56
|
+
return [wrongKind(at, value, CORE_MESSAGES[CoreMessage.ManifestKindObject])];
|
|
57
|
+
return Object.entries(value)
|
|
58
|
+
.filter(([key, runner]) => isTier(key) && !isRunner(runner))
|
|
59
|
+
.map(([key, runner]) => wrongKind(`${at}.${key}`, runner, CORE_MESSAGES[CoreMessage.ManifestKindStringOrNull]));
|
|
60
|
+
}
|
|
61
|
+
const BLOCK_READS = {
|
|
62
|
+
runners: wrongKindsInRunners,
|
|
63
|
+
notChecks: wrongKindsInList,
|
|
64
|
+
deferralTags: wrongKindsInList,
|
|
65
|
+
};
|
|
66
|
+
export function configurationNotRead(packageJson) {
|
|
67
|
+
const block = packageJson.specController;
|
|
68
|
+
if (block === undefined)
|
|
69
|
+
return { wrongKinds: [], unknownKeys: [] };
|
|
70
|
+
if (!isBlock(block))
|
|
71
|
+
return { wrongKinds: [wrongKind("specController", block, CORE_MESSAGES[CoreMessage.ManifestKindObject])], unknownKeys: [] };
|
|
72
|
+
return {
|
|
73
|
+
unknownKeys: Object.keys(block).filter((key) => !Object.hasOwn(BLOCK_READS, key)),
|
|
74
|
+
wrongKinds: Object.entries(block).flatMap(([key, value]) => Object.hasOwn(BLOCK_READS, key) ? BLOCK_READS[key](value, `specController.${key}`) : []),
|
|
75
|
+
};
|
|
226
76
|
}
|
|
227
77
|
//# sourceMappingURL=targetManifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"targetManifest.js","sourceRoot":"","sources":["../../src/parse/targetManifest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"targetManifest.js","sourceRoot":"","sources":["../../src/parse/targetManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEnE,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,GAAW,EAAW,EAAE,CAAE,sBAA4C,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAErG,MAAM,QAAQ,GAAG,CAAC,KAAc,EAA0B,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AAE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,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACjF,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CACzD,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,CAAE,WAAW,CAAC,GAAG,CAAkD,CAAC,KAAK,EAAE,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAC1I;KACF,CAAC;AACJ,CAAC"}
|
package/dist/parse/vitest.d.ts
CHANGED
|
@@ -1,50 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `ingest/vitest` reader — one of the two named observed-evidence readers
|
|
3
|
-
* (the embryonic adapters, deliberately not a registry in v1). Reads Vitest's
|
|
4
|
-
* JSON reporter output and normalises each assertion that cites an @SCN id into
|
|
5
|
-
* an EvidenceObservation at the `unit` level.
|
|
6
|
-
*
|
|
7
|
-
* The level is supplied by the CALLER, not inferred: the caller states the level this Vitest
|
|
8
|
-
* source yields, and the reader stamps it — no Vitest⇒unit assumption baked into the parser. The
|
|
9
|
-
* JS-ecosystem default (unit) is set at the CLI edge.
|
|
10
|
-
*
|
|
11
|
-
* The @SCN id is the bracketed `[SCN-<FFF>-<NNN>]` token carried in the test's
|
|
12
|
-
* `describe`/`it` name (the bidirectional-link rule). The bracket is what makes it a
|
|
13
|
-
* citation and not a mention: this module's regex used to match any SCN-shaped token
|
|
14
|
-
* anywhere in the name, so fixture data and prose cross-references cited scenarios nobody
|
|
15
|
-
* meant to cite (@SCN-LDG-033, 3F-2368). The form now lives in `lib/scnCitation.ts`,
|
|
16
|
-
* shared with the scn-subissue gate's cite scan so one answer serves both readers.
|
|
17
|
-
*
|
|
18
|
-
* Vitest surfaces the assertion's OWN name as `assertionResults[].title` and its
|
|
19
|
-
* ANCESTOR PATH (describe → it) as `fullName`;
|
|
20
|
-
* the citation belongs to the assertion, so the reader reads the leaf's title FIRST and
|
|
21
|
-
* falls back to the ancestor path only when the leaf does not self-cite — most-specific-
|
|
22
|
-
* citation-wins (@SCN-LDG-016).
|
|
23
|
-
*
|
|
24
|
-
* The reader classifies THREE-WAY (@SCN-PND-015), uniform with the cucumber reader
|
|
25
|
-
* (@SCN-PND-013): a `passed` assertion → a `passed` observation (satisfied); a `failed`
|
|
26
|
-
* assertion → a `failed` observation (failing); an INCONCLUSIVE vitest status (`skipped`/`todo`,
|
|
27
|
-
* and any status ∉ {passed, failed}) → the assertion is DROPPED (no observation), so its
|
|
28
|
-
* obligation reconciles missing by absence — pending is never inferred from status. A skipped/todo
|
|
29
|
-
* unit test is a GAP, not a failure.
|
|
30
|
-
*
|
|
31
|
-
* Parent: @SCN-LDG-001 (the foundation seam; balanced path).
|
|
32
|
-
*/
|
|
33
1
|
import type { RuntimeQualityCheck, EvidenceObservation } from "../model.js";
|
|
34
|
-
/** The minimal shape of Vitest's JSON reporter output this reader depends on. */
|
|
35
2
|
export interface VitestJsonReport {
|
|
36
3
|
testResults?: Array<{
|
|
37
|
-
/** The test-file path — the locator for the evidenceObservations reconciliation. */
|
|
38
4
|
name?: string;
|
|
39
|
-
/**
|
|
40
|
-
* The FILE-level status (@SCN-LDG-017) — previously read and discarded. A file that failed to
|
|
41
|
-
* COLLECT reports `"failed"` here WITH a `message` and ZERO `assertionResults`: it errored
|
|
42
|
-
* before naming a test. That pair (failed + zero assertions) is the collection-failure
|
|
43
|
-
* signature the reader now emits as a `broken` observation. (A file whose tests merely FAILED
|
|
44
|
-
* also reports `"failed"` here — but it carries assertions, so it is not broken.)
|
|
45
|
-
*/
|
|
46
5
|
status?: string;
|
|
47
|
-
/** The FILE-level error message a collection failure reports (@SCN-LDG-017). */
|
|
48
6
|
message?: string;
|
|
49
7
|
assertionResults?: Array<{
|
|
50
8
|
fullName?: string;
|
|
@@ -53,23 +11,5 @@ export interface VitestJsonReport {
|
|
|
53
11
|
}>;
|
|
54
12
|
}>;
|
|
55
13
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Parse a Vitest JSON report into observed results at the CALLER-SUPPLIED level. One result per
|
|
58
|
-
* EMITTED assertion: those carrying an @SCN id cite that scenario; those with NO id emit a
|
|
59
|
-
* null-scnId credit (@SCN-LDG-007 — previously DROPPED). A null-scnId credit cites no scenario,
|
|
60
|
-
* so the reconciler folds it into the SUSPENSE row. Every result carries its test-file locator.
|
|
61
|
-
*
|
|
62
|
-
* THREE-WAY classification (@SCN-PND-015), uniform with the cucumber reader (@SCN-PND-013) —
|
|
63
|
-
* pending is NEVER inferred from status:
|
|
64
|
-
* - `passed` → a `passed` observation → satisfied.
|
|
65
|
-
* - `failed` → a `failed` observation → failing.
|
|
66
|
-
* - otherwise (`skipped`/`todo`, and any status ∉ {passed, failed}) → INCONCLUSIVE: an assertion
|
|
67
|
-
* that RAN but proved nothing. Emit NOTHING — the evidence obligation then finds no matching
|
|
68
|
-
* observation and reconciles missing BY ABSENCE.
|
|
69
|
-
* Treating any non-pass-non-fail status as inconclusive keeps the reader robust to vitest's status
|
|
70
|
-
* spelling (`skipped`/`todo`/`pending`). `EvidenceStatus` stays binary (no new status, no reconciler
|
|
71
|
-
* change): the DROP is what realises inconclusive→missing. The uncited (null-scnId) SUSPENSE credit
|
|
72
|
-
* is preserved for genuine passed/failed results — only inconclusive assertions are dropped.
|
|
73
|
-
*/
|
|
74
14
|
export declare function parseVitestEvidenceObservations(report: VitestJsonReport, qualityCheck: RuntimeQualityCheck, root?: string): EvidenceObservation[];
|
|
75
15
|
//# sourceMappingURL=vitest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../src/parse/vitest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../src/parse/vitest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAK5E,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,gBAAgB,CAAC,EAAE,KAAK,CAAC;YACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,mBAAmB,EACjC,IAAI,CAAC,EAAE,MAAM,GACZ,mBAAmB,EAAE,CA8BvB"}
|