Skip to content

Land the Dynamics graph, accounting, identity and history stack (#420, #436–#448) - #449

Merged
MaxGhenis merged 48 commits into
masterfrom
land-dynamics-stack-20260922
Sep 22, 2026
Merged

MaxGhenis merged 48 commits into
masterfrom
land-dynamics-stack-20260922

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Lands the thirteen green draft PRs from the September 9–22 Dynamics lane onto current master in one merge-commit integration, so later work builds on master instead of on stacked drafts. Each PR's head is merged unchanged (merge commits, no squash), so every original commit stays in history.

PR Adds
#420 Optional mortality and ageing population graph (populace_dynamics.graph)
#436 Annual mortality graph trajectories with isolated evaluation
#440 Stock-flow accounting on annual mortality trajectories
#437 Claiming state preserved through disability conversion (engine/claiming.py)
#438 Experimental entrant schedules with explicit support boundaries
#439 Opt-in annual population stock-flow accounting (engine/accounting.py)
#441 Consecutive annual accounting-history validation
#443 Source person IDs preserved with append-only private keys
#444 Annual labor and covered-wage histories
#445 Mortality outcomes retained with source identities
#446 Annual earnings histories retained through mortality
#447 Original-cohort histories retained from assembled projections
#448 Compact cohort-history storage without repeated identity maps

Conflict resolution

The PRs conflicted only on four shared files. Each PR appended its own new modules to the birth-evidence reducer's POST_REVIEW_SOURCE_EXCLUSIONS and bumped the tier manifest independently.

  • scripts/first_estimates_birth_evidence.py: union of all 20 new source paths; duplicate comments collapsed.
  • tests/estimates/test_birth_evidence_artifact.py: the pinned tuple matches the script, and the reachability test also guards the seven identity/history modules alongside the PSID, graph, accounting, claiming-successor and entrant exclusions. No registered evidence pin changes.
  • tests/tier_counts.json / tests/README-tiers.md: recollected on the combined tree (unit 2,207; artifact 2,672; integration_psid 848; reproduction_legacy 520; oracle_policyengine 159; total 6,406).

All other files merged without conflict. No gate, contract, amendment or runs/ artifact is touched.

Verification

Cross-family review and fixes

Five Claude reviewers read the stack's source cluster by cluster; each finding then went to two independent refuters. Of 13 reported findings, 11 were confirmed (2 medium, 9 low) and 2 rejected. All 11 are fixed with regression tests, each cluster independently verified:

The review also caught a duplicated test that my union merge introduced (removed). Local unit tier after the fixes: 2,167 passed, 131 skipped (graph tests needing the graph extra, covered by CI's graph-integration job), 0 failed. Tier manifest: unit 2,298, total 6,497.

Closes #420, #436, #437, #438, #439, #440, #441, #443, #444, #445, #446, #447, #448 on merge.

🤖 Generated with Claude Code

# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
MaxGhenis and others added 8 commits September 22, 2026 13:58
# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
# Conflicts:
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
# Conflicts:
#	scripts/first_estimates_birth_evidence.py
#	tests/README-tiers.md
#	tests/estimates/test_birth_evidence_artifact.py
#	tests/tier_counts.json
Each of the thirteen stacked drafts appended its new opt-in modules to the
birth-evidence reducer's POST_REVIEW_SOURCE_EXCLUSIONS and bumped the tier
manifest independently, so they conflicted only on those four files.

- Union of all twenty new source paths in the script and its pinned test
  tuple; duplicate comments collapsed.
- The reachability test now guards the identity and history modules
  (person_identity, forward/covered earnings histories, mortality observer,
  closed-cohort, assembled-history and compact histories) alongside the
  PSID, graph, accounting, claiming-successor and entrant exclusions.
- Tier manifest recollected on the combined tree: unit 2,207, artifact
  2,672, integration_psid 848, reproduction_legacy 520,
  oracle_policyengine 159; total 6,406.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 22, 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 22, 2026 9:49pm UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 6 commits September 22, 2026 16:30
… source numbers

- The one-year graph's advance step copied the prior year's survives=True
  and death_probability onto next-period rows, so person_period.csv and the
  in-memory population reported outcomes no draw produced. Next-period rows
  now carry null outcomes through a same-version claim node, and the
  evaluation refuses admitted rows that claim one.
- _integer_column refuses values outside signed 64-bit instead of wrapping
  (a wrapped event year slipped past the fit cutoff; a wrapped person_id
  renamed a person).
- Weight, start_weight, exposure and death readers refuse JSON strings and
  booleans instead of coercing them.

Review findings on #449 (cross-family review, independently verified).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PopulationReconciliationError and HistoryAccountingError rebuilt from
args=(message,) on unpickle/copy and raised TypeError, so a refusal raised in
a worker process broke the pool and lost its discrepancies, kind and period.
Both now define __reduce__ that restores every field.

Review findings on #449.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- validate_projection_allocator refuses projection metadata whose
  allocator can hand a later birth an unreserved initial or scheduled
  person_id (a schedule built from a second allocator at the same start
  made one ID name a dead entrant and a newborn). The check lives in
  entrant_schedule.py because engine/loop.py is inside the birth-evidence
  reducer's reviewed-implementation identity; a test pins that the
  unvalidated loop still reuses the ID, so loop-level enforcement needs a
  deliberate re-pin.
- Activation years are normalized to int at the boundary so the
  provenance and alignment records serialize; duplicate years after
  normalization are refused.

Review findings on #449.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…contract

Review findings on #449.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rehashed audit with float years validated, giving one observation two
encodings and digests; NumPy draw indexes and scheduled-year keys passed
validation and then crashed the digest step.

Review findings on #449.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 6,497)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review September 22, 2026 22:29
@MaxGhenis
MaxGhenis merged commit 247e61b into master Sep 22, 2026
12 checks passed
MaxGhenis added a commit that referenced this pull request Sep 23, 2026
Tier manifest recollected on the merged tree: unit 2,341; total 6,540.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis deleted the land-dynamics-stack-20260922 branch September 25, 2026 23:35

This branch was successfully deployed

1 active deployment
Preview — 6541baf5 Deployed Sep 22, 2026 by vercel[bot]
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