Skip to content

Report held-out SNAP caseload composition and take-up at certification (#647) - #1714

Open
DTrim99 wants to merge 4 commits into
mainfrom
snap-caseload-composition-report
Open

DTrim99 wants to merge 4 commits into
mainfrom
snap-caseload-composition-report

Conversation

@DTrim99

@DTrim99 DTrim99 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Certification now writes us_snap_caseload_composition_holdout.json beside the other held-out reports. On the written release H5, at the release's weights, nationally and by state, it reports:

  • the SPM units receiving SNAP, split by whether they pass the federal gross and net income tests and the federal resource test;
  • take-up among eligible units;
  • the states where the share of eligible units carrying the take-up flag, or receiving, reaches 0.999.

It is validation only. It never enters the calibration registry or a take-up stage, it never refuses a release, and it reports an unavailable measurement as unavailable.

This is the report-only response to #647. In the 24 October build at final weights, 16 states are at full take-up and hold 45% of recipients. A blocking gate would fail the next national build, so this PR reports the numbers instead.

Now on main

#1676 merged, so this PR now targets main, with main merged in (7d46b03). Builds made from main record the report, and certification scores one more baseline pass. The build itself runs no new engine pass. Resolving the merge:

  • The report's consumer joins main's _post_export_holdout_consumers registry, which every build and the post-export probe read.
  • Its write step sits inside main's post-export try block, after the Medicare IRMAA report. Its writer re-raises scored-file integrity and worker-pool errors, as main's two held-out writers now do.
  • Main's tests that list the post-export consumers or their files now include the report. The pinned post-export plan digests move with the new consumer, and the report's own output digest is added.

In the 27 November certified build, 14 states have take-up of 99.9% or more among eligible units, and they hold 21% of recipients (24 October build: 16 states, 45%).

Definitions

The national shares sit beside USDA's estimates in its proposed rule on categorical eligibility (91 FR 72454, at 72457 and 72459). USDA puts 5.4% of participating households above an income limit and 11.5% above the resource limit alone. Those figures are held out and are never a target. #1712 covers the resource side.

Tests

New tests:

  • Hand-computed composition, take-up and state rows.
  • Hypothesis invariants: inputs are never written, totals are linear in the weights, results are order-invariant and additive over batches, and the groups partition the receiving units.
  • Batch-size invariance through the household-batched scorer.
  • No ledger mapping or pinned Chronicle record set carries a federal-test measure.
  • An engine-scenario test pins the December rule and the groups on policyengine-us 2.145.3.

Run locally after the merge:

  • The pin checks (repin_us_spec_engine_contracts.py, spec_engine_coverage.py, generate_us_bundle_from_constants.py, each --check) and tools/ci_test_plan.py verify pass.
  • The post-export request, probe, batch-file, pooled-scoring and scoring tests, the report's own tests and the spine-blindness test pass, except one pooled-scoring test that fails the same way on main's code here: worker_environment_variables lists MICROCOSM_ENGINE_ABI_LOCK_CHECK_RECORD when policyengine-us is installed, which CI's engine-free job doesn't install.

CI runs the full suites.

🤖 Generated with Claude Code

Adds us_snap_caseload_composition_holdout.json beside the other held-out
reports certification writes: on the written release H5, the SPM units
receiving SNAP split by whether they pass the federal gross and net income
tests and the federal resource test, and take-up among eligible units,
nationally and by state at the release's weights. Validation only: it never
enters the calibration registry or a take-up stage and never refuses a
release; an unavailable measurement is reported as such.

A unit is eligible on its December is_snap_eligible and receives when its
annual snap is also positive: policyengine-core reports a monthly
true-or-false variable for a year as its December value. A unit failing an
income test and the resource test counts under income. The report lists the
states where the share of eligible units carrying the take-up flag, or
receiving, reaches 0.999; the take-up stage's own diagnostic measures
saturation at pre-calibration weights.

The national shares sit beside USDA's estimates in its proposed rule on
categorical eligibility (91 FR 72454, at 72457 and 72459): 5.4% of
participating households above an income limit and 11.5% above the resource
limit alone.

The post-export scoring plan gains one consumer of ten SPM-unit keys, so a
build made at this commit records it and its certification scores one more
baseline pass. The build itself runs no new engine pass.

Tests: hand-computed composition, take-up and state rows; Hypothesis
invariants (inputs never written, totals linear in the weights, order
invariant and additive over batches, groups partition the receiving units);
batch-size invariance through the household-batched scorer; no ledger
mapping or pinned Chronicle record set carries a federal-test measure; an
engine-scenario test pins the December rule and the groups on
policyengine-us 2.145.3.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
#1676 merged, so this branch now follows main. Conflicts resolved:

- The report's consumer joins main's _post_export_holdout_consumers registry,
  which every build and the post-export probe read, instead of a line in
  _post_export_consumers.
- Its write step moves inside main's post-export try block, after the
  Medicare IRMAA report, and its writer re-raises scored-file integrity and
  worker-pool errors, as main's two held-out writers now do.
- The fixture engine's SNAP consumer keeps main's scoring return shape.

Main's tests that list the post-export consumers or their files now include
the report, and the pinned post-export plan digests move with the new
consumer (its own output digest is added).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 changed the base branch from us-engine-refresh-route-a to main December 2, 2026 18:35
DTrim99 and others added 2 commits December 2, 2026 16:19
The publication test reads declared artifacts through the file's
_declared_artifacts_in_build_directory, as main's other holdout tests do,
since main removed microcosm.data.release's _release_manifest_release_artifacts.
The merged-baseline engine test now plans six consumers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's staging version 2 carries only the result files listed in
US_STAGING_RESULT_FILES; the SNAP holdout joins the other holdouts as aggregate
diagnostics, and the build now attaches 21 reviewed files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 requested a review from juaristi22 December 3, 2026 03:16

This branch has not been deployed

No deployments
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