@3f-consulting/spec-controller-core 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +1 -1
- package/dist/assemble/evidenceReconciliationFromSources.d.ts +8 -15
- package/dist/assemble/evidenceReconciliationFromSources.d.ts.map +1 -1
- package/dist/assemble/evidenceReconciliationFromSources.js +21 -24
- package/dist/assemble/evidenceReconciliationFromSources.js.map +1 -1
- package/dist/domain/checkCharacteristics.d.ts +24 -15
- package/dist/domain/checkCharacteristics.d.ts.map +1 -1
- package/dist/domain/checkCharacteristics.js +24 -15
- package/dist/domain/checkCharacteristics.js.map +1 -1
- package/dist/domain/evidenceReconciliation.d.ts +26 -2
- package/dist/domain/evidenceReconciliation.d.ts.map +1 -1
- package/dist/domain/evidenceReconciliation.js +164 -61
- package/dist/domain/evidenceReconciliation.js.map +1 -1
- package/dist/domain/fitnessChecks.d.ts +24 -35
- package/dist/domain/fitnessChecks.d.ts.map +1 -1
- package/dist/domain/fitnessChecks.js +3 -30
- package/dist/domain/fitnessChecks.js.map +1 -1
- package/dist/domain/journal.d.ts +13 -103
- package/dist/domain/journal.d.ts.map +1 -1
- package/dist/domain/journal.js +6 -19
- package/dist/domain/journal.js.map +1 -1
- package/dist/domain/ledger.d.ts.map +1 -1
- package/dist/domain/ledger.js +45 -34
- package/dist/domain/ledger.js.map +1 -1
- package/dist/domain/posting.d.ts.map +1 -1
- package/dist/domain/posting.js +4 -7
- package/dist/domain/posting.js.map +1 -1
- package/dist/domain/qualityCheckFaultMessages.d.ts +7 -2
- package/dist/domain/qualityCheckFaultMessages.d.ts.map +1 -1
- package/dist/domain/qualityCheckFaultMessages.js +7 -2
- package/dist/domain/qualityCheckFaultMessages.js.map +1 -1
- package/dist/domain/qualityCheckReconciliation.d.ts +23 -2
- package/dist/domain/qualityCheckReconciliation.d.ts.map +1 -1
- package/dist/domain/qualityCheckReconciliation.js +40 -105
- package/dist/domain/qualityCheckReconciliation.js.map +1 -1
- package/dist/domain/qualityCheckReconciliationFault.d.ts +3 -1
- package/dist/domain/qualityCheckReconciliationFault.d.ts.map +1 -1
- package/dist/domain/qualityCheckReconciliationFault.js +3 -1
- package/dist/domain/qualityCheckReconciliationFault.js.map +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +8 -15
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +37 -84
- package/dist/internal.js.map +1 -1
- package/dist/model.d.ts +3 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +3 -2
- package/dist/model.js.map +1 -1
- package/dist/parse/checkScriptsRunInCI.d.ts +8 -7
- package/dist/parse/checkScriptsRunInCI.d.ts.map +1 -1
- package/dist/parse/checkScriptsRunInCI.js +7 -6
- package/dist/parse/checkScriptsRunInCI.js.map +1 -1
- package/dist/parse/ciStepRecord.d.ts +5 -17
- package/dist/parse/ciStepRecord.d.ts.map +1 -1
- package/dist/parse/ciStepRecord.js +7 -27
- package/dist/parse/ciStepRecord.js.map +1 -1
- package/dist/parse/corpusCodeFaults.d.ts +4 -4
- package/dist/parse/corpusCodeFaults.js +4 -4
- package/dist/parse/corpusFaults.d.ts +26 -37
- package/dist/parse/corpusFaults.d.ts.map +1 -1
- package/dist/parse/corpusFaults.js +18 -33
- package/dist/parse/corpusFaults.js.map +1 -1
- package/dist/parse/corpusGrammarFaults.d.ts +11 -73
- package/dist/parse/corpusGrammarFaults.d.ts.map +1 -1
- package/dist/parse/corpusGrammarFaults.js +27 -58
- package/dist/parse/corpusGrammarFaults.js.map +1 -1
- package/dist/parse/runningStaticChecks.d.ts +3 -2
- package/dist/parse/runningStaticChecks.d.ts.map +1 -1
- package/dist/parse/runningStaticChecks.js +3 -2
- package/dist/parse/runningStaticChecks.js.map +1 -1
- package/dist/parse/scenarios.d.ts +28 -13
- package/dist/parse/scenarios.d.ts.map +1 -1
- package/dist/parse/scenarios.js +48 -86
- package/dist/parse/scenarios.js.map +1 -1
- package/dist/parse/targetCorpus.d.ts +21 -11
- package/dist/parse/targetCorpus.d.ts.map +1 -1
- package/dist/parse/targetCorpus.js +16 -19
- package/dist/parse/targetCorpus.js.map +1 -1
- package/dist/parse/targetManifest.d.ts +12 -86
- package/dist/parse/targetManifest.d.ts.map +1 -1
- package/dist/parse/targetManifest.js +49 -138
- package/dist/parse/targetManifest.js.map +1 -1
- package/dist/provenance/provenance.d.ts +8 -11
- package/dist/provenance/provenance.d.ts.map +1 -1
- package/dist/provenance/provenance.js +2 -3
- package/dist/provenance/provenance.js.map +1 -1
- package/dist/render/evidenceGrid.d.ts +45 -0
- package/dist/render/evidenceGrid.d.ts.map +1 -0
- package/dist/render/evidenceGrid.js +145 -0
- package/dist/render/evidenceGrid.js.map +1 -0
- package/dist/render/markdown.d.ts.map +1 -1
- package/dist/render/markdown.js +85 -190
- package/dist/render/markdown.js.map +1 -1
- package/dist/render/runVerdict.d.ts +3 -2
- package/dist/render/runVerdict.d.ts.map +1 -1
- package/dist/render/runVerdict.js +11 -4
- package/dist/render/runVerdict.js.map +1 -1
- package/dist/render/staticChecks.d.ts.map +1 -1
- package/dist/render/staticChecks.js +10 -1
- package/dist/render/staticChecks.js.map +1 -1
- package/package.json +1 -6
- package/dist/domain/thresholds.d.ts +0 -123
- package/dist/domain/thresholds.d.ts.map +0 -1
- package/dist/domain/thresholds.js +0 -185
- package/dist/domain/thresholds.js.map +0 -1
- package/dist/parse/checkStaticEvidenceObligations.d.ts +0 -32
- package/dist/parse/checkStaticEvidenceObligations.d.ts.map +0 -1
- package/dist/parse/checkStaticEvidenceObligations.js +0 -78
- package/dist/parse/checkStaticEvidenceObligations.js.map +0 -1
- package/dist/parse/corpusClaimFaults.d.ts +0 -104
- package/dist/parse/corpusClaimFaults.d.ts.map +0 -1
- package/dist/parse/corpusClaimFaults.js +0 -128
- package/dist/parse/corpusClaimFaults.js.map +0 -1
- package/dist/parse/measurements.d.ts +0 -47
- package/dist/parse/measurements.d.ts.map +0 -1
- package/dist/parse/measurements.js +0 -65
- package/dist/parse/measurements.js.map +0 -1
- package/dist/render/measuredItem.d.ts +0 -30
- package/dist/render/measuredItem.d.ts.map +0 -1
- package/dist/render/measuredItem.js +0 -43
- package/dist/render/measuredItem.js.map +0 -1
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE CLAIM RULE of `spec-controller tags` — how many checks ONE scenario may claim. Its siblings
|
|
3
|
-
* hold the other two questions: `corpusCodeFaults.ts` whether a feature code binds to one feature
|
|
4
|
-
* file, `corpusGrammarFaults.ts` whether a tag means anything at all. `corpusFaults.ts` composes
|
|
5
|
-
* the three and is the only entry point any of them has.
|
|
6
|
-
*
|
|
7
|
-
* WHY IT IS NOT A GRAMMAR RULE, WHICH IS THE SEAM THIS MODULE IS DRAWN ON. The grammar arm asks
|
|
8
|
-
* *does this word mean something here*, and answers it one tag at a time against a set. This asks
|
|
9
|
-
* *does this scenario claim too many of the words that do* — a different question, over the same
|
|
10
|
-
* set, whose verdict belongs to the SCENARIO rather than to any tag on it. A grammar rule that
|
|
11
|
-
* redded a legitimate word would be wrong; this one reds two legitimate words for being on one
|
|
12
|
-
* line. Two questions, two modules — and the joined module would have carried the grammar clauses
|
|
13
|
-
* past the 400-line `max-lines` ceiling, which canon answers with a split and never with an
|
|
14
|
-
* exception entry (@SCN-CPX-001).
|
|
15
|
-
*
|
|
16
|
-
* THE SET IS NOT ASSEMBLED HERE. `checkTagsOf` is the grammar module's, and it is imported rather
|
|
17
|
-
* than rebuilt: a rule counting a NARROWER set than the grammar admits would green a corpus
|
|
18
|
-
* claiming two checks by one of the words the grammar had just called legitimate, and a WIDER one
|
|
19
|
-
* would red a word no obligation is ever raised from. That is not a hypothetical — the floor and
|
|
20
|
-
* the obligation rule each assembled their own copy of this set, came to disagree about it, and
|
|
21
|
-
* cost a slice to bring back (3F-3126). One assembly, two questions asked over it.
|
|
22
|
-
*/
|
|
23
|
-
import type { CorpusFault, CorpusFile, TargetManifest } from "./corpusFaults.js";
|
|
24
|
-
import { type KillFloorReader } from "./targetManifest.js";
|
|
25
|
-
/**
|
|
26
|
-
* A scenario whose tags name more than one check (@SCN-STG-007).
|
|
27
|
-
*
|
|
28
|
-
* ONE CHECK PER FITNESS SCENARIO is canon (`fitness-functions.md`). @SCN-LNT-008 already enforces
|
|
29
|
-
* it from the CREDIT side — one run is not evidence for two scenarios, and the runner-up reads
|
|
30
|
-
* missing — but that arm only ever sees two scenarios reaching one check. The fault running the
|
|
31
|
-
* other way is invisible to it: two runs citing one scenario are two honest credits, and nothing
|
|
32
|
-
* about them says the corpus is wrong.
|
|
33
|
-
*
|
|
34
|
-
* AND THE LEDGER IS BLIND TO IT, MEASURED RATHER THAN ARGUED. A stepless scenario carrying two
|
|
35
|
-
* registered bare check tags, both handles wired in CI, reconciles BALANCED at exit 0 — two
|
|
36
|
-
* Evidence Obligations, two Evidence Observations, nothing out of balance and nothing pending.
|
|
37
|
-
* Every other assertion this command makes has some cell of a reconciliation that already names
|
|
38
|
-
* the fault; this one has none, in any cut, at any exit status. That measurement is the whole
|
|
39
|
-
* reason the rule ships rather than being left to the ledger beside it.
|
|
40
|
-
*
|
|
41
|
-
* IT DOES NOT MAKE THE MODEL'S SOUNDNESS OPTIONAL. A registry mapping two handles onto one check
|
|
42
|
-
* reaches the same collision with no corpus fault for this to see, which is why @SCN-LNT-012
|
|
43
|
-
* stamps each credit with its own bare tag as well. Mechanism and model, not one or the other;
|
|
44
|
-
* what this adds is that the collision becomes unconstructible from a feature file, at the moment
|
|
45
|
-
* the author is looking at it and the fix is one line.
|
|
46
|
-
*
|
|
47
|
-
* NOTHING ABOUT SHAPE (3F-3126). It first shipped asking only about a STEPLESS scenario, on the
|
|
48
|
-
* argument that a stepped row riding two check tags has a different fault — it names no tier — so
|
|
49
|
-
* telling it "two checks" would send the author to delete a tag when what they owe is a tier. That
|
|
50
|
-
* argument was downstream of the tier floor and true only while the floor redded such a row as
|
|
51
|
-
* tier-less; 3F-3133 stopped it doing that, and the shipped command carries no floor at all. Steps
|
|
52
|
-
* are a fact about how a row is written; the check tag is the claim about which axis it is on
|
|
53
|
-
* (3F-3115). A scenario carrying two check tags meant two scenarios however it was written.
|
|
54
|
-
*
|
|
55
|
-
* DISTINCT WORDS, NOT TAG OCCURRENCES, and this clause is new rather than moved. The walk here is
|
|
56
|
-
* `parseTaggedScenarios`, which inherits Feature- and Rule-level tags onto every scenario beneath
|
|
57
|
-
* exactly as cucumber does — so a check tag hoisted to a `Rule:` and repeated on one of its
|
|
58
|
-
* scenarios arrives TWICE in one tag list. Counting occurrences would red that scenario for
|
|
59
|
-
* claiming `@complexity` and `@complexity`, a finding whose own message reads as nonsense. The
|
|
60
|
-
* private check this rule replaced never met the case because it read a scenario's own tag block
|
|
61
|
-
* and nothing above it — which is precisely the second reading `parseTaggedScenarios` exists to
|
|
62
|
-
* end, arriving here as a fault of its own rather than as a missed one.
|
|
63
|
-
*
|
|
64
|
-
* BOTH TAGS NAMED, IN DOCUMENT ORDER. The author has to choose which scenario keeps which check,
|
|
65
|
-
* and a message naming one of them has already chosen for them; the order is the walk's own —
|
|
66
|
-
* a scenario's OWN tags first, then what it inherits — so the message reads like the line.
|
|
67
|
-
*
|
|
68
|
-
* AND THE REMEDY NAMES NO SHAPE (3F-3133). It read "Split it into one stepless scenario per
|
|
69
|
-
* check", which was sound only while the floor redded a stepped check-tagged row as tier-less: an
|
|
70
|
-
* author who split into two STEPPED rows would have been sent back by it. Both halves of the split
|
|
71
|
-
* are admissible however they are written, and an instruction to strip the steps would be this
|
|
72
|
-
* rule prescribing the very shape 3F-3097 exists to stop assuming.
|
|
73
|
-
*
|
|
74
|
-
* ASKED OF UNPARKED SCENARIOS ONLY (operator ruling, 3F-2655). This rule first shipped saying the
|
|
75
|
-
* opposite — that a parking tag defers what a scenario OWES and so has nothing to say about what
|
|
76
|
-
* it IS. Both readings agree the split is the same edit whenever it happens; they disagree about
|
|
77
|
-
* whether an author who has already said "not yet" should be made to do it now, and canon says no:
|
|
78
|
-
* parking is a SKIP-SIGNAL, and out of scope is not a place where some questions still get asked.
|
|
79
|
-
* The skip is not an ERASURE, which is a separate claim and a separate arm: unpark the scenario
|
|
80
|
-
* and the same two tags red again, unchanged.
|
|
81
|
-
*
|
|
82
|
-
* THE SCOPE IS A CLAUSE HERE, AND IT USED TO BE A POSITION. Inside the private check the rules
|
|
83
|
-
* shared one walk, so parking was enforced by where this rule sat in it — below the grammar
|
|
84
|
-
* question, above everything else — and the rule never had to know what parking was. Three rule
|
|
85
|
-
* functions over one corpus have no shared walk to be positioned in, so the clause is written out.
|
|
86
|
-
* What the position bought is unchanged and is now structural rather than remembered: the grammar
|
|
87
|
-
* arm has no parking clause AT ALL, so a parked scenario's tags are still read for well-formedness
|
|
88
|
-
* — parking defers what a scenario owes and what shape it must have, never whether its tags are
|
|
89
|
-
* spelled right, and the deferral set is the very thing that lets that arm recognise the parking
|
|
90
|
-
* tag. `@wip @untit` cannot go quiet.
|
|
91
|
-
*
|
|
92
|
-
* @param features the target's discovered feature files, read once at the edge.
|
|
93
|
-
* @param packageJson the TARGET's manifest, read HERE through the same resolvers the grammar arm
|
|
94
|
-
* reads it with — one reading of `specController.deferralTags` (@SCN-PND-021), and `checkTagsOf`
|
|
95
|
-
* for the three sources of what names a check.
|
|
96
|
-
* @param starterDeferralTags the APPLICATION layer's starter set, which a target's config may only
|
|
97
|
-
* extend and never replace. A parameter because it is product policy; a copy held in core would be
|
|
98
|
-
* a second statement of it.
|
|
99
|
-
* @param killFloor the reader over the TARGET's mutation records, threaded through to the
|
|
100
|
-
* threshold resolution inside `checkTagsOf` because a bar may name a gate rather than a figure
|
|
101
|
-
* (@SCN-MUT-012).
|
|
102
|
-
*/
|
|
103
|
-
export declare function multipleCheckTags(features: readonly CorpusFile[], packageJson: TargetManifest, starterDeferralTags: readonly string[], killFloor: KillFloorReader): CorpusFault[];
|
|
104
|
-
//# sourceMappingURL=corpusClaimFaults.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"corpusClaimFaults.d.ts","sourceRoot":"","sources":["../../src/parse/corpusClaimFaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGjF,OAAO,EAAE,KAAK,eAAe,EAAuB,MAAM,qBAAqB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,SAAS,UAAU,EAAE,EAC/B,WAAW,EAAE,cAAc,EAC3B,mBAAmB,EAAE,SAAS,MAAM,EAAE,EACtC,SAAS,EAAE,eAAe,GACzB,WAAW,EAAE,CAsBf"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE CLAIM RULE of `spec-controller tags` — how many checks ONE scenario may claim. Its siblings
|
|
3
|
-
* hold the other two questions: `corpusCodeFaults.ts` whether a feature code binds to one feature
|
|
4
|
-
* file, `corpusGrammarFaults.ts` whether a tag means anything at all. `corpusFaults.ts` composes
|
|
5
|
-
* the three and is the only entry point any of them has.
|
|
6
|
-
*
|
|
7
|
-
* WHY IT IS NOT A GRAMMAR RULE, WHICH IS THE SEAM THIS MODULE IS DRAWN ON. The grammar arm asks
|
|
8
|
-
* *does this word mean something here*, and answers it one tag at a time against a set. This asks
|
|
9
|
-
* *does this scenario claim too many of the words that do* — a different question, over the same
|
|
10
|
-
* set, whose verdict belongs to the SCENARIO rather than to any tag on it. A grammar rule that
|
|
11
|
-
* redded a legitimate word would be wrong; this one reds two legitimate words for being on one
|
|
12
|
-
* line. Two questions, two modules — and the joined module would have carried the grammar clauses
|
|
13
|
-
* past the 400-line `max-lines` ceiling, which canon answers with a split and never with an
|
|
14
|
-
* exception entry (@SCN-CPX-001).
|
|
15
|
-
*
|
|
16
|
-
* THE SET IS NOT ASSEMBLED HERE. `checkTagsOf` is the grammar module's, and it is imported rather
|
|
17
|
-
* than rebuilt: a rule counting a NARROWER set than the grammar admits would green a corpus
|
|
18
|
-
* claiming two checks by one of the words the grammar had just called legitimate, and a WIDER one
|
|
19
|
-
* would red a word no obligation is ever raised from. That is not a hypothetical — the floor and
|
|
20
|
-
* the obligation rule each assembled their own copy of this set, came to disagree about it, and
|
|
21
|
-
* cost a slice to bring back (3F-3126). One assembly, two questions asked over it.
|
|
22
|
-
*/
|
|
23
|
-
import { checkTagsOf } from "./corpusGrammarFaults.js";
|
|
24
|
-
import { parseTaggedScenarios } from "./scenarios.js";
|
|
25
|
-
import { resolveDeferralTags } from "./targetManifest.js";
|
|
26
|
-
/**
|
|
27
|
-
* A scenario whose tags name more than one check (@SCN-STG-007).
|
|
28
|
-
*
|
|
29
|
-
* ONE CHECK PER FITNESS SCENARIO is canon (`fitness-functions.md`). @SCN-LNT-008 already enforces
|
|
30
|
-
* it from the CREDIT side — one run is not evidence for two scenarios, and the runner-up reads
|
|
31
|
-
* missing — but that arm only ever sees two scenarios reaching one check. The fault running the
|
|
32
|
-
* other way is invisible to it: two runs citing one scenario are two honest credits, and nothing
|
|
33
|
-
* about them says the corpus is wrong.
|
|
34
|
-
*
|
|
35
|
-
* AND THE LEDGER IS BLIND TO IT, MEASURED RATHER THAN ARGUED. A stepless scenario carrying two
|
|
36
|
-
* registered bare check tags, both handles wired in CI, reconciles BALANCED at exit 0 — two
|
|
37
|
-
* Evidence Obligations, two Evidence Observations, nothing out of balance and nothing pending.
|
|
38
|
-
* Every other assertion this command makes has some cell of a reconciliation that already names
|
|
39
|
-
* the fault; this one has none, in any cut, at any exit status. That measurement is the whole
|
|
40
|
-
* reason the rule ships rather than being left to the ledger beside it.
|
|
41
|
-
*
|
|
42
|
-
* IT DOES NOT MAKE THE MODEL'S SOUNDNESS OPTIONAL. A registry mapping two handles onto one check
|
|
43
|
-
* reaches the same collision with no corpus fault for this to see, which is why @SCN-LNT-012
|
|
44
|
-
* stamps each credit with its own bare tag as well. Mechanism and model, not one or the other;
|
|
45
|
-
* what this adds is that the collision becomes unconstructible from a feature file, at the moment
|
|
46
|
-
* the author is looking at it and the fix is one line.
|
|
47
|
-
*
|
|
48
|
-
* NOTHING ABOUT SHAPE (3F-3126). It first shipped asking only about a STEPLESS scenario, on the
|
|
49
|
-
* argument that a stepped row riding two check tags has a different fault — it names no tier — so
|
|
50
|
-
* telling it "two checks" would send the author to delete a tag when what they owe is a tier. That
|
|
51
|
-
* argument was downstream of the tier floor and true only while the floor redded such a row as
|
|
52
|
-
* tier-less; 3F-3133 stopped it doing that, and the shipped command carries no floor at all. Steps
|
|
53
|
-
* are a fact about how a row is written; the check tag is the claim about which axis it is on
|
|
54
|
-
* (3F-3115). A scenario carrying two check tags meant two scenarios however it was written.
|
|
55
|
-
*
|
|
56
|
-
* DISTINCT WORDS, NOT TAG OCCURRENCES, and this clause is new rather than moved. The walk here is
|
|
57
|
-
* `parseTaggedScenarios`, which inherits Feature- and Rule-level tags onto every scenario beneath
|
|
58
|
-
* exactly as cucumber does — so a check tag hoisted to a `Rule:` and repeated on one of its
|
|
59
|
-
* scenarios arrives TWICE in one tag list. Counting occurrences would red that scenario for
|
|
60
|
-
* claiming `@complexity` and `@complexity`, a finding whose own message reads as nonsense. The
|
|
61
|
-
* private check this rule replaced never met the case because it read a scenario's own tag block
|
|
62
|
-
* and nothing above it — which is precisely the second reading `parseTaggedScenarios` exists to
|
|
63
|
-
* end, arriving here as a fault of its own rather than as a missed one.
|
|
64
|
-
*
|
|
65
|
-
* BOTH TAGS NAMED, IN DOCUMENT ORDER. The author has to choose which scenario keeps which check,
|
|
66
|
-
* and a message naming one of them has already chosen for them; the order is the walk's own —
|
|
67
|
-
* a scenario's OWN tags first, then what it inherits — so the message reads like the line.
|
|
68
|
-
*
|
|
69
|
-
* AND THE REMEDY NAMES NO SHAPE (3F-3133). It read "Split it into one stepless scenario per
|
|
70
|
-
* check", which was sound only while the floor redded a stepped check-tagged row as tier-less: an
|
|
71
|
-
* author who split into two STEPPED rows would have been sent back by it. Both halves of the split
|
|
72
|
-
* are admissible however they are written, and an instruction to strip the steps would be this
|
|
73
|
-
* rule prescribing the very shape 3F-3097 exists to stop assuming.
|
|
74
|
-
*
|
|
75
|
-
* ASKED OF UNPARKED SCENARIOS ONLY (operator ruling, 3F-2655). This rule first shipped saying the
|
|
76
|
-
* opposite — that a parking tag defers what a scenario OWES and so has nothing to say about what
|
|
77
|
-
* it IS. Both readings agree the split is the same edit whenever it happens; they disagree about
|
|
78
|
-
* whether an author who has already said "not yet" should be made to do it now, and canon says no:
|
|
79
|
-
* parking is a SKIP-SIGNAL, and out of scope is not a place where some questions still get asked.
|
|
80
|
-
* The skip is not an ERASURE, which is a separate claim and a separate arm: unpark the scenario
|
|
81
|
-
* and the same two tags red again, unchanged.
|
|
82
|
-
*
|
|
83
|
-
* THE SCOPE IS A CLAUSE HERE, AND IT USED TO BE A POSITION. Inside the private check the rules
|
|
84
|
-
* shared one walk, so parking was enforced by where this rule sat in it — below the grammar
|
|
85
|
-
* question, above everything else — and the rule never had to know what parking was. Three rule
|
|
86
|
-
* functions over one corpus have no shared walk to be positioned in, so the clause is written out.
|
|
87
|
-
* What the position bought is unchanged and is now structural rather than remembered: the grammar
|
|
88
|
-
* arm has no parking clause AT ALL, so a parked scenario's tags are still read for well-formedness
|
|
89
|
-
* — parking defers what a scenario owes and what shape it must have, never whether its tags are
|
|
90
|
-
* spelled right, and the deferral set is the very thing that lets that arm recognise the parking
|
|
91
|
-
* tag. `@wip @untit` cannot go quiet.
|
|
92
|
-
*
|
|
93
|
-
* @param features the target's discovered feature files, read once at the edge.
|
|
94
|
-
* @param packageJson the TARGET's manifest, read HERE through the same resolvers the grammar arm
|
|
95
|
-
* reads it with — one reading of `specController.deferralTags` (@SCN-PND-021), and `checkTagsOf`
|
|
96
|
-
* for the three sources of what names a check.
|
|
97
|
-
* @param starterDeferralTags the APPLICATION layer's starter set, which a target's config may only
|
|
98
|
-
* extend and never replace. A parameter because it is product policy; a copy held in core would be
|
|
99
|
-
* a second statement of it.
|
|
100
|
-
* @param killFloor the reader over the TARGET's mutation records, threaded through to the
|
|
101
|
-
* threshold resolution inside `checkTagsOf` because a bar may name a gate rather than a figure
|
|
102
|
-
* (@SCN-MUT-012).
|
|
103
|
-
*/
|
|
104
|
-
export function multipleCheckTags(features, packageJson, starterDeferralTags, killFloor) {
|
|
105
|
-
// Both sets are resolved ONCE, before the walk, for the grammar arm's reasons: the manifest
|
|
106
|
-
// cannot change mid-corpus, and one resolution keeps the target's mutation record opened once.
|
|
107
|
-
const deferralTags = resolveDeferralTags(packageJson, starterDeferralTags);
|
|
108
|
-
const checkTags = checkTagsOf(packageJson, killFloor);
|
|
109
|
-
const faults = [];
|
|
110
|
-
for (const file of features) {
|
|
111
|
-
for (const scenario of parseTaggedScenarios(file.source)) {
|
|
112
|
-
if (scenario.tags.some((tag) => deferralTags.includes(tag)))
|
|
113
|
-
continue;
|
|
114
|
-
const claimed = [...new Set(scenario.tags.filter((tag) => checkTags.includes(tag)))];
|
|
115
|
-
if (claimed.length < 2)
|
|
116
|
-
continue;
|
|
117
|
-
faults.push({
|
|
118
|
-
kind: "multiple-check-tags",
|
|
119
|
-
message: `multiple-check-tags: ${file.slug}.feature scenario @${scenario.scnId} carries ` +
|
|
120
|
-
`${claimed.length} check tags — ${claimed.map((tag) => `@${tag}`).join(", ")} — but a ` +
|
|
121
|
-
`scenario names ONE check: one run is one credit, and a scenario claiming two owes ` +
|
|
122
|
-
`evidence it cannot tell apart. Split it into one scenario per check.`,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return faults;
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=corpusClaimFaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"corpusClaimFaults.js","sourceRoot":"","sources":["../../src/parse/corpusClaimFaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAwB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAA+B,EAC/B,WAA2B,EAC3B,mBAAsC,EACtC,SAA0B;IAE1B,4FAA4F;IAC5F,+FAA+F;IAC/F,MAAM,YAAY,GAAG,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC3E,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACtD,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,KAAK,MAAM,QAAQ,IAAI,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAAE,SAAS;YACtE,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACrF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;gBAAE,SAAS;YACjC,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,qBAAqB;gBAC3B,OAAO,EACL,wBAAwB,IAAI,CAAC,IAAI,sBAAsB,QAAQ,CAAC,KAAK,WAAW;oBAChF,GAAG,OAAO,CAAC,MAAM,iBAAiB,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;oBACvF,oFAAoF;oBACpF,sEAAsE;aACzE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE MEASUREMENT READER — the measurement artefact read into citing Evidence Observations
|
|
3
|
-
* (@SCN-CIP-003).
|
|
4
|
-
*
|
|
5
|
-
* The third evidence stream, and it belongs to neither of the other two. A runtime credit is read
|
|
6
|
-
* from a runner's result JSON; a static credit is read from a target's CI config and manifest. A
|
|
7
|
-
* measurement is neither a test result nor a fact about the tree: it is what the wrapper around a
|
|
8
|
-
* timed step measured while the step ran, and nothing else in the pipeline is in a position to
|
|
9
|
-
* know it.
|
|
10
|
-
*
|
|
11
|
-
* THE ARTEFACT:
|
|
12
|
-
*
|
|
13
|
-
* { "measurements": [ { "scnId": "SCN-CIP-001", "checkTag": "ci-run-time", "measured": 42.1 } ] }
|
|
14
|
-
*
|
|
15
|
-
* NO CITATION IS RESOLVED HERE, and that is the shape of the axis rather than an omission. The
|
|
16
|
-
* static axis needs two hops — script handle to bare tag through the registry, bare tag to scenario
|
|
17
|
-
* through the corpus — because a run of a script does not know what it is FOR. A measurement does:
|
|
18
|
-
* canon puts the check-to-scenario mapping in the runner that measures (`double-entry-manifesto.md`
|
|
19
|
-
* → Fitness Scenario), so the credit arrives already carrying both terms and this reader only has
|
|
20
|
-
* to read them.
|
|
21
|
-
*
|
|
22
|
-
* TOLERANT ROW BY ROW, like every reader at this edge. A malformed row is dropped rather than
|
|
23
|
-
* thrown on: the run's job is to produce a verdict, and one bad row costing the whole verdict is
|
|
24
|
-
* loud nowhere, while a dropped measurement is loud on the ledger as the obligation it leaves
|
|
25
|
-
* unanswered (@SCN-CIP-006).
|
|
26
|
-
*/
|
|
27
|
-
import type { MeasuredEvidenceObservation } from "../model.js";
|
|
28
|
-
/** The measurement artefact, as the reader takes it — validated row by row below. */
|
|
29
|
-
export interface MeasurementReport {
|
|
30
|
-
measurements?: unknown;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Read the artefact into one `MeasuredEvidenceObservation` per well-formed row, in artefact order.
|
|
34
|
-
*
|
|
35
|
-
* A ROW MISSING EITHER TERM OF ITS ADDRESS IS DROPPED, NOT SENT TO SUSPENSE. An uncited STATIC
|
|
36
|
-
* credit is a real and meaningful fact — a check ran that no scenario names — and suspense is where
|
|
37
|
-
* it belongs. A measurement without a citation is a different thing: stamping the citation is the
|
|
38
|
-
* wrapper's whole job, so a row without one says the artefact is broken, not that a check went
|
|
39
|
-
* unattributed. Posting it to suspense would report a check as having run uncited when what
|
|
40
|
-
* actually happened is that its row could not be read.
|
|
41
|
-
*
|
|
42
|
-
* A NaN MEASUREMENT IS DROPPED FOR A SHARPER REASON. Every comparison against NaN is false, so
|
|
43
|
-
* `measured <= threshold` is false and the row would read `failing` — blaming an honestly-fast
|
|
44
|
-
* suite for a fault in the artefact that measured it.
|
|
45
|
-
*/
|
|
46
|
-
export declare function parseMeasuredEvidenceObservations(report: MeasurementReport): MeasuredEvidenceObservation[];
|
|
47
|
-
//# sourceMappingURL=measurements.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../../src/parse/measurements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE/D,qFAAqF;AACrF,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAYD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,iBAAiB,GACxB,2BAA2B,EAAE,CAY/B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE MEASUREMENT READER — the measurement artefact read into citing Evidence Observations
|
|
3
|
-
* (@SCN-CIP-003).
|
|
4
|
-
*
|
|
5
|
-
* The third evidence stream, and it belongs to neither of the other two. A runtime credit is read
|
|
6
|
-
* from a runner's result JSON; a static credit is read from a target's CI config and manifest. A
|
|
7
|
-
* measurement is neither a test result nor a fact about the tree: it is what the wrapper around a
|
|
8
|
-
* timed step measured while the step ran, and nothing else in the pipeline is in a position to
|
|
9
|
-
* know it.
|
|
10
|
-
*
|
|
11
|
-
* THE ARTEFACT:
|
|
12
|
-
*
|
|
13
|
-
* { "measurements": [ { "scnId": "SCN-CIP-001", "checkTag": "ci-run-time", "measured": 42.1 } ] }
|
|
14
|
-
*
|
|
15
|
-
* NO CITATION IS RESOLVED HERE, and that is the shape of the axis rather than an omission. The
|
|
16
|
-
* static axis needs two hops — script handle to bare tag through the registry, bare tag to scenario
|
|
17
|
-
* through the corpus — because a run of a script does not know what it is FOR. A measurement does:
|
|
18
|
-
* canon puts the check-to-scenario mapping in the runner that measures (`double-entry-manifesto.md`
|
|
19
|
-
* → Fitness Scenario), so the credit arrives already carrying both terms and this reader only has
|
|
20
|
-
* to read them.
|
|
21
|
-
*
|
|
22
|
-
* TOLERANT ROW BY ROW, like every reader at this edge. A malformed row is dropped rather than
|
|
23
|
-
* thrown on: the run's job is to produce a verdict, and one bad row costing the whole verdict is
|
|
24
|
-
* loud nowhere, while a dropped measurement is loud on the ledger as the obligation it leaves
|
|
25
|
-
* unanswered (@SCN-CIP-006).
|
|
26
|
-
*/
|
|
27
|
-
import { bareTerm } from "../lib/bareTerm.js";
|
|
28
|
-
/** Both terms bare, so an artefact may spell either the way a feature file does (@SCN-TRM-001). */
|
|
29
|
-
function bare(value) {
|
|
30
|
-
return typeof value === "string" ? bareTerm(value) : "";
|
|
31
|
-
}
|
|
32
|
-
/** A measurement is a finite, non-negative number. Zero is legal — a step can take no time. */
|
|
33
|
-
function isMeasurement(value) {
|
|
34
|
-
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Read the artefact into one `MeasuredEvidenceObservation` per well-formed row, in artefact order.
|
|
38
|
-
*
|
|
39
|
-
* A ROW MISSING EITHER TERM OF ITS ADDRESS IS DROPPED, NOT SENT TO SUSPENSE. An uncited STATIC
|
|
40
|
-
* credit is a real and meaningful fact — a check ran that no scenario names — and suspense is where
|
|
41
|
-
* it belongs. A measurement without a citation is a different thing: stamping the citation is the
|
|
42
|
-
* wrapper's whole job, so a row without one says the artefact is broken, not that a check went
|
|
43
|
-
* unattributed. Posting it to suspense would report a check as having run uncited when what
|
|
44
|
-
* actually happened is that its row could not be read.
|
|
45
|
-
*
|
|
46
|
-
* A NaN MEASUREMENT IS DROPPED FOR A SHARPER REASON. Every comparison against NaN is false, so
|
|
47
|
-
* `measured <= threshold` is false and the row would read `failing` — blaming an honestly-fast
|
|
48
|
-
* suite for a fault in the artefact that measured it.
|
|
49
|
-
*/
|
|
50
|
-
export function parseMeasuredEvidenceObservations(report) {
|
|
51
|
-
const rows = Array.isArray(report.measurements) ? report.measurements : [];
|
|
52
|
-
const observations = [];
|
|
53
|
-
for (const row of rows) {
|
|
54
|
-
if (typeof row !== "object" || row === null)
|
|
55
|
-
continue;
|
|
56
|
-
const { scnId: rawScn, checkTag: rawTag, measured } = row;
|
|
57
|
-
const scnId = bare(rawScn);
|
|
58
|
-
const checkTag = bare(rawTag);
|
|
59
|
-
if (scnId === "" || checkTag === "" || !isMeasurement(measured))
|
|
60
|
-
continue;
|
|
61
|
-
observations.push({ qualityCheck: "lint", scnId, checkTag, measured });
|
|
62
|
-
}
|
|
63
|
-
return observations;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=measurements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measurements.js","sourceRoot":"","sources":["../../src/parse/measurements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ9C,mGAAmG;AACnG,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED,+FAA+F;AAC/F,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iCAAiC,CAC/C,MAAyB;IAEzB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,MAAM,YAAY,GAAkC,EAAE,CAAC;IACvD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;YAAE,SAAS;QACtD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAA8B,CAAC;QACrF,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAI,KAAK,KAAK,EAAE,IAAI,QAAQ,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;YAAE,SAAS;QAC1E,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE MEASURED ITEM'S WHERE-TO-FIX (@SCN-CIP-008) — the two numbers a measured reconciling item
|
|
3
|
-
* carries into the report: the check, what was measured, and the bar it was held to.
|
|
4
|
-
*
|
|
5
|
-
* AND WHICH SIDE OF THAT BAR IT HAD TO BE ON (@SCN-MUT-006). "91.4 against 91.87" reads as a
|
|
6
|
-
* comfortable pass to a reader who has met this axis as a ceiling and as a red to one who has met
|
|
7
|
-
* it as a floor, so the comparison is named in words beside the number. Both directions, because
|
|
8
|
-
* naming one and leaving the other bare leaves the second reader in the ambiguity the first was
|
|
9
|
-
* rescued from. It is read off the obligation and never off the check tag: which side satisfies is
|
|
10
|
-
* half of what the bar says, and an engine that knew `mutation` to be a floor would be holding the
|
|
11
|
-
* roster of tag meanings @SCN-LNT-005 puts in the target's hands.
|
|
12
|
-
*
|
|
13
|
-
* WHY THIS IS NOT A CREDIT-SIDE SUFFIX. Every other where-to-fix on a reconciling item belongs to
|
|
14
|
-
* an unmatched CREDIT — a test file's locator, or the handle of a check nobody named. A measured
|
|
15
|
-
* item's belongs to the PAIR: a reader needs the bar and the number together, and on a `missing`
|
|
16
|
-
* row there is no credit at all, only the bar the suite was supposed to meet. Rendering nothing
|
|
17
|
-
* there would leave the loudest row on the ledger the least informative one.
|
|
18
|
-
*
|
|
19
|
-
* NO BAR SAYS SO IN WORDS, and names no comparison — there is no number to name a side of.
|
|
20
|
-
* Rendered as a blank a reader has to interpret, the fault @SCN-CIP-002 makes loud on the DATA goes
|
|
21
|
-
* quiet again on the PAGE; rendered as a zero it reads as a bar OF zero, which is a different and
|
|
22
|
-
* much louder claim than nobody having set one.
|
|
23
|
-
*
|
|
24
|
-
* Its own module rather than a further function in `markdown.ts`, which sits at a `max-lines`
|
|
25
|
-
* exception — and an exception excuses existing debt, never headroom (complexity-threshold.feature).
|
|
26
|
-
*/
|
|
27
|
-
import type { ScenarioReconciliation } from "../model.js";
|
|
28
|
-
/** The parenthesised where-to-fix for a measured item, or "" for any other item. */
|
|
29
|
-
export declare function measuredSuffix(item: ScenarioReconciliation["reconcilingItems"][number]): string;
|
|
30
|
-
//# sourceMappingURL=measuredItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measuredItem.d.ts","sourceRoot":"","sources":["../../src/render/measuredItem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,GACvD,MAAM,CAcR"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE MEASURED ITEM'S WHERE-TO-FIX (@SCN-CIP-008) — the two numbers a measured reconciling item
|
|
3
|
-
* carries into the report: the check, what was measured, and the bar it was held to.
|
|
4
|
-
*
|
|
5
|
-
* AND WHICH SIDE OF THAT BAR IT HAD TO BE ON (@SCN-MUT-006). "91.4 against 91.87" reads as a
|
|
6
|
-
* comfortable pass to a reader who has met this axis as a ceiling and as a red to one who has met
|
|
7
|
-
* it as a floor, so the comparison is named in words beside the number. Both directions, because
|
|
8
|
-
* naming one and leaving the other bare leaves the second reader in the ambiguity the first was
|
|
9
|
-
* rescued from. It is read off the obligation and never off the check tag: which side satisfies is
|
|
10
|
-
* half of what the bar says, and an engine that knew `mutation` to be a floor would be holding the
|
|
11
|
-
* roster of tag meanings @SCN-LNT-005 puts in the target's hands.
|
|
12
|
-
*
|
|
13
|
-
* WHY THIS IS NOT A CREDIT-SIDE SUFFIX. Every other where-to-fix on a reconciling item belongs to
|
|
14
|
-
* an unmatched CREDIT — a test file's locator, or the handle of a check nobody named. A measured
|
|
15
|
-
* item's belongs to the PAIR: a reader needs the bar and the number together, and on a `missing`
|
|
16
|
-
* row there is no credit at all, only the bar the suite was supposed to meet. Rendering nothing
|
|
17
|
-
* there would leave the loudest row on the ledger the least informative one.
|
|
18
|
-
*
|
|
19
|
-
* NO BAR SAYS SO IN WORDS, and names no comparison — there is no number to name a side of.
|
|
20
|
-
* Rendered as a blank a reader has to interpret, the fault @SCN-CIP-002 makes loud on the DATA goes
|
|
21
|
-
* quiet again on the PAGE; rendered as a zero it reads as a bar OF zero, which is a different and
|
|
22
|
-
* much louder claim than nobody having set one.
|
|
23
|
-
*
|
|
24
|
-
* Its own module rather than a further function in `markdown.ts`, which sits at a `max-lines`
|
|
25
|
-
* exception — and an exception excuses existing debt, never headroom (complexity-threshold.feature).
|
|
26
|
-
*/
|
|
27
|
-
import { isMeasuredObservation } from "../model.js";
|
|
28
|
-
/** The parenthesised where-to-fix for a measured item, or "" for any other item. */
|
|
29
|
-
export function measuredSuffix(item) {
|
|
30
|
-
const obligation = item.evidenceObligation;
|
|
31
|
-
if (obligation?.measured !== true)
|
|
32
|
-
return "";
|
|
33
|
-
const check = item.staticCheck ?? "";
|
|
34
|
-
const bar = obligation.threshold === undefined
|
|
35
|
-
? "no threshold configured"
|
|
36
|
-
: `${obligation.atLeast === true ? "at least" : "at most"} ${obligation.threshold}`;
|
|
37
|
-
const observation = item.evidenceObservation;
|
|
38
|
-
const measured = observation !== undefined && isMeasuredObservation(observation)
|
|
39
|
-
? `measured ${observation.measured} against `
|
|
40
|
-
: "";
|
|
41
|
-
return ` (${check}: ${measured}${bar})`;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=measuredItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measuredItem.js","sourceRoot":"","sources":["../../src/render/measuredItem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD,oFAAoF;AACpF,MAAM,UAAU,cAAc,CAC5B,IAAwD;IAExD,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAC3C,IAAI,UAAU,EAAE,QAAQ,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;IACrC,MAAM,GAAG,GACP,UAAU,CAAC,SAAS,KAAK,SAAS;QAChC,CAAC,CAAC,yBAAyB;QAC3B,CAAC,CAAC,GAAG,UAAU,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,UAAU,CAAC,SAAS,EAAE,CAAC;IACxF,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC;IAC7C,MAAM,QAAQ,GACZ,WAAW,KAAK,SAAS,IAAI,qBAAqB,CAAC,WAAW,CAAC;QAC7D,CAAC,CAAC,YAAY,WAAW,CAAC,QAAQ,WAAW;QAC7C,CAAC,CAAC,EAAE,CAAC;IACT,OAAO,KAAK,KAAK,KAAK,QAAQ,GAAG,GAAG,GAAG,CAAC;AAC1C,CAAC"}
|