@3f-consulting/spec-controller-core 0.1.0-alpha.7 → 0.1.0-alpha.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/assemble/evidenceReconciliationFromSources.d.ts +5 -40
- package/dist/assemble/evidenceReconciliationFromSources.d.ts.map +1 -1
- package/dist/assemble/evidenceReconciliationFromSources.js +30 -325
- package/dist/assemble/evidenceReconciliationFromSources.js.map +1 -1
- package/dist/assemble/renderInput.d.ts +7 -73
- package/dist/assemble/renderInput.d.ts.map +1 -1
- package/dist/assemble/renderInput.js +3 -45
- package/dist/assemble/renderInput.js.map +1 -1
- package/dist/census/evidenceObligations.d.ts +11 -46
- package/dist/census/evidenceObligations.d.ts.map +1 -1
- package/dist/census/evidenceObligations.js +19 -25
- package/dist/census/evidenceObligations.js.map +1 -1
- package/dist/domain/evidenceOrder.d.ts +3 -0
- package/dist/domain/evidenceOrder.d.ts.map +1 -0
- package/dist/domain/evidenceOrder.js +15 -0
- package/dist/domain/evidenceOrder.js.map +1 -0
- package/dist/domain/evidenceReconciliation.d.ts +21 -391
- package/dist/domain/evidenceReconciliation.d.ts.map +1 -1
- package/dist/domain/evidenceReconciliation.js +87 -382
- package/dist/domain/evidenceReconciliation.js.map +1 -1
- package/dist/domain/featureCode.d.ts +4 -0
- package/dist/domain/featureCode.d.ts.map +1 -0
- package/dist/domain/featureCode.js +12 -0
- package/dist/domain/featureCode.js.map +1 -0
- package/dist/domain/journal.d.ts +8 -393
- package/dist/domain/journal.d.ts.map +1 -1
- package/dist/domain/journal.js +6 -118
- package/dist/domain/journal.js.map +1 -1
- package/dist/domain/ledger.d.ts +8 -328
- package/dist/domain/ledger.d.ts.map +1 -1
- package/dist/domain/ledger.js +23 -326
- package/dist/domain/ledger.js.map +1 -1
- package/dist/domain/messages.d.ts +213 -0
- package/dist/domain/messages.d.ts.map +1 -0
- package/dist/domain/messages.js +313 -0
- package/dist/domain/messages.js.map +1 -0
- package/dist/domain/outcome.d.ts +3 -0
- package/dist/domain/outcome.d.ts.map +1 -0
- package/dist/domain/outcome.js +2 -0
- package/dist/domain/outcome.js.map +1 -0
- package/dist/domain/posting.d.ts +8 -105
- package/dist/domain/posting.d.ts.map +1 -1
- package/dist/domain/posting.js +4 -56
- package/dist/domain/posting.js.map +1 -1
- package/dist/domain/qualityCheckFault.d.ts +3 -43
- package/dist/domain/qualityCheckFault.d.ts.map +1 -1
- package/dist/domain/qualityCheckFault.js +0 -24
- package/dist/domain/qualityCheckFault.js.map +1 -1
- package/dist/domain/qualityCheckReconciliation.d.ts +7 -280
- package/dist/domain/qualityCheckReconciliation.d.ts.map +1 -1
- package/dist/domain/qualityCheckReconciliation.js +63 -463
- package/dist/domain/qualityCheckReconciliation.js.map +1 -1
- package/dist/domain/qualityCheckReconciliationFault.d.ts +0 -19
- package/dist/domain/qualityCheckReconciliationFault.d.ts.map +1 -1
- package/dist/domain/qualityCheckReconciliationFault.js +1 -24
- package/dist/domain/qualityCheckReconciliationFault.js.map +1 -1
- package/dist/domain/scenarioCodeError.d.ts +16 -0
- package/dist/domain/scenarioCodeError.d.ts.map +1 -0
- package/dist/domain/scenarioCodeError.js +4 -0
- package/dist/domain/scenarioCodeError.js.map +1 -0
- package/dist/domain/scenarioReconciliation.d.ts +2 -207
- package/dist/domain/scenarioReconciliation.d.ts.map +1 -1
- package/dist/domain/scenarioReconciliation.js +4 -101
- package/dist/domain/scenarioReconciliation.js.map +1 -1
- package/dist/domain/scnAllocation.d.ts +27 -0
- package/dist/domain/scnAllocation.d.ts.map +1 -0
- package/dist/domain/scnAllocation.js +33 -0
- package/dist/domain/scnAllocation.js.map +1 -0
- package/dist/domain/verdictCode.d.ts +10 -0
- package/dist/domain/verdictCode.d.ts.map +1 -0
- package/dist/domain/verdictCode.js +16 -0
- package/dist/domain/verdictCode.js.map +1 -0
- package/dist/index.d.ts +14 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -88
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +3 -27
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +3 -94
- package/dist/internal.js.map +1 -1
- package/dist/lib/bareTerm.d.ts +0 -39
- package/dist/lib/bareTerm.d.ts.map +1 -1
- package/dist/lib/bareTerm.js +0 -39
- package/dist/lib/bareTerm.js.map +1 -1
- package/dist/lib/portablePath.d.ts.map +1 -1
- package/dist/lib/portablePath.js +2 -16
- package/dist/lib/portablePath.js.map +1 -1
- package/dist/lib/scnCitation.d.ts +0 -32
- package/dist/lib/scnCitation.d.ts.map +1 -1
- package/dist/lib/scnCitation.js +2 -42
- package/dist/lib/scnCitation.js.map +1 -1
- package/dist/model.d.ts +0 -23
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +0 -23
- package/dist/model.js.map +1 -1
- package/dist/parse/checkScriptsRunInCI.d.ts +5 -168
- package/dist/parse/checkScriptsRunInCI.d.ts.map +1 -1
- package/dist/parse/checkScriptsRunInCI.js +11 -171
- package/dist/parse/checkScriptsRunInCI.js.map +1 -1
- package/dist/parse/ciStepRecord.d.ts +4 -118
- package/dist/parse/ciStepRecord.d.ts.map +1 -1
- package/dist/parse/ciStepRecord.js +18 -225
- package/dist/parse/ciStepRecord.js.map +1 -1
- package/dist/parse/commandRuns.d.ts +0 -39
- package/dist/parse/commandRuns.d.ts.map +1 -1
- package/dist/parse/commandRuns.js +6 -67
- package/dist/parse/commandRuns.js.map +1 -1
- package/dist/parse/cucumber.d.ts +0 -53
- package/dist/parse/cucumber.d.ts.map +1 -1
- package/dist/parse/cucumber.js +42 -146
- package/dist/parse/cucumber.js.map +1 -1
- package/dist/parse/discoveryScope.d.ts +1 -46
- package/dist/parse/discoveryScope.d.ts.map +1 -1
- package/dist/parse/discoveryScope.js +2 -57
- package/dist/parse/discoveryScope.js.map +1 -1
- package/dist/parse/fitnessCitations.d.ts +1 -72
- package/dist/parse/fitnessCitations.d.ts.map +1 -1
- package/dist/parse/fitnessCitations.js +3 -55
- package/dist/parse/fitnessCitations.js.map +1 -1
- package/dist/parse/reconcilerSteps.d.ts +0 -46
- package/dist/parse/reconcilerSteps.d.ts.map +1 -1
- package/dist/parse/reconcilerSteps.js +2 -64
- package/dist/parse/reconcilerSteps.js.map +1 -1
- package/dist/parse/runningFitnessFunctions.d.ts +9 -0
- package/dist/parse/runningFitnessFunctions.d.ts.map +1 -0
- package/dist/parse/runningFitnessFunctions.js +57 -0
- package/dist/parse/runningFitnessFunctions.js.map +1 -0
- package/dist/parse/scenarioCodeErrors.d.ts +11 -0
- package/dist/parse/scenarioCodeErrors.d.ts.map +1 -0
- package/dist/parse/scenarioCodeErrors.js +78 -0
- package/dist/parse/scenarioCodeErrors.js.map +1 -0
- package/dist/parse/scenarios.d.ts +3 -228
- package/dist/parse/scenarios.d.ts.map +1 -1
- package/dist/parse/scenarios.js +20 -457
- package/dist/parse/scenarios.js.map +1 -1
- package/dist/parse/stepAccounting.d.ts +0 -46
- package/dist/parse/stepAccounting.d.ts.map +1 -1
- package/dist/parse/stepAccounting.js +1 -55
- package/dist/parse/stepAccounting.js.map +1 -1
- package/dist/parse/stepExclusions.d.ts +0 -47
- package/dist/parse/stepExclusions.d.ts.map +1 -1
- package/dist/parse/stepExclusions.js +2 -50
- package/dist/parse/stepExclusions.js.map +1 -1
- package/dist/parse/stepNames.d.ts +0 -27
- package/dist/parse/stepNames.d.ts.map +1 -1
- package/dist/parse/stepNames.js +0 -27
- package/dist/parse/stepNames.js.map +1 -1
- package/dist/parse/targetCorpus.d.ts +1 -78
- package/dist/parse/targetCorpus.d.ts.map +1 -1
- package/dist/parse/targetCorpus.js +4 -46
- package/dist/parse/targetCorpus.js.map +1 -1
- package/dist/parse/targetManifest.d.ts +8 -146
- package/dist/parse/targetManifest.d.ts.map +1 -1
- package/dist/parse/targetManifest.js +48 -198
- package/dist/parse/targetManifest.js.map +1 -1
- package/dist/parse/vitest.d.ts +0 -60
- package/dist/parse/vitest.d.ts.map +1 -1
- package/dist/parse/vitest.js +4 -83
- package/dist/parse/vitest.js.map +1 -1
- package/dist/provenance/provenance.d.ts +2 -110
- package/dist/provenance/provenance.d.ts.map +1 -1
- package/dist/provenance/provenance.js +2 -58
- package/dist/provenance/provenance.js.map +1 -1
- package/dist/render/behaviouralRunners.d.ts +0 -29
- package/dist/render/behaviouralRunners.d.ts.map +1 -1
- package/dist/render/behaviouralRunners.js +6 -69
- package/dist/render/behaviouralRunners.js.map +1 -1
- package/dist/render/configurationNotRead.d.ts +3 -0
- package/dist/render/configurationNotRead.d.ts.map +1 -0
- package/dist/render/configurationNotRead.js +17 -0
- package/dist/render/configurationNotRead.js.map +1 -0
- package/dist/render/discoveryScope.d.ts +0 -37
- package/dist/render/discoveryScope.d.ts.map +1 -1
- package/dist/render/discoveryScope.js +3 -39
- package/dist/render/discoveryScope.js.map +1 -1
- package/dist/render/evidenceGrid.d.ts +1 -35
- package/dist/render/evidenceGrid.d.ts.map +1 -1
- package/dist/render/evidenceGrid.js +21 -103
- package/dist/render/evidenceGrid.js.map +1 -1
- package/dist/render/excludedSteps.d.ts +0 -26
- package/dist/render/excludedSteps.d.ts.map +1 -1
- package/dist/render/excludedSteps.js +4 -32
- package/dist/render/excludedSteps.js.map +1 -1
- package/dist/render/fitnessFunctions.d.ts +3 -0
- package/dist/render/fitnessFunctions.d.ts.map +1 -0
- package/dist/render/fitnessFunctions.js +12 -0
- package/dist/render/fitnessFunctions.js.map +1 -0
- package/dist/render/json.d.ts +0 -11
- package/dist/render/json.d.ts.map +1 -1
- package/dist/render/json.js +0 -11
- package/dist/render/json.js.map +1 -1
- package/dist/render/markdown.d.ts +1 -55
- package/dist/render/markdown.d.ts.map +1 -1
- package/dist/render/markdown.js +128 -467
- package/dist/render/markdown.js.map +1 -1
- package/dist/render/provenanceSection.d.ts +0 -22
- package/dist/render/provenanceSection.d.ts.map +1 -1
- package/dist/render/provenanceSection.js +10 -53
- package/dist/render/provenanceSection.js.map +1 -1
- package/dist/render/reconcilerSteps.d.ts +0 -25
- package/dist/render/reconcilerSteps.d.ts.map +1 -1
- package/dist/render/reconcilerSteps.js +5 -30
- package/dist/render/reconcilerSteps.js.map +1 -1
- package/dist/render/runVerdict.d.ts +0 -38
- package/dist/render/runVerdict.d.ts.map +1 -1
- package/dist/render/runVerdict.js +62 -129
- package/dist/render/runVerdict.js.map +1 -1
- package/dist/render/scenarioCodeErrorsSection.d.ts +3 -0
- package/dist/render/scenarioCodeErrorsSection.d.ts.map +1 -0
- package/dist/render/scenarioCodeErrorsSection.js +45 -0
- package/dist/render/scenarioCodeErrorsSection.js.map +1 -0
- package/dist/render/stepAccounting.d.ts +0 -36
- package/dist/render/stepAccounting.d.ts.map +1 -1
- package/dist/render/stepAccounting.js +5 -49
- package/dist/render/stepAccounting.js.map +1 -1
- package/dist/render/testVolume.d.ts +0 -25
- package/dist/render/testVolume.d.ts.map +1 -1
- package/dist/render/testVolume.js +4 -35
- package/dist/render/testVolume.js.map +1 -1
- package/package.json +4 -1
- package/dist/domain/checkCharacteristics.d.ts +0 -88
- package/dist/domain/checkCharacteristics.d.ts.map +0 -1
- package/dist/domain/checkCharacteristics.js +0 -109
- package/dist/domain/checkCharacteristics.js.map +0 -1
- package/dist/domain/fitnessChecks.d.ts +0 -79
- package/dist/domain/fitnessChecks.d.ts.map +0 -1
- package/dist/domain/fitnessChecks.js +0 -81
- package/dist/domain/fitnessChecks.js.map +0 -1
- package/dist/domain/qualityCheckFaultMessages.d.ts +0 -43
- package/dist/domain/qualityCheckFaultMessages.d.ts.map +0 -1
- package/dist/domain/qualityCheckFaultMessages.js +0 -38
- package/dist/domain/qualityCheckFaultMessages.js.map +0 -1
- package/dist/lib/featureCode.d.ts +0 -21
- package/dist/lib/featureCode.d.ts.map +0 -1
- package/dist/lib/featureCode.js +0 -24
- package/dist/lib/featureCode.js.map +0 -1
- package/dist/parse/corpusCodeFaults.d.ts +0 -76
- package/dist/parse/corpusCodeFaults.d.ts.map +0 -1
- package/dist/parse/corpusCodeFaults.js +0 -121
- package/dist/parse/corpusCodeFaults.js.map +0 -1
- package/dist/parse/corpusFaults.d.ts +0 -124
- package/dist/parse/corpusFaults.d.ts.map +0 -1
- package/dist/parse/corpusFaults.js +0 -72
- package/dist/parse/corpusFaults.js.map +0 -1
- package/dist/parse/corpusGrammarFaults.d.ts +0 -71
- package/dist/parse/corpusGrammarFaults.d.ts.map +0 -1
- package/dist/parse/corpusGrammarFaults.js +0 -292
- package/dist/parse/corpusGrammarFaults.js.map +0 -1
- package/dist/parse/runningStaticChecks.d.ts +0 -125
- package/dist/parse/runningStaticChecks.d.ts.map +0 -1
- package/dist/parse/runningStaticChecks.js +0 -316
- package/dist/parse/runningStaticChecks.js.map +0 -1
- package/dist/render/staticChecks.d.ts +0 -23
- package/dist/render/staticChecks.d.ts.map +0 -1
- package/dist/render/staticChecks.js +0 -69
- package/dist/render/staticChecks.js.map +0 -1
package/dist/domain/posting.d.ts
CHANGED
|
@@ -1,70 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* (`strategy/double-entry-manifesto.md`, "### Posting") beside Journal, Ledger and Reconciling,
|
|
4
|
-
* and this module is that group's home (module, not class), co-locating the destination type with
|
|
5
|
-
* the pure rule that decides it.
|
|
6
|
-
*
|
|
7
|
-
* It sits BETWEEN the journal and the Ledger, which is why it is neither's: `domain/ledger` folds
|
|
8
|
-
* over an ASSEMBLED Ledger, and the posting rule runs BEFORE a Ledger exists; `domain/journal`
|
|
9
|
-
* owns the entry types and what a scenario NAMES. Posting reads both sides and yields the row an
|
|
10
|
-
* entry lands on. (3F-2202 — extracted from the `reconcile` fold, which decided this inline.)
|
|
11
|
-
*
|
|
12
|
-
* ONE CLAUSE, OVER BOTH AXES (3F-2590). THE CREDIT CITES. A test carries `@SCN-XXX`; a fitness
|
|
13
|
-
* check's run carries the `@SCN` of the fitness scenario that raises its obligation. So
|
|
14
|
-
* one credit names one scenario and posts to EXACTLY ONE row, and a credit posting to no real
|
|
15
|
-
* scenario is PHANTOM (its `@SCN` matches no scenario) or SUSPENSE (it cites nothing).
|
|
16
|
-
*
|
|
17
|
-
* THE BY-NAME ROUTE IS GONE, and with it the exception it forced. `lint` used to be the axis where
|
|
18
|
-
* the DEBIT cited: a scenario carried `@lint=<static-check>`, the run cited nothing, and it was
|
|
19
|
-
* matched BY NAME to EVERY row whose obligation named it. That is why the invariant had to be
|
|
20
|
-
* written "every evidence observation posts to AT LEAST ONE account, never to none" — not *exactly*
|
|
21
|
-
* one, which was the runtime property over-generalised. With both axes citing, EXACTLY ONE is true
|
|
22
|
-
* universally, and it is the stronger claim: "at least one" is silent about a double-post, and a
|
|
23
|
-
* double-post is a second copy of the same fact. `Posting` is total over the `EvidenceObservation`
|
|
24
|
-
* union by construction: every variant yields a destination.
|
|
25
|
-
*
|
|
26
|
-
* POSTING IS NOT CLASSIFYING. This rule decides WHERE an entry lands, never what it reconciles TO.
|
|
27
|
-
* A credit posts to its row whatever outcome it later earns — or none at all. The outcome rules
|
|
28
|
-
* are the sibling concepts' (`qualityCheckReconciliation`, `scenarioReconciliation`).
|
|
29
|
-
*/
|
|
30
|
-
import type { EvidenceObservation, RuntimeEvidenceObservation, GuardEvidenceObservation } from "./journal.js";
|
|
31
|
-
/**
|
|
32
|
-
* WHERE an entry lands — the posting destination, one variant per route canon names.
|
|
33
|
-
*
|
|
34
|
-
* EVERY `kind` NAMES A ROW, and matches `ScenarioKind` exactly, because each IS the row kind the
|
|
35
|
-
* entry posts to. A fourth member used to sit here — a SET of rows resolved by name — and it was
|
|
36
|
-
* the one destination that was not a row at all. It went with the by-name route (3F-2590), so the
|
|
37
|
-
* type is now exactly the row kinds, on both axes.
|
|
38
|
-
*
|
|
39
|
-
* Named for the ROW, never `Account`: `account` is RETIRED vocabulary (the container re-term —
|
|
40
|
-
* Evidence / Scenario / Quality-Check Reconciliation replaced trial-balance / account /
|
|
41
|
-
* sub-account), kept only as the bookkeeping ROOT of the metaphor in canon's glossary.
|
|
42
|
-
*/
|
|
43
|
-
export type Posting =
|
|
44
|
-
/** BY CITATION → the row of the one real scenario this credit's `@SCN` names. */
|
|
45
|
-
{
|
|
1
|
+
import type { EvidenceObservation, RuntimeEvidenceObservation, FitnessEvidenceObservation } from "./journal.js";
|
|
2
|
+
export type Posting = {
|
|
46
3
|
kind: "scenario";
|
|
47
4
|
scnId: string;
|
|
48
|
-
}
|
|
49
|
-
/** BY CITATION → an INVENTED row: the credit's `@SCN` is one no scenario carries. */
|
|
50
|
-
| {
|
|
5
|
+
} | {
|
|
51
6
|
kind: "phantom-scenario";
|
|
52
7
|
scnId: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* → the SUSPENSE row: the entry names no row at all. `posted` carries WHICH of the three
|
|
56
|
-
* routes brought it here — they are genuinely different facts with different remedies, and the
|
|
57
|
-
* suspense row's items distinguish them (`broken` vs `cites-no-scenario`):
|
|
58
|
-
* - `broken` — a proof that NEVER RAN, so it names no test and cites
|
|
59
|
-
* nothing, WHATEVER `scnId` / `status` it structurally carries.
|
|
60
|
-
* - `cites-nothing` — a runtime credit that RAN and carried no `@SCN`.
|
|
61
|
-
* - `no-evidence-obligation-static-check` — a static check that ran with no `@lint` naming it.
|
|
62
|
-
*/
|
|
63
|
-
| {
|
|
8
|
+
} | {
|
|
64
9
|
kind: "suspense-scenario";
|
|
65
|
-
posted: "broken" | "cites-nothing" | "no-evidence-obligation-
|
|
10
|
+
posted: "broken" | "cites-nothing" | "no-evidence-obligation-fitness-function";
|
|
66
11
|
};
|
|
67
|
-
/** The destinations a RUNTIME credit can reach — it is citation-routed, so never by name. */
|
|
68
12
|
export type RuntimePosting = {
|
|
69
13
|
kind: "scenario";
|
|
70
14
|
scnId: string;
|
|
@@ -75,23 +19,7 @@ export type RuntimePosting = {
|
|
|
75
19
|
kind: "suspense-scenario";
|
|
76
20
|
posted: "broken" | "cites-nothing";
|
|
77
21
|
};
|
|
78
|
-
|
|
79
|
-
* The destinations a STATIC-CHECK credit can reach — the citation-routed ones when the observer
|
|
80
|
-
* stamped an `@SCN` on it (@SCN-LNT-001), and suspense when the check named nobody or never ran.
|
|
81
|
-
* Structurally `RuntimePosting`'s shape now that the by-name member is gone (3F-2590): one posting
|
|
82
|
-
* rule over both axes. The two types stay APART because their SUSPENSE reasons still differ — a
|
|
83
|
-
* runtime credit reaches suspense `broken` or `cites-nothing`, a fitness credit `broken` or
|
|
84
|
-
* because no obligation names its check — and collapsing them would let a caller be handed a
|
|
85
|
-
* reason its axis cannot produce. `cites-nothing` is the one this axis has never had: a converted
|
|
86
|
-
* credit that cites nothing is a check nobody named, which is a different fault with a different
|
|
87
|
-
* remedy.
|
|
88
|
-
*
|
|
89
|
-
* `broken` ARRIVES HERE AT @SCN-LNT-026 AND IS NOT A NEW CONCEPT, only a newly reachable one. The
|
|
90
|
-
* outcome has meant a proof that never ran since @SCN-LDG-017; what changed is that the static
|
|
91
|
-
* axis can now say it, because the CI run's own step record says whether the check ran and the
|
|
92
|
-
* reader had been declining to look.
|
|
93
|
-
*/
|
|
94
|
-
export type StaticCheckPosting = {
|
|
22
|
+
export type FitnessFunctionPosting = {
|
|
95
23
|
kind: "scenario";
|
|
96
24
|
scnId: string;
|
|
97
25
|
} | {
|
|
@@ -99,34 +27,9 @@ export type StaticCheckPosting = {
|
|
|
99
27
|
scnId: string;
|
|
100
28
|
} | {
|
|
101
29
|
kind: "suspense-scenario";
|
|
102
|
-
posted: "broken" | "no-evidence-obligation-
|
|
30
|
+
posted: "broken" | "no-evidence-obligation-fitness-function";
|
|
103
31
|
};
|
|
104
|
-
/**
|
|
105
|
-
* WHERE does this evidence observation post? THE posting rule, in one place.
|
|
106
|
-
*
|
|
107
|
-
* `scenarioIds` is the OBLIGATION side — which scenarios exist — already the model's own rule,
|
|
108
|
-
* built once by the caller and passed rather than re-derived here, so the rule stays a pure
|
|
109
|
-
* decision over prepared inputs and cannot disagree with the census that shares it. A second set
|
|
110
|
-
* (the named static-check handles) stood beside it for the by-name route and went with it.
|
|
111
|
-
*
|
|
112
|
-
* ORDER IS LOAD-BEARING — the arms are checked exactly as canon fail-safes them, and ON BOTH
|
|
113
|
-
* BRANCHES since @SCN-LNT-026, which is the point of saying it once here:
|
|
114
|
-
* 1. `broken` FIRST, on the FLAG, never on `scnId` / `status` (@SCN-LDG-017). A proof that never
|
|
115
|
-
* ran cannot discharge or fail an obligation, so it must never be citation-routed — not to a
|
|
116
|
-
* real row, not to a phantom one. It structurally MAY carry an `scnId` and a `status`; both
|
|
117
|
-
* are ignored here. Checking `broken` after either would misfile it.
|
|
118
|
-
* 2. an uncited credit (`scnId === null`, or absent on the static axis) → suspense, never phantom.
|
|
119
|
-
* 3. a cited credit whose `@SCN` no scenario carries → phantom.
|
|
120
|
-
* 4. otherwise → that scenario's row.
|
|
121
|
-
*
|
|
122
|
-
* The two branches differ only in what step 2's suspense reason is CALLED, because the two axes
|
|
123
|
-
* reach it for different reasons: a runtime credit that ran and cited nothing, a static check no
|
|
124
|
-
* obligation names. Steps 1, 3 and 4 are the same rule read twice.
|
|
125
|
-
*
|
|
126
|
-
* The overloads keep the two axes' destinations apart at the type level, so a caller that has
|
|
127
|
-
* already narrowed the union cannot be handed a destination its axis can never reach.
|
|
128
|
-
*/
|
|
129
32
|
export declare function postingOf(observation: RuntimeEvidenceObservation, scenarioIds: ReadonlySet<string>): RuntimePosting;
|
|
130
|
-
export declare function postingOf(observation:
|
|
33
|
+
export declare function postingOf(observation: FitnessEvidenceObservation, scenarioIds: ReadonlySet<string>): FitnessFunctionPosting;
|
|
131
34
|
export declare function postingOf(observation: EvidenceObservation, scenarioIds: ReadonlySet<string>): Posting;
|
|
132
35
|
//# sourceMappingURL=posting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posting.d.ts","sourceRoot":"","sources":["../../src/domain/posting.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"posting.d.ts","sourceRoot":"","sources":["../../src/domain/posting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,eAAe,GAAG,yCAAyC,CAAA;CAAE,CAAC;AAElH,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,eAAe,CAAA;CAAE,CAAC;AAEtE,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,yCAAyC,CAAA;CAAE,CAAC;AAEhG,wBAAgB,SAAS,CACvB,WAAW,EAAE,0BAA0B,EACvC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,cAAc,CAAC;AAClB,wBAAgB,SAAS,CACvB,WAAW,EAAE,0BAA0B,EACvC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,sBAAsB,CAAC;AAC1B,wBAAgB,SAAS,CACvB,WAAW,EAAE,mBAAmB,EAChC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,OAAO,CAAC"}
|
package/dist/domain/posting.js
CHANGED
|
@@ -1,68 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
* POSTING — the rule for WHERE an entry lands. Canon gives Posting its own glossary group
|
|
3
|
-
* (`strategy/double-entry-manifesto.md`, "### Posting") beside Journal, Ledger and Reconciling,
|
|
4
|
-
* and this module is that group's home (module, not class), co-locating the destination type with
|
|
5
|
-
* the pure rule that decides it.
|
|
6
|
-
*
|
|
7
|
-
* It sits BETWEEN the journal and the Ledger, which is why it is neither's: `domain/ledger` folds
|
|
8
|
-
* over an ASSEMBLED Ledger, and the posting rule runs BEFORE a Ledger exists; `domain/journal`
|
|
9
|
-
* owns the entry types and what a scenario NAMES. Posting reads both sides and yields the row an
|
|
10
|
-
* entry lands on. (3F-2202 — extracted from the `reconcile` fold, which decided this inline.)
|
|
11
|
-
*
|
|
12
|
-
* ONE CLAUSE, OVER BOTH AXES (3F-2590). THE CREDIT CITES. A test carries `@SCN-XXX`; a fitness
|
|
13
|
-
* check's run carries the `@SCN` of the fitness scenario that raises its obligation. So
|
|
14
|
-
* one credit names one scenario and posts to EXACTLY ONE row, and a credit posting to no real
|
|
15
|
-
* scenario is PHANTOM (its `@SCN` matches no scenario) or SUSPENSE (it cites nothing).
|
|
16
|
-
*
|
|
17
|
-
* THE BY-NAME ROUTE IS GONE, and with it the exception it forced. `lint` used to be the axis where
|
|
18
|
-
* the DEBIT cited: a scenario carried `@lint=<static-check>`, the run cited nothing, and it was
|
|
19
|
-
* matched BY NAME to EVERY row whose obligation named it. That is why the invariant had to be
|
|
20
|
-
* written "every evidence observation posts to AT LEAST ONE account, never to none" — not *exactly*
|
|
21
|
-
* one, which was the runtime property over-generalised. With both axes citing, EXACTLY ONE is true
|
|
22
|
-
* universally, and it is the stronger claim: "at least one" is silent about a double-post, and a
|
|
23
|
-
* double-post is a second copy of the same fact. `Posting` is total over the `EvidenceObservation`
|
|
24
|
-
* union by construction: every variant yields a destination.
|
|
25
|
-
*
|
|
26
|
-
* POSTING IS NOT CLASSIFYING. This rule decides WHERE an entry lands, never what it reconciles TO.
|
|
27
|
-
* A credit posts to its row whatever outcome it later earns — or none at all. The outcome rules
|
|
28
|
-
* are the sibling concepts' (`qualityCheckReconciliation`, `scenarioReconciliation`).
|
|
29
|
-
*/
|
|
30
|
-
// The union's OWN predicate over the `lint` quality-check — asked rather than a hand-written shape
|
|
31
|
-
// test, so this rule classes an observation exactly as the reconciler does.
|
|
32
|
-
// A value import, hence its own statement beside the type-only one above.
|
|
33
|
-
import { isStaticCheckObservation } from "./journal.js";
|
|
1
|
+
import { isFitnessObservation } from "./journal.js";
|
|
34
2
|
export function postingOf(observation, scenarioIds) {
|
|
35
|
-
if (observation.qualityCheck === "
|
|
36
|
-
|
|
37
|
-
// down and carries its reason unchanged: broken is taken on the FLAG, before `scnId` is ever
|
|
38
|
-
// consulted, so a proof that never ran can never be citation-routed — not to a real row, not
|
|
39
|
-
// to a phantom one — and so can neither discharge nor fail the obligation it cites. The
|
|
40
|
-
// observation MAY carry an `scnId` and a `checkTag`, and does; both are ignored here.
|
|
41
|
-
//
|
|
42
|
-
// Asked through the union's own predicate, so this rule and the reconciler class a static-check
|
|
43
|
-
// observation the same way.
|
|
44
|
-
if (isStaticCheckObservation(observation) && observation.broken === true) {
|
|
3
|
+
if (observation.qualityCheck === "fitness") {
|
|
4
|
+
if (isFitnessObservation(observation) && observation.broken === true) {
|
|
45
5
|
return { kind: "suspense-scenario", posted: "broken" };
|
|
46
6
|
}
|
|
47
|
-
// THE CITATION ROUTE (@SCN-LNT-001) — the run carries the `@SCN` of the fitness scenario that
|
|
48
|
-
// raises its obligation, so it posts by citation like every other credit: exactly one row,
|
|
49
|
-
// real or invented. This is deliberately the SAME rule the runtime arm applies below, not a
|
|
50
|
-
// static-axis variant of it — a whole-system characteristic belongs to the one scenario that
|
|
51
|
-
// holds it, and the moment the static axis is allowed its own posting rule is the moment the
|
|
52
|
-
// smear can be reintroduced under a different name.
|
|
53
7
|
if (observation.scnId !== undefined) {
|
|
54
8
|
return scenarioIds.has(observation.scnId)
|
|
55
9
|
? { kind: "scenario", scnId: observation.scnId }
|
|
56
10
|
: { kind: "phantom-scenario", scnId: observation.scnId };
|
|
57
11
|
}
|
|
58
|
-
|
|
59
|
-
// check — so the run cites nothing and posts to SUSPENSE, the static analogue of an uncited
|
|
60
|
-
// runtime credit. There is no by-name fallback to try: a check nobody named is meant to
|
|
61
|
-
// surface, and matching it to rows by handle is exactly the smear this route replaced.
|
|
62
|
-
return { kind: "suspense-scenario", posted: "no-evidence-obligation-static-check" };
|
|
12
|
+
return { kind: "suspense-scenario", posted: "no-evidence-obligation-fitness-function" };
|
|
63
13
|
}
|
|
64
|
-
// THE RUNTIME AXIS — the CREDIT cites, so exactly one row, resolved from the `@SCN` it carries.
|
|
65
|
-
// The fail-safe first: broken is taken on the FLAG, before scnId is ever consulted.
|
|
66
14
|
if (observation.broken === true)
|
|
67
15
|
return { kind: "suspense-scenario", posted: "broken" };
|
|
68
16
|
if (observation.scnId === null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posting.js","sourceRoot":"","sources":["../../src/domain/posting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"posting.js","sourceRoot":"","sources":["../../src/domain/posting.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AA6BpD,MAAM,UAAU,SAAS,CACvB,WAAgC,EAChC,WAAgC;IAEhC,IAAI,WAAW,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC3C,IAAI,oBAAoB,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACrE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QACzD,CAAC;QACD,IAAI,WAAW,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;gBACvC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE;gBAChD,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC;QAC7D,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,yCAAyC,EAAE,CAAC;IAC1F,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACxF,IAAI,WAAW,CAAC,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IAC9F,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QACxC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC;IAChE,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -1,59 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
* The QUALITY CHECK FAULT vocabulary (@SCN-MSG-001, 3F-2872) — what a refused minting carries
|
|
3
|
-
* INSTEAD of a sentence.
|
|
4
|
-
*
|
|
5
|
-
* Stryker mutates every string literal in the domain, so an invariant that states its refusal as
|
|
6
|
-
* an interpolated template puts its prose on the mutated surface: emptying a template chunk
|
|
7
|
-
* survives every test that does not pin wording, and pinning wording turns a copy-edit red. The
|
|
8
|
-
* cure is to move the question rather than answer it — the throw site names a CODE and carries its
|
|
9
|
-
* parameters as fields, and the prose that renders them lives in a catalogue held as data.
|
|
10
|
-
*
|
|
11
|
-
* THE CODE IS A NUMERIC, IMPLICITLY-VALUED ENUM, AND THAT IS THE WHOLE POINT. A string enum would
|
|
12
|
-
* relocate the mutable prose onto the enum's own values — the survivors would move house rather
|
|
13
|
-
* than leave it. Implicit numbering means there is no literal here for a mutator to reach, so what
|
|
14
|
-
* remains on the mutated surface is exactly the logic worth mutating: WHICH fault is raised, and
|
|
15
|
-
* with WHAT parameters.
|
|
16
|
-
*/
|
|
17
|
-
import type { Outcome, SidePresence } from "./qualityCheckReconciliation.js";
|
|
18
|
-
/**
|
|
19
|
-
* One member per throw site in `makeQualityCheckReconciliation`.
|
|
20
|
-
*
|
|
21
|
-
* Numeric and implicitly valued deliberately (see the module note). The members are named for the
|
|
22
|
-
* divergence they report, so a reader meets the meaning at the identifier rather than in a table.
|
|
23
|
-
*/
|
|
1
|
+
import type { Outcome, SidePresence } from "./outcome.js";
|
|
24
2
|
export declare enum QualityCheckFaultCode {
|
|
25
|
-
/** The carried evidence obligation (debit) side disagrees with the outcome's canon row. */
|
|
26
3
|
ObligationSideDivergesFromCanon = 0,
|
|
27
|
-
/** The carried evidence observation (credit) side disagrees with the outcome's canon row. */
|
|
28
4
|
ObservationSideDivergesFromCanon = 1
|
|
29
5
|
}
|
|
30
|
-
/**
|
|
31
|
-
* What BOTH divergences carry: the outcome whose canon row was consulted, the side-presence that
|
|
32
|
-
* row REQUIRED, and the side-presence the fields ACTUALLY carried.
|
|
33
|
-
*
|
|
34
|
-
* `required` and `actual` are the two halves of the comparison that failed, so a reader — and an
|
|
35
|
-
* assertion — recovers the whole disagreement from the fault without reading a sentence.
|
|
36
|
-
*/
|
|
37
6
|
interface SideDivergence {
|
|
38
7
|
readonly outcome: Outcome;
|
|
39
8
|
readonly required: SidePresence;
|
|
40
9
|
readonly actual: SidePresence;
|
|
41
10
|
}
|
|
42
|
-
|
|
43
|
-
export interface ObligationSideDivergesFromCanonFault extends SideDivergence {
|
|
11
|
+
interface ObligationSideDivergesFromCanonFault extends SideDivergence {
|
|
44
12
|
readonly code: QualityCheckFaultCode.ObligationSideDivergesFromCanon;
|
|
45
13
|
}
|
|
46
|
-
|
|
47
|
-
export interface ObservationSideDivergesFromCanonFault extends SideDivergence {
|
|
14
|
+
interface ObservationSideDivergesFromCanonFault extends SideDivergence {
|
|
48
15
|
readonly code: QualityCheckFaultCode.ObservationSideDivergesFromCanon;
|
|
49
16
|
}
|
|
50
|
-
/**
|
|
51
|
-
* The discriminated union over every fault this concept can raise.
|
|
52
|
-
*
|
|
53
|
-
* Discriminated on `code` so the catalogue can be a mapped type over it (3F-2873): the compiler
|
|
54
|
-
* then refuses both a code with no message and a message reaching for a parameter its fault does
|
|
55
|
-
* not carry. Completeness is not asserted; it is unconstructible otherwise.
|
|
56
|
-
*/
|
|
57
17
|
export type QualityCheckFault = ObligationSideDivergesFromCanonFault | ObservationSideDivergesFromCanonFault;
|
|
58
18
|
export {};
|
|
59
19
|
//# sourceMappingURL=qualityCheckFault.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualityCheckFault.d.ts","sourceRoot":"","sources":["../../src/domain/qualityCheckFault.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"qualityCheckFault.d.ts","sourceRoot":"","sources":["../../src/domain/qualityCheckFault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,oBAAY,qBAAqB;IAC/B,+BAA+B,IAAA;IAC/B,gCAAgC,IAAA;CACjC;AAED,UAAU,cAAc;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED,UAAU,oCAAqC,SAAQ,cAAc;IACnE,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC,+BAA+B,CAAC;CACtE;AAED,UAAU,qCAAsC,SAAQ,cAAc;IACpE,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC,gCAAgC,CAAC;CACvE;AAED,MAAM,MAAM,iBAAiB,GACzB,oCAAoC,GACpC,qCAAqC,CAAC"}
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The QUALITY CHECK FAULT vocabulary (@SCN-MSG-001, 3F-2872) — what a refused minting carries
|
|
3
|
-
* INSTEAD of a sentence.
|
|
4
|
-
*
|
|
5
|
-
* Stryker mutates every string literal in the domain, so an invariant that states its refusal as
|
|
6
|
-
* an interpolated template puts its prose on the mutated surface: emptying a template chunk
|
|
7
|
-
* survives every test that does not pin wording, and pinning wording turns a copy-edit red. The
|
|
8
|
-
* cure is to move the question rather than answer it — the throw site names a CODE and carries its
|
|
9
|
-
* parameters as fields, and the prose that renders them lives in a catalogue held as data.
|
|
10
|
-
*
|
|
11
|
-
* THE CODE IS A NUMERIC, IMPLICITLY-VALUED ENUM, AND THAT IS THE WHOLE POINT. A string enum would
|
|
12
|
-
* relocate the mutable prose onto the enum's own values — the survivors would move house rather
|
|
13
|
-
* than leave it. Implicit numbering means there is no literal here for a mutator to reach, so what
|
|
14
|
-
* remains on the mutated surface is exactly the logic worth mutating: WHICH fault is raised, and
|
|
15
|
-
* with WHAT parameters.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* One member per throw site in `makeQualityCheckReconciliation`.
|
|
19
|
-
*
|
|
20
|
-
* Numeric and implicitly valued deliberately (see the module note). The members are named for the
|
|
21
|
-
* divergence they report, so a reader meets the meaning at the identifier rather than in a table.
|
|
22
|
-
*/
|
|
23
1
|
export var QualityCheckFaultCode;
|
|
24
2
|
(function (QualityCheckFaultCode) {
|
|
25
|
-
/** The carried evidence obligation (debit) side disagrees with the outcome's canon row. */
|
|
26
3
|
QualityCheckFaultCode[QualityCheckFaultCode["ObligationSideDivergesFromCanon"] = 0] = "ObligationSideDivergesFromCanon";
|
|
27
|
-
/** The carried evidence observation (credit) side disagrees with the outcome's canon row. */
|
|
28
4
|
QualityCheckFaultCode[QualityCheckFaultCode["ObservationSideDivergesFromCanon"] = 1] = "ObservationSideDivergesFromCanon";
|
|
29
5
|
})(QualityCheckFaultCode || (QualityCheckFaultCode = {}));
|
|
30
6
|
//# sourceMappingURL=qualityCheckFault.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualityCheckFault.js","sourceRoot":"","sources":["../../src/domain/qualityCheckFault.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"qualityCheckFault.js","sourceRoot":"","sources":["../../src/domain/qualityCheckFault.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,uHAA+B,CAAA;IAC/B,yHAAgC,CAAA;AAClC,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC"}
|