Skip to content

feat: add an offline baseline freshness report to the weekly run - #13

Merged
codethor0 merged 4 commits into
mainfrom
claude/site-footer-linkedin-jj3u50
Sep 27, 2026
Merged

codethor0 merged 4 commits into
mainfrom
claude/site-footer-linkedin-jj3u50

Conversation

@codethor0

@codethor0 codethor0 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Self-maintenance, part 3 of 3. Makes stale baselines visible without adding infrastructure, network checks or anything that can turn main red.

  • Cadence. Every observed or projected node records how often its publisher releases a new figure: daily, weekly, monthly, quarterly, annual or irregular (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:freshness prints 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.
  • Weekly CI writes the table to the job summary on the scheduled run only, and never fails on it. Pull requests and pushes are unaffected.
  • CONTRIBUTING.md documents how to refresh a flagged baseline: read the publisher's page, then update baseline, asOf, sourceUrl, sourceDetail and retrievedDate together.

As of 2026-09-27 it flags mortgage_rate (weekly, 2026-09-17), savings_rate (monthly, July 2026) and federal_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 main after parts 1 and 2 (#11, #12). Its diff against main is only this change.

Validation

  • npm run verify passes: 775 tests, 100% coverage, and the numerical audit passes.
  • npm run test:e2e passes. The built data changed by one field per node.
  • npm audit --audit-level=low: 0 vulnerabilities. No dependency changes.
  • No secrets, credentials, private logs, local machine paths, or generated build output are included.
  • The pull request contains no unrelated changes.

Data or model changes

  • Source/provenance metadata is updated when facts or baselines change. No baselines changed; only cadence was added.
  • Observed and projected values remain explicitly distinguished.
  • Every changed causal relationship is explicitly classified as modeled or empirical. No relationships changed.
  • Claims do not present a modeled relationship as a measured causal estimate.

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.

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
@codethor0
codethor0 merged commit 50a4ef7 into main Sep 27, 2026
5 checks passed
@codethor0
codethor0 deleted the claude/site-footer-linkedin-jj3u50 branch September 27, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant