Repository navigation
feat: record relationship kind, horizon and intentional dead ends - #11
Merged
Merged
Conversation
Model integrity release, part 1. - Every edge now states what it asserts (kind: accounting, causal or association) and a rough horizon (short, medium, long), separately from confidence (empirical or modeled). The arithmetic ignores both. - Every node with no outgoing edge states why in a terminal field, and the validator rejects an unexplained dead end or a terminal node that drives an edge. - Two accounting links close the federal borrowing loop: net_interest -> debt_growth_rate and debt_growth_rate -> federal_debt. Both are modeled, with no citation. - Claims are qualified where the old wording overstated: refinancing lags, distribution versus median, association versus causation. No baseline or confidence changes: primary sources could not be read from the build environment, so nothing is marked as verified. Hand-worked expectations are recomputed in the test comments.
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Model integrity, part 1 of 3. Makes what each relationship asserts explicit, and makes every dead end a recorded decision instead of an accident of the topology.
kind(accounting,causalorassociation) andhorizon(short,mediumorlong). Both are separate fromconfidence(empiricalormodeled), which still says only whether a read citation backs the edge. The arithmetic ignores both new fields.terminalfield, and a node that drives an edge must leave itnull. The validator enforces both directions.hate_crimesstays isolated on purpose.food_insecurity,homelessnessandinstitutional_confidenceare outcome indicators the model does not trace further.payrolls_headlineandsavings_rate, the downstream effects are too noisy or too contested to model.net_interest -> debt_growth_rate(+, 0.5): interest outlays add to the deficit and so to borrowing.debt_growth_rate -> federal_debt(+, 0.75): the growth rate is the change in the stock. Both are modeled, with no citation. Simple paths count the loop once, so it never compounds.Arithmetic, redone by hand in
src/lib/propagation.test.ts(fed_rate at +1):debt_growth_rate= 0.0875 (E3, E10) + 0.75 x 0.5 x 0.7 = 0.2625 (E4, E21) = 0.35federal_debt= -0.5 x -0.25 x 0.75 x 0.49 = 0.0459375 (E3, E10, E22) + 0.75 x 0.5 x 0.75 x 0.49 = 0.1378125 (E4, E21, E22) = 0.18375No baseline and no
confidencechanged. The primary-source hosts could not be reached from the build environment, so nothing is marked as verified or cited.Validation
npm run verifypasses: 725 tests, 100% coverage, and the numerical audit passes (1,680 scenarios, 33,600 comparisons, sign mutation detected).npm run test:e2epasses.npm audit --audit-level=low: 0 vulnerabilities. No dependency changes.Data or model changes
Security
None. Data, schema, validator, tests and docs only.