Skip to content

Add opt-in annual population stock-flow accounting - #439

Draft
MaxGhenis wants to merge 1 commit into
masterfrom
dynamics-stock-flow-20260909
Draft

Add opt-in annual population stock-flow accounting#439
MaxGhenis wants to merge 1 commit into
masterfrom
dynamics-stock-flow-20260909

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Annual projections need an explicit account of people who enter or leave, including entrants who disappear before the next saved slice. Add an opt-in reconcile_period interface that checks declared arrivals/exits against opening and closing person sets and reports weight flows, separate weight changes, and arithmetic residuals. It rejects inconsistent declarations, lossy identifier coercion, malformed weights, and unrepresentable weight summaries; serialized provenance cannot mutate the account.

The historical engine remains unchanged. A path-exact source exclusion and import-reachability check keep the accountant outside the sealed projection; the guard now includes implicit parent-package initializers. This is accounting coherence only: event-log completeness and true causes are caller responsibilities, and no scientific gate or numerical benchmark is changed.

Validation: 107 focused checks pass locally, with four extended-precision cases skipped on this Mac and included for Linux CI. Coverage includes synthetic adapters in the real projection loop, entry and exit within one period, malformed declarations, integer boundaries, numeric edge cases, immutable provenance, and source identity. Black79/Ruff pass; the documented example executes and the standalone Quarto page renders. New test inventory: 93 unit cases (including four platform-conditional cases) and four source-guard cases in the existing artifact-tier module. No native population or benchmark evaluation was run.

Independent source review is clean after fixes and re-review. The draft is for review; no merge, data publication, or manual deployment is included.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
social-security-model Ready Ready Preview Sep 9, 2026 9:48pm UTC

Request Review

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