@3f-consulting/spec-controller-core 0.1.0-alpha.4 → 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/dist/assemble/evidenceReconciliationFromSources.d.ts +4 -13
- package/dist/assemble/evidenceReconciliationFromSources.d.ts.map +1 -1
- package/dist/assemble/evidenceReconciliationFromSources.js +17 -22
- package/dist/assemble/evidenceReconciliationFromSources.js.map +1 -1
- package/dist/domain/checkCharacteristics.d.ts +22 -15
- package/dist/domain/checkCharacteristics.d.ts.map +1 -1
- package/dist/domain/checkCharacteristics.js +22 -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 +21 -0
- 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 +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +2 -10
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +24 -71
- package/dist/internal.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 +24 -36
- package/dist/parse/corpusFaults.d.ts.map +1 -1
- package/dist/parse/corpusFaults.js +16 -32
- 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 +27 -12
- package/dist/parse/scenarios.d.ts.map +1 -1
- package/dist/parse/scenarios.js +47 -85
- 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 +10 -85
- package/dist/parse/targetManifest.d.ts.map +1 -1
- package/dist/parse/targetManifest.js +47 -137
- 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 +3 -2
- 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 -1
- 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
|
@@ -53,7 +53,7 @@ evidenceObligationsOf, pendingItemsOf, } from "../model.js";
|
|
|
53
53
|
import { reconcileEvidenceObligation,
|
|
54
54
|
// THE CREDIT-SIDE AND DEGENERATE OUTCOME RULES (3F-2204) — what an entry reconciles TO, as
|
|
55
55
|
// opposed to where it lands. `reconcile` asks; it no longer maps outcomes itself.
|
|
56
|
-
noEvidenceObligationReconciliationsOf, citesUnknownScenarioReconciliationsOf, suspenseReconciliationsOf, noScnCodeReconciliations, } from "./qualityCheckReconciliation.js";
|
|
56
|
+
noEvidenceObligationReconciliationsOf, citesUnknownScenarioReconciliationsOf, suspenseReconciliationsOf, noScnCodeReconciliations, unspecifiedRowReconciliations, } from "./qualityCheckReconciliation.js";
|
|
57
57
|
import { ledgerTally, runtimeObservationTally, staticObservationTally, } from "./ledger.js";
|
|
58
58
|
import { verdictFor, reconcilingItemsOf,
|
|
59
59
|
// THE ROW-SHAPE RULE (3F-2204) — the both-missing degeneration and its pending clause.
|
|
@@ -61,8 +61,8 @@ qualityCheckReconciliationsOf, } from "./scenarioReconciliation.js";
|
|
|
61
61
|
// THE POSTING RULE (3F-2202) — where an entry lands is canon's own glossary group, so it lives on
|
|
62
62
|
// its own concept module. `reconcile` no longer decides a destination; it ASKS.
|
|
63
63
|
import { postingOf } from "./posting.js";
|
|
64
|
-
// The `lint` quality-check's own
|
|
65
|
-
//
|
|
64
|
+
// The `lint` quality-check's own predicate, asked here to NARROW what the posting rule has already
|
|
65
|
+
// routed — see the fitness arm below.
|
|
66
66
|
import { isStaticCheckObservation } from "../model.js";
|
|
67
67
|
function citationIndex() {
|
|
68
68
|
const byScn = new Map();
|
|
@@ -107,9 +107,6 @@ function routeCredits(evidenceObservations, scenarioIds) {
|
|
|
107
107
|
// same kind of absence, so it lands in the same stream and renders through the same section.
|
|
108
108
|
const brokenEvidence = [];
|
|
109
109
|
const uncited = [];
|
|
110
|
-
// The FITNESS union, not the static interface alone (@SCN-CIP-003). A measurement always cites —
|
|
111
|
-
// its runner stamps the citation — so it cannot in fact reach suspense; the stream is typed to
|
|
112
|
-
// what `postingOf` may hand it rather than to what today's producers happen to emit.
|
|
113
110
|
const noEvidenceObligationGuards = [];
|
|
114
111
|
for (const o of evidenceObservations) {
|
|
115
112
|
// The union NARROW — `qualityCheck === "lint"` is the `EvidenceObservation` union's TYPE TAG,
|
|
@@ -161,55 +158,57 @@ function routeCredits(evidenceObservations, scenarioIds) {
|
|
|
161
158
|
}
|
|
162
159
|
return { citations, brokenEvidence, uncited, noEvidenceObligationGuards };
|
|
163
160
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
// THE
|
|
175
|
-
//
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
161
|
+
/**
|
|
162
|
+
* ONE REAL SCENARIO'S ROW — the debit side reconciled against the observed evidence, the credit
|
|
163
|
+
* side's no-evidence-obligation items beside it, and the row assembled from both.
|
|
164
|
+
*
|
|
165
|
+
* ITS OWN FUNCTION, extracted at @SCN-LNT-027 (3F-3472) when the fourth population took `reconcile`
|
|
166
|
+
* past the `max-lines-per-function` ceiling — `routeCredits`' own precedent, and the same seam.
|
|
167
|
+
* Routing is one idea with a name, what each population RECONCILES to is another, and `reconcile`
|
|
168
|
+
* is the ORDER they are filed in. Nothing any of them decides moved.
|
|
169
|
+
*/
|
|
170
|
+
function scenarioRow(d, evidenceObservations, citations, evidenceObligationPairs) {
|
|
171
|
+
// THE PENDING PARTITION (@SCN-PND-004) — `pendingItemsOf` and `evidenceObligationsOf`
|
|
172
|
+
// are exact complements over the scenario's obligations, so nothing is dropped and nothing is
|
|
173
|
+
// counted twice. Rule + rationale: `domain/journal`.
|
|
174
|
+
const pendingItems = pendingItemsOf(d);
|
|
175
|
+
// The DEBIT side — each NAMED obligation reconciled against the observed evidence.
|
|
176
|
+
const reconciledEvidenceObligations = evidenceObligationsOf(d.evidenceObligations).map((req) => reconcileEvidenceObligation(d.scnId, req, evidenceObservations));
|
|
177
|
+
// The CREDIT side — NO-EVIDENCE-OBLIGATION (@SCN-LDG-008): a credit citing THIS real scenario at a
|
|
178
|
+
// quality-check it never named. Rule + rationale: `domain/qualityCheckReconciliation`.
|
|
179
|
+
const noEvidenceObligationItems = noEvidenceObligationReconciliationsOf(d.scnId, citations.creditsFor(d.scnId), evidenceObligationPairs);
|
|
180
|
+
// The row's SUB-ROWS, degenerating to one `both-missing` item when the row reconciled to
|
|
181
|
+
// nothing either way (@SCN-LDG-009). Rule + rationale: `domain/scenarioReconciliation`.
|
|
182
|
+
const qualityCheckReconciliations = qualityCheckReconciliationsOf(reconciledEvidenceObligations, noEvidenceObligationItems, pendingItems);
|
|
183
|
+
return {
|
|
184
|
+
scnId: d.scnId,
|
|
185
|
+
kind: "scenario",
|
|
186
|
+
verdict: verdictFor(qualityCheckReconciliations),
|
|
187
|
+
// THE POSTED CREDITS (@SCN-LDG-022) — every credit CITING this scenario, whatever it
|
|
188
|
+
// reconciles to above. The citation index holds every citing credit, so this includes one citing a
|
|
189
|
+
// PENDING quality-check, which reconciles `no-evidence-obligation` (3F-1858 — it used to reconcile to
|
|
190
|
+
// NO ROW AT ALL, the false-green this posting made visible without fixing). It posts and is
|
|
191
|
+
// findable WHATEVER it reconciles to; posting is not classifying, and a misclassification
|
|
192
|
+
// must misfile an entry, never vaporise it. A fitness check's run is in here too and by the
|
|
193
|
+
// SAME route (3F-2590): it cites this scenario, so the citation index holds it like any other.
|
|
194
|
+
evidenceObservations: citations.creditsFor(d.scnId),
|
|
195
|
+
// THE POSTED DEBITS (@SCN-LDG-023) — every obligation THIS scenario RAISES, in document
|
|
196
|
+
// order, keyed by quality-check. The debit half of the same posting: where a credit is
|
|
197
|
+
// routed by its citation, a debit needs no routing at all — the account IS the scenario.
|
|
198
|
+
// Includes a PENDING obligation, which partitioned off above and earns NO reconciled row: it
|
|
199
|
+
// posts ANYWAY. Posting is not classifying, on this side too.
|
|
200
|
+
evidenceObligations: [...d.evidenceObligations],
|
|
201
|
+
qualityCheckReconciliations,
|
|
202
|
+
reconcilingItems: reconcilingItemsOf(qualityCheckReconciliations),
|
|
203
|
+
pendingItems,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* THE PHANTOM ROWS, assembled (@SCN-LDG-006). Extracted beside its siblings at 3F-3472; the
|
|
208
|
+
* routing that produced `citations.phantomIds` is `routeCredits`', and unchanged.
|
|
209
|
+
*/
|
|
210
|
+
function phantomScenarioRows(citations) {
|
|
211
|
+
const rows = [];
|
|
213
212
|
// CREDIT-SIDE — PHANTOM scenarios (@SCN-LDG-006). One phantom Scenario Reconciliation per
|
|
214
213
|
// UNKNOWN cited id, in first-seen order, its Quality Check Reconciliation(s) carrying the
|
|
215
214
|
// outcome `cites-unknown-scenario` (and the evidence observation's locator, ruling Q5), verdict
|
|
@@ -223,7 +222,7 @@ export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [
|
|
|
223
222
|
const credits = citations.creditsFor(scnId);
|
|
224
223
|
// ASKED, not decided (3F-2204).
|
|
225
224
|
const items = citesUnknownScenarioReconciliationsOf(credits);
|
|
226
|
-
|
|
225
|
+
rows.push({
|
|
227
226
|
scnId,
|
|
228
227
|
kind: "phantom-scenario",
|
|
229
228
|
// ASKED, not restated (3F-2204, the close-gate read). Canon says a phantom row is ALWAYS
|
|
@@ -245,6 +244,14 @@ export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [
|
|
|
245
244
|
pendingItems: [],
|
|
246
245
|
});
|
|
247
246
|
}
|
|
247
|
+
return rows;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* THE SUSPENSE ROW, assembled (@SCN-LDG-007) — nil rows or one. Extracted beside its siblings at
|
|
251
|
+
* 3F-3472; what lands on it is `routeCredits`' decision, and unchanged.
|
|
252
|
+
*/
|
|
253
|
+
function suspenseScenarioRows(brokenEvidence, uncited, noEvidenceObligationGuards) {
|
|
254
|
+
const rows = [];
|
|
248
255
|
// THE SUSPENSE ROW (@SCN-LDG-007) — every entry that names no scenario aggregates into ONE row
|
|
249
256
|
// (sentinel scnId `(no scenario)`), grouped LAST, verdict always out-of-balance.
|
|
250
257
|
//
|
|
@@ -254,7 +261,7 @@ export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [
|
|
|
254
261
|
// on it, so no credit means no row.
|
|
255
262
|
if (brokenEvidence.length > 0 || uncited.length > 0 || noEvidenceObligationGuards.length > 0) {
|
|
256
263
|
const items = suspenseReconciliationsOf(brokenEvidence, uncited, noEvidenceObligationGuards);
|
|
257
|
-
|
|
264
|
+
rows.push({
|
|
258
265
|
scnId: "(no scenario)",
|
|
259
266
|
kind: "suspense-scenario",
|
|
260
267
|
// ASKED, not restated — same reason as the phantom row. The `if` above is what makes this
|
|
@@ -272,6 +279,13 @@ export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [
|
|
|
272
279
|
pendingItems: [],
|
|
273
280
|
});
|
|
274
281
|
}
|
|
282
|
+
return rows;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* THE UNCODED-WORK ROWS, assembled (@SCN-LDG-021). Extracted beside its siblings at 3F-3472.
|
|
286
|
+
*/
|
|
287
|
+
function untaggedScenarioRows(untaggedScenarios) {
|
|
288
|
+
const rows = [];
|
|
275
289
|
// UNCODED WORK (@SCN-LDG-021) — a scenario carrying no @SCN. It is REAL and ORDINARY
|
|
276
290
|
// (`kind: "scenario"`, never phantom or suspense: it exists, and cucumber runs it); what is
|
|
277
291
|
// absent is the CODE its obligation needs in order to link to an observation. It gets its own
|
|
@@ -281,7 +295,7 @@ export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [
|
|
|
281
295
|
// are the item concept's (3F-2204, `noScnCodeReconciliations` — rule + rationale there).
|
|
282
296
|
for (const name of untaggedScenarios) {
|
|
283
297
|
const items = noScnCodeReconciliations();
|
|
284
|
-
|
|
298
|
+
rows.push({
|
|
285
299
|
// The scenario's NAME is its only handle — it has no code. (Precedent: the suspense row's
|
|
286
300
|
// "(no scenario)" sentinel; `featureCodeOf` falls back to the raw id when it cannot parse.)
|
|
287
301
|
scnId: name,
|
|
@@ -299,7 +313,89 @@ export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [
|
|
|
299
313
|
pendingItems: [],
|
|
300
314
|
});
|
|
301
315
|
}
|
|
302
|
-
return
|
|
316
|
+
return rows;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* THE ROWS A CONFIGURED ROW WITH NO SCENARIO EARNS, assembled (@SCN-LNT-027, 3F-3472).
|
|
320
|
+
*/
|
|
321
|
+
function unspecifiedFitnessRowRows(unspecifiedFitnessRows) {
|
|
322
|
+
const rows = [];
|
|
323
|
+
// A CONFIGURED ROW THE CORPUS CARRIES NO SCENARIO FOR (@SCN-LNT-027, 3F-3472) — a check the
|
|
324
|
+
// target's manifest declares and nothing in its corpus specifies. The obligations travel with
|
|
325
|
+
// the scenarios, so such a row raised NOTHING: it was not `missing`, not phantom, not suspense,
|
|
326
|
+
// and a tree carrying one reconciled balanced at exit 0 over a check declared and never written.
|
|
327
|
+
// `features/fitness-checks.feature` promises the opposite in terms — "a row whose scenario the
|
|
328
|
+
// corpus does not carry as an Evidence Obligation nothing observed" — and this is that promise.
|
|
329
|
+
//
|
|
330
|
+
// THE PRECEDENT IS UNCODED WORK, three lines up: a fact the ordinary obligation path cannot raise
|
|
331
|
+
// reaches the ledger by a reading of its own and gets its own out-of-balance row so the verdict
|
|
332
|
+
// can see it at all. There the CORPUS supplies a row the obligations cannot; here the MANIFEST
|
|
333
|
+
// does.
|
|
334
|
+
//
|
|
335
|
+
// THE ROW IS NOT IN `scenarioIds`, WHICH IS WHAT MAKES IT UNDISCHARGEABLE. That set was built
|
|
336
|
+
// from `scenarios` alone and is not widened here, so a credit citing this row's code still mints
|
|
337
|
+
// a PHANTOM row (@SCN-LDG-006, @SCN-LNT-009) and a broken credit still lands on SUSPENSE — and
|
|
338
|
+
// there is no route left by which any credit settles this debit. Synthesising a `Scenario` for
|
|
339
|
+
// the row instead would have put it INTO that set, so a run whose CI step cited a declared-but-
|
|
340
|
+
// unwritten check would reconcile BALANCED: a new false green, in the case the phantom row
|
|
341
|
+
// already covers.
|
|
342
|
+
for (const row of unspecifiedFitnessRows) {
|
|
343
|
+
const items = unspecifiedRowReconciliations(row.characteristic);
|
|
344
|
+
rows.push({
|
|
345
|
+
scnId: row.scnId,
|
|
346
|
+
kind: "scenario",
|
|
347
|
+
// ASKED, not restated — the phantom and suspense rows' rule. `unspecifiedRowReconciliations`
|
|
348
|
+
// always returns the one `missing` item, so the verdict follows from it.
|
|
349
|
+
verdict: verdictFor(items),
|
|
350
|
+
// No scenario carries this code, so the citation router posts no credit here — see above.
|
|
351
|
+
evidenceObservations: [],
|
|
352
|
+
// THE DEBIT IS REAL AND IS POSTED (@SCN-LDG-023). Unlike the untagged row above, which
|
|
353
|
+
// reaches the ledger by name and names no check, this row names exactly one characteristic:
|
|
354
|
+
// that is the obligation, and the manifest is what raised it.
|
|
355
|
+
evidenceObligations: [...items.map((item) => item.evidenceObligation)],
|
|
356
|
+
qualityCheckReconciliations: items,
|
|
357
|
+
reconcilingItems: items,
|
|
358
|
+
pendingItems: [],
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return rows;
|
|
362
|
+
}
|
|
363
|
+
export function reconcile(scenarios, evidenceObservations, untaggedScenarios = [],
|
|
364
|
+
/**
|
|
365
|
+
* The CONFIGURED ROWS the target's corpus carries no scenario for (@SCN-LNT-027, 3F-3472) — the
|
|
366
|
+
* fourth population, minted below.
|
|
367
|
+
*
|
|
368
|
+
* IT DEFAULTS, WHERE THE TWO GATES BELOW DELIBERATELY DO NOT (3F-2875). A gate that defaults is a
|
|
369
|
+
* gate a caller can forget and thereby CHANGE what the summary claims. This is a population, and
|
|
370
|
+
* an omitted population is indistinguishable from an empty one in the only way that matters:
|
|
371
|
+
* both mint no rows, and neither says anything about a manifest. Every caller that constructs
|
|
372
|
+
* `Scenario[]` by hand has no manifest to read rows from, which is `untaggedScenarios`' own
|
|
373
|
+
* argument for the default it already carries.
|
|
374
|
+
*/
|
|
375
|
+
unspecifiedFitnessRows = []) {
|
|
376
|
+
// THE OBLIGATION SIDE, prepared once — the three sets the posting rule and the outcome rules read.
|
|
377
|
+
// Each is already the MODEL's own rule (never re-derived here), and each is built ONCE and
|
|
378
|
+
// shared, so no two consumers can drift: `scenarioIds` is which scenarios exist,
|
|
379
|
+
// and `evidenceObligationPairs` is what they name at each quality-check (3F-1858).
|
|
380
|
+
const scenarioIds = new Set(scenarios.map((d) => d.scnId));
|
|
381
|
+
// The NAMED pairs — the model's rule, built ONCE and shared with the census (3F-1858).
|
|
382
|
+
// Pending obligations are excluded: a pending obligation names nothing.
|
|
383
|
+
const evidenceObligationPairs = evidenceObligationPairsOf(scenarios);
|
|
384
|
+
// THE ONE ROUTING PASS (3F-2202) — asked of the posting rule, in one place, and read back as
|
|
385
|
+
// four streams. What each of them then RECONCILES to is the fold's, below.
|
|
386
|
+
const { citations, brokenEvidence, uncited, noEvidenceObligationGuards } = routeCredits(evidenceObservations, scenarioIds);
|
|
387
|
+
// THE ORDER THE POPULATIONS ARE FILED IN IS THE LEDGER'S GROUPING, and it is the whole of what
|
|
388
|
+
// this function decides now: the real scenario rows, then the phantom rows a credit invented,
|
|
389
|
+
// then the one suspense row, then uncoded work, then the configured rows no scenario specifies.
|
|
390
|
+
return {
|
|
391
|
+
scenarioReconciliations: [
|
|
392
|
+
...scenarios.map((d) => scenarioRow(d, evidenceObservations, citations, evidenceObligationPairs)),
|
|
393
|
+
...phantomScenarioRows(citations),
|
|
394
|
+
...suspenseScenarioRows(brokenEvidence, uncited, noEvidenceObligationGuards),
|
|
395
|
+
...untaggedScenarioRows(untaggedScenarios),
|
|
396
|
+
...unspecifiedFitnessRowRows(unspecifiedFitnessRows),
|
|
397
|
+
],
|
|
398
|
+
};
|
|
303
399
|
}
|
|
304
400
|
/**
|
|
305
401
|
* Materialise the summary totals from the balance — the aggregate the markdown's trial-balance
|
|
@@ -388,8 +484,15 @@ export function summaryOf(ledger, withRuntimeObservations, withStaticChecks) {
|
|
|
388
484
|
* so. A default is the wrong shape for an argument whose omission is indistinguishable from a
|
|
389
485
|
* deliberate `false`.
|
|
390
486
|
*/
|
|
391
|
-
export function evidenceReconciliationOf(scenarios, evidenceObservations, untaggedScenarios, withRuntimeObservations, withStaticChecks
|
|
392
|
-
|
|
487
|
+
export function evidenceReconciliationOf(scenarios, evidenceObservations, untaggedScenarios, withRuntimeObservations, withStaticChecks,
|
|
488
|
+
/**
|
|
489
|
+
* The CONFIGURED ROWS the corpus carries no scenario for (@SCN-LNT-027, 3F-3472) — passed
|
|
490
|
+
* through to `reconcile`, which mints one row apiece. It defaults for the reason given there, and
|
|
491
|
+
* that reason is NOT the trailing three's: a population omitted mints nothing and claims nothing,
|
|
492
|
+
* where a gate omitted silently changes what the summary says is in play.
|
|
493
|
+
*/
|
|
494
|
+
unspecifiedFitnessRows = []) {
|
|
495
|
+
const ledger = reconcile(scenarios, evidenceObservations, untaggedScenarios, unspecifiedFitnessRows);
|
|
393
496
|
return { summary: summaryOf(ledger, withRuntimeObservations, withStaticChecks), ledger };
|
|
394
497
|
}
|
|
395
498
|
//# sourceMappingURL=evidenceReconciliation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidenceReconciliation.js","sourceRoot":"","sources":["../../src/domain/evidenceReconciliation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAaH,OAAO,EACL,yBAAyB;AACzB,6FAA6F;AAC7F,qBAAqB,EACrB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,2BAA2B;AAC3B,2FAA2F;AAC3F,kFAAkF;AAClF,qCAAqC,EACrC,qCAAqC,EACrC,yBAAyB,EACzB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"evidenceReconciliation.js","sourceRoot":"","sources":["../../src/domain/evidenceReconciliation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAaH,OAAO,EACL,yBAAyB;AACzB,6FAA6F;AAC7F,qBAAqB,EACrB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,2BAA2B;AAC3B,2FAA2F;AAC3F,kFAAkF;AAClF,qCAAqC,EACrC,qCAAqC,EACrC,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAOrB,OAAO,EACL,UAAU,EACV,kBAAkB;AAClB,uFAAuF;AACvF,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,kGAAkG;AAClG,gFAAgF;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,mGAAmG;AACnG,sCAAsC;AACtC,OAA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-23,54 +23,22 @@
|
|
|
23
23
|
* rather than something a lookup has to recover.
|
|
24
24
|
*
|
|
25
25
|
* PURE AND INJECTED — the rows arrive as data, read from the TARGET's own manifest at the app edge
|
|
26
|
-
* (`specController.fitnessChecks`), the stance `thresholdsOf`
|
|
26
|
+
* (`specController.fitnessChecks`), the stance the retired `thresholdsOf` took. A target that
|
|
27
27
|
* configures nothing raises nothing, so the reading is inert on a corpus
|
|
28
28
|
* nobody has converted.
|
|
29
29
|
*/
|
|
30
|
-
import { type ThresholdBar } from "./thresholds.js";
|
|
31
30
|
/**
|
|
32
31
|
* ONE CONFIGURED ROW as the obligation rule reads it.
|
|
33
32
|
*
|
|
34
33
|
* The `scn` a row states is not a member here: it is this index's KEY, so a row cannot name one
|
|
35
34
|
* scenario and be filed under another. The command a row states is not a member either — it is the
|
|
36
|
-
* COMMAND half of the row and nothing on the debit side reads it.
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* AND SO IS THE ENDING BY WHICH THAT COMMAND SAYS `I EXAMINED NOTHING` (3F-3177). It is not the
|
|
40
|
-
* command: it is the row's sentence about how the command SPEAKS, and the credit side has to ask
|
|
41
|
-
* it, because a skip in the run's step record is honest exactly where the row named the ending that
|
|
42
|
-
* produced it and incidental everywhere else. One field read by two sides belongs in the ONE
|
|
43
|
-
* reading of the rows, beside the bar — a second copy elsewhere is two readers of one fact.
|
|
35
|
+
* COMMAND half of the row and nothing on the debit side reads it. Every row is credited by its own
|
|
36
|
+
* step's outcome in the run's record, so the characteristic is the whole of what the ledger reads.
|
|
44
37
|
*/
|
|
45
38
|
export interface FitnessCheck {
|
|
46
39
|
/** The bare characteristic this check asserts (`complexity`). */
|
|
47
40
|
readonly characteristic: string;
|
|
48
|
-
/**
|
|
49
|
-
* The BAR this check's number is held to (@SCN-LNT-019), and the field whose PRESENCE says the
|
|
50
|
-
* check is measured at all.
|
|
51
|
-
*
|
|
52
|
-
* THREE STATES, AND THE MIDDLE ONE IS THE POINT. Absent: the row named no bar key, so the check
|
|
53
|
-
* is static — the discrimination `thresholdsOf` has always made, where a check with no entry is
|
|
54
|
-
* already the static case. A bar: the row named one and it read. `null`: the row named one and
|
|
55
|
-
* authored none this could read, which keeps the check MEASURED with nothing to hold it to —
|
|
56
|
-
* `barOf`'s own way with an entry it cannot read, and the shape @SCN-CIP-002 exists to report.
|
|
57
|
-
*
|
|
58
|
-
* READ THROUGH `carriesBar`, NEVER BY REACHING FOR THIS FIELD, because both sides of the ledger
|
|
59
|
-
* ask the same question of it and one spelling is what keeps their answers the same.
|
|
60
|
-
*/
|
|
61
|
-
readonly bar?: ThresholdBar | null;
|
|
62
41
|
}
|
|
63
|
-
/**
|
|
64
|
-
* THE ONE PREDICATE — does this row carry a bar (@SCN-LNT-019).
|
|
65
|
-
*
|
|
66
|
-
* The DEBIT asks it to decide whether to raise a measured obligation or a static one; the CREDIT
|
|
67
|
-
* asks it to decide whether a step's outcome raises a credit at all, a measured row's credit
|
|
68
|
-
* being its NUMBER. Two questions, one fact, and one spelling: two readers over this field would
|
|
69
|
-
* eventually differ, and the row whose bar nothing can read — measured, with `null` beside it — is
|
|
70
|
-
* exactly where they would differ first, producing an obligation with no credit or two credits for
|
|
71
|
-
* one obligation.
|
|
72
|
-
*/
|
|
73
|
-
export declare function carriesBar(check: FitnessCheck): boolean;
|
|
74
42
|
/** The rows as the rule reads them — bare `@SCN` → the row naming that scenario's check. */
|
|
75
43
|
export type FitnessCheckIndex = ReadonlyMap<string, FitnessCheck>;
|
|
76
44
|
/**
|
|
@@ -87,4 +55,25 @@ export type FitnessCheckIndex = ReadonlyMap<string, FitnessCheck>;
|
|
|
87
55
|
* dropped row leaves its scenario naming no characteristic, which the corpus reports.
|
|
88
56
|
*/
|
|
89
57
|
export declare function fitnessChecksOf(entries: unknown): FitnessCheckIndex;
|
|
58
|
+
/**
|
|
59
|
+
* ONE CONFIGURED ROW THE TARGET'S CORPUS CARRIES NO SCENARIO FOR (3F-3472) — a check the manifest
|
|
60
|
+
* declares and nothing in the corpus specifies.
|
|
61
|
+
*
|
|
62
|
+
* THE MIRROR OF `unconfiguredFitnessScenarios`, AND THE HALF THE BOOKS COULD NOT SEE. That one
|
|
63
|
+
* reads a `@fitness` scenario no row names; this reads a row no scenario names. The asymmetry
|
|
64
|
+
* between what each EARNS is the two facts' own: a scenario naming no row names no characteristic,
|
|
65
|
+
* so there is nothing to put on the books and the census says who — a row names one, so there IS a
|
|
66
|
+
* debit, and `features/fitness-checks.feature` promises it as "an Evidence Obligation nothing
|
|
67
|
+
* observed".
|
|
68
|
+
*
|
|
69
|
+
* IT CARRIES THE CHARACTERISTIC BECAUSE THE OBLIGATION IT RAISES NAMES ONE. The `@SCN` alone would
|
|
70
|
+
* leave the reader of this reading to go back to the index for the other half, which is the second
|
|
71
|
+
* read `readTargetCorpus` composes its readings together to foreclose.
|
|
72
|
+
*/
|
|
73
|
+
export interface UnspecifiedFitnessRow {
|
|
74
|
+
/** The `@SCN` the row states, which no scenario in the target's corpus carries. */
|
|
75
|
+
readonly scnId: string;
|
|
76
|
+
/** The bare characteristic the row asserts (`complexity`) — what its debit is owed at. */
|
|
77
|
+
readonly characteristic: string;
|
|
78
|
+
}
|
|
90
79
|
//# sourceMappingURL=fitnessChecks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fitnessChecks.d.ts","sourceRoot":"","sources":["../../src/domain/fitnessChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"fitnessChecks.d.ts","sourceRoot":"","sources":["../../src/domain/fitnessChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,4FAA4F;AAC5F,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AA2BlE;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAQnE;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,qBAAqB;IACpC,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC"}
|
|
@@ -23,38 +23,18 @@
|
|
|
23
23
|
* rather than something a lookup has to recover.
|
|
24
24
|
*
|
|
25
25
|
* PURE AND INJECTED — the rows arrive as data, read from the TARGET's own manifest at the app edge
|
|
26
|
-
* (`specController.fitnessChecks`), the stance `thresholdsOf`
|
|
26
|
+
* (`specController.fitnessChecks`), the stance the retired `thresholdsOf` took. A target that
|
|
27
27
|
* configures nothing raises nothing, so the reading is inert on a corpus
|
|
28
28
|
* nobody has converted.
|
|
29
29
|
*/
|
|
30
30
|
import { bareTerm } from "../lib/bareTerm.js";
|
|
31
|
-
import { barOf } from "./thresholds.js";
|
|
32
|
-
/**
|
|
33
|
-
* THE ONE PREDICATE — does this row carry a bar (@SCN-LNT-019).
|
|
34
|
-
*
|
|
35
|
-
* The DEBIT asks it to decide whether to raise a measured obligation or a static one; the CREDIT
|
|
36
|
-
* asks it to decide whether a step's outcome raises a credit at all, a measured row's credit
|
|
37
|
-
* being its NUMBER. Two questions, one fact, and one spelling: two readers over this field would
|
|
38
|
-
* eventually differ, and the row whose bar nothing can read — measured, with `null` beside it — is
|
|
39
|
-
* exactly where they would differ first, producing an obligation with no credit or two credits for
|
|
40
|
-
* one obligation.
|
|
41
|
-
*/
|
|
42
|
-
export function carriesBar(check) {
|
|
43
|
-
return check.bar !== undefined;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* The two keys a row names its bar with. Either one makes the row MEASURED, whatever stands beside
|
|
47
|
-
* it — the key is the target saying this check produces a number, and only the value can fail to
|
|
48
|
-
* read.
|
|
49
|
-
*/
|
|
50
|
-
const BAR_DIRECTIONS = ["atLeast", "atMost"];
|
|
51
31
|
/**
|
|
52
32
|
* One entry as a manifest spells it, read into the pair a lookup can use, or `null` where it names
|
|
53
33
|
* nothing one can.
|
|
54
34
|
*
|
|
55
35
|
* BOTH TERMS ARE STORED BARE. A manifest written by hand will sooner or later spell an `@SCN` — and
|
|
56
36
|
* a characteristic — the way a feature file does, and both lookups match bare; stripping once here
|
|
57
|
-
* rather than at every call site is the stance `thresholdsOf`
|
|
37
|
+
* rather than at every call site is the stance the retired `thresholdsOf` took.
|
|
58
38
|
*
|
|
59
39
|
* A ROW NAMING NEITHER TERM IS DROPPED WHOLE, never half-read. The two terms make one claim
|
|
60
40
|
* together — THIS scenario asserts THIS characteristic — so a row missing either says nothing a
|
|
@@ -72,14 +52,7 @@ function fitnessCheckOf(entry) {
|
|
|
72
52
|
const characteristic = bareTerm(named.characteristic);
|
|
73
53
|
if (scnId === "" || characteristic === "")
|
|
74
54
|
return null;
|
|
75
|
-
|
|
76
|
-
// measured characteristics somebody has to keep in step with the rows. The bar is read by the
|
|
77
|
-
// threshold index's OWN reader, handed the row whole: one grammar for `atLeast` / `atMost`, so a
|
|
78
|
-
// converted row and a threshold entry cannot come to disagree about what a target wrote.
|
|
79
|
-
const row = named;
|
|
80
|
-
if (!BAR_DIRECTIONS.some((direction) => direction in row))
|
|
81
|
-
return [scnId, { characteristic }];
|
|
82
|
-
return [scnId, { characteristic, bar: barOf(row) }];
|
|
55
|
+
return [scnId, { characteristic }];
|
|
83
56
|
}
|
|
84
57
|
/**
|
|
85
58
|
* Build the index from the rows a manifest holds.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fitnessChecks.js","sourceRoot":"","sources":["../../src/domain/fitnessChecks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,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