Repository navigation
feat: add an offline baseline freshness report to the weekly run - #13
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.
Model transparency release, part 2. - Each tile shows its stored real-world baseline under the title, apart from the normalized MODEL RESPONSE, which is no longer called a combined result. - Why & source lists paths strongest first with the direction and the kind, citation status and horizon of every step, labels every relationship the same way, and states why a dead end drives nothing. - Sensitivity: every scenario is rerun under nine nearby settings (decay 0.5, 0.7, 0.9; up to 2, 3, 4 relationships) and each moved tile says whether its direction holds, depends on the path limit, or flips. Same engine, other parameters (src/model/analysis.ts). - Category filter. Hidden tiles still take part in the calculation. - Cited relationships only: the same engine on empirical edges alone. None exist yet, and the board says that is a gap in citations, not evidence of no effect. Not part of Share links, which carry inputs only; the page says so. - Scenario A: saved in memory for the tab only, compared tile by tile, never written to the address bar; Reset and history leave it alone. No new dependency. Built JS 269.9 kB to 274.8 kB. Browser suite covers the new tools at 1440, 390 and 320 px and runs axe with them active.
Self-maintenance release, part 3. - Every measured or projected node records its publication cadence (daily, weekly, monthly, quarterly, annual, irregular); the validator requires it on those nodes and forbids it on abstract levers. - src/lib/freshness.ts flags a baseline when more time has passed since the end of its period than a release usually takes at that cadence. Pure and fully covered. - npm run check:freshness prints the table for today or --today, reads no network, and exits non-zero only with --strict. - The weekly scheduled CI run writes the table to the job summary and never fails on it, so main stays green while stale data is visible. - CONTRIBUTING.md documents how to refresh a baseline. As of 2026-09-27 it flags mortgage_rate, savings_rate and federal_debt.
# Conflicts: # CONTRIBUTING.md # src/data/graph.json # src/lib/schema.ts # src/lib/validate.test.ts # src/lib/validate.ts
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
Self-maintenance, part 3 of 3. Makes stale baselines visible without adding infrastructure, network checks or anything that can turn
mainred.daily,weekly,monthly,quarterly,annualorirregular(FOMC meetings). The validator requires it on measured nodes and forbids it on abstract levers.src/lib/freshness.ts(pure, 100% covered) flags a baseline as "check source" when more time has passed since the end of its period than a release usually takes at that cadence. The period end handles days, months, quarters, fiscal years and years. Annual series get two years, because a 2024 survey is typically replaced late in 2026. An open period, such as a current-fiscal-year projection, counts as age 0.npm run check:freshnessprints the table for today or--today YYYY-MM-DD. It reads no network, so a publisher blocking automated requests can never fail it. It exits non-zero only with--strict, and it rejects impossible dates.As of 2026-09-27 it flags
mortgage_rate(weekly, 2026-09-17),savings_rate(monthly, July 2026) andfederal_debt(daily, 2026-08-18). A flag is a prompt to read the source, not a finding that the value is wrong. A date that looks current does not catch revisions to the same period.The branch carries a merge of
mainafter parts 1 and 2 (#11, #12). Its diff againstmainis only this change.Validation
npm run verifypasses: 775 tests, 100% coverage, and the numerical audit passes.npm run test:e2epasses. The built data changed by one field per node.npm audit --audit-level=low: 0 vulnerabilities. No dependency changes.Data or model changes
cadencewas added.Security
The new CI step runs a repository script on the scheduled event only, with the existing read-only token. It needs no secret and no network, and it writes only to the job summary.