@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
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* THE RUN VERDICT — the headline sentence a reader meets first, and the exit code it names.
|
|
3
3
|
*
|
|
4
4
|
* Its own module rather than a further section in `markdown.ts`, which sits at a `max-lines`
|
|
5
|
-
* exception — and an exception excuses existing debt, never headroom
|
|
6
|
-
* The precedent
|
|
5
|
+
* exception — and an exception excuses existing debt, never headroom.
|
|
6
|
+
* The precedent was `measuredItem.ts` (retired with the measured axis, 3F-3516), moved out for
|
|
7
|
+
* the same reason; the move was forced here by
|
|
7
8
|
* @SCN-CLI-019 adding a fifth verdict, and it is the emitter this file is named for.
|
|
8
9
|
*/
|
|
9
10
|
import { hasBrokenEvidence, isBalanced, hasPendingItems, hasNothingToReconcile, } from "../domain/ledger.js";
|
|
@@ -21,8 +22,14 @@ const DEFAULT_CORPUS_DIR = "features";
|
|
|
21
22
|
* READ FROM `runProvenance`, WHICH IS WHY NO NEW FIELD IS OWED. `provenanceSection` derives both
|
|
22
23
|
* the Inputs list and the "Not supplied" line from this same object, so the verdict names the
|
|
23
24
|
* directory the header already accounts for and the two cannot disagree. A `process.cwd()` here
|
|
24
|
-
* would be the obvious alternative and is barred twice over: this package is pure and
|
|
25
|
-
*
|
|
25
|
+
* would be the obvious alternative and is barred twice over: this package is pure and
|
|
26
|
+
* `lint:boundaries`'s `no-restricted-globals` rule enforces it over every non-test file under
|
|
27
|
+
* `packages/core/src`, and a resolved absolute path is not the fact a reader needs.
|
|
28
|
+
*
|
|
29
|
+
* THE RULE NAMED HERE WAS WRONG UNTIL 3F-3438 AND IS CORRECTED RATHER THAN RE-WORDED. It read "the
|
|
30
|
+
* domain-purity guard enforces it", and that guard never scanned `render/` — its population was
|
|
31
|
+
* `packages/core/src/domain` — nor did it look at a global at all, only at `from` specifiers. The
|
|
32
|
+
* bar was real; the mechanism cited for it was not.
|
|
26
33
|
*/
|
|
27
34
|
function corpusExamined(provenance) {
|
|
28
35
|
return provenance.inputs.features ?? DEFAULT_CORPUS_DIR;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runVerdict.js","sourceRoot":"","sources":["../../src/render/runVerdict.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runVerdict.js","sourceRoot":"","sources":["../../src/render/runVerdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAKtC;;;;;;;;;;;;;;;GAeG;AACH,SAAS,cAAc,CAAC,UAA4B;IAClD,OAAO,UAAU,CAAC,MAAM,CAAC,QAAQ,IAAI,kBAAkB,CAAC;AAC1D,CAAC;AAED,oFAAoF;AACpF,SAAS,SAAS,CAAC,cAAsB,EAAE,SAAiB;IAC1D,+FAA+F;IAC/F,8FAA8F;IAC9F,6FAA6F;IAC7F,EAAE;IACF,8FAA8F;IAC9F,6FAA6F;IAC7F,8FAA8F;IAC9F,+FAA+F;IAC/F,iGAAiG;IACjG,gGAAgG;IAChG,+FAA+F;IAC/F,qCAAqC;IACrC,MAAM,OAAO,GAAG,qBAAqB,CAAC,cAAc,CAAC;QACnD,CAAC,CAAC;YACE,QAAQ,EAAE,0BAA0B;YACpC,IAAI,EAAE,QAAQ;YACd,yFAAyF;YACzF,2FAA2F;YAC3F,EAAE;YACF,4FAA4F;YAC5F,sFAAsF;YACtF,yFAAyF;YACzF,2FAA2F;YAC3F,qFAAqF;YACrF,KAAK,EACH,oFAAoF;gBACpF,2EAA2E,S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AAC,IAAI,CACR,yFAAyF;YACvF,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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"}
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
* exactly this reason. NOTHING about the section changed in the move: same emitter, same lines,
|
|
9
9
|
* same omit-when-absent.
|
|
10
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[");
|
|
11
18
|
/**
|
|
12
19
|
* THE RETIRED-KEY ACCOUNT (@SCN-USG-021) — one line per `specController.*` key this reader has
|
|
13
20
|
* retired that the target's manifest still carries, naming the key and saying what became of it.
|
|
@@ -19,7 +26,9 @@
|
|
|
19
26
|
* citation — so the only remaining question is whether they get to find that out, and this is
|
|
20
27
|
* the answer.
|
|
21
28
|
*/
|
|
22
|
-
const retiredKeyAccount = (keys) => (keys ?? []).map((key) => `- specController.${key} — retired:
|
|
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."}`);
|
|
23
32
|
/**
|
|
24
33
|
* Static checks (@SCN-USG-001) — the STATIC-check evidence observation side under
|
|
25
34
|
* Summary views, the mirror of `### Test volume` on the runtime axis. Renders the counts line
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticChecks.js","sourceRoot":"","sources":["../../src/render/staticChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;;;;;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,
|
|
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,CAAC;IACX,CAAC,CAAC,yFAAyF;IAC3F,CAAC,CAAC,0EACN,EAAE,CACL,CAAC;AAEJ;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAmB,EAAY,EAAE;IACnE,iGAAiG;IACjG,8FAA8F;IAC9F,kGAAkG;IAClG,iGAAiG;IACjG,gFAAgF;IAChF,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,4BAA4B,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;IAClG,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,yFAAyF;IACzF,8FAA8F;IAC9F,4FAA4F;IAC5F,qBAAqB;IACrB,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9D,8EAA8E;IAC9E,4FAA4F;IAC5F,sGAAsG;IACtG,6FAA6F;IAC7F,uEAAuE;IACvE,OAAO;QACL,mBAAmB,EAAE,EAAE;QACvB,GAAG,MAAM,CAAC,uBAAuB,yBAAyB,MAAM,CAAC,uBAAuB,2BAA2B;QACnH,EAAE;QACF,GAAG,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,kDAAkD,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/I,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAChD,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3f-consulting/spec-controller-core",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "The pure, embeddable reconciliation core behind spec-controller — Gherkin/@SCN parse, the evidence model, reconcile primitives, and renderers. No CLI, no I/O.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"reconciliation",
|
|
@@ -10,11 +10,6 @@
|
|
|
10
10
|
"double-entry",
|
|
11
11
|
"spec-controller"
|
|
12
12
|
],
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/3f-consulting/spec-controller.git",
|
|
16
|
-
"directory": "packages/core"
|
|
17
|
-
},
|
|
18
13
|
"license": "MIT",
|
|
19
14
|
"type": "module",
|
|
20
15
|
"engines": {
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE THRESHOLD INDEX — what ceiling a MEASURED fitness check is held to on a given scenario.
|
|
3
|
-
*
|
|
4
|
-
* The debit-side twin of the (now-retired) check registry, and the input that makes the measured
|
|
5
|
-
* axis possible at all:
|
|
6
|
-
*
|
|
7
|
-
* @SCN + bare check tag ──thresholds──▶ the ceiling
|
|
8
|
-
* SCN-CIP-001 ci-run-time 75
|
|
9
|
-
*
|
|
10
|
-
* WHY THE CEILING IS AUTHORED HERE AND NOT CARRIED BY THE RUN. A static check decides pass from
|
|
11
|
-
* fail itself and the ledger reconciles what it decided; its threshold is binary and never written
|
|
12
|
-
* down. A measured check produces a NUMBER, and if the run supplied both the number and the bar it
|
|
13
|
-
* was judged against, the runner would be grading its own homework — the ledger would transcribe a
|
|
14
|
-
* verdict rather than reconcile one. Double entry wants the two sides independently sourced, so the
|
|
15
|
-
* ceiling is the obligation's and the measurement is only ever a number.
|
|
16
|
-
*
|
|
17
|
-
* KEYED BY @SCN, THEN BY CHECK, and both halves are load-bearing. Keyed by the tag alone it could
|
|
18
|
-
* not express what canon asks of this axis — several checks of one characteristic are several
|
|
19
|
-
* stepless scenarios sharing the tag, told apart by @SCN, with ceilings of their own. Flat under
|
|
20
|
-
* the @SCN it would re-open on the debit side the non-uniqueness @SCN-LNT-012 closed on the credit
|
|
21
|
-
* side: a stepless scenario may carry more than one bare check, so one @SCN can owe two measured
|
|
22
|
-
* obligations, and one number under it would answer for both — whichever was read first silently
|
|
23
|
-
* setting the other's bar.
|
|
24
|
-
*
|
|
25
|
-
* PURE AND INJECTED — the index arrives as data, read from the TARGET's own manifest at the app
|
|
26
|
-
* edge (`specController.thresholds`). A ceiling means what the target says it means (@SCN-LNT-005);
|
|
27
|
-
* resolved from spec-controller's own manifest it would answer for a repository the run never read.
|
|
28
|
-
*
|
|
29
|
-
* NOT A SECOND HOME FOR THE CORPUS. This says what a scenario's ceiling IS, never which scenarios
|
|
30
|
-
* exist: the corpus stays the one place a fitness scenario is named, so a ceiling keyed against an
|
|
31
|
-
* @SCN nobody wrote reaches no obligation, and an obligation whose ceiling nobody wrote reads loud
|
|
32
|
-
* rather than unbounded (@SCN-CIP-002).
|
|
33
|
-
*/
|
|
34
|
-
export interface ThresholdBar {
|
|
35
|
-
/** The number the measurement is compared against. */
|
|
36
|
-
threshold: number;
|
|
37
|
-
/** The bar is a FLOOR — `measured >= threshold`. Absent on an ordinary ceiling. */
|
|
38
|
-
atLeast?: true;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The index as the rule reads it — `@SCN` → bare check tag → the bar it is held to.
|
|
42
|
-
*
|
|
43
|
-
* THE BAR IS NULLABLE AND THE TAG IS NOT (@SCN-MUT-003). A manifest entry makes two claims — that
|
|
44
|
-
* this scenario holds this check, and what bar it holds it to — and only the second can fail to
|
|
45
|
-
* read. An entry whose value this cannot read keeps its key here with a `null` beside it, so the
|
|
46
|
-
* check stays measured and the missing bar is reported by the arm that exists for exactly that
|
|
47
|
-
* (@SCN-CIP-002) rather than by the tag grammar complaining about a check nobody wrote.
|
|
48
|
-
*/
|
|
49
|
-
export type ThresholdIndex = ReadonlyMap<string, ReadonlyMap<string, ThresholdBar | null>>;
|
|
50
|
-
/**
|
|
51
|
-
* The bar a manifest entry authors, or `null` where it authors none this reads (@SCN-MUT-002).
|
|
52
|
-
*
|
|
53
|
-
* TWO FORMS, ONE OF WHICH NAMES ITS COMPARISON. A bare number is read at-most and carries nothing
|
|
54
|
-
* else, so the entries already written that way keep saying what they say. An object names the
|
|
55
|
-
* comparison with the KEY beside the number — `atLeast` or `atMost` — which is what makes an
|
|
56
|
-
* entry in this form unwritable without a direction, and leaves no third value anybody has to
|
|
57
|
-
* validate or that could come to mean something surprising. `atMost` is the explicit long form of
|
|
58
|
-
* the bare number and is deliberately recognised though it adds nothing: a recognised set of one
|
|
59
|
-
* is not a set, and it is the set an unrecognised entry is unrecognised AGAINST.
|
|
60
|
-
*
|
|
61
|
-
* A RECOGNISED KEY IS NOT A LICENCE FOR THE VALUE BESIDE IT. Both forms reach the same number
|
|
62
|
-
* reading, so a floor of `NaN` is dropped exactly as a ceiling of `NaN` is — `measured >= NaN` is
|
|
63
|
-
* false, and a bar nothing can clear reds an honest suite and blames the suite.
|
|
64
|
-
*
|
|
65
|
-
* EXPORTED BECAUSE A CONVERTED CHECK'S ROW NAMES ITS BAR IN THESE SAME TWO KEYS (@SCN-LNT-019), and
|
|
66
|
-
* one bar grammar is the point: a second reader over `atLeast` / `atMost` would be a second opinion
|
|
67
|
-
* about what a target wrote, and the first entry either read differently would be a silent one. The
|
|
68
|
-
* row is handed in whole — the other terms beside the direction are none of this reader's business.
|
|
69
|
-
*/
|
|
70
|
-
export declare function barOf(entry: unknown): ThresholdBar | null;
|
|
71
|
-
/**
|
|
72
|
-
* Build an index from a manifest's `{ "<@SCN>": { "<check>": <bar> } }` entries.
|
|
73
|
-
*
|
|
74
|
-
* BOTH KEYS ARE STORED BARE. A manifest written by hand will sooner or later spell either the way
|
|
75
|
-
* a feature file does (`@SCN-CIP-001`, `@ci-run-time`), and both lookups match bare — so the `@` is
|
|
76
|
-
* stripped once here rather than at every call site, where one reader would eventually forget and
|
|
77
|
-
* the miss would be silent.
|
|
78
|
-
*
|
|
79
|
-
* A MALFORMED BAR IS DROPPED, NOT TRUSTED AND NOT THROWN ON — the same defensive stance
|
|
80
|
-
* `resolveDeferralTags` takes, and for a sharper reason here. A ceiling of
|
|
81
|
-
* `NaN` fails every comparison, so `measured <= NaN` is false and an honestly-fast suite would read
|
|
82
|
-
* `failing` with the blame on the suite rather than on the manifest. Throwing instead would turn one
|
|
83
|
-
* bad character into a run that produces no verdict at all, which is loud nowhere; a dropped bar
|
|
84
|
-
* leaves the obligation with no ceiling, which is loud on the ledger.
|
|
85
|
-
*
|
|
86
|
-
* WHAT IS DROPPED IS THE BAR, NEVER THE CHECK (@SCN-MUT-003). The key still names a pair the target
|
|
87
|
-
* authored, and that naming is the whole of what makes a check MEASURED — a measured check has no
|
|
88
|
-
* script handle, so this index's key set is the only place the tag is known at all. Dropping the
|
|
89
|
-
* key with the value would take the obligation down with the bar: the stepless scenario carrying
|
|
90
|
-
* that tag would raise nothing, and the only complaint left would come from the tag grammar, about
|
|
91
|
-
* a check nobody wrote rather than about a bar nobody authored. So a value this cannot read is kept
|
|
92
|
-
* as `null` — indistinguishable, to every reader downstream, from a pair the manifest never named,
|
|
93
|
-
* which is the honest reading of both.
|
|
94
|
-
*
|
|
95
|
-
* A KEY THAT NAMES NO CHECK IS STILL DROPPED WHOLE. An empty tag names no pair, so there is no
|
|
96
|
-
* check to hold measured and nothing to report a missing bar against.
|
|
97
|
-
*/
|
|
98
|
-
export declare function thresholdsOf(entries: Readonly<Record<string, unknown>>): ThresholdIndex;
|
|
99
|
-
/**
|
|
100
|
-
* The BAR this scenario holds this check to, or `null` when there is none to read — the manifest
|
|
101
|
-
* named no such pair, or it named the pair and authored no bar this could read (@SCN-MUT-003). The
|
|
102
|
-
* two arrive here as one answer on purpose: a reader deciding what to do about a missing bar has
|
|
103
|
-
* the same thing to say either way, and telling them apart would be an invitation to say something
|
|
104
|
-
* different about one of them.
|
|
105
|
-
*
|
|
106
|
-
* `null` rather than a default, and the choice is the whole of @SCN-CIP-002. `Infinity` would put
|
|
107
|
-
* every measurement under its bar and produce a green row for a check nobody set a bar for — the
|
|
108
|
-
* watermelon this axis exists to refuse, manufactured by the engine. Zero would read as a ceiling
|
|
109
|
-
* of zero, a far louder claim than "nobody set one", and would red a suite for taking any time at
|
|
110
|
-
* all. The honest answer is that there is no rule, and the obligation carries that absence.
|
|
111
|
-
*/
|
|
112
|
-
export declare function thresholdFor(index: ThresholdIndex, scnId: string, checkTag: string): ThresholdBar | null;
|
|
113
|
-
/**
|
|
114
|
-
* The bare check tags this index knows to be MEASURED — unique and sorted.
|
|
115
|
-
*
|
|
116
|
-
* The reason a measured check is visible to the obligation rule at all. A measured check has no
|
|
117
|
-
* runnable script handle, so it is never discoverable by one; were the obligation-raising tag
|
|
118
|
-
* set built from discovered handles alone, a stepless scenario
|
|
119
|
-
* tagged with one would raise nothing and the axis would be silent rather than wrong. The two sets
|
|
120
|
-
* are unioned at the edge that reads both.
|
|
121
|
-
*/
|
|
122
|
-
export declare function measuredCheckTags(index: ThresholdIndex): string[];
|
|
123
|
-
//# sourceMappingURL=thresholds.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"thresholds.d.ts","sourceRoot":"","sources":["../../src/domain/thresholds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAmBH,MAAM,WAAW,YAAY;IAC3B,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC;AAyB3F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAYzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,cAAc,CAcvF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf,YAAY,GAAG,IAAI,CAErB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAAE,CAIjE"}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE THRESHOLD INDEX — what ceiling a MEASURED fitness check is held to on a given scenario.
|
|
3
|
-
*
|
|
4
|
-
* The debit-side twin of the (now-retired) check registry, and the input that makes the measured
|
|
5
|
-
* axis possible at all:
|
|
6
|
-
*
|
|
7
|
-
* @SCN + bare check tag ──thresholds──▶ the ceiling
|
|
8
|
-
* SCN-CIP-001 ci-run-time 75
|
|
9
|
-
*
|
|
10
|
-
* WHY THE CEILING IS AUTHORED HERE AND NOT CARRIED BY THE RUN. A static check decides pass from
|
|
11
|
-
* fail itself and the ledger reconciles what it decided; its threshold is binary and never written
|
|
12
|
-
* down. A measured check produces a NUMBER, and if the run supplied both the number and the bar it
|
|
13
|
-
* was judged against, the runner would be grading its own homework — the ledger would transcribe a
|
|
14
|
-
* verdict rather than reconcile one. Double entry wants the two sides independently sourced, so the
|
|
15
|
-
* ceiling is the obligation's and the measurement is only ever a number.
|
|
16
|
-
*
|
|
17
|
-
* KEYED BY @SCN, THEN BY CHECK, and both halves are load-bearing. Keyed by the tag alone it could
|
|
18
|
-
* not express what canon asks of this axis — several checks of one characteristic are several
|
|
19
|
-
* stepless scenarios sharing the tag, told apart by @SCN, with ceilings of their own. Flat under
|
|
20
|
-
* the @SCN it would re-open on the debit side the non-uniqueness @SCN-LNT-012 closed on the credit
|
|
21
|
-
* side: a stepless scenario may carry more than one bare check, so one @SCN can owe two measured
|
|
22
|
-
* obligations, and one number under it would answer for both — whichever was read first silently
|
|
23
|
-
* setting the other's bar.
|
|
24
|
-
*
|
|
25
|
-
* PURE AND INJECTED — the index arrives as data, read from the TARGET's own manifest at the app
|
|
26
|
-
* edge (`specController.thresholds`). A ceiling means what the target says it means (@SCN-LNT-005);
|
|
27
|
-
* resolved from spec-controller's own manifest it would answer for a repository the run never read.
|
|
28
|
-
*
|
|
29
|
-
* NOT A SECOND HOME FOR THE CORPUS. This says what a scenario's ceiling IS, never which scenarios
|
|
30
|
-
* exist: the corpus stays the one place a fitness scenario is named, so a ceiling keyed against an
|
|
31
|
-
* @SCN nobody wrote reaches no obligation, and an obligation whose ceiling nobody wrote reads loud
|
|
32
|
-
* rather than unbounded (@SCN-CIP-002).
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* A BAR a measurement is held to — the number, and the side of it that satisfies.
|
|
36
|
-
*
|
|
37
|
-
* The index's value is this rather than the number alone, because a number cannot carry a
|
|
38
|
-
* comparison and "91.87" says nothing until somebody says which side of it passes. The direction is
|
|
39
|
-
* half of the bar, so it is authored in the same manifest entry as the number and cannot disagree
|
|
40
|
-
* with the number it qualifies.
|
|
41
|
-
*
|
|
42
|
-
* SPARSE, AND ABSENT MEANS AT-MOST (@SCN-MUT-001). A bare-number entry sets no comparison at all,
|
|
43
|
-
* so the bar it produces holds exactly what it held before this direction existed — which is what
|
|
44
|
-
* lets the two live `@ci-run-time` rows keep saying what they already say without a sweep somebody
|
|
45
|
-
* has to get right. A `false` here would be the same sentence in a term every existing row would
|
|
46
|
-
* have to grow.
|
|
47
|
-
*/
|
|
48
|
-
import { bareTerm } from "../lib/bareTerm.js";
|
|
49
|
-
/** A bar's number is finite and non-negative. Zero is legal — canon's binary fitness function. */
|
|
50
|
-
function isCeiling(value) {
|
|
51
|
-
// A SURVIVING MUTANT LIVES ON THE FIRST CLAUSE, KEPT DELIBERATELY (3F-2237). Stryker replaces
|
|
52
|
-
// `typeof value === "number"` ALONE — the column range says so, not the line — leaving
|
|
53
|
-
// `Number.isFinite(value) && value >= 0`. `Number.isFinite` DOES NOT COERCE: per spec it returns
|
|
54
|
-
// `false` whenever its argument is not a Number, so it ENTAILS the clause before it and the
|
|
55
|
-
// result cannot move. Probed against 27 values (strings, booleans, `null`, `undefined`, bigint,
|
|
56
|
-
// arrays, boxed `new Number(5)`, a `valueOf` object, a `Symbol.toPrimitive` object, a `Proxy`, a
|
|
57
|
-
// `Date`, `-0`, `NaN`, both infinities): none separates the two, and neither clause has a side
|
|
58
|
-
// effect, so evaluation order is unobservable too.
|
|
59
|
-
//
|
|
60
|
-
// The ground is LANGUAGE SEMANTICS OVER `unknown`, not a type contract — which is why, unlike
|
|
61
|
-
// `locatorOf` and `fitnessCheckTagOf` (both killed by 3F-2879 / 3F-2898), there is no
|
|
62
|
-
// published-surface escape. `value` is already `unknown`, so a JavaScript consumer over the
|
|
63
|
-
// frozen barrel may hand in literally anything, and for every one of those things the two
|
|
64
|
-
// expressions agree.
|
|
65
|
-
//
|
|
66
|
-
// Kept because it is load-bearing for the compiler: delete it and `pnpm typecheck` reds with
|
|
67
|
-
// `TS18046: 'value' is of type 'unknown'` — both `value >= 0` and the `value is number`
|
|
68
|
-
// predicate rest on this narrowing.
|
|
69
|
-
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* The bar a manifest entry authors, or `null` where it authors none this reads (@SCN-MUT-002).
|
|
73
|
-
*
|
|
74
|
-
* TWO FORMS, ONE OF WHICH NAMES ITS COMPARISON. A bare number is read at-most and carries nothing
|
|
75
|
-
* else, so the entries already written that way keep saying what they say. An object names the
|
|
76
|
-
* comparison with the KEY beside the number — `atLeast` or `atMost` — which is what makes an
|
|
77
|
-
* entry in this form unwritable without a direction, and leaves no third value anybody has to
|
|
78
|
-
* validate or that could come to mean something surprising. `atMost` is the explicit long form of
|
|
79
|
-
* the bare number and is deliberately recognised though it adds nothing: a recognised set of one
|
|
80
|
-
* is not a set, and it is the set an unrecognised entry is unrecognised AGAINST.
|
|
81
|
-
*
|
|
82
|
-
* A RECOGNISED KEY IS NOT A LICENCE FOR THE VALUE BESIDE IT. Both forms reach the same number
|
|
83
|
-
* reading, so a floor of `NaN` is dropped exactly as a ceiling of `NaN` is — `measured >= NaN` is
|
|
84
|
-
* false, and a bar nothing can clear reds an honest suite and blames the suite.
|
|
85
|
-
*
|
|
86
|
-
* EXPORTED BECAUSE A CONVERTED CHECK'S ROW NAMES ITS BAR IN THESE SAME TWO KEYS (@SCN-LNT-019), and
|
|
87
|
-
* one bar grammar is the point: a second reader over `atLeast` / `atMost` would be a second opinion
|
|
88
|
-
* about what a target wrote, and the first entry either read differently would be a silent one. The
|
|
89
|
-
* row is handed in whole — the other terms beside the direction are none of this reader's business.
|
|
90
|
-
*/
|
|
91
|
-
export function barOf(entry) {
|
|
92
|
-
if (isCeiling(entry))
|
|
93
|
-
return { threshold: entry };
|
|
94
|
-
if (typeof entry !== "object" || entry === null)
|
|
95
|
-
return null;
|
|
96
|
-
const named = entry;
|
|
97
|
-
const floor = "atLeast" in named;
|
|
98
|
-
// Neither key, or both at once — an entry naming no comparison this recognises, and no bar this
|
|
99
|
-
// can hold anything to (@SCN-MUT-003). Both at once is a contradiction rather than more
|
|
100
|
-
// information: whichever key were read first would silently settle it.
|
|
101
|
-
if (floor === "atMost" in named)
|
|
102
|
-
return null;
|
|
103
|
-
const number = floor ? named["atLeast"] : named["atMost"];
|
|
104
|
-
if (!isCeiling(number))
|
|
105
|
-
return null;
|
|
106
|
-
return floor ? { threshold: number, atLeast: true } : { threshold: number };
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Build an index from a manifest's `{ "<@SCN>": { "<check>": <bar> } }` entries.
|
|
110
|
-
*
|
|
111
|
-
* BOTH KEYS ARE STORED BARE. A manifest written by hand will sooner or later spell either the way
|
|
112
|
-
* a feature file does (`@SCN-CIP-001`, `@ci-run-time`), and both lookups match bare — so the `@` is
|
|
113
|
-
* stripped once here rather than at every call site, where one reader would eventually forget and
|
|
114
|
-
* the miss would be silent.
|
|
115
|
-
*
|
|
116
|
-
* A MALFORMED BAR IS DROPPED, NOT TRUSTED AND NOT THROWN ON — the same defensive stance
|
|
117
|
-
* `resolveDeferralTags` takes, and for a sharper reason here. A ceiling of
|
|
118
|
-
* `NaN` fails every comparison, so `measured <= NaN` is false and an honestly-fast suite would read
|
|
119
|
-
* `failing` with the blame on the suite rather than on the manifest. Throwing instead would turn one
|
|
120
|
-
* bad character into a run that produces no verdict at all, which is loud nowhere; a dropped bar
|
|
121
|
-
* leaves the obligation with no ceiling, which is loud on the ledger.
|
|
122
|
-
*
|
|
123
|
-
* WHAT IS DROPPED IS THE BAR, NEVER THE CHECK (@SCN-MUT-003). The key still names a pair the target
|
|
124
|
-
* authored, and that naming is the whole of what makes a check MEASURED — a measured check has no
|
|
125
|
-
* script handle, so this index's key set is the only place the tag is known at all. Dropping the
|
|
126
|
-
* key with the value would take the obligation down with the bar: the stepless scenario carrying
|
|
127
|
-
* that tag would raise nothing, and the only complaint left would come from the tag grammar, about
|
|
128
|
-
* a check nobody wrote rather than about a bar nobody authored. So a value this cannot read is kept
|
|
129
|
-
* as `null` — indistinguishable, to every reader downstream, from a pair the manifest never named,
|
|
130
|
-
* which is the honest reading of both.
|
|
131
|
-
*
|
|
132
|
-
* A KEY THAT NAMES NO CHECK IS STILL DROPPED WHOLE. An empty tag names no pair, so there is no
|
|
133
|
-
* check to hold measured and nothing to report a missing bar against.
|
|
134
|
-
*/
|
|
135
|
-
export function thresholdsOf(entries) {
|
|
136
|
-
const index = new Map();
|
|
137
|
-
for (const [scnKey, checks] of Object.entries(entries)) {
|
|
138
|
-
const scnId = bareTerm(scnKey);
|
|
139
|
-
if (scnId === "" || typeof checks !== "object" || checks === null)
|
|
140
|
-
continue;
|
|
141
|
-
const bars = new Map();
|
|
142
|
-
for (const [checkKey, entry] of Object.entries(checks)) {
|
|
143
|
-
const checkTag = bareTerm(checkKey);
|
|
144
|
-
if (checkTag === "")
|
|
145
|
-
continue;
|
|
146
|
-
bars.set(checkTag, barOf(entry));
|
|
147
|
-
}
|
|
148
|
-
if (bars.size > 0)
|
|
149
|
-
index.set(scnId, bars);
|
|
150
|
-
}
|
|
151
|
-
return index;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* The BAR this scenario holds this check to, or `null` when there is none to read — the manifest
|
|
155
|
-
* named no such pair, or it named the pair and authored no bar this could read (@SCN-MUT-003). The
|
|
156
|
-
* two arrive here as one answer on purpose: a reader deciding what to do about a missing bar has
|
|
157
|
-
* the same thing to say either way, and telling them apart would be an invitation to say something
|
|
158
|
-
* different about one of them.
|
|
159
|
-
*
|
|
160
|
-
* `null` rather than a default, and the choice is the whole of @SCN-CIP-002. `Infinity` would put
|
|
161
|
-
* every measurement under its bar and produce a green row for a check nobody set a bar for — the
|
|
162
|
-
* watermelon this axis exists to refuse, manufactured by the engine. Zero would read as a ceiling
|
|
163
|
-
* of zero, a far louder claim than "nobody set one", and would red a suite for taking any time at
|
|
164
|
-
* all. The honest answer is that there is no rule, and the obligation carries that absence.
|
|
165
|
-
*/
|
|
166
|
-
export function thresholdFor(index, scnId, checkTag) {
|
|
167
|
-
return index.get(scnId)?.get(checkTag) ?? null;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* The bare check tags this index knows to be MEASURED — unique and sorted.
|
|
171
|
-
*
|
|
172
|
-
* The reason a measured check is visible to the obligation rule at all. A measured check has no
|
|
173
|
-
* runnable script handle, so it is never discoverable by one; were the obligation-raising tag
|
|
174
|
-
* set built from discovered handles alone, a stepless scenario
|
|
175
|
-
* tagged with one would raise nothing and the axis would be silent rather than wrong. The two sets
|
|
176
|
-
* are unioned at the edge that reads both.
|
|
177
|
-
*/
|
|
178
|
-
export function measuredCheckTags(index) {
|
|
179
|
-
const tags = new Set();
|
|
180
|
-
for (const bars of index.values())
|
|
181
|
-
for (const tag of bars.keys())
|
|
182
|
-
tags.add(tag);
|
|
183
|
-
return [...tags].sort();
|
|
184
|
-
}
|
|
185
|
-
//# sourceMappingURL=thresholds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"thresholds.js","sourceRoot":"","sources":["../../src/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;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAqB;IACrD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE;QAAE,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The OBLIGATION-side static-check observer (the watermelon input).
|
|
3
|
-
* Per runnable handle the corpus obliges it reports `{ staticCheck, exists, enforcedOverRealSource }`,
|
|
4
|
-
* where `enforcedOverRealSource` means the static check's command appears as a CI `run:` step over the
|
|
5
|
-
* real tree WHOSE RED IS THAT JOB'S VERDICT — so a named static check that exists but is not wired,
|
|
6
|
-
* or is wired to a step the job survives, reconciles as the WATERMELON.
|
|
7
|
-
*
|
|
8
|
-
* WHERE ITS HANDLES COME FROM, SINCE IT IS NOT WHAT THIS DOCBLOCK USED TO SAY (3F-3083). They are
|
|
9
|
-
* `corpus.checkHandles` — the check registry's inverse, narrowed to the checks the corpus actually
|
|
10
|
-
* carries a scenario for (`parse/targetCorpus`). The `@lint=<handle>` rider that once fed this
|
|
11
|
-
* reader went with the by-name route at 3F-2590 and raises no obligation at all now
|
|
12
|
-
* (@SCN-LNT-007), so it is an input this function can no longer receive.
|
|
13
|
-
*
|
|
14
|
-
* One of the two static-check observers: this one reads the OBLIGATION side; the running-check
|
|
15
|
-
* observer (`runningStaticChecks`) reads every static check CI runs. Both share the
|
|
16
|
-
* watermelon-critical CI-parse primitive (`ciRunSteps` / `commandInvokesScript`) from
|
|
17
|
-
* `checkScriptsRunInCI`, so the structural parse lives in ONE place — and since @SCN-LNT-032 both
|
|
18
|
-
* read the same field off it, so the two cannot come to disagree about what enforcement is.
|
|
19
|
-
*
|
|
20
|
-
* Parent: @SCN-LNT-001 (the seam-bearing first sub-issue; satisfied path).
|
|
21
|
-
*/
|
|
22
|
-
import type { GuardEvidenceObservation } from "../model.js";
|
|
23
|
-
import { type PackageJsonScripts } from "./checkScriptsRunInCI.js";
|
|
24
|
-
import type { ScriptCitation } from "./fitnessCitations.js";
|
|
25
|
-
/**
|
|
26
|
-
* Read each named static check's evidenceObservation from the CI config source + package.json:
|
|
27
|
-
* - `exists` — the static check is a `package.json` `scripts` entry.
|
|
28
|
-
* - `enforcedOverRealSource` — its command is a CI `run:` step over the real tree AND that step's
|
|
29
|
-
* red is its job's verdict.
|
|
30
|
-
*/
|
|
31
|
-
export declare function checkStaticEvidenceObligations(guards: string[], ciSources: readonly string[], packageJson: PackageJsonScripts, citedScn?: (script: string) => ScriptCitation | null): GuardEvidenceObservation[];
|
|
32
|
-
//# sourceMappingURL=checkStaticEvidenceObligations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkStaticEvidenceObligations.d.ts","sourceRoot":"","sources":["../../src/parse/checkStaticEvidenceObligations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,WAAW,EAAE,kBAAkB,EAuB/B,QAAQ,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,cAAc,GAAG,IAAiB,GAC/D,wBAAwB,EAAE,CA2B5B"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The OBLIGATION-side static-check observer (the watermelon input).
|
|
3
|
-
* Per runnable handle the corpus obliges it reports `{ staticCheck, exists, enforcedOverRealSource }`,
|
|
4
|
-
* where `enforcedOverRealSource` means the static check's command appears as a CI `run:` step over the
|
|
5
|
-
* real tree WHOSE RED IS THAT JOB'S VERDICT — so a named static check that exists but is not wired,
|
|
6
|
-
* or is wired to a step the job survives, reconciles as the WATERMELON.
|
|
7
|
-
*
|
|
8
|
-
* WHERE ITS HANDLES COME FROM, SINCE IT IS NOT WHAT THIS DOCBLOCK USED TO SAY (3F-3083). They are
|
|
9
|
-
* `corpus.checkHandles` — the check registry's inverse, narrowed to the checks the corpus actually
|
|
10
|
-
* carries a scenario for (`parse/targetCorpus`). The `@lint=<handle>` rider that once fed this
|
|
11
|
-
* reader went with the by-name route at 3F-2590 and raises no obligation at all now
|
|
12
|
-
* (@SCN-LNT-007), so it is an input this function can no longer receive.
|
|
13
|
-
*
|
|
14
|
-
* One of the two static-check observers: this one reads the OBLIGATION side; the running-check
|
|
15
|
-
* observer (`runningStaticChecks`) reads every static check CI runs. Both share the
|
|
16
|
-
* watermelon-critical CI-parse primitive (`ciRunSteps` / `commandInvokesScript`) from
|
|
17
|
-
* `checkScriptsRunInCI`, so the structural parse lives in ONE place — and since @SCN-LNT-032 both
|
|
18
|
-
* read the same field off it, so the two cannot come to disagree about what enforcement is.
|
|
19
|
-
*
|
|
20
|
-
* Parent: @SCN-LNT-001 (the seam-bearing first sub-issue; satisfied path).
|
|
21
|
-
*/
|
|
22
|
-
import { ciRunSteps, commandInvokesScript } from "./checkScriptsRunInCI.js";
|
|
23
|
-
/**
|
|
24
|
-
* Read each named static check's evidenceObservation from the CI config source + package.json:
|
|
25
|
-
* - `exists` — the static check is a `package.json` `scripts` entry.
|
|
26
|
-
* - `enforcedOverRealSource` — its command is a CI `run:` step over the real tree AND that step's
|
|
27
|
-
* red is its job's verdict.
|
|
28
|
-
*/
|
|
29
|
-
export function checkStaticEvidenceObligations(guards, ciSources, packageJson,
|
|
30
|
-
// @SCN-LNT-002 (3F-2569) — THIS READER STAMPS THE CITATION TOO, and it is the only one that can
|
|
31
|
-
// stamp it for the watermelon. The running-check observer emits what CI RUNS, so a check that
|
|
32
|
-
// runs nowhere is exactly what its filter removes; the exists-but-unwired fact has always come
|
|
33
|
-
// from this side, and under citation-routing it has to arrive here already carrying the `@SCN`.
|
|
34
|
-
//
|
|
35
|
-
// Without it a fitness obligation could not reconcile at all: its `staticCheck` is the BARE check
|
|
36
|
-
// tag its stepless scenario carries (`planted-watermelon`) while this observation names the
|
|
37
|
-
// runnable handle (`lint:planted-watermelon`), so the two can never meet by name and the
|
|
38
|
-
// obligation reads `missing` — a check that exists and enforces nothing, reported as one nobody
|
|
39
|
-
// wrote. The citation is what joins them (`qualityCheckReconciliation`, citation-first).
|
|
40
|
-
//
|
|
41
|
-
// BOTH TERMS, not just the @SCN — the same widening, and the same reason, as the running-check
|
|
42
|
-
// observer's. The bare check tag is what an Evidence Obligation NAMES, so it is what the
|
|
43
|
-
// reconciler compares against; without it a row carrying two bare check tags hands the first
|
|
44
|
-
// credit it finds to both of its fitness obligations (@SCN-LNT-012).
|
|
45
|
-
//
|
|
46
|
-
// Trailing, optional, and defaulting to citing NOTHING — so a target that has registered nothing
|
|
47
|
-
// observes exactly what it observed before. There is no name-match left to fall back to: an
|
|
48
|
-
// uncited credit posts to suspense and answers no obligation (3F-2590 removed the posting arm;
|
|
49
|
-
// 3F-2625 the by-handle half in `domain/qualityCheckReconciliation`). The same shape and the same
|
|
50
|
-
// reasoning as `runningStaticChecks`' parameter: what a reader needs is one answer per handle,
|
|
51
|
-
// never a registry's shape.
|
|
52
|
-
citedScn = () => null) {
|
|
53
|
-
const scripts = packageJson.scripts ?? {};
|
|
54
|
-
// THE STEPS, NOT THEIR COMMANDS (@SCN-LNT-032). `ciRunCommands` is this walk's projection, so
|
|
55
|
-
// reading the steps is the SAME parse rather than a second one — and `abortsJob` is the field the
|
|
56
|
-
// projection discarded. It has been read off both carriers of the severance correctly since
|
|
57
|
-
// 3F-3042 and reached no published consumer until now, which is how this reader came to certify
|
|
58
|
-
// as satisfied a check whose red its target's job swallows.
|
|
59
|
-
const runSteps = ciRunSteps(ciSources);
|
|
60
|
-
return guards.map((guard) => {
|
|
61
|
-
const citation = citedScn(guard);
|
|
62
|
-
return {
|
|
63
|
-
qualityCheck: "lint",
|
|
64
|
-
staticCheck: guard,
|
|
65
|
-
exists: Object.prototype.hasOwnProperty.call(scripts, guard),
|
|
66
|
-
// ANY step that both invokes the check and aborts its job on a red — `some`, not `every`,
|
|
67
|
-
// because a check a second step runs unsevered IS one the job's verdict depends on. The same
|
|
68
|
-
// rule in the same shape as `runningStaticChecks`', deliberately: two observers answering one
|
|
69
|
-
// question differently is the disagreement this shared primitive exists to foreclose.
|
|
70
|
-
enforcedOverRealSource: runSteps.some((step) => commandInvokesScript(step.command, guard) && step.abortsJob),
|
|
71
|
-
// Spread rather than two `?? undefined` assignments, so an observation that cites nothing
|
|
72
|
-
// carries neither key and its JSON stays byte-identical. Both terms or neither — the seam
|
|
73
|
-
// resolves them together, and a half-citation would be a shape no reader knows how to read.
|
|
74
|
-
...(citation !== null ? { scnId: citation.scnId, checkTag: citation.checkTag } : {}),
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=checkStaticEvidenceObligations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkStaticEvidenceObligations.js","sourceRoot":"","sources":["../../src/parse/checkStaticEvidenceObligations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAA2B,MAAM,0BAA0B,CAAC;AAGrG;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAC5C,MAAgB,EAChB,SAA4B,EAC5B,WAA+B;AAC/B,gGAAgG;AAChG,8FAA8F;AAC9F,+FAA+F;AAC/F,gGAAgG;AAChG,EAAE;AACF,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