@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,316 +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 { commandRuns } from "./commandRuns.js";
|
|
58
|
-
import { ciWorkflowSteps, commandInvokesScript, } from "./checkScriptsRunInCI.js";
|
|
59
|
-
/**
|
|
60
|
-
* WHICH TIERS' NAMED RUNNER THIS STEP RUNS — rule D asked of one step (@SCN-USG-011).
|
|
61
|
-
*
|
|
62
|
-
* ONE COMPARISON, TWO READERS. The recognition is REPORTED by `recognisedRunners` below and is
|
|
63
|
-
* ASKED by the membership rule above, and a second implementation of it would be a second chance
|
|
64
|
-
* for the report and the books to disagree about which step ran a runner — a step named as the
|
|
65
|
-
* unit runner in one section and posted as an uncited fitness check in another.
|
|
66
|
-
*
|
|
67
|
-
* A TIER THE TARGET SAYS HAS NONE FALLS OUT HERE (@SCN-USG-016), and falls out silently: there is
|
|
68
|
-
* no name for a whole-token match to be run against, so no step can be its runner. The statement
|
|
69
|
-
* itself is not lost — the resolver keeps it and the report says it — but this reader answers only
|
|
70
|
-
* "which named runner does this step run".
|
|
71
|
-
*/
|
|
72
|
-
function namedRunnersAt(step, scripts, runners) {
|
|
73
|
-
if (!("runs" in step))
|
|
74
|
-
return [];
|
|
75
|
-
const command = step.runs;
|
|
76
|
-
return Object.entries(runners).filter((entry) => entry[1] !== null && commandRuns(command, entry[1], scripts));
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* WHAT THIS CANDIDATE IS CALLED — the runnable handle a report row and a reconciling credit carry.
|
|
80
|
-
*
|
|
81
|
-
* THE SCRIPT IT INVOKES, WHERE IT INVOKES ONE (3F-3397). A handle is where-to-fix: the thing a
|
|
82
|
-
* consumer runs to reproduce the check, and the vocabulary the citation seam already speaks — the
|
|
83
|
-
* `citedScn` callback below resolves a run through the target's registry to a bare check tag, and
|
|
84
|
-
* a handle spelled the same way is what lets a report row and a reconciling credit name the same
|
|
85
|
-
* check. A step that reaches its check through the consumer's own manifest has that name
|
|
86
|
-
* available, so it is used.
|
|
87
|
-
*
|
|
88
|
-
* OTHERWISE THE STEP'S OWN IDENTITY, which is GitHub's (`checkScriptsRunInCI`) and therefore the
|
|
89
|
-
* string already in the consumer's run log. `pnpm exec eslint` and a bare `run: ruff` invoke no
|
|
90
|
-
* script of theirs and so have no handle to be named by; inventing one out of the command's shape
|
|
91
|
-
* would be a convention, which is the thing this rule exists without. Naming the step is the
|
|
92
|
-
* honest answer and the one a consumer can act on.
|
|
93
|
-
*
|
|
94
|
-
* AND AN ACTION STEP IS ALWAYS THAT SECOND CASE (@SCN-USG-013). A `uses:` step states no command
|
|
95
|
-
* at all, so there is nothing for the manifest hop to be asked about and no script of the
|
|
96
|
-
* consumer's to reach — its identity is the action reference GitHub displays for it, or the
|
|
97
|
-
* `name:` its author gave it. The branch is not a special case for actions: it is the same
|
|
98
|
-
* fallback a command invoking no script of theirs already takes, arrived at one step earlier.
|
|
99
|
-
*/
|
|
100
|
-
function handleOf(step, scripts) {
|
|
101
|
-
if (!("runs" in step))
|
|
102
|
-
return step.identity;
|
|
103
|
-
const invoked = Object.keys(scripts).filter((name) => commandInvokesScript(step.runs, name));
|
|
104
|
-
return invoked[0] ?? step.identity;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* IS THIS STEP A CANDIDATE FITNESS CHECK — the membership rule itself, asked of one step.
|
|
108
|
-
*
|
|
109
|
-
* ONE RULE, TWO READERS, for the reason `namedRunnersAt` above is one function. The observer below
|
|
110
|
-
* posts a check for every step this answers yes to, and the scope census (`parse/discoveryScope`,
|
|
111
|
-
* @SCN-USG-020) reports how many of each job's steps it answered yes to. A census re-deriving the
|
|
112
|
-
* rule for itself would be measuring its own arithmetic: it would go on agreeing with the report
|
|
113
|
-
* while disagreeing with the books beneath it, which is the one disagreement a reader of a scope
|
|
114
|
-
* section has no way to see.
|
|
115
|
-
*
|
|
116
|
-
* SAID BY SUBTRACTION, which is the inversion in one line (@SCN-USG-004). A step is a candidate
|
|
117
|
-
* unless something took it out of discovery entirely, or it runs a behavioural runner the target
|
|
118
|
-
* named. There is no third condition and nothing here reads a step's name.
|
|
119
|
-
*
|
|
120
|
-
* ASKED IN THAT ORDER. A step this reader is not looking at is not a step it decided against, so
|
|
121
|
-
* the exclusion is asked before anything is read off the step for the runner rule.
|
|
122
|
-
*/
|
|
123
|
-
export function isCandidateStep(step, packageJson, runners, isExcludedFromDiscovery) {
|
|
124
|
-
return !isExcludedFromDiscovery(step) && !runsNamedRunner(step, packageJson, runners);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* DOES THIS STEP RUN A RUNNER THE TARGET NAMED — rule D as a yes or no (@SCN-USG-011).
|
|
128
|
-
*
|
|
129
|
-
* THE SAME COMPARISON A THIRD TIME, AND STILL ONLY ONE OF THEM. The membership rule above asks it,
|
|
130
|
-
* the report's recognised-runner cut asks it, and the accounting identity (`parse/stepAccounting`,
|
|
131
|
-
* @SCN-USG-018) asks it to say which disposition a step got. A count that decided "is this a
|
|
132
|
-
* runner" out of its own reading of the rule could report every step accounted for while the books
|
|
133
|
-
* beneath it had posted one of them twice, or not at all — and a total that agrees with itself is
|
|
134
|
-
* exactly the reassurance the identity exists to refuse.
|
|
135
|
-
*
|
|
136
|
-
* WHICH TIERS IS THE OTHER QUESTION and is not this one. The report names the tier a step was
|
|
137
|
-
* recognised for, and one step can be two tiers' runner; a count of dispositions wants the step,
|
|
138
|
-
* once, whatever it was recognised as.
|
|
139
|
-
*/
|
|
140
|
-
export function runsNamedRunner(step, packageJson, runners) {
|
|
141
|
-
return namedRunnersAt(step, packageJson.scripts ?? {}, runners).length > 0;
|
|
142
|
-
}
|
|
143
|
-
export function runningStaticChecks(ciSources, packageJson,
|
|
144
|
-
// @SCN-USG-004 (3F-3343) — THE TARGET'S DECLARED BEHAVIOURAL RUNNERS, which is what decides
|
|
145
|
-
// membership now that nothing decides it by name. This argument replaces the observed prefix
|
|
146
|
-
// set that used to sit here, and the replacement is the inversion in one line: the tool no
|
|
147
|
-
// longer guesses at the open set of things a check might be called, it is told the closed set of
|
|
148
|
-
// things that are not checks — one command per canon tier, named once by the consumer.
|
|
149
|
-
//
|
|
150
|
-
// THE PARTITION, NOT THE WHOLE BLOCK (@SCN-USG-019). Only entries keyed by a canon tier reach
|
|
151
|
-
// rule D; a key outside the four is reported rather than honoured, and the caller resolves that
|
|
152
|
-
// (`resolveRunners`) so a consumer cannot take their own checks out of discovery one invented
|
|
153
|
-
// key at a time.
|
|
154
|
-
//
|
|
155
|
-
// AN EMPTY RECORD IS A REAL AND SUPPORTED STATE (@SCN-USG-017). A target that has named no
|
|
156
|
-
// runners has every step of its pipeline reported as a candidate, which is exactly the report
|
|
157
|
-
// `new-client` is sold on: a first run that says what your pipeline ran, out loud, before you
|
|
158
|
-
// have configured anything at all.
|
|
159
|
-
runners,
|
|
160
|
-
// @SCN-LNT-001 (3F-2568) — THE OBSERVER STAMPS THE CITATION. Citation-routing inverts what
|
|
161
|
-
// name-match relied on: the DEBIT used to cite, so a run never had to know which scenario it
|
|
162
|
-
// belonged to. Now the CREDIT cites, and the only moment a run and the corpus are both in hand
|
|
163
|
-
// is the moment the run is observed — so the `@SCN` is stamped here rather than recovered
|
|
164
|
-
// downstream from the handle, which is the lookup name-match already proved cannot be trusted.
|
|
165
|
-
//
|
|
166
|
-
// The seam arrives as a FUNCTION rather than as the registry and the corpus map, because what
|
|
167
|
-
// this reader needs is one answer per handle. Passing the two structures would put the
|
|
168
|
-
// composition (`citationOfScript`) inside an observer that has no business knowing a registry's
|
|
169
|
-
// shape — and where a registry is AUTHORED is still open (increment D).
|
|
170
|
-
//
|
|
171
|
-
// BOTH TERMS, not just the @SCN. The seam already resolves the bare check tag on its way to the
|
|
172
|
-
// scenario, and the observation needs it: the @SCN says which ROW the credit posts to, the tag
|
|
173
|
-
// says which OBLIGATION on that row it answers. A row carrying two bare check tags raises two
|
|
174
|
-
// fitness obligations and is cited by two runs, so the @SCN alone cannot tell their credits
|
|
175
|
-
// apart (@SCN-LNT-012). Resolved once at the seam rather than looked up again here, which would
|
|
176
|
-
// give this reader an opinion about a registry's shape.
|
|
177
|
-
//
|
|
178
|
-
// Defaults to citing NOTHING, so a target that has registered nothing observes exactly what it
|
|
179
|
-
// observed before. What such a target's credits then DO has changed: every one of them cites
|
|
180
|
-
// nothing, so every one posts to suspense and answers no obligation. No name-match remains to
|
|
181
|
-
// catch them (3F-2590 removed the posting arm; 3F-2625 the by-handle half in
|
|
182
|
-
// `domain/qualityCheckReconciliation`, which was still live for a prefix-less check whose handle
|
|
183
|
-
// and bare tag are the same word).
|
|
184
|
-
//
|
|
185
|
-
// IT IS ASKED ABOUT THE STEP AS WELL AS THE HANDLE (@SCN-LNT-031, 3F-3273). A consumer's own
|
|
186
|
-
// citation is written on the CI step, so a seam handed only the handle cannot see the one thing
|
|
187
|
-
// the consumer said — and the widening is what lets the citation come off the ROW that code
|
|
188
|
-
// names rather than out of the handle's spelling. The second argument is optional and every
|
|
189
|
-
// existing caller supplies a one-argument function, which JavaScript is free to keep passing two
|
|
190
|
-
// arguments to: the seams that resolve a handle go on answering exactly as they did.
|
|
191
|
-
citedScn = () => null,
|
|
192
|
-
// @SCN-USG-015 / @SCN-USG-014 (3F-3343) — WHETHER THIS STEP IS ONE THIS READER LOOKS AT, asked of
|
|
193
|
-
// every step before it is read for anything. Such a step carries no check into this observer, is
|
|
194
|
-
// not consulted for a check's enforcement, and cannot supply a citation: it is not a step this
|
|
195
|
-
// reader is looking at, which is a different thing from a step whose check it decided against.
|
|
196
|
-
//
|
|
197
|
-
// TWO FACTS, ONE ANSWER, AND THE COMPOSITION IS THE CALLER'S. The consumer named the step a
|
|
198
|
-
// non-check (`parse/stepExclusions`), or it is the reconciler itself (`parse/reconcilerSteps`) —
|
|
199
|
-
// by construction and by configuration, which the REPORT tells apart because a consumer needs to
|
|
200
|
-
// know which of them took a step out. This reader does not: what it needs is one answer per step,
|
|
201
|
-
// and asking it two questions would put the precedence between them in an observer that has no
|
|
202
|
-
// business holding it, in a second place, free to disagree with the account the report prints.
|
|
203
|
-
//
|
|
204
|
-
// A FUNCTION, and the exclusion seam's own module states why (`parse/stepExclusions`): taking
|
|
205
|
-
// the entry list instead would put the file-and-job qualification rule inside an observer with
|
|
206
|
-
// no business restating it.
|
|
207
|
-
//
|
|
208
|
-
// THE EXCLUSION IS ABOUT A STEP, NEVER ABOUT A SCRIPT. A check the consumer excluded at one step
|
|
209
|
-
// and still runs at another is a check their pipeline runs, and reading the entry as being about
|
|
210
|
-
// the script would delete it from the report on the strength of something they did not say.
|
|
211
|
-
//
|
|
212
|
-
// Trailing and optional: a target that names no non-checks observes exactly what it observed
|
|
213
|
-
// before, byte for byte.
|
|
214
|
-
isExcludedFromDiscovery = () => false) {
|
|
215
|
-
const scripts = packageJson.scripts ?? {};
|
|
216
|
-
// THE STEPS, NOT THEIR COMMANDS, AND THE WHOLE-PIPELINE WALK RATHER THAN ITS `run:` PROJECTION.
|
|
217
|
-
// `ciRunSteps` is that projection and was what this reader took until @SCN-USG-015; the wider
|
|
218
|
-
// reading is taken here because a step is taken out of discovery by its IDENTITY, the job it
|
|
219
|
-
// belongs to and — for the reconciler's dump — the expression its `env:` carries, and the
|
|
220
|
-
// projection drops all three. It is the SAME parse either way — the projection is built from
|
|
221
|
-
// this walk — so no second reading of the workflow enters.
|
|
222
|
-
//
|
|
223
|
-
// EVERY STEP, WHATEVER FORM IT TAKES (@SCN-USG-013). This filter read `run:` steps alone until
|
|
224
|
-
// now, and the narrowing was never principled: a quality check can be an ACTION — CodeQL's
|
|
225
|
-
// analyse step, a dependency review — so a rule discarding every `uses:` step drops real checks
|
|
226
|
-
// and drops them silently, which is the prefix rule arriving one layer along in a parse
|
|
227
|
-
// limitation's clothes. It is also the shape a non-Node consumer arrives in: a pipeline whose
|
|
228
|
-
// static analysis is an action has no manifest script for it, and a `run:`-only reading hands
|
|
229
|
-
// them the same empty report the Node-shaped limit used to.
|
|
230
|
-
//
|
|
231
|
-
// NOTHING ELSE IN THIS READER NEEDED WIDENING, which is what says the narrowing was incidental.
|
|
232
|
-
// The runner rule already answers "no" for a step stating no command, the exclusion seam already
|
|
233
|
-
// takes a step of either form, and the handle already falls back to the step's own identity —
|
|
234
|
-
// so what is deleted here is a condition, not a case.
|
|
235
|
-
//
|
|
236
|
-
// THE RULE ITSELF IS `isCandidateStep` ABOVE, and it is a named function rather than this
|
|
237
|
-
// filter's body because the scope census asks it too (@SCN-USG-020). Two statements of "is this
|
|
238
|
-
// a candidate" would be free to disagree, and the report would then name a number of candidates
|
|
239
|
-
// per job that the books beneath it did not post.
|
|
240
|
-
const candidates = ciWorkflowSteps(ciSources).filter((step) => isCandidateStep(step, packageJson, runners, isExcludedFromDiscovery));
|
|
241
|
-
return candidates
|
|
242
|
-
.map((step) => {
|
|
243
|
-
const staticCheck = handleOf(step, scripts);
|
|
244
|
-
// AND THE SEAM IS ASKED WITH THE STEP (@SCN-LNT-031). Read as an INPUT to the citation and
|
|
245
|
-
// not only as a refinement of one: the code the consumer wrote on the step names the
|
|
246
|
-
// configured row, and that row is where the check tag a CI step cannot state comes from.
|
|
247
|
-
const citation = citedScn(staticCheck, step.id);
|
|
248
|
-
return {
|
|
249
|
-
qualityCheck: "lint",
|
|
250
|
-
staticCheck,
|
|
251
|
-
exists: true,
|
|
252
|
-
// WHETHER THE JOB'S VERDICT DEPENDS ON THIS STEP (@SCN-LNT-032), read off the step that
|
|
253
|
-
// ran it rather than folded across every step that runs the same script. A candidate IS a
|
|
254
|
-
// step now, so a check run twice — once severed, once not — is two observations with two
|
|
255
|
-
// honest answers, where the fold had to pick one and would have vouched for the severed
|
|
256
|
-
// one on the strength of its sibling.
|
|
257
|
-
enforcedOverRealSource: step.abortsJob,
|
|
258
|
-
// Spread rather than two `?? undefined` assignments, so an observation that cites nothing
|
|
259
|
-
// carries neither key and its JSON stays byte-identical. Both terms or neither — a
|
|
260
|
-
// half-citation would be a shape no reader knows how to read, and the bare check tag is
|
|
261
|
-
// the term a CI step CANNOT state: `id:` names the row, never the characteristic the
|
|
262
|
-
// ledger reconciles on. So a step's `id:` refines which row a citation posts to; it does
|
|
263
|
-
// not manufacture a citation where the seam reached no check tag at all — that target has
|
|
264
|
-
// registered nothing, which is `new-client`, and its observations belong in suspense.
|
|
265
|
-
...(citation !== null
|
|
266
|
-
? { scnId: step.id ?? citation.scnId, checkTag: citation.checkTag }
|
|
267
|
-
: {}),
|
|
268
|
-
};
|
|
269
|
-
})
|
|
270
|
-
// BY HANDLE, which is the order this observer has always emitted in and the order a reader of
|
|
271
|
-
// the report expects. Stable, so two steps sharing a handle stay in the order their pipeline
|
|
272
|
-
// runs them.
|
|
273
|
-
.sort((a, b) => a.staticCheck.localeCompare(b.staticCheck));
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* RULE D (@SCN-USG-011, 3F-3343) — the steps of a target's pipeline that run the behavioural
|
|
277
|
-
* runners its manifest named, each with the tier it was named for and the step it was found at.
|
|
278
|
-
*
|
|
279
|
-
* IT IS THE ACCOUNT, AND SINCE @SCN-USG-004 THE SAME COMPARISON IS ALSO THE VERDICT. This reader
|
|
280
|
-
* REPORTS which step ran which named runner; the membership rule above ASKS the same question of
|
|
281
|
-
* each step and takes a runner's step out of discovery. Both go through `namedRunnersAt`, so the
|
|
282
|
-
* report and the books cannot come to disagree — a step named here as the unit runner is the same
|
|
283
|
-
* step that is not on the books as a fitness check.
|
|
284
|
-
*
|
|
285
|
-
* AND BEING NAMED IS WHAT LETS THE RULE BE THIS SIMPLE. A step recognised as a runner leaves the
|
|
286
|
-
* reader NAMED rather than silent, so what the recognition gets wrong is visible in the report and
|
|
287
|
-
* correctable in one line of the consumer's own configuration — the safe direction, in the one
|
|
288
|
-
* place where the unsafe one would be invisible.
|
|
289
|
-
*
|
|
290
|
-
* `run:` STEPS ONLY, because the rule is about a COMMAND. A `uses:` step runs an action and states
|
|
291
|
-
* no command for a runner to be a token of; what such a step is instead is a question for the
|
|
292
|
-
* disposition rule, not for this one.
|
|
293
|
-
*
|
|
294
|
-
* ONE ENTRY PER TIER PER STEP. Two tiers sharing a runner is the ordinary case — `@integration` and
|
|
295
|
-
* `@e2e` are both `cucumber-js` in three portfolio repositories — and each tier is a separate thing
|
|
296
|
-
* the consumer said, so collapsing them would answer for a tier nobody asked about.
|
|
297
|
-
*
|
|
298
|
-
* A TIER THE TARGET SAYS HAS NONE FALLS OUT IN `namedRunnersAt` (@SCN-USG-016), and falls out
|
|
299
|
-
* silently, which is right: there is no name for a whole-token match to be run against, so no step
|
|
300
|
-
* can be its runner. The statement itself is not lost — the resolver keeps it, and the report says
|
|
301
|
-
* it — but this reader answers only "which step runs which named runner", and a null is not an
|
|
302
|
-
* answer to that.
|
|
303
|
-
*/
|
|
304
|
-
export function recognisedRunners(ciSources, packageJson, runners) {
|
|
305
|
-
const scripts = packageJson.scripts ?? {};
|
|
306
|
-
// THE WIDENED WALK, of which the observer above's `ciRunSteps` is the `run:`-only projection
|
|
307
|
-
// (3F-3352) — the SAME parse, so this reader and that one cannot come to disagree about which
|
|
308
|
-
// steps a workflow runs. It is read here for the step's IDENTITY, which is the string a consumer
|
|
309
|
-
// reads in their own run log and therefore the only useful way to name a step back to them.
|
|
310
|
-
return ciWorkflowSteps(ciSources).flatMap((step) => namedRunnersAt(step, scripts, runners).map(([tier, runner]) => ({
|
|
311
|
-
tier,
|
|
312
|
-
runner,
|
|
313
|
-
step: step.identity,
|
|
314
|
-
})));
|
|
315
|
-
}
|
|
316
|
-
//# sourceMappingURL=runningStaticChecks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runningStaticChecks.js","sourceRoot":"","sources":["../../src/parse/runningStaticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,oBAAoB,GAGrB,MAAM,0BAA0B,CAAC;AAIlC;;;;;;;;;;;;GAYG;AACH,SAAS,cAAc,CACrB,IAAoB,EACpB,OAAyC,EACzC,OAAgD;IAEhD,IAAI,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CACnC,CAAC,KAAK,EAA6B,EAAE,CACnC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAC/D,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAS,QAAQ,CAAC,IAAoB,EAAE,OAAyC;IAC/E,IAAI,CAAC,CAAC,M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AC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACjD,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9D,IAAI;QACJ,MAAM;QACN,IAAI,EAAE,IAAI,CAAC,QAAQ;KACpB,CAAC,CAAC,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE STATIC-CHECK CENSUS a run banked — the counts line under Summary views, and the corpus's
|
|
3
|
-
* half-converted checks beside it.
|
|
4
|
-
*
|
|
5
|
-
* Its own module rather than a section in `markdown.ts`, which sits at a `max-lines` exception —
|
|
6
|
-
* and an exception excuses existing debt, never headroom. Moved out whole at 3F-3353, when the
|
|
7
|
-
* behavioural-runner cut beside it needed the room; `runVerdict.ts` is the precedent, moved for
|
|
8
|
-
* exactly this reason. NOTHING about the section changed in the move: same emitter, same lines,
|
|
9
|
-
* same omit-when-absent.
|
|
10
|
-
*/
|
|
11
|
-
import type { RenderInput } from "../assemble/renderInput.js";
|
|
12
|
-
/**
|
|
13
|
-
* Static checks (@SCN-USG-001) — the STATIC-check evidence observation side under
|
|
14
|
-
* Summary views, the mirror of `### Test volume` on the runtime axis. Renders the counts line
|
|
15
|
-
* (`N static check(s) run, K uncited static check(s)`) alone — a pure counts summary, symmetric with
|
|
16
|
-
* `### Test volume` (2.4). The named count is implicit (`running − uncited`), so it
|
|
17
|
-
* is no longer printed. The per-guard member detail lives in the rows (named → each
|
|
18
|
-
* scenario's `@lint` sub-row; no-evidence-obligation → the suspense row's `cites-no-scenario` credit items), so
|
|
19
|
-
* no list renders here. Omitted only when no static-check census is threaded (the back-compat path).
|
|
20
|
-
* The counts read off the report's materialised `summary.staticChecks`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const staticChecksSection: (report: RenderInput) => string[];
|
|
23
|
-
//# sourceMappingURL=staticChecks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staticChecks.d.ts","sourceRoot":"","sources":["../../src/render/staticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AA+B9D;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,KAAG,MAAM,EAyB/D,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE STATIC-CHECK CENSUS a run banked — the counts line under Summary views, and the corpus's
|
|
3
|
-
* half-converted checks beside it.
|
|
4
|
-
*
|
|
5
|
-
* Its own module rather than a section in `markdown.ts`, which sits at a `max-lines` exception —
|
|
6
|
-
* and an exception excuses existing debt, never headroom. Moved out whole at 3F-3353, when the
|
|
7
|
-
* behavioural-runner cut beside it needed the room; `runVerdict.ts` is the precedent, moved for
|
|
8
|
-
* exactly this reason. NOTHING about the section changed in the move: same emitter, same lines,
|
|
9
|
-
* same omit-when-absent.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* A BAR A CONFIGURED ROW STILL CARRIES (@SCN-LNT-035), named `fitnessChecks[<@SCN>].<key>` by the
|
|
13
|
-
* resolver. Its line says something different from a retired top-level key's, because its
|
|
14
|
-
* consequence is different: the row still reaches the books, credited by its own step's outcome;
|
|
15
|
-
* only the number on it is unread.
|
|
16
|
-
*/
|
|
17
|
-
const isRowBar = (key) => key.startsWith("fitnessChecks[");
|
|
18
|
-
/**
|
|
19
|
-
* THE RETIRED-KEY ACCOUNT (@SCN-USG-021) — one line per `specController.*` key this reader has
|
|
20
|
-
* retired that the target's manifest still carries, naming the key and saying what became of it.
|
|
21
|
-
*
|
|
22
|
-
* THE LINE EXISTS BECAUSE THE ALTERNATIVE IS SILENCE, the same argument
|
|
23
|
-
* `behaviouralRunners.ts`'s `unrecognisedKeyAccount` makes for a key the target INVENTED: a
|
|
24
|
-
* consumer who wrote `checkRegistry` in good faith, when it was read, believes it still routes
|
|
25
|
-
* their checks. Nothing reads it now — the entries it names reach no candidate and resolve no
|
|
26
|
-
* citation — so the only remaining question is whether they get to find that out, and this is
|
|
27
|
-
* the answer.
|
|
28
|
-
*/
|
|
29
|
-
const retiredKeyAccount = (keys) => (keys ?? []).map((key) => `- specController.${key} — retired: ${isRowBar(key)
|
|
30
|
-
? "this reader no longer reads a row's bar, and the row is credited by its step's outcome."
|
|
31
|
-
: "this reader no longer reads it, and none of its entries reach the books."}`);
|
|
32
|
-
/**
|
|
33
|
-
* Static checks (@SCN-USG-001) — the STATIC-check evidence observation side under
|
|
34
|
-
* Summary views, the mirror of `### Test volume` on the runtime axis. Renders the counts line
|
|
35
|
-
* (`N static check(s) run, K uncited static check(s)`) alone — a pure counts summary, symmetric with
|
|
36
|
-
* `### Test volume` (2.4). The named count is implicit (`running − uncited`), so it
|
|
37
|
-
* is no longer printed. The per-guard member detail lives in the rows (named → each
|
|
38
|
-
* scenario's `@lint` sub-row; no-evidence-obligation → the suspense row's `cites-no-scenario` credit items), so
|
|
39
|
-
* no list renders here. Omitted only when no static-check census is threaded (the back-compat path).
|
|
40
|
-
* The counts read off the report's materialised `summary.staticChecks`.
|
|
41
|
-
*/
|
|
42
|
-
export const staticChecksSection = (report) => {
|
|
43
|
-
// THE HALF-CONVERTED CHECKS (@SCN-LNT-020) render HERE, under the same heading, because they are
|
|
44
|
-
// the same class of half-entry as an uncited static check — something the run saw and nothing
|
|
45
|
-
// owed — read off the other side of the books. FACTS ONLY, count and ids: the reader is told what
|
|
46
|
-
// the corpus said about itself and left with the one remedy there is, which is to write the row.
|
|
47
|
-
// OMIT-WHEN-EMPTY, so an unconverted corpus renders byte-identically to before.
|
|
48
|
-
const { staticChecks: counts, unconfiguredFitnessScenarios: halfConverted = [] } = report.summary;
|
|
49
|
-
if (!counts)
|
|
50
|
-
return [];
|
|
51
|
-
// THE RETIRED-KEY ACCOUNT (@SCN-USG-021) renders HERE, under the same heading, because a
|
|
52
|
-
// retired key is a fact about the STATIC axis: every key this reader has retired so far named
|
|
53
|
-
// a route onto this axis's books, never the runtime one. OMIT-WHEN-EMPTY, the same as every
|
|
54
|
-
// account beside it.
|
|
55
|
-
const retired = retiredKeyAccount(report.summary.retiredKeys);
|
|
56
|
-
// A pure counts summary off `summary.staticChecks` (2.4) — symmetric with the
|
|
57
|
-
// runtime `### Test volume` line. There is no census section: the per-guard DETAIL lives in
|
|
58
|
-
// the rows (named → each scenario's `@lint` sub-row; the no-evidence-obligation static-checks surface
|
|
59
|
-
// as `cites-no-scenario` credit items on the `(no scenario)` suspense row). Only the running
|
|
60
|
-
// volume + the uncited count render here; the named count is implicit.
|
|
61
|
-
return [
|
|
62
|
-
"### Static checks", "",
|
|
63
|
-
`${counts.runningStaticCheckCount} static check(s) run, ${counts.uncitedStaticCheckCount} uncited static check(s).`,
|
|
64
|
-
"",
|
|
65
|
-
...(halfConverted.length > 0 ? [`${halfConverted.length} @fitness scenario(s) no configured row names: ${halfConverted.join(", ")}.`, ""] : []),
|
|
66
|
-
...(retired.length > 0 ? [...retired, ""] : []),
|
|
67
|
-
];
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=staticChecks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staticChecks.js","sourceRoot":"","sources":["../../src/render/staticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAW,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAE5E;;;;;;;;;;GAUG;AACH,MAAM,iBAAiB,GAAG,CAAC,IAAmC,EAAY,EAAE,CAC1E,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CACd,CAAC,GAAG,EAAE,EAAE,CACN,oBAAoB,GAAG,eACrB,QAAQ,CAAC,GAAG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