From ce08745ace2b4955720090f5527400a2976ece86 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 10:23:43 -0400 Subject: [PATCH 01/23] docs: start passive pass-through progress journal --- PROGRESS.md | 60 +++++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 2e04a7968..a2345bf63 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -1,48 +1,30 @@ -# Progress +# Progress: microcosm #722 ## State -Microcosm #516 whole-row donor outlier screen is complete on -`mortgage-donor-outlier-screen` (rebased onto `origin/main` after the #515 -interim carve merged as #525). The `puf_tax_detail` donor now drops tax units -whose grouped raw mortgage interest reaches $10M before the #515 carve -(pinned-artifact effect: 3,066 rows, weight 3,684 of ~161M, removing $2.947T -of phantom mortgage-interest mass), with the checkpoint schema bumped to v3 -so post-carve pre-screen checkpoints rebuild. +Implementation is in progress on `passive-pass-through-722`, based on +`origin/main` at `9c20c1d2`. The verified #530 QBI branch chain was inspected +and is not used as a base because its tip still has the retired `populace.*` +namespace and `packages/populace-*` layout. Only the required QBI v3 concepts +will be ported into the current `microcosm.*` tree. ## Done -- Confirmed a clean starting worktree at `aef1c56`. -- Read the repository guidance and established the #515 donor carve as the - screen's required downstream boundary. -- Started source-level audits of every donor-frame consumer, checkpoint - validation, row-count pins, and existing donor-fact summaries. -- Attempted the requested GitNexus impact workflow; the managed filesystem - denied its global registry write. Its local index also exposed a broad - `build/` ignore mismatch, so the completed impact audit uses direct source - call sites and tests. -- Added `US_PUF_DONOR_MORTGAGE_OUTLIER_CEILING = 10_000_000.0` with the - structural rationale and pinned-artifact receipts. -- Added a whole-row screen on grouped raw person `home_mortgage_interest` - after tax-unit assembly, before the #515 carve, with retained-index reset. -- Confirmed no downstream consumer pairs donor rows to the original HDF arrays - or carries a stale donor-length vector; values and weights always originate - from the same screened frame. -- Bumped the primary QRF checkpoint schema from v2 to v3 and made the stale - checkpoint regression track the live constant while retaining literal-v1 - corruptions. -- Added regression coverage for the exact grouped boundary, whole-row removal, - retained/carved $5M row, raw-$10.5M pre-carve ordering, and constant. -- Requested suites pass: PUF support/QRF 53; plan/gates 195; fiscal targets - 139; microcosm-data 138 with 1 skip. The directly affected tail-bound suite - adds 12 passes. Ruff format/check and `git diff --check` are clean. -- Wrote `SOL_516_REPORT.md` with the exact seam, consumer-by-consumer file:line - audit, expected 208,611-row real-artifact effect, verification results, count - sweep, and deliberately untouched surfaces. +- Read `CLAUDE.md` and established the PR-CI/certification and journal + contracts. +- Confirmed the primary checkout has unrelated untracked paths and left it + untouched. +- Created the requested isolated worktree at + `.claude/worktrees/passive-722` from current `origin/main`. +- Attempted the GitNexus exploration workflow; no GitNexus MCP resources or + tools are configured, so source and Git-history inspection are the fallback. ## Next -- PR #527 review cycle, then merge. After both #525 and #527: rebuild the - base/release; the mortgage critical-fit ratchet (0.20 -> 0.15) waits on a - run that holds per `us_critical_targets.py`. -- Root record-level ETL carve stays open on microcosm#515. +- Map the minimal QBI v3 resource, assumptions-build, assignment, RNG, and + validation surfaces onto the renamed tree. +- Derive the SCF conditional cells from the pre-verified local inputs and add + the provisional evidence resource. +- Implement and test simulation version 4 while preserving v1-v3 byte output. +- Run restricted replay if the declared PUF artifact is present, then run the + full workspace tests, lint, contract sweeps, and write the final report. From d1830f006eaa5f8b45e3cbcf905695be79855da1 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 10:36:41 -0400 Subject: [PATCH 02/23] docs: record passive stage design --- PROGRESS.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index a2345bf63..4aeea35d7 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -4,9 +4,9 @@ Implementation is in progress on `passive-pass-through-722`, based on `origin/main` at `9c20c1d2`. The verified #530 QBI branch chain was inspected -and is not used as a base because its tip still has the retired `populace.*` -namespace and `packages/populace-*` layout. Only the required QBI v3 concepts -will be ported into the current `microcosm.*` tree. +and is not used as a base because its tip still has the retired pre-rename +namespace and package layout. Only the required QBI v3 concepts will be +ported into the current `microcosm.*` tree. ## Done @@ -18,13 +18,25 @@ will be ported into the current `microcosm.*` tree. `.claude/worktrees/passive-722` from current `origin/main`. - Attempted the GitNexus exploration workflow; no GitNexus MCP resources or tools are configured, so source and Git-history inspection are the fallback. +- Confirmed the old QBI v3 stack is opt-in, diverges before the repository + rename, and does not expose its latent entity form on the output frame. +- Selected a sibling passive assignment stage before current QBI + reconciliation. This preserves the archived 15-leaf QBI contract and all + prior QBI random streams while still accepting a latent form for routing + when one becomes available. +- Reproduced the six SCF Schedule-E-band cells from the local 2022 public + extract. Presence cells all clear effective n=30; the three middle-band + conditional-share cells fall back to the pooled holder sample. +- Confirmed the restricted PUF replay artifact is present and pinned its + size, digest, row counts, weighted positive pass-through aggregate, and + provisional Form 8960 midpoint calibration target. ## Next -- Map the minimal QBI v3 resource, assumptions-build, assignment, RNG, and - validation surfaces onto the renamed tree. -- Derive the SCF conditional cells from the pre-verified local inputs and add - the provisional evidence resource. -- Implement and test simulation version 4 while preserving v1-v3 byte output. +- Add the provisional SCF evidence resource and persisted calibration + assumptions. +- Implement and integrate the isolated passive assignment stage while proving + prior QBI outputs are byte-identical. +- Add the diagnostics-only Form 8960 validation rows and restricted replay. - Run restricted replay if the declared PUF artifact is present, then run the full workspace tests, lint, contract sweeps, and write the final report. From bb390facc8074d131ad7800b6398a14ad9f37382 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 10:54:13 -0400 Subject: [PATCH 03/23] feat(us): add passive passthrough evidence --- .../microcosm/build/us/country_package.json | 1 + .../build/us/qbi_passive_passthrough_v1.json | 442 +++++++++ .../qbi_passive_passthrough_evidence.py | 888 ++++++++++++++++++ ...est_us_qbi_passive_passthrough_evidence.py | 290 ++++++ ...ild_us_qbi_passive_passthrough_evidence.py | 200 ++++ 5 files changed, 1821 insertions(+) create mode 100644 packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_v1.json create mode 100644 packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py create mode 100644 packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py create mode 100644 tools/build_us_qbi_passive_passthrough_evidence.py diff --git a/packages/microcosm-build/src/microcosm/build/us/country_package.json b/packages/microcosm-build/src/microcosm/build/us/country_package.json index 281484513..444e0cbfa 100644 --- a/packages/microcosm-build/src/microcosm/build/us/country_package.json +++ b/packages/microcosm-build/src/microcosm/build/us/country_package.json @@ -9,6 +9,7 @@ "fiscal_target_references.json", "obbba_reforms.json", "puf_aggregate_record_disaggregation.json", + "qbi_passive_passthrough_v1.json", "release_input_coverage_manifest.json", "soca_capital_gain_distribution_shares.json", "soi_baseline_levels.json", diff --git a/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_v1.json b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_v1.json new file mode 100644 index 000000000..96e539ec7 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_v1.json @@ -0,0 +1,442 @@ +{ + "cells": [ + { + "conditional_share": { + "conditional_on": "X3401 == 1 and ACTBUS + NONACTBUS > 0", + "estimate_level": "exact", + "requested_mean": 0.6020802648193814, + "requested_quantiles": { + "q05": 0.02912621359223301, + "q25": 0.18181818181818182, + "q50": 0.84472049689441, + "q75": 1.0, + "q95": 1.0 + }, + "selected_mean": 0.6020802648193814, + "selected_quantiles": { + "q05": 0.02912621359223301, + "q25": 0.18181818181818182, + "q50": 0.84472049689441, + "q75": 1.0, + "q95": 1.0 + }, + "source_counts": { + "implicate_adjusted_unweighted_n": 63.0, + "pooled_record_count": 315, + "weighted_households": 359517.357858932 + }, + "source_income_band": "nonpositive" + }, + "holding_prevalence": { + "estimate": 0.03349291816162936, + "estimate_level": "exact", + "requested_estimate": 0.03349291816162936, + "source_counts": { + "implicate_adjusted_unweighted_n": 454.4, + "pooled_record_count": 2272, + "weighted_households": 10734130.604087148 + }, + "source_income_band": "nonpositive" + }, + "income_band": "nonpositive", + "requested_counts": { + "active_implicate_adjusted_unweighted_n": 454.4, + "active_pooled_record_count": 2272, + "active_weighted_households": 10734130.604087148, + "nonactive_holder_implicate_adjusted_unweighted_n": 63.0, + "nonactive_holder_pooled_record_count": 315, + "nonactive_holder_weighted_households": 359517.357858932, + "positive_denominator_holder_implicate_adjusted_unweighted_n": 63.0, + "positive_denominator_holder_pooled_record_count": 315, + "positive_denominator_holder_weighted_households": 359517.357858932 + } + }, + { + "conditional_share": { + "conditional_on": "X3401 == 1 and ACTBUS + NONACTBUS > 0", + "estimate_level": "all_income_bands", + "requested_mean": 0.2790077931286368, + "requested_quantiles": { + "q05": 0.0, + "q25": 0.002613240418118467, + "q50": 0.06976744186046512, + "q75": 0.6097560975609756, + "q95": 0.9935897435897436 + }, + "selected_mean": 0.4106054515053052, + "selected_quantiles": { + "q05": 0.0, + "q25": 0.06976744186046512, + "q50": 0.3333333333333333, + "q75": 0.7170827214880078, + "q95": 1.0 + }, + "source_counts": { + "implicate_adjusted_unweighted_n": 236.0, + "pooled_record_count": 1180, + "weighted_households": 930929.1390162968 + }, + "source_income_band": "all" + }, + "holding_prevalence": { + "estimate": 0.041323551642333756, + "estimate_level": "exact", + "requested_estimate": 0.041323551642333756, + "source_counts": { + "implicate_adjusted_unweighted_n": 102.6, + "pooled_record_count": 513, + "weighted_households": 2165633.7738445457 + }, + "source_income_band": "0_to_25k" + }, + "income_band": "0_to_25k", + "requested_counts": { + "active_implicate_adjusted_unweighted_n": 102.6, + "active_pooled_record_count": 513, + "active_weighted_households": 2165633.7738445457, + "nonactive_holder_implicate_adjusted_unweighted_n": 13.8, + "nonactive_holder_pooled_record_count": 69, + "nonactive_holder_weighted_households": 89491.67909184723, + "positive_denominator_holder_implicate_adjusted_unweighted_n": 13.8, + "positive_denominator_holder_pooled_record_count": 69, + "positive_denominator_holder_weighted_households": 89491.67909184723 + } + }, + { + "conditional_share": { + "conditional_on": "X3401 == 1 and ACTBUS + NONACTBUS > 0", + "estimate_level": "all_income_bands", + "requested_mean": 0.44704119295026856, + "requested_quantiles": { + "q05": 0.0, + "q25": 0.4, + "q50": 0.4, + "q75": 0.5827505827505828, + "q95": 0.9362898188632105 + }, + "selected_mean": 0.4106054515053052, + "selected_quantiles": { + "q05": 0.0, + "q25": 0.06976744186046512, + "q50": 0.3333333333333333, + "q75": 0.7170827214880078, + "q95": 1.0 + }, + "source_counts": { + "implicate_adjusted_unweighted_n": 236.0, + "pooled_record_count": 1180, + "weighted_households": 930929.1390162968 + }, + "source_income_band": "all" + }, + "holding_prevalence": { + "estimate": 0.0645329198764294, + "estimate_level": "exact", + "requested_estimate": 0.0645329198764294, + "source_counts": { + "implicate_adjusted_unweighted_n": 121.2, + "pooled_record_count": 606, + "weighted_households": 2454506.560942089 + }, + "source_income_band": "25k_to_100k" + }, + "income_band": "25k_to_100k", + "requested_counts": { + "active_implicate_adjusted_unweighted_n": 121.2, + "active_pooled_record_count": 606, + "active_weighted_households": 2454506.560942089, + "nonactive_holder_implicate_adjusted_unweighted_n": 11.4, + "nonactive_holder_pooled_record_count": 57, + "nonactive_holder_weighted_households": 158396.4752334461, + "positive_denominator_holder_implicate_adjusted_unweighted_n": 11.4, + "positive_denominator_holder_pooled_record_count": 57, + "positive_denominator_holder_weighted_households": 158396.4752334461 + } + }, + { + "conditional_share": { + "conditional_on": "X3401 == 1 and ACTBUS + NONACTBUS > 0", + "estimate_level": "all_income_bands", + "requested_mean": 0.1889671863895858, + "requested_quantiles": { + "q05": 0.022222222222222223, + "q25": 0.034974093264248704, + "q50": 0.1724137931034483, + "q75": 0.1736111111111111, + "q95": 0.7203591107733232 + }, + "selected_mean": 0.4106054515053052, + "selected_quantiles": { + "q05": 0.0, + "q25": 0.06976744186046512, + "q50": 0.3333333333333333, + "q75": 0.7170827214880078, + "q95": 1.0 + }, + "source_counts": { + "implicate_adjusted_unweighted_n": 236.0, + "pooled_record_count": 1180, + "weighted_households": 930929.1390162968 + }, + "source_income_band": "all" + }, + "holding_prevalence": { + "estimate": 0.09654342380984532, + "estimate_level": "exact", + "requested_estimate": 0.09654342380984532, + "source_counts": { + "implicate_adjusted_unweighted_n": 82.6, + "pooled_record_count": 413, + "weighted_households": 971818.2959718417 + }, + "source_income_band": "100k_to_250k" + }, + "income_band": "100k_to_250k", + "requested_counts": { + "active_implicate_adjusted_unweighted_n": 82.6, + "active_pooled_record_count": 413, + "active_weighted_households": 971818.2959718417, + "nonactive_holder_implicate_adjusted_unweighted_n": 17.2, + "nonactive_holder_pooled_record_count": 86, + "nonactive_holder_weighted_households": 93822.6656141712, + "positive_denominator_holder_implicate_adjusted_unweighted_n": 17.2, + "positive_denominator_holder_pooled_record_count": 86, + "positive_denominator_holder_weighted_households": 93822.6656141712 + } + }, + { + "conditional_share": { + "conditional_on": "X3401 == 1 and ACTBUS + NONACTBUS > 0", + "estimate_level": "exact", + "requested_mean": 0.14374098966992677, + "requested_quantiles": { + "q05": 0.0, + "q25": 0.0009000900090009, + "q50": 0.03932584269662921, + "q75": 0.16666666666666666, + "q95": 0.6962676962676962 + }, + "selected_mean": 0.14374098966992677, + "selected_quantiles": { + "q05": 0.0, + "q25": 0.0009000900090009, + "q50": 0.03932584269662921, + "q75": 0.16666666666666666, + "q95": 0.6962676962676962 + }, + "source_counts": { + "implicate_adjusted_unweighted_n": 35.2, + "pooled_record_count": 176, + "weighted_households": 125777.33801387913 + }, + "source_income_band": "250k_to_1m" + }, + "holding_prevalence": { + "estimate": 0.2122687904327135, + "estimate_level": "exact", + "requested_estimate": 0.2122687904327135, + "source_counts": { + "implicate_adjusted_unweighted_n": 117.2, + "pooled_record_count": 586, + "weighted_households": 592538.0634500245 + }, + "source_income_band": "250k_to_1m" + }, + "income_band": "250k_to_1m", + "requested_counts": { + "active_implicate_adjusted_unweighted_n": 117.2, + "active_pooled_record_count": 586, + "active_weighted_households": 592538.0634500245, + "nonactive_holder_implicate_adjusted_unweighted_n": 35.2, + "nonactive_holder_pooled_record_count": 176, + "nonactive_holder_weighted_households": 125777.33801387913, + "positive_denominator_holder_implicate_adjusted_unweighted_n": 35.2, + "positive_denominator_holder_pooled_record_count": 176, + "positive_denominator_holder_weighted_households": 125777.33801387913 + } + }, + { + "conditional_share": { + "conditional_on": "X3401 == 1 and ACTBUS + NONACTBUS > 0", + "estimate_level": "exact", + "requested_mean": 0.32907709570621996, + "requested_quantiles": { + "q05": 0.014393086449806773, + "q25": 0.13549459684123025, + "q50": 0.29411764705882354, + "q75": 0.40508684863523575, + "q95": 0.8722044728434505 + }, + "selected_mean": 0.32907709570621996, + "selected_quantiles": { + "q05": 0.014393086449806773, + "q25": 0.13549459684123025, + "q50": 0.29411764705882354, + "q75": 0.40508684863523575, + "q95": 0.8722044728434505 + }, + "source_counts": { + "implicate_adjusted_unweighted_n": 95.4, + "pooled_record_count": 477, + "weighted_households": 103923.6232040211 + }, + "source_income_band": "over_1m" + }, + "holding_prevalence": { + "estimate": 0.38980634752196003, + "estimate_level": "exact", + "requested_estimate": 0.38980634752196003, + "source_counts": { + "implicate_adjusted_unweighted_n": 229.0, + "pooled_record_count": 1145, + "weighted_households": 266603.2091695646 + }, + "source_income_band": "over_1m" + }, + "income_band": "over_1m", + "requested_counts": { + "active_implicate_adjusted_unweighted_n": 229.0, + "active_pooled_record_count": 1145, + "active_weighted_households": 266603.2091695646, + "nonactive_holder_implicate_adjusted_unweighted_n": 95.4, + "nonactive_holder_pooled_record_count": 477, + "nonactive_holder_weighted_households": 103923.6232040211, + "positive_denominator_holder_implicate_adjusted_unweighted_n": 95.4, + "positive_denominator_holder_pooled_record_count": 477, + "positive_denominator_holder_weighted_households": 103923.6232040211 + } + } + ], + "external_anchor": { + "caveats": [ + "Line 4c includes rental and royalty net investment income as well as passive partnership and S-corporation income; it is not a passive pass-through point estimate.", + "The engine counts rental_income in NIIT in full. Schedule E rental income is frequently passive, so using line 4c without a rental decomposition would overlap an existing NIIT leg. Rental handling is unchanged here.", + "No entity-side SOI passive split exists: partnership tables 23pa01, 23pa04, 23pa06, 23pa10, and 23pa23 were checked, and IRS Table 1.4 likewise has no passive split. Form 8960 line 4 is the only administrative level available for this provisional evidence surface." + ], + "form_8960": { + "line_4a": { + "amount": 1185607258000.0, + "description": "gross rental, royalty, partnership, S corporation, trust, and trade-or-business flow-through", + "returns_count": 4988033 + }, + "line_4b": { + "amount": -1076350273000.0, + "description": "non-section-1411 trade-or-business amount removed", + "returns_count": 4038235 + }, + "line_4c": { + "amount": 109256984000.0, + "description": "line 4a plus line 4b; amount remaining in the NIIT base", + "returns_count": 2260296 + } + }, + "line_4c_to_4a_survival_ratio": 0.09215276244538645, + "passive_passthrough_bounds": { + "decomposition_status": "open question: no administrative source on disk decomposes line 4c between rental or royalty income and passive partnership or S-corporation income", + "lower": { + "amount": 0.0, + "assumption": "all Form 8960 line 4c is rental or royalty income" + }, + "upper": { + "amount": 109256984000.0, + "assumption": "all Form 8960 line 4c is passive pass-through income" + } + }, + "source": "IRS Publication 4801, Form 8960 statistics, tax year 2023", + "units": "dollars" + }, + "methodology": { + "estimands": { + "conditional_share": "NONACTBUS / (ACTBUS + NONACTBUS), conditional on X3401 == 1 and a positive denominator", + "holding_prevalence": "P(X3401 == 1 | actively managed business, X5714 income band)" + }, + "fallback_order": [ + "income_band", + "all_income_bands" + ], + "implicate_count": 5, + "income_bands": [ + { + "definition": "X5714 <= 0", + "id": "nonpositive" + }, + { + "definition": "0 < X5714 <= 25,000", + "id": "0_to_25k" + }, + { + "definition": "25,000 < X5714 <= 100,000", + "id": "25k_to_100k" + }, + { + "definition": "100,000 < X5714 <= 250,000", + "id": "100k_to_250k" + }, + { + "definition": "250,000 < X5714 <= 1,000,000", + "id": "250k_to_1m" + }, + { + "definition": "X5714 > 1,000,000", + "id": "over_1m" + } + ], + "minimum_effective_n": 30.0, + "quantile_method": "weighted inverse CDF", + "quantile_probabilities": [ + 0.05, + 0.25, + 0.5, + 0.75, + 0.95 + ] + }, + "notes": [ + "SCF X3119 identifies the legal form of the largest actively managed business, not the non-actively-managed holding. There is no defensible entity-form link, so these estimates are band-only.", + "The SCF value share is a survey shape, not an income-share level. The separate assumptions build supplies the provisional administrative calibration and persists its solved shift.", + "A household with X3401 == 1 remains a holder when NONACTBUS is zero; this preserves the requested holding concept." + ], + "provenance": { + "deterministic": true, + "generated_by": "tools/build_us_qbi_passive_passthrough_evidence.py", + "inputs": [ + { + "bytes": 8856125, + "filename": "scf2022s.zip", + "role": "scf_2022_source", + "sha256": "409e6811df895766d50b2f597c10b1b3c5813e7d3e0e45d910ad26c0cb07f4eb" + }, + { + "bytes": 236952250, + "container_filename": "scf2022s.zip", + "filename": "p22i6.dta", + "role": "scf_2022_archive_member", + "sha256": "61e2fceb1594e4009eb996d6e25d38a5d8e4874930fc2bfce3c87ffa6946ad0a" + } + ], + "random_draws": "none", + "run_command": "uv run python tools/build_us_qbi_passive_passthrough_evidence.py --scf /path/to/scf2022s.zip" + }, + "provisional": true, + "resource": "us_qbi_passive_passthrough_evidence", + "schema_version": 1, + "source": { + "public_extract": "full public data, pooled multiple-imputation file p22i6.dta", + "record_selection": "X3103 == 1 and X3104 == 1 and X3105 >= 1; one record per household implicate. A non-active holding is X3401 == 1, even when the reported NONACTBUS value is zero.", + "survey": "Federal Reserve Survey of Consumer Finances", + "variables": { + "active_business_value": "SCFP ACTBUS: active-business net values and family-business loan adjustments for X3121-X3335, plus FARMBUS", + "active_management_screeners": [ + "X3103", + "X3104", + "X3105" + ], + "nonactive_business_value": "SCFP NONACTBUS: sum of nonnegative X3408, X3412, X3416, X3420, X3452, and X3428", + "nonactive_holding_screener": "X3401", + "schedule_e_income_band": "X5714" + }, + "vintage": 2022, + "weight": "X42001 divided by five implicates" + }, + "survey_year": 2022 +} diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py new file mode 100644 index 000000000..90a888e39 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py @@ -0,0 +1,888 @@ +"""Build and validate the SCF shape for passive pass-through income. + +The public 2022 Survey of Consumer Finances (SCF) does not identify passive +income by tax entity. It does, however, separately identify households that +actively manage a business and households that hold a business without an +active management role. This module turns those observations into the small, +deterministic evidence surface used by the NIIT passive pass-through stage: + +* the probability of holding any non-actively-managed business, conditional + on having an actively managed business and an ``X5714`` income band; and +* the conditional share of business value held outside active management, + ``NONACTBUS / (ACTBUS + NONACTBUS)``. + +All five SCF implicates are pooled and ``X42001`` is divided by five. A band +estimate is retained only when its implicate-adjusted unweighted sample is at +least 30; otherwise it collapses to the all-band sample. This is evidence +construction only. Assignment and administrative-level calibration live in +the sibling passive pass-through runtime. +""" + +from __future__ import annotations + +import json +from collections.abc import Mapping, Sequence +from importlib.resources import files +from pathlib import Path +from typing import Any + +import numpy as np +import pandas as pd + +SCF_PASSIVE_IMPLICATE_COUNT = 5 +SCF_PASSIVE_MINIMUM_EFFECTIVE_N = 30.0 +SCF_PASSIVE_QUANTILE_PROBABILITIES = (0.05, 0.25, 0.50, 0.75, 0.95) +SCF_PASSIVE_INCOME_BANDS = ( + "nonpositive", + "0_to_25k", + "25k_to_100k", + "100k_to_250k", + "250k_to_1m", + "over_1m", +) + +SCF_PASSIVE_REQUIRED_COLUMNS = ( + "y1", + "x42001", + "x3103", + "x3104", + "x3105", + "x3401", + "x5714", + "x3129", + "x3124", + "x3126", + "x3127", + "x3121", + "x3122", + "x3229", + "x3224", + "x3226", + "x3227", + "x3221", + "x3222", + "x3335", + "x3408", + "x3412", + "x3416", + "x3420", + "x3452", + "x3428", + "x507", + "x513", + "x526", + "x805", + "x905", + "x1005", + "x1103", + "x1108", + "x1114", + "x1119", + "x1125", + "x1130", + "x1136", +) + +FORM_8960_TAX_YEAR = 2023 +FORM_8960_LINE_4A_AMOUNT = 1_185_607_258_000.0 +FORM_8960_LINE_4A_RETURNS = 4_988_033 +FORM_8960_LINE_4B_AMOUNT = -1_076_350_273_000.0 +FORM_8960_LINE_4B_RETURNS = 4_038_235 +FORM_8960_LINE_4C_AMOUNT = 109_256_984_000.0 +FORM_8960_LINE_4C_RETURNS = 2_260_296 +FORM_8960_LINE_4C_TO_4A_RATIO = ( + FORM_8960_LINE_4C_AMOUNT / FORM_8960_LINE_4A_AMOUNT +) + +_QUANTILE_NAMES = ("q05", "q25", "q50", "q75", "q95") +_RESOURCE_NAME = "qbi_passive_passthrough_v1.json" + + +def _normalized_scf_frame(frame: pd.DataFrame) -> pd.DataFrame: + normalized = frame.rename( + columns={str(column): str(column).lower() for column in frame.columns} + ) + duplicates = normalized.columns[normalized.columns.duplicated()].tolist() + if duplicates: + raise ValueError( + "SCF frame has case-insensitive duplicate columns " + f"{sorted(set(duplicates))}." + ) + missing = sorted(set(SCF_PASSIVE_REQUIRED_COLUMNS) - set(normalized.columns)) + if missing: + raise ValueError(f"SCF frame is missing required columns {missing}.") + + result = normalized.loc[:, SCF_PASSIVE_REQUIRED_COLUMNS].copy() + for column in SCF_PASSIVE_REQUIRED_COLUMNS: + result[column] = pd.to_numeric(result[column], errors="coerce") + values = result[column].to_numpy(dtype=np.float64) + if not np.isfinite(values).all(): + raise ValueError( + f"SCF column {column!r} contains nonnumeric or nonfinite values." + ) + return result + + +def _validate_implicates(source: pd.DataFrame) -> tuple[np.ndarray, np.ndarray]: + raw_y1 = source["y1"].to_numpy(dtype=np.float64) + y1 = raw_y1.astype(np.int64) + if not np.array_equal(raw_y1, y1.astype(np.float64)): + raise ValueError("SCF Y1 must contain integer identifiers.") + if pd.Series(y1).duplicated().any(): + raise ValueError("SCF Y1 must be unique across household implicates.") + + household_id = y1 // 10 + implicate = y1 % 10 + expected = set(range(1, SCF_PASSIVE_IMPLICATE_COUNT + 1)) + malformed = [ + int(identifier) + for identifier, group in pd.DataFrame( + {"household_id": household_id, "implicate": implicate} + ).groupby("household_id")["implicate"] + if set(group.tolist()) != expected + ] + if malformed: + raise ValueError( + "SCF Y1 must encode exactly implicates 1-5 for every household; " + f"malformed household ids include {malformed[:5]}." + ) + return household_id, implicate + + +def _positive(source: pd.DataFrame, column: str) -> np.ndarray: + return np.maximum(source[column].to_numpy(dtype=np.float64), 0.0) + + +def _farm_business_value(source: pd.DataFrame) -> np.ndarray: + """Reproduce the SCFP ``FARMBUS`` balance-sheet construction.""" + + x507 = source["x507"].to_numpy(dtype=np.float64) + business_fraction = np.where(x507 > 0.0, np.minimum(x507, 9_000.0) / 10_000.0, 0.0) + farm = business_fraction * ( + source["x513"].to_numpy(dtype=np.float64) + + source["x526"].to_numpy(dtype=np.float64) + - source["x805"].to_numpy(dtype=np.float64) + - source["x905"].to_numpy(dtype=np.float64) + - source["x1005"].to_numpy(dtype=np.float64) + ) + + first = source["x1108"].to_numpy(dtype=np.float64) + second = source["x1119"].to_numpy(dtype=np.float64) + third = source["x1130"].to_numpy(dtype=np.float64) + first_farm = source["x1103"].to_numpy(dtype=np.float64) == 1.0 + second_farm = source["x1114"].to_numpy(dtype=np.float64) == 1.0 + third_farm = source["x1125"].to_numpy(dtype=np.float64) == 1.0 + farm -= business_fraction * np.where(first_farm, first, 0.0) + farm -= business_fraction * np.where(second_farm, second, 0.0) + farm -= business_fraction * np.where(third_farm, third, 0.0) + + # The SCFP macro mutates each farm-secured line-of-credit balance after + # subtracting its business share. Its subsequent X1136 allocation uses + # those reduced copies, not the original balances. + first_reduced = np.where(first_farm, first * (1.0 - business_fraction), first) + second_reduced = np.where( + second_farm, second * (1.0 - business_fraction), second + ) + third_reduced = np.where(third_farm, third * (1.0 - business_fraction), third) + other_mortgage = source["x1136"].to_numpy(dtype=np.float64) + mortgage_total = first_reduced + second_reduced + third_reduced + farm_mortgage = ( + first_reduced * first_farm.astype(np.float64) + + second_reduced * second_farm.astype(np.float64) + + third_reduced * third_farm.astype(np.float64) + ) + shared_fraction = np.divide( + farm_mortgage, + mortgage_total, + out=np.zeros_like(farm_mortgage), + where=mortgage_total > 0.0, + ) + farm -= np.where( + (other_mortgage > 0.0) & (mortgage_total > 0.0), + other_mortgage * business_fraction * shared_fraction, + 0.0, + ) + return farm + + +def _active_business_value(source: pd.DataFrame) -> np.ndarray: + first = ( + _positive(source, "x3129") + + _positive(source, "x3124") + - _positive(source, "x3126") + * (source["x3127"].to_numpy(dtype=np.float64) == 5.0) + + _positive(source, "x3121") + * np.isin(source["x3122"].to_numpy(dtype=np.float64), (1.0, 6.0)) + ) + second = ( + _positive(source, "x3229") + + _positive(source, "x3224") + - _positive(source, "x3226") + * (source["x3227"].to_numpy(dtype=np.float64) == 5.0) + + _positive(source, "x3221") + * np.isin(source["x3222"].to_numpy(dtype=np.float64), (1.0, 6.0)) + ) + return first + second + _positive(source, "x3335") + _farm_business_value(source) + + +def _nonactive_business_value(source: pd.DataFrame) -> np.ndarray: + columns = ("x3408", "x3412", "x3416", "x3420", "x3452", "x3428") + return sum((_positive(source, column) for column in columns), np.zeros(len(source))) + + +def _income_band(values: pd.Series) -> pd.Series: + return pd.cut( + values, + bins=(-np.inf, 0.0, 25_000.0, 100_000.0, 250_000.0, 1_000_000.0, np.inf), + labels=SCF_PASSIVE_INCOME_BANDS, + right=True, + include_lowest=True, + ).astype("object") + + +def build_scf_passive_passthrough_records(frame: pd.DataFrame) -> pd.DataFrame: + """Return pooled active-business household-implicate records from SCF.""" + + source = _normalized_scf_frame(frame) + household_id, implicate = _validate_implicates(source) + raw_weight = source["x42001"].to_numpy(dtype=np.float64) + if (raw_weight <= 0.0).any(): + raise ValueError("SCF X42001 must be positive for every implicate.") + + active = ( + source["x3103"].eq(1) + & source["x3104"].eq(1) + & source["x3105"].ge(1) + ).to_numpy() + if not active.any(): + raise ValueError("SCF frame contains no actively managed business households.") + + actbus = _active_business_value(source) + nonactbus = _nonactive_business_value(source) + denominator = actbus + nonactbus + holder = source["x3401"].eq(1).to_numpy() + eligible_share = holder & (denominator > 0.0) + share = np.divide( + nonactbus, + denominator, + out=np.full(len(source), np.nan, dtype=np.float64), + where=eligible_share, + ) + invalid_share = eligible_share & ((share < 0.0) | (share > 1.0)) + if invalid_share.any(): + raise ValueError( + "SCF NONACTBUS / (ACTBUS + NONACTBUS) falls outside [0, 1] " + f"for {int(invalid_share.sum())} eligible record(s)." + ) + + records = pd.DataFrame( + { + "household_id": household_id, + "implicate": implicate, + "weight": raw_weight / SCF_PASSIVE_IMPLICATE_COUNT, + "schedule_e_income": source["x5714"].to_numpy(dtype=np.float64), + "income_band": _income_band(source["x5714"]), + "holds_nonactive_business": holder, + "actbus": actbus, + "nonactbus": nonactbus, + "positive_share_denominator": denominator > 0.0, + "nonactive_business_value_share": share, + } + ) + return records.loc[active].reset_index(drop=True) + + +def weighted_inverse_cdf( + values: Sequence[float] | np.ndarray, + weights: Sequence[float] | np.ndarray, + probabilities: Sequence[float] = SCF_PASSIVE_QUANTILE_PROBABILITIES, +) -> dict[str, float]: + """Return weighted inverse-CDF quantiles with stable tie handling.""" + + value_array = np.asarray(values, dtype=np.float64) + weight_array = np.asarray(weights, dtype=np.float64) + probability_array = np.asarray(probabilities, dtype=np.float64) + if value_array.ndim != 1 or value_array.shape != weight_array.shape: + raise ValueError("Weighted values and weights must be equal 1-D arrays.") + if value_array.size == 0: + raise ValueError("Weighted quantiles require at least one observation.") + if ( + not np.isfinite(value_array).all() + or not np.isfinite(weight_array).all() + or (weight_array <= 0.0).any() + ): + raise ValueError("Weighted quantiles require finite values and positive weights.") + if ( + not np.isfinite(probability_array).all() + or (probability_array < 0.0).any() + or (probability_array > 1.0).any() + ): + raise ValueError("Weighted quantile probabilities must lie in [0, 1].") + + order = np.argsort(value_array, kind="stable") + cumulative = np.cumsum(weight_array[order]) + positions = np.searchsorted( + cumulative, probability_array * cumulative[-1], side="left" + ) + positions = np.minimum(positions, len(order) - 1) + return { + name: float(value_array[order[position]]) + for name, position in zip(_QUANTILE_NAMES, positions, strict=True) + } + + +def _counts(frame: pd.DataFrame) -> dict[str, float | int]: + return { + "pooled_record_count": int(len(frame)), + "implicate_adjusted_unweighted_n": float( + len(frame) / SCF_PASSIVE_IMPLICATE_COUNT + ), + "weighted_households": float(frame["weight"].sum()), + } + + +def _weighted_mean(frame: pd.DataFrame) -> float: + return float( + np.average( + frame["nonactive_business_value_share"].to_numpy(dtype=np.float64), + weights=frame["weight"].to_numpy(dtype=np.float64), + ) + ) + + +def _quantiles(frame: pd.DataFrame) -> dict[str, float]: + return weighted_inverse_cdf( + frame["nonactive_business_value_share"].to_numpy(dtype=np.float64), + frame["weight"].to_numpy(dtype=np.float64), + ) + + +def _selected_sample( + requested: pd.DataFrame, + pooled: pd.DataFrame, +) -> tuple[str, str, pd.DataFrame]: + effective_n = len(requested) / SCF_PASSIVE_IMPLICATE_COUNT + if effective_n >= SCF_PASSIVE_MINIMUM_EFFECTIVE_N: + return "exact", str(requested["income_band"].iloc[0]), requested + if pooled.empty: + raise ValueError("SCF all-band fallback sample is empty.") + return "all_income_bands", "all", pooled + + +def _requested_counts( + active: pd.DataFrame, + holders: pd.DataFrame, + eligible_holders: pd.DataFrame, +) -> dict[str, float | int]: + counts: dict[str, float | int] = {} + for prefix, sample in ( + ("active", active), + ("nonactive_holder", holders), + ("positive_denominator_holder", eligible_holders), + ): + sample_counts = _counts(sample) + for name, value in sample_counts.items(): + counts[f"{prefix}_{name}"] = value + return counts + + +def _source_description() -> dict[str, object]: + return { + "survey": "Federal Reserve Survey of Consumer Finances", + "vintage": 2022, + "public_extract": "full public data, pooled multiple-imputation file p22i6.dta", + "weight": "X42001 divided by five implicates", + "record_selection": ( + "X3103 == 1 and X3104 == 1 and X3105 >= 1; one record per " + "household implicate. A non-active holding is X3401 == 1, even " + "when the reported NONACTBUS value is zero." + ), + "variables": { + "schedule_e_income_band": "X5714", + "active_management_screeners": ["X3103", "X3104", "X3105"], + "nonactive_holding_screener": "X3401", + "active_business_value": ( + "SCFP ACTBUS: active-business net values and family-business " + "loan adjustments for X3121-X3335, plus FARMBUS" + ), + "nonactive_business_value": ( + "SCFP NONACTBUS: sum of nonnegative X3408, X3412, X3416, " + "X3420, X3452, and X3428" + ), + }, + } + + +def _methodology() -> dict[str, object]: + return { + "estimands": { + "holding_prevalence": ( + "P(X3401 == 1 | actively managed business, X5714 income band)" + ), + "conditional_share": ( + "NONACTBUS / (ACTBUS + NONACTBUS), conditional on X3401 == 1 " + "and a positive denominator" + ), + }, + "income_bands": [ + {"id": "nonpositive", "definition": "X5714 <= 0"}, + {"id": "0_to_25k", "definition": "0 < X5714 <= 25,000"}, + {"id": "25k_to_100k", "definition": "25,000 < X5714 <= 100,000"}, + { + "id": "100k_to_250k", + "definition": "100,000 < X5714 <= 250,000", + }, + { + "id": "250k_to_1m", + "definition": "250,000 < X5714 <= 1,000,000", + }, + {"id": "over_1m", "definition": "X5714 > 1,000,000"}, + ], + "implicate_count": SCF_PASSIVE_IMPLICATE_COUNT, + "minimum_effective_n": SCF_PASSIVE_MINIMUM_EFFECTIVE_N, + "fallback_order": ["income_band", "all_income_bands"], + "quantile_probabilities": list(SCF_PASSIVE_QUANTILE_PROBABILITIES), + "quantile_method": "weighted inverse CDF", + } + + +def _external_anchor() -> dict[str, object]: + return { + "source": "IRS Publication 4801, Form 8960 statistics, tax year 2023", + "units": "dollars", + "form_8960": { + "line_4a": { + "description": ( + "gross rental, royalty, partnership, S corporation, trust, " + "and trade-or-business flow-through" + ), + "returns_count": FORM_8960_LINE_4A_RETURNS, + "amount": FORM_8960_LINE_4A_AMOUNT, + }, + "line_4b": { + "description": "non-section-1411 trade-or-business amount removed", + "returns_count": FORM_8960_LINE_4B_RETURNS, + "amount": FORM_8960_LINE_4B_AMOUNT, + }, + "line_4c": { + "description": "line 4a plus line 4b; amount remaining in the NIIT base", + "returns_count": FORM_8960_LINE_4C_RETURNS, + "amount": FORM_8960_LINE_4C_AMOUNT, + }, + }, + "line_4c_to_4a_survival_ratio": FORM_8960_LINE_4C_TO_4A_RATIO, + "passive_passthrough_bounds": { + "lower": { + "amount": 0.0, + "assumption": "all Form 8960 line 4c is rental or royalty income", + }, + "upper": { + "amount": FORM_8960_LINE_4C_AMOUNT, + "assumption": "all Form 8960 line 4c is passive pass-through income", + }, + "decomposition_status": ( + "open question: no administrative source on disk decomposes line " + "4c between rental or royalty income and passive partnership or " + "S-corporation income" + ), + }, + "caveats": [ + ( + "Line 4c includes rental and royalty net investment income as well " + "as passive partnership and S-corporation income; it is not a " + "passive pass-through point estimate." + ), + ( + "The engine counts rental_income in NIIT in full. Schedule E rental " + "income is frequently passive, so using line 4c without a rental " + "decomposition would overlap an existing NIIT leg. Rental handling " + "is unchanged here." + ), + ( + "No entity-side SOI passive split exists: partnership tables " + "23pa01, 23pa04, 23pa06, 23pa10, and 23pa23 were checked, and " + "IRS Table 1.4 likewise has no passive split. Form 8960 line 4 " + "is the only administrative level available for this provisional " + "evidence surface." + ), + ], + } + + +def build_qbi_passive_passthrough_resource( + frame: pd.DataFrame, + *, + provenance: Mapping[str, object], +) -> dict[str, object]: + """Build the deterministic version-1 passive pass-through evidence resource.""" + + records = build_scf_passive_passthrough_records(frame) + pooled_holders = records.loc[ + records["holds_nonactive_business"] + & records["positive_share_denominator"] + ] + if pooled_holders.empty: + raise ValueError("SCF records contain no eligible non-active business holders.") + + cells: list[dict[str, object]] = [] + for income_band in SCF_PASSIVE_INCOME_BANDS: + active = records.loc[records["income_band"].eq(income_band)] + if active.empty: + raise ValueError(f"SCF income band {income_band!r} is empty.") + holders = active.loc[active["holds_nonactive_business"]] + eligible_holders = holders.loc[holders["positive_share_denominator"]] + if eligible_holders.empty: + raise ValueError( + f"SCF income band {income_band!r} has no positive-denominator holders." + ) + + presence_level, presence_source_band, presence_sample = _selected_sample( + active, records + ) + share_level, share_source_band, share_sample = _selected_sample( + eligible_holders, pooled_holders + ) + requested_weight = float(active["weight"].sum()) + selected_presence_weight = float(presence_sample["weight"].sum()) + cells.append( + { + "income_band": income_band, + "requested_counts": _requested_counts( + active, holders, eligible_holders + ), + "holding_prevalence": { + "estimate": float( + presence_sample.loc[ + presence_sample["holds_nonactive_business"], "weight" + ].sum() + / selected_presence_weight + ), + "requested_estimate": float( + holders["weight"].sum() / requested_weight + ), + "estimate_level": presence_level, + "source_income_band": presence_source_band, + "source_counts": _counts(presence_sample), + }, + "conditional_share": { + "conditional_on": ( + "X3401 == 1 and ACTBUS + NONACTBUS > 0" + ), + "requested_mean": _weighted_mean(eligible_holders), + "requested_quantiles": _quantiles(eligible_holders), + "selected_mean": _weighted_mean(share_sample), + "selected_quantiles": _quantiles(share_sample), + "estimate_level": share_level, + "source_income_band": share_source_band, + "source_counts": _counts(share_sample), + }, + } + ) + + payload: dict[str, object] = { + "schema_version": 1, + "resource": "us_qbi_passive_passthrough_evidence", + "survey_year": 2022, + "provisional": True, + "source": _source_description(), + "methodology": _methodology(), + "cells": cells, + "external_anchor": _external_anchor(), + "notes": [ + ( + "SCF X3119 identifies the legal form of the largest actively " + "managed business, not the non-actively-managed holding. There is " + "no defensible entity-form link, so these estimates are band-only." + ), + ( + "The SCF value share is a survey shape, not an income-share level. " + "The separate assumptions build supplies the provisional " + "administrative calibration and persists its solved shift." + ), + ( + "A household with X3401 == 1 remains a holder when NONACTBUS is " + "zero; this preserves the requested holding concept." + ), + ], + "provenance": dict(provenance), + } + validate_qbi_passive_passthrough_resource(payload) + return payload + + +def _require_mapping(value: object, location: str) -> Mapping[str, Any]: + if not isinstance(value, Mapping): + raise ValueError(f"{location} must be an object.") + return value + + +def _require_list(value: object, location: str) -> list[Any]: + if not isinstance(value, list): + raise ValueError(f"{location} must be a list.") + return value + + +def _finite_number(value: object, location: str) -> float: + if isinstance(value, bool) or not isinstance(value, (int, float)): + raise ValueError(f"{location} must be numeric.") + result = float(value) + if not np.isfinite(result): + raise ValueError(f"{location} must be finite.") + return result + + +def _probability(value: object, location: str) -> float: + result = _finite_number(value, location) + if not 0.0 <= result <= 1.0: + raise ValueError(f"{location} must lie in [0, 1].") + return result + + +def _validate_quantiles(value: object, location: str) -> None: + quantiles = _require_mapping(value, location) + if tuple(quantiles) != _QUANTILE_NAMES: + raise ValueError(f"{location} must have ordered keys {_QUANTILE_NAMES}.") + values = [_probability(quantiles[name], f"{location}.{name}") for name in quantiles] + if values != sorted(values): + raise ValueError(f"{location} must be nondecreasing.") + + +def _validate_counts(value: object, location: str) -> Mapping[str, Any]: + counts = _require_mapping(value, location) + for name in ( + "pooled_record_count", + "implicate_adjusted_unweighted_n", + "weighted_households", + ): + number = _finite_number(counts.get(name), f"{location}.{name}") + if number < 0.0: + raise ValueError(f"{location}.{name} must be nonnegative.") + pooled = _finite_number(counts["pooled_record_count"], f"{location}.pooled_record_count") + effective = _finite_number( + counts["implicate_adjusted_unweighted_n"], + f"{location}.implicate_adjusted_unweighted_n", + ) + if not np.isclose(effective, pooled / SCF_PASSIVE_IMPLICATE_COUNT): + raise ValueError(f"{location} has inconsistent implicate-adjusted n.") + return counts + + +def validate_qbi_passive_passthrough_resource( + payload: Mapping[str, object], +) -> None: + """Reject malformed or silently de-provisionalized evidence payloads.""" + + root = _require_mapping(payload, "resource") + if root.get("schema_version") != 1: + raise ValueError("resource.schema_version must equal 1.") + if root.get("resource") != "us_qbi_passive_passthrough_evidence": + raise ValueError("resource.resource has the wrong identifier.") + if root.get("survey_year") != 2022: + raise ValueError("resource.survey_year must equal 2022.") + if root.get("provisional") is not True: + raise ValueError("Passive pass-through evidence must remain provisional.") + + methodology = _require_mapping(root.get("methodology"), "methodology") + if methodology.get("implicate_count") != SCF_PASSIVE_IMPLICATE_COUNT: + raise ValueError("methodology.implicate_count must equal 5.") + if methodology.get("minimum_effective_n") != SCF_PASSIVE_MINIMUM_EFFECTIVE_N: + raise ValueError("methodology.minimum_effective_n must equal 30.") + if methodology.get("fallback_order") != ["income_band", "all_income_bands"]: + raise ValueError("methodology.fallback_order is not the reviewed hierarchy.") + probabilities = _require_list( + methodology.get("quantile_probabilities"), + "methodology.quantile_probabilities", + ) + if probabilities != list(SCF_PASSIVE_QUANTILE_PROBABILITIES): + raise ValueError("methodology.quantile_probabilities are not reviewed values.") + + cells = _require_list(root.get("cells"), "cells") + if [cell.get("income_band") for cell in cells if isinstance(cell, Mapping)] != list( + SCF_PASSIVE_INCOME_BANDS + ) or len(cells) != len(SCF_PASSIVE_INCOME_BANDS): + raise ValueError("cells must contain the six reviewed income bands in order.") + for index, cell_value in enumerate(cells): + cell = _require_mapping(cell_value, f"cells[{index}]") + band = SCF_PASSIVE_INCOME_BANDS[index] + requested = _require_mapping( + cell.get("requested_counts"), f"cells[{index}].requested_counts" + ) + for prefix in ( + "active", + "nonactive_holder", + "positive_denominator_holder", + ): + _validate_counts( + { + name: requested.get(f"{prefix}_{name}") + for name in ( + "pooled_record_count", + "implicate_adjusted_unweighted_n", + "weighted_households", + ) + }, + f"cells[{index}].requested_counts.{prefix}", + ) + + presence = _require_mapping( + cell.get("holding_prevalence"), f"cells[{index}].holding_prevalence" + ) + _probability(presence.get("estimate"), f"cells[{index}].holding_prevalence.estimate") + _probability( + presence.get("requested_estimate"), + f"cells[{index}].holding_prevalence.requested_estimate", + ) + presence_counts = _validate_counts( + presence.get("source_counts"), + f"cells[{index}].holding_prevalence.source_counts", + ) + active_n = _finite_number( + requested.get("active_implicate_adjusted_unweighted_n"), + f"cells[{index}].requested_counts.active_implicate_adjusted_unweighted_n", + ) + expected_level = ( + "exact" + if active_n >= SCF_PASSIVE_MINIMUM_EFFECTIVE_N + else "all_income_bands" + ) + if presence.get("estimate_level") != expected_level: + raise ValueError(f"cells[{index}] holding fallback is inconsistent with n.") + expected_source = band if expected_level == "exact" else "all" + if presence.get("source_income_band") != expected_source: + raise ValueError(f"cells[{index}] holding source band is inconsistent.") + if expected_level == "exact" and not np.isclose( + _finite_number( + presence_counts["implicate_adjusted_unweighted_n"], + f"cells[{index}].holding_prevalence.source_counts.n", + ), + active_n, + ): + raise ValueError(f"cells[{index}] exact holding source n is inconsistent.") + + share = _require_mapping( + cell.get("conditional_share"), f"cells[{index}].conditional_share" + ) + _probability( + share.get("requested_mean"), + f"cells[{index}].conditional_share.requested_mean", + ) + _probability( + share.get("selected_mean"), + f"cells[{index}].conditional_share.selected_mean", + ) + _validate_quantiles( + share.get("requested_quantiles"), + f"cells[{index}].conditional_share.requested_quantiles", + ) + _validate_quantiles( + share.get("selected_quantiles"), + f"cells[{index}].conditional_share.selected_quantiles", + ) + share_counts = _validate_counts( + share.get("source_counts"), + f"cells[{index}].conditional_share.source_counts", + ) + share_n = _finite_number( + requested.get( + "positive_denominator_holder_implicate_adjusted_unweighted_n" + ), + f"cells[{index}].requested_counts.positive_denominator_holder_n", + ) + expected_level = ( + "exact" + if share_n >= SCF_PASSIVE_MINIMUM_EFFECTIVE_N + else "all_income_bands" + ) + if share.get("estimate_level") != expected_level: + raise ValueError(f"cells[{index}] share fallback is inconsistent with n.") + expected_source = band if expected_level == "exact" else "all" + if share.get("source_income_band") != expected_source: + raise ValueError(f"cells[{index}] share source band is inconsistent.") + if expected_level == "exact" and not np.isclose( + _finite_number( + share_counts["implicate_adjusted_unweighted_n"], + f"cells[{index}].conditional_share.source_counts.n", + ), + share_n, + ): + raise ValueError(f"cells[{index}] exact share source n is inconsistent.") + + anchor = _require_mapping(root.get("external_anchor"), "external_anchor") + form = _require_mapping(anchor.get("form_8960"), "external_anchor.form_8960") + expected_lines = { + "line_4a": (FORM_8960_LINE_4A_AMOUNT, FORM_8960_LINE_4A_RETURNS), + "line_4b": (FORM_8960_LINE_4B_AMOUNT, FORM_8960_LINE_4B_RETURNS), + "line_4c": (FORM_8960_LINE_4C_AMOUNT, FORM_8960_LINE_4C_RETURNS), + } + for line, (amount, returns_count) in expected_lines.items(): + row = _require_mapping(form.get(line), f"external_anchor.form_8960.{line}") + if _finite_number(row.get("amount"), f"{line}.amount") != amount: + raise ValueError(f"external_anchor.form_8960.{line}.amount is not reviewed.") + if row.get("returns_count") != returns_count: + raise ValueError( + f"external_anchor.form_8960.{line}.returns_count is not reviewed." + ) + ratio = _finite_number( + anchor.get("line_4c_to_4a_survival_ratio"), + "external_anchor.line_4c_to_4a_survival_ratio", + ) + if not np.isclose(ratio, FORM_8960_LINE_4C_TO_4A_RATIO, rtol=0.0, atol=1e-15): + raise ValueError("external_anchor survival ratio is inconsistent.") + bounds = _require_mapping( + anchor.get("passive_passthrough_bounds"), + "external_anchor.passive_passthrough_bounds", + ) + lower = _require_mapping(bounds.get("lower"), "bounds.lower") + upper = _require_mapping(bounds.get("upper"), "bounds.upper") + if _finite_number(lower.get("amount"), "bounds.lower.amount") != 0.0: + raise ValueError("Passive pass-through lower bound must equal zero.") + if ( + _finite_number(upper.get("amount"), "bounds.upper.amount") + != FORM_8960_LINE_4C_AMOUNT + ): + raise ValueError("Passive pass-through upper bound must equal line 4c.") + status = bounds.get("decomposition_status") + if not isinstance(status, str) or "open question" not in status.lower(): + raise ValueError("Bounds must retain the open decomposition question.") + + _require_mapping(root.get("source"), "source") + _require_list(root.get("notes"), "notes") + _require_mapping(root.get("provenance"), "provenance") + + +def default_qbi_passive_passthrough_resource_path() -> Path: + """Return the packaged evidence resource path.""" + + return Path(str(files("microcosm.build.us").joinpath(_RESOURCE_NAME))) + + +def load_qbi_passive_passthrough_resource( + path: Path | str | None = None, +) -> dict[str, object]: + """Load and validate the packaged or explicitly supplied evidence JSON.""" + + resource_path = ( + default_qbi_passive_passthrough_resource_path() + if path is None + else Path(path) + ) + payload = json.loads(resource_path.read_text(encoding="utf-8")) + validate_qbi_passive_passthrough_resource(payload) + return payload + + +__all__ = [ + "FORM_8960_LINE_4A_AMOUNT", + "FORM_8960_LINE_4C_AMOUNT", + "FORM_8960_LINE_4C_TO_4A_RATIO", + "SCF_PASSIVE_INCOME_BANDS", + "SCF_PASSIVE_MINIMUM_EFFECTIVE_N", + "SCF_PASSIVE_QUANTILE_PROBABILITIES", + "SCF_PASSIVE_REQUIRED_COLUMNS", + "build_qbi_passive_passthrough_resource", + "build_scf_passive_passthrough_records", + "default_qbi_passive_passthrough_resource_path", + "load_qbi_passive_passthrough_resource", + "validate_qbi_passive_passthrough_resource", + "weighted_inverse_cdf", +] diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py new file mode 100644 index 000000000..0f958fec5 --- /dev/null +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py @@ -0,0 +1,290 @@ +"""Synthetic and packaged-resource tests for passive pass-through evidence.""" + +from __future__ import annotations + +import importlib.util +import json +import zipfile +from copy import deepcopy +from pathlib import Path + +import numpy as np +import pandas as pd +import pytest + +from microcosm.build.us_runtime.qbi_passive_passthrough_evidence import ( + FORM_8960_LINE_4C_AMOUNT, + FORM_8960_LINE_4C_TO_4A_RATIO, + SCF_PASSIVE_INCOME_BANDS, + SCF_PASSIVE_REQUIRED_COLUMNS, + build_qbi_passive_passthrough_resource, + build_scf_passive_passthrough_records, + load_qbi_passive_passthrough_resource, + validate_qbi_passive_passthrough_resource, + weighted_inverse_cdf, +) + +ROOT = Path(__file__).resolve().parents[3] +BUILDER_PATH = ROOT / "tools/build_us_qbi_passive_passthrough_evidence.py" + + +def _load_builder(): + spec = importlib.util.spec_from_file_location( + "qbi_passive_passthrough_evidence_builder", BUILDER_PATH + ) + assert spec is not None and spec.loader is not None + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + return builder + + +def _row( + household_id: int, + implicate: int, + *, + schedule_e_income: float, + holder: bool, + nonactive_value: float, + active_value: float = 100.0, + weight: float = 100.0, +) -> dict[str, float]: + row = {column: 0.0 for column in SCF_PASSIVE_REQUIRED_COLUMNS} + row.update( + { + "y1": float(household_id * 10 + implicate), + "x42001": weight, + "x3103": 1.0, + "x3104": 1.0, + "x3105": 1.0, + "x3401": 1.0 if holder else 5.0, + "x5714": schedule_e_income, + "x3129": active_value, + "x3408": nonactive_value, + } + ) + return row + + +def _scf_fixture() -> pd.DataFrame: + band_values = (-1.0, 10_000.0, 50_000.0, 150_000.0, 500_000.0, 2_000_000.0) + rows: list[dict[str, float]] = [] + household_id = 1 + for band_index, income in enumerate(band_values): + # Every prevalence denominator meets n=30. The first share cell meets + # n=30; the other five each have one holder and must pool to all bands. + for household_index in range(30): + holder = band_index == 0 or household_index == 0 + nonactive = ( + float(10 + household_index) + if holder and not (band_index == 0 and household_index == 0) + else 0.0 + ) + for implicate in range(1, 6): + rows.append( + _row( + household_id, + implicate, + schedule_e_income=income, + holder=holder, + nonactive_value=nonactive, + weight=float(100 + household_index), + ) + ) + household_id += 1 + return pd.DataFrame.from_records(rows) + + +def _provenance() -> dict[str, object]: + return { + "generated_by": "synthetic test", + "run_command": "synthetic fixture", + "inputs": [{"filename": "synthetic.dta", "sha256": "0" * 64}], + "deterministic": True, + "random_draws": "none", + } + + +def test_scf_balance_sheet_formulas_match_scfp_construction() -> None: + rows = [ + _row( + 1, + implicate, + schedule_e_income=10_000.0, + holder=True, + nonactive_value=0.0, + ) + for implicate in range(1, 6) + ] + source = pd.DataFrame.from_records(rows) + source["x3129"] = 100.0 + source["x3124"] = 20.0 + source["x3126"] = 10.0 + source["x3127"] = 5.0 + source["x3121"] = 7.0 + source["x3122"] = 1.0 + source["x3229"] = 50.0 + source["x3224"] = 5.0 + source["x3226"] = 2.0 + source["x3227"] = 5.0 + source["x3221"] = 3.0 + source["x3222"] = 6.0 + source["x3335"] = 4.0 + source["x507"] = 10_000.0 # SCFP caps the business percentage at 90%. + source["x513"] = 100.0 + source["x526"] = 20.0 + source["x805"] = 10.0 + source["x905"] = 5.0 + source["x1005"] = 5.0 + source["x1103"] = 1.0 + source["x1108"] = 10.0 + source["x1114"] = 5.0 + source["x1119"] = 20.0 + source["x1125"] = 1.0 + source["x1130"] = 30.0 + source["x1136"] = 12.0 + source["x3408"] = 10.0 + source["x3412"] = 20.0 + source["x3416"] = 30.0 + + records = build_scf_passive_passthrough_records(source) + + # First active business 117; second 56; remaining businesses 4. + # The direct farm-secured allocations leave reduced balances 1, 20, and + # 3. X1136 therefore assigns 1/6 to the farm: FARMBUS is + # 90 - 9 - 27 - 1.8 = 52.2. NONACTBUS = 60. + assert records["actbus"].tolist() == pytest.approx([229.2] * 5) + assert records["nonactbus"].tolist() == pytest.approx([60.0] * 5) + assert records["nonactive_business_value_share"].tolist() == pytest.approx( + [60.0 / 289.2] * 5 + ) + + +def test_pooled_implicates_and_independent_thin_cell_fallbacks() -> None: + payload = build_qbi_passive_passthrough_resource( + _scf_fixture(), provenance=_provenance() + ) + + assert [cell["income_band"] for cell in payload["cells"]] == list( + SCF_PASSIVE_INCOME_BANDS + ) + first = payload["cells"][0] + assert first["requested_counts"]["active_pooled_record_count"] == 150 + assert first["requested_counts"]["active_implicate_adjusted_unweighted_n"] == 30 + assert first["holding_prevalence"]["estimate_level"] == "exact" + assert first["holding_prevalence"]["estimate"] == 1.0 + assert first["conditional_share"]["estimate_level"] == "exact" + assert first["conditional_share"]["source_income_band"] == "nonpositive" + + thin = payload["cells"][1] + assert thin["holding_prevalence"]["estimate_level"] == "exact" + assert thin["conditional_share"]["estimate_level"] == "all_income_bands" + assert thin["conditional_share"]["source_income_band"] == "all" + assert thin["requested_counts"][ + "nonactive_holder_implicate_adjusted_unweighted_n" + ] == 1.0 + assert thin["conditional_share"]["selected_quantiles"] == payload["cells"][ + 2 + ]["conditional_share"]["selected_quantiles"] + + +def test_holding_screener_retains_reported_zero_value_holders() -> None: + records = build_scf_passive_passthrough_records(_scf_fixture()) + payload = build_qbi_passive_passthrough_resource( + _scf_fixture(), provenance=_provenance() + ) + first = payload["cells"][0] + + assert first["requested_counts"]["nonactive_holder_pooled_record_count"] == 150 + first_band_holders = records.loc[ + records["income_band"].eq("nonpositive") + & records["holds_nonactive_business"] + ] + assert first_band_holders["nonactive_business_value_share"].eq(0.0).sum() == 5 + + +def test_weighted_inverse_cdf_uses_weights_and_stable_ties() -> None: + quantiles = weighted_inverse_cdf( + np.array([0.1, 0.2, 0.9]), + np.array([1.0, 3.0, 1.0]), + ) + + assert quantiles == { + "q05": 0.1, + "q25": 0.2, + "q50": 0.2, + "q75": 0.2, + "q95": 0.9, + } + + +def test_builder_reads_equivalent_dta_and_zip_sources(tmp_path: Path) -> None: + source = _scf_fixture().iloc[:30].copy() + dta_path = tmp_path / "p22i6.dta" + zip_path = tmp_path / "scf2022s.zip" + source.to_stata(dta_path, write_index=False) + with zipfile.ZipFile(zip_path, "w") as archive: + archive.write(dta_path, arcname="p22i6.dta") + builder = _load_builder() + + dta_frame, dta_inputs = builder.read_scf_source(dta_path) + zip_frame, zip_inputs = builder.read_scf_source(zip_path) + + pd.testing.assert_frame_equal(dta_frame, zip_frame) + assert [record["role"] for record in dta_inputs] == ["scf_2022_source"] + assert [record["role"] for record in zip_inputs] == [ + "scf_2022_source", + "scf_2022_archive_member", + ] + assert zip_inputs[1]["sha256"] == dta_inputs[0]["sha256"] + + +def test_schema_rejects_deprovisionalized_or_inconsistent_payload() -> None: + payload = build_qbi_passive_passthrough_resource( + _scf_fixture(), provenance=_provenance() + ) + broken = deepcopy(payload) + broken["provisional"] = False + with pytest.raises(ValueError, match="must remain provisional"): + validate_qbi_passive_passthrough_resource(broken) + + broken = deepcopy(payload) + broken["cells"][1]["conditional_share"]["estimate_level"] = "exact" + with pytest.raises(ValueError, match="share fallback"): + validate_qbi_passive_passthrough_resource(broken) + + broken = deepcopy(payload) + broken["external_anchor"]["passive_passthrough_bounds"]["upper"][ + "amount" + ] = 1.0 + with pytest.raises(ValueError, match="upper bound"): + validate_qbi_passive_passthrough_resource(broken) + + +def test_packaged_resource_has_reviewed_cells_and_anchor() -> None: + payload = load_qbi_passive_passthrough_resource() + + estimates = { + cell["income_band"]: cell["holding_prevalence"]["estimate"] + for cell in payload["cells"] + } + assert estimates == pytest.approx( + { + "nonpositive": 0.033492918161629, + "0_to_25k": 0.041323551642334, + "25k_to_100k": 0.064532919876429, + "100k_to_250k": 0.096543423809845, + "250k_to_1m": 0.212268790432713, + "over_1m": 0.389806347521960, + } + ) + anchor = payload["external_anchor"] + assert anchor["form_8960"]["line_4c"]["amount"] == FORM_8960_LINE_4C_AMOUNT + assert anchor["line_4c_to_4a_survival_ratio"] == pytest.approx( + FORM_8960_LINE_4C_TO_4A_RATIO + ) + assert anchor["passive_passthrough_bounds"]["lower"]["amount"] == 0.0 + assert ( + anchor["passive_passthrough_bounds"]["upper"]["amount"] + == FORM_8960_LINE_4C_AMOUNT + ) + assert json.dumps(payload, allow_nan=False) diff --git a/tools/build_us_qbi_passive_passthrough_evidence.py b/tools/build_us_qbi_passive_passthrough_evidence.py new file mode 100644 index 000000000..7fd250865 --- /dev/null +++ b/tools/build_us_qbi_passive_passthrough_evidence.py @@ -0,0 +1,200 @@ +#!/usr/bin/env python3 +"""Build the provisional SCF passive pass-through evidence resource. + +The source SCF microdata is a build-time input. The committed output contains +only deterministic aggregate cells and source-byte provenance. + +Reproduction:: + + uv run python tools/build_us_qbi_passive_passthrough_evidence.py \ + --scf /path/to/scf2022s.zip +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import tempfile +import zipfile +from pathlib import Path + +import pandas as pd + +from microcosm.build.us_runtime.qbi_passive_passthrough_evidence import ( + SCF_PASSIVE_REQUIRED_COLUMNS, + build_qbi_passive_passthrough_resource, +) + +REPO_ROOT = Path(__file__).resolve().parents[1] +DEFAULT_OUTPUT = ( + REPO_ROOT + / "packages/microcosm-build/src/microcosm/build/us" + / "qbi_passive_passthrough_v1.json" +) +SCF_ARCHIVE_MEMBER = "p22i6.dta" + +SCF_ARCHIVE_SHA256 = ( + "409e6811df895766d50b2f597c10b1b3c5813e7d3e0e45d910ad26c0cb07f4eb" +) +SCF_ARCHIVE_SIZE_BYTES = 8_856_125 +SCF_MEMBER_SHA256 = ( + "61e2fceb1594e4009eb996d6e25d38a5d8e4874930fc2bfce3c87ffa6946ad0a" +) +SCF_MEMBER_SIZE_BYTES = 236_952_250 + +REPRODUCTION_COMMAND = ( + "uv run python tools/build_us_qbi_passive_passthrough_evidence.py " + "--scf /path/to/scf2022s.zip" +) + + +def _parse_args(argv: list[str] | None = None) -> argparse.Namespace: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--scf", + required=True, + type=Path, + help="SCF p22i6.dta or the scf2022s.zip archive containing it.", + ) + parser.add_argument( + "--output", + type=Path, + default=DEFAULT_OUTPUT, + help="Path receiving qbi_passive_passthrough_v1.json.", + ) + return parser.parse_args(argv) + + +def _sha256(path: Path) -> str: + digest = hashlib.sha256() + with path.open("rb") as stream: + for chunk in iter(lambda: stream.read(1024 * 1024), b""): + digest.update(chunk) + return digest.hexdigest() + + +def _input_record(path: Path, *, role: str) -> dict[str, object]: + if not path.is_file(): + raise FileNotFoundError(f"{role} input does not exist: {path}") + return { + "role": role, + "filename": path.name, + "sha256": _sha256(path), + "bytes": path.stat().st_size, + } + + +def _read_stata(path: Path) -> pd.DataFrame: + return pd.read_stata( + path, + columns=list(SCF_PASSIVE_REQUIRED_COLUMNS), + convert_categoricals=False, + ) + + +def _verify_pin( + record: dict[str, object], + *, + expected_sha256: str, + expected_bytes: int, +) -> None: + if record["sha256"] != expected_sha256 or record["bytes"] != expected_bytes: + raise ValueError( + f"{record['role']} does not match the reviewed SCF 2022 bytes: " + f"sha256={record['sha256']}, bytes={record['bytes']}." + ) + + +def read_scf_source( + path: Path | str, + *, + require_reviewed_bytes: bool = False, +) -> tuple[pd.DataFrame, list[dict[str, object]]]: + """Read the SCF DTA or containing ZIP and return exact input digests.""" + + source = Path(path) + container_record = _input_record(source, role="scf_2022_source") + if source.suffix.lower() == ".dta": + if require_reviewed_bytes: + _verify_pin( + container_record, + expected_sha256=SCF_MEMBER_SHA256, + expected_bytes=SCF_MEMBER_SIZE_BYTES, + ) + return _read_stata(source), [container_record] + if source.suffix.lower() != ".zip": + raise ValueError("SCF source must end in .dta or .zip.") + if require_reviewed_bytes: + _verify_pin( + container_record, + expected_sha256=SCF_ARCHIVE_SHA256, + expected_bytes=SCF_ARCHIVE_SIZE_BYTES, + ) + + with zipfile.ZipFile(source) as archive: + matches = [ + name for name in archive.namelist() if Path(name).name == SCF_ARCHIVE_MEMBER + ] + if matches != [SCF_ARCHIVE_MEMBER]: + raise ValueError( + "SCF archive must contain exactly root member " + f"{SCF_ARCHIVE_MEMBER!r}; got {matches}." + ) + with tempfile.TemporaryDirectory(prefix="microcosm-passive-scf-") as directory: + extracted = Path(directory) / SCF_ARCHIVE_MEMBER + with archive.open(SCF_ARCHIVE_MEMBER) as source_stream: + with extracted.open("wb") as destination: + for chunk in iter(lambda: source_stream.read(1024 * 1024), b""): + destination.write(chunk) + member_record = _input_record( + extracted, role="scf_2022_archive_member" + ) + member_record["container_filename"] = source.name + if require_reviewed_bytes: + _verify_pin( + member_record, + expected_sha256=SCF_MEMBER_SHA256, + expected_bytes=SCF_MEMBER_SIZE_BYTES, + ) + frame = _read_stata(extracted) + return frame, [container_record, member_record] + + +def _provenance(inputs: list[dict[str, object]]) -> dict[str, object]: + return { + "generated_by": "tools/build_us_qbi_passive_passthrough_evidence.py", + "run_command": REPRODUCTION_COMMAND, + "inputs": inputs, + "deterministic": True, + "random_draws": "none", + } + + +def _write_json(payload: dict[str, object], path: Path) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + rendered = json.dumps(payload, indent=2, sort_keys=True, allow_nan=False) + path.write_text(rendered + "\n", encoding="utf-8") + + +def build_resource(args: argparse.Namespace) -> dict[str, object]: + """Read the reviewed source and return the complete evidence payload.""" + + scf_frame, inputs = read_scf_source(args.scf, require_reviewed_bytes=True) + return build_qbi_passive_passthrough_resource( + scf_frame, + provenance=_provenance(inputs), + ) + + +def main(argv: list[str] | None = None) -> int: + args = _parse_args(argv) + payload = build_resource(args) + output = Path(args.output) + _write_json(payload, output) + print(output) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) From 5dc6a87414f4833bf0020975583a2d8a36ce407e Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 10:58:44 -0400 Subject: [PATCH 04/23] feat(us): assign passive passthrough income --- .../microcosm/build/us/country_package.json | 1 + ...bi_passive_passthrough_assumptions_v1.json | 73 ++ .../microcosm/build/us_runtime/__init__.py | 10 + .../us_runtime/qbi_passive_passthrough.py | 828 ++++++++++++++++++ .../tests/test_us_qbi_passive_passthrough.py | 466 ++++++++++ ..._us_qbi_passive_passthrough_assumptions.py | 182 ++++ 6 files changed, 1560 insertions(+) create mode 100644 packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json create mode 100644 packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py create mode 100644 packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py create mode 100644 tools/build_us_qbi_passive_passthrough_assumptions.py diff --git a/packages/microcosm-build/src/microcosm/build/us/country_package.json b/packages/microcosm-build/src/microcosm/build/us/country_package.json index 444e0cbfa..8ffe36152 100644 --- a/packages/microcosm-build/src/microcosm/build/us/country_package.json +++ b/packages/microcosm-build/src/microcosm/build/us/country_package.json @@ -9,6 +9,7 @@ "fiscal_target_references.json", "obbba_reforms.json", "puf_aggregate_record_disaggregation.json", + "qbi_passive_passthrough_assumptions_v1.json", "qbi_passive_passthrough_v1.json", "release_input_coverage_manifest.json", "soca_capital_gain_distribution_shares.json", diff --git a/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json new file mode 100644 index 000000000..e4d027462 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json @@ -0,0 +1,73 @@ +{ + "assignment_stage": { + "architecture": "sibling_before_qbi_reconciliation", + "latent_form_treatment": "When a v3 latent entity form is available it routes only partnership and S-corporation records into eligibility; the SCF probability and share remain band-only because active and non-active SCF businesses are not entity-linked.", + "output_column": "passive_partnership_s_corp_income", + "person_input_columns": [ + "partnership_income", + "s_corp_income", + "rental_income", + "estate_income" + ], + "schedule_e_proxy": "partnership_income + s_corp_income + rental_income + estate_income", + "version": 1, + "versioning_decision": "Use a version-1 sibling rather than QBI simulation version 4: the current renamed tree consumes 15 archived QBI leaves and does not carry the old opt-in simulation stack." + }, + "calibration": { + "bounds": { + "lower": 0.0, + "upper": 109256984000.0 + }, + "expected_aggregate": 54628491999.999985, + "log_odds_shift": -1.157105426398319, + "provisional_target": { + "amount": 54628492000.0, + "choice": "midpoint_of_unresolved_bounds" + }, + "replay_artifact": { + "bytes": 241045964, + "filename": "puf_2024.h5", + "person_rows": 484015, + "person_weight_total": 317181074.5235834, + "positive_passthrough_rows": 83820, + "positive_passthrough_weighted_aggregate": 1632692702130.5078, + "sha256": "8182579ddfecaf5e5b872e2307b88f03e8e8def993171b648f701a19a847f37b", + "tax_unit_rows": 207692 + }, + "replay_relative_tolerance": 0.05, + "seeded_replay": { + "aggregate": 55021131518.061035, + "positive_assigned_rows": 6207, + "relative_error": 0.007187449327011208, + "seed": 0 + }, + "solver": { + "iterations": 128, + "lower_bound": -30.0, + "method": "bisection_on_expected_weighted_aggregate", + "upper_bound": 30.0 + } + }, + "evidence": { + "resource": "qbi_passive_passthrough_v1.json", + "schema_version": 1, + "sha256": "32fac446d5f208a9c3f73c8234184144dd0c1f322ccdf186e5fb94dd774d61a7" + }, + "notes": [ + "The target is provisional because Form 8960 line 4c does not decompose passive pass-through income from rental and royalty income.", + "Rental income remains unchanged: the current engine includes it fully in NIIT, and this stage assigns only the pass-through leaf.", + "The runtime does not read the restricted replay artifact or solve the calibration shift.", + "The sibling stage neither invokes nor advances any archived QBI random stream and preserves all 15 existing QBI leaves." + ], + "provisional": true, + "random_streams": { + "bit_generator": "PCG64", + "draw_policy": "full_length_before_support_masks", + "family_entropy": 4722, + "presence_family": 0, + "root_seed_default": 0, + "share_family": 1 + }, + "resource": "qbi_passive_passthrough_assumptions", + "schema_version": 1 +} diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/__init__.py b/packages/microcosm-build/src/microcosm/build/us_runtime/__init__.py index e55690cb5..05c0090f5 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/__init__.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/__init__.py @@ -639,6 +639,12 @@ us_qbi_inputs_summary, with_us_qbi_input_reconciliation, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS, + us_qbi_passive_passthrough_contract_identity, + with_us_qbi_passive_passthrough_assignment, +) from microcosm.build.us_runtime.reform_coverage_smoke import ( us_reform_coverage_smoke_gate, ) @@ -1450,6 +1456,10 @@ "us_qbi_inputs_stage_spec", "us_qbi_inputs_summary", "with_us_qbi_input_reconciliation", + "US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN", + "US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS", + "us_qbi_passive_passthrough_contract_identity", + "with_us_qbi_passive_passthrough_assignment", "US_AOTC_ELIGIBILITY_OUTPUT_COLUMNS", "US_EDUCATION_INPUTS_NONCONSTANT_PERSON_COLUMNS", "US_EDUCATION_INPUTS_OUTPUT_COLUMNS", diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py new file mode 100644 index 000000000..f84232982 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py @@ -0,0 +1,828 @@ +"""Assign the passive share of partnership and S-corporation income. + +This is a versioned sibling of the archived QBI-input reconciliation, not a +replacement for it. Survey evidence supplies the Schedule-E-band shape and a +restricted replay build persists the single administrative-anchor shift. The +runtime only loads those committed resources and makes seeded draws. +""" + +from __future__ import annotations + +import hashlib +import json +import math +import re +from collections.abc import Mapping +from importlib.resources import files +from typing import Any + +import numpy as np +import pandas as pd + +from microcosm.build.us_runtime.qbi_passive_passthrough_evidence import ( + SCF_PASSIVE_INCOME_BANDS, + validate_qbi_passive_passthrough_resource, +) +from microcosm.frame import Frame + +__all__ = [ + "QBI_PASSIVE_ASSUMPTIONS_RESOURCE", + "QBI_PASSIVE_EVIDENCE_RESOURCE", + "US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN", + "US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS", + "assign_passive_partnership_s_corp_income", + "build_qbi_passive_passthrough_assumptions_payload", + "calibrate_qbi_passive_log_odds_shift", + "load_qbi_passive_passthrough_assumptions", + "load_qbi_passive_passthrough_evidence", + "qbi_passive_expected_aggregate", + "us_qbi_passive_passthrough_contract_identity", + "validate_qbi_passive_passthrough_assumptions", + "with_us_qbi_passive_passthrough_assignment", +] + +QBI_PASSIVE_EVIDENCE_RESOURCE = "qbi_passive_passthrough_v1.json" +QBI_PASSIVE_ASSUMPTIONS_RESOURCE = ( + "qbi_passive_passthrough_assumptions_v1.json" +) +US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN = ( + "passive_partnership_s_corp_income" +) +US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS: tuple[str, ...] = ( + "partnership_income", + "s_corp_income", + "rental_income", + "estate_income", +) + +_ASSIGNMENT_STAGE_VERSION = 1 +_ASSUMPTIONS_SCHEMA_VERSION = 1 +_DEFAULT_ROOT_SEED = 0 +_RNG_FAMILY_ENTROPY = 4722 +_PRESENCE_FAMILY = 0 +_SHARE_FAMILY = 1 +_SOLVER_ITERATIONS = 128 +_SOLVER_LOWER_BOUND = -30.0 +_SOLVER_UPPER_BOUND = 30.0 +_PROBABILITY_CLIP = 1e-12 +_SHA256 = re.compile(r"[0-9a-f]{64}") + + +def _resource_bytes(name: str) -> bytes: + return files("microcosm.build.us").joinpath(name).read_bytes() + + +def _resource_payload(name: str) -> dict[str, Any]: + payload = json.loads(_resource_bytes(name)) + if not isinstance(payload, dict): + raise ValueError(f"{name} must contain one JSON object.") + return payload + + +def _resource_sha256(name: str) -> str: + return hashlib.sha256(_resource_bytes(name)).hexdigest() + + +def _mapping(value: object, location: str) -> Mapping[str, Any]: + if not isinstance(value, Mapping): + raise ValueError(f"{location} must be a JSON object.") + return value + + +def _number( + value: object, + location: str, + *, + minimum: float | None = None, +) -> float: + if isinstance(value, bool) or not isinstance(value, (int, float)): + raise ValueError(f"{location} must be numeric.") + result = float(value) + if not math.isfinite(result) or (minimum is not None and result < minimum): + suffix = "" if minimum is None else f" and at least {minimum}" + raise ValueError(f"{location} must be finite{suffix}.") + return result + + +def _integer(value: object, location: str, *, minimum: int = 0) -> int: + if isinstance(value, bool) or not isinstance(value, int) or value < minimum: + raise ValueError(f"{location} must be an integer at least {minimum}.") + return value + + +def _text(value: object, location: str) -> str: + if not isinstance(value, str) or not value.strip(): + raise ValueError(f"{location} must be a nonempty string.") + return value + + +def _digest(value: object, location: str) -> str: + result = _text(value, location) + if _SHA256.fullmatch(result) is None: + raise ValueError(f"{location} must be a lowercase SHA-256 digest.") + return result + + +def _finite_vector(value: object, location: str) -> np.ndarray: + result = np.asarray(value, dtype=np.float64) + if result.ndim != 1: + raise ValueError(f"{location} must be one-dimensional.") + if not np.isfinite(result).all(): + raise ValueError(f"{location} must be finite.") + return result + + +def _aligned_vectors(**values: object) -> dict[str, np.ndarray]: + arrays = {name: _finite_vector(value, name) for name, value in values.items()} + lengths = {len(value) for value in arrays.values()} + if len(lengths) != 1: + raise ValueError("Passive pass-through arrays must have equal lengths.") + return arrays + + +def _income_band_index(values: np.ndarray) -> np.ndarray: + return np.select( + ( + values <= 0.0, + values <= 25_000.0, + values <= 100_000.0, + values <= 250_000.0, + values <= 1_000_000.0, + ), + (0, 1, 2, 3, 4), + default=5, + ).astype(np.int8) + + +def _logistic(values: np.ndarray | float) -> np.ndarray: + array = np.asarray(values, dtype=np.float64) + return 1.0 / (1.0 + np.exp(-np.clip(array, -700.0, 700.0))) + + +def _logit(values: np.ndarray | float) -> np.ndarray: + array = np.clip( + np.asarray(values, dtype=np.float64), + _PROBABILITY_CLIP, + 1.0 - _PROBABILITY_CLIP, + ) + return np.log(array / (1.0 - array)) + + +def _evidence_model( + evidence: Mapping[str, Any], +) -> tuple[np.ndarray, np.ndarray, np.ndarray]: + validate_qbi_passive_passthrough_resource(evidence) + methodology = _mapping(evidence["methodology"], "methodology") + probabilities = _finite_vector( + methodology["quantile_probabilities"], + "methodology.quantile_probabilities", + ) + cells = { + _text(cell["income_band"], "cells[].income_band"): cell + for cell in evidence["cells"] + } + prevalence: list[float] = [] + quantiles: list[np.ndarray] = [] + for band in SCF_PASSIVE_INCOME_BANDS: + cell = _mapping(cells[band], f"cells.{band}") + holding = _mapping( + cell["holding_prevalence"], + f"cells.{band}.holding_prevalence", + ) + share = _mapping( + cell["conditional_share"], + f"cells.{band}.conditional_share", + ) + prevalence.append( + _number( + holding["estimate"], + f"cells.{band}.holding_prevalence.estimate", + minimum=0.0, + ) + ) + selected_quantiles = _mapping( + share["selected_quantiles"], + f"cells.{band}.conditional_share.selected_quantiles", + ) + quantiles.append( + _finite_vector( + [ + selected_quantiles[name] + for name in ("q05", "q25", "q50", "q75", "q95") + ], + f"cells.{band}.conditional_share.selected_quantiles", + ) + ) + prevalence_array = np.asarray(prevalence, dtype=np.float64) + quantile_array = np.asarray(quantiles, dtype=np.float64) + if np.any(prevalence_array > 1.0): + raise ValueError("SCF passive holding prevalence must lie in [0, 1].") + if quantile_array.shape != ( + len(SCF_PASSIVE_INCOME_BANDS), + len(probabilities), + ): + raise ValueError("SCF passive conditional-share quantiles are misaligned.") + if np.any((quantile_array < 0.0) | (quantile_array > 1.0)): + raise ValueError("SCF passive share quantiles must lie in [0, 1].") + if np.any(np.diff(probabilities) <= 0.0): + raise ValueError("SCF passive quantile probabilities must increase.") + if probabilities[0] <= 0.0 or probabilities[-1] >= 1.0: + raise ValueError("SCF passive quantile probabilities must lie in (0, 1).") + if np.any(np.diff(quantile_array, axis=1) < 0.0): + raise ValueError("SCF passive share quantiles must be nondecreasing.") + return prevalence_array, probabilities, quantile_array + + +def _inverse_cdf_means( + probabilities: np.ndarray, + quantiles: np.ndarray, +) -> np.ndarray: + left = quantiles[:, 0] * probabilities[0] + middle = np.sum( + (quantiles[:, :-1] + quantiles[:, 1:]) + * np.diff(probabilities) + / 2.0, + axis=1, + ) + right = quantiles[:, -1] * (1.0 - probabilities[-1]) + return left + middle + right + + +def _latent_form_eligibility( + latent_entity_form: object | None, + *, + length: int, +) -> np.ndarray: + if latent_entity_form is None: + return np.ones(length, dtype=bool) + forms = np.asarray(latent_entity_form) + if forms.ndim != 1 or len(forms) != length: + raise ValueError("latent_entity_form must align one-for-one with inputs.") + if np.issubdtype(forms.dtype, np.number): + numeric = np.asarray(forms, dtype=np.float64) + if not np.isfinite(numeric).all(): + raise ValueError("latent_entity_form numeric codes must be finite.") + return np.isin(numeric, (1.0, 2.0)) + normalized = np.asarray( + [str(value).strip().lower() for value in forms], + dtype=object, + ) + recognized = { + "partnership", + "partnership_or_llc", + "s_corporation", + } + return np.isin(normalized, tuple(recognized)) + + +def validate_qbi_passive_passthrough_assumptions( + payload: Mapping[str, Any], +) -> None: + """Fail closed on the persisted passive assignment contract.""" + + required = { + "schema_version", + "resource", + "provisional", + "assignment_stage", + "evidence", + "random_streams", + "calibration", + "notes", + } + if set(payload) != required: + raise ValueError( + "Passive pass-through assumptions keys must be exactly " + f"{sorted(required)}; got {sorted(payload)}." + ) + if payload["schema_version"] != _ASSUMPTIONS_SCHEMA_VERSION: + raise ValueError("Unsupported passive pass-through assumptions schema.") + if payload["resource"] != "qbi_passive_passthrough_assumptions": + raise ValueError("Unexpected passive pass-through assumptions resource.") + if payload["provisional"] is not True: + raise ValueError("Passive pass-through assumptions must remain provisional.") + + stage = _mapping(payload["assignment_stage"], "assignment_stage") + if stage.get("version") != _ASSIGNMENT_STAGE_VERSION: + raise ValueError("Unexpected passive assignment stage version.") + if stage.get("architecture") != "sibling_before_qbi_reconciliation": + raise ValueError("Unexpected passive assignment stage architecture.") + if stage.get("output_column") != US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN: + raise ValueError("Passive assignment output column does not match runtime.") + if tuple(stage.get("person_input_columns", ())) != ( + US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS + ): + raise ValueError("Passive assignment input columns do not match runtime.") + + evidence = _mapping(payload["evidence"], "evidence") + if evidence.get("resource") != QBI_PASSIVE_EVIDENCE_RESOURCE: + raise ValueError("Passive assumptions name the wrong evidence resource.") + if evidence.get("schema_version") != 1: + raise ValueError("Passive assumptions require evidence schema 1.") + _digest(evidence.get("sha256"), "evidence.sha256") + + streams = _mapping(payload["random_streams"], "random_streams") + expected_streams = { + "bit_generator": "PCG64", + "root_seed_default": _DEFAULT_ROOT_SEED, + "family_entropy": _RNG_FAMILY_ENTROPY, + "presence_family": _PRESENCE_FAMILY, + "share_family": _SHARE_FAMILY, + "draw_policy": "full_length_before_support_masks", + } + if dict(streams) != expected_streams: + raise ValueError("Passive assignment random-stream contract drifted.") + + calibration = _mapping(payload["calibration"], "calibration") + bounds = _mapping(calibration.get("bounds"), "calibration.bounds") + lower = _number(bounds.get("lower"), "calibration.bounds.lower", minimum=0.0) + upper = _number(bounds.get("upper"), "calibration.bounds.upper", minimum=0.0) + target = _mapping( + calibration.get("provisional_target"), + "calibration.provisional_target", + ) + amount = _number( + target.get("amount"), + "calibration.provisional_target.amount", + minimum=0.0, + ) + if target.get("choice") != "midpoint_of_unresolved_bounds": + raise ValueError("Passive provisional target choice must remain explicit.") + if not math.isclose(amount, (lower + upper) / 2.0, abs_tol=1e-6): + raise ValueError("Passive provisional target is not the bounds midpoint.") + shift = _number(calibration.get("log_odds_shift"), "calibration.log_odds_shift") + expected = _number( + calibration.get("expected_aggregate"), + "calibration.expected_aggregate", + minimum=0.0, + ) + if not math.isclose(expected, amount, rel_tol=1e-10, abs_tol=1.0): + raise ValueError("Passive expected aggregate does not hit its target.") + _ = shift + tolerance = _number( + calibration.get("replay_relative_tolerance"), + "calibration.replay_relative_tolerance", + minimum=0.0, + ) + seeded = _mapping(calibration.get("seeded_replay"), "calibration.seeded_replay") + achieved = _number( + seeded.get("aggregate"), + "calibration.seeded_replay.aggregate", + minimum=0.0, + ) + relative_error = _number( + seeded.get("relative_error"), + "calibration.seeded_replay.relative_error", + minimum=0.0, + ) + if seeded.get("seed") != _DEFAULT_ROOT_SEED: + raise ValueError("Passive replay must use the committed default seed.") + if not math.isclose(relative_error, abs(achieved / amount - 1.0), abs_tol=1e-12): + raise ValueError("Passive seeded replay relative error is inconsistent.") + if relative_error > tolerance: + raise ValueError("Passive seeded replay exceeds its committed tolerance.") + replay = _mapping(calibration.get("replay_artifact"), "replay_artifact") + _text(replay.get("filename"), "replay_artifact.filename") + _digest(replay.get("sha256"), "replay_artifact.sha256") + _integer(replay.get("bytes"), "replay_artifact.bytes", minimum=1) + _integer(replay.get("tax_unit_rows"), "replay_artifact.tax_unit_rows", minimum=1) + _integer(replay.get("person_rows"), "replay_artifact.person_rows", minimum=1) + _number( + replay.get("person_weight_total"), + "replay_artifact.person_weight_total", + minimum=0.0, + ) + _integer( + replay.get("positive_passthrough_rows"), + "replay_artifact.positive_passthrough_rows", + ) + _number( + replay.get("positive_passthrough_weighted_aggregate"), + "replay_artifact.positive_passthrough_weighted_aggregate", + minimum=0.0, + ) + solver = _mapping(calibration.get("solver"), "calibration.solver") + if solver.get("method") != "bisection_on_expected_weighted_aggregate": + raise ValueError("Unexpected passive calibration solver.") + if solver.get("iterations") != _SOLVER_ITERATIONS: + raise ValueError("Unexpected passive calibration iteration count.") + if solver.get("lower_bound") != _SOLVER_LOWER_BOUND: + raise ValueError("Unexpected passive calibration lower bound.") + if solver.get("upper_bound") != _SOLVER_UPPER_BOUND: + raise ValueError("Unexpected passive calibration upper bound.") + notes = payload["notes"] + if not isinstance(notes, list) or not all( + isinstance(note, str) and note.strip() for note in notes + ): + raise ValueError("Passive assumptions notes must be nonempty strings.") + + +def load_qbi_passive_passthrough_evidence() -> dict[str, Any]: + payload = _resource_payload(QBI_PASSIVE_EVIDENCE_RESOURCE) + validate_qbi_passive_passthrough_resource(payload) + return payload + + +def load_qbi_passive_passthrough_assumptions() -> dict[str, Any]: + payload = _resource_payload(QBI_PASSIVE_ASSUMPTIONS_RESOURCE) + validate_qbi_passive_passthrough_assumptions(payload) + expected_evidence_sha = payload["evidence"]["sha256"] + actual_evidence_sha = _resource_sha256(QBI_PASSIVE_EVIDENCE_RESOURCE) + if expected_evidence_sha != actual_evidence_sha: + raise ValueError( + "Passive assumptions evidence digest does not match the packaged " + "resource." + ) + return payload + + +def _assignment_inputs( + partnership_s_corp_income: object, + schedule_e_income: object, + *, + evidence: Mapping[str, Any], + log_odds_shift: float, +) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]: + arrays = _aligned_vectors( + partnership_s_corp_income=partnership_s_corp_income, + schedule_e_income=schedule_e_income, + ) + passthrough = np.maximum(arrays["partnership_s_corp_income"], 0.0) + band_index = _income_band_index(arrays["schedule_e_income"]) + prevalence, probabilities, quantiles = _evidence_model(evidence) + shifted = _logistic(_logit(prevalence) + float(log_odds_shift)) + return passthrough, band_index, shifted, probabilities, quantiles + + +def assign_passive_partnership_s_corp_income( + partnership_s_corp_income: object, + schedule_e_income: object, + *, + seed: int = _DEFAULT_ROOT_SEED, + latent_entity_form: object | None = None, + evidence: Mapping[str, Any] | None = None, + assumptions: Mapping[str, Any] | None = None, +) -> np.ndarray: + """Return one seeded passive amount per person. + + Presence and conditional-share generators draw over the complete input + length before eligibility masks are applied. Adding or removing support + rows therefore cannot advance another random family. + """ + + if isinstance(seed, bool) or not isinstance(seed, int) or seed < 0: + raise ValueError("Passive assignment seed must be a nonnegative integer.") + evidence_payload = ( + load_qbi_passive_passthrough_evidence() + if evidence is None + else dict(evidence) + ) + assumptions_payload = ( + load_qbi_passive_passthrough_assumptions() + if assumptions is None + else dict(assumptions) + ) + validate_qbi_passive_passthrough_assumptions(assumptions_payload) + shift = float(assumptions_payload["calibration"]["log_odds_shift"]) + passthrough, band_index, shifted, probabilities, quantiles = ( + _assignment_inputs( + partnership_s_corp_income, + schedule_e_income, + evidence=evidence_payload, + log_odds_shift=shift, + ) + ) + length = len(passthrough) + eligible = _latent_form_eligibility(latent_entity_form, length=length) + presence_rng = np.random.Generator( + np.random.PCG64( + np.random.SeedSequence([seed, _RNG_FAMILY_ENTROPY, _PRESENCE_FAMILY]) + ) + ) + share_rng = np.random.Generator( + np.random.PCG64( + np.random.SeedSequence([seed, _RNG_FAMILY_ENTROPY, _SHARE_FAMILY]) + ) + ) + presence_draw = presence_rng.random(length) + share_draw = share_rng.random(length) + sampled_share = np.zeros(length, dtype=np.float64) + for band in range(len(SCF_PASSIVE_INCOME_BANDS)): + mask = band_index == band + sampled_share[mask] = np.interp( + share_draw[mask], + probabilities, + quantiles[band], + ) + present = presence_draw < shifted[band_index] + return np.where(eligible & (passthrough > 0.0) & present, passthrough * sampled_share, 0.0) + + +def qbi_passive_expected_aggregate( + partnership_s_corp_income: object, + schedule_e_income: object, + person_weights: object, + *, + evidence: Mapping[str, Any], + log_odds_shift: float, + latent_entity_form: object | None = None, +) -> float: + arrays = _aligned_vectors( + partnership_s_corp_income=partnership_s_corp_income, + schedule_e_income=schedule_e_income, + person_weights=person_weights, + ) + if np.any(arrays["person_weights"] < 0.0): + raise ValueError("Passive replay person weights must be nonnegative.") + passthrough, band_index, shifted, probabilities, quantiles = ( + _assignment_inputs( + arrays["partnership_s_corp_income"], + arrays["schedule_e_income"], + evidence=evidence, + log_odds_shift=log_odds_shift, + ) + ) + eligible = _latent_form_eligibility( + latent_entity_form, + length=len(passthrough), + ) + expected_share = _inverse_cdf_means(probabilities, quantiles) + values = ( + passthrough + * shifted[band_index] + * expected_share[band_index] + * eligible.astype(np.float64) + ) + return float(np.dot(arrays["person_weights"], values)) + + +def calibrate_qbi_passive_log_odds_shift( + partnership_s_corp_income: object, + schedule_e_income: object, + person_weights: object, + *, + evidence: Mapping[str, Any], + target: float, + latent_entity_form: object | None = None, +) -> tuple[float, float]: + target_value = _number(target, "target", minimum=0.0) + + def aggregate(shift: float) -> float: + return qbi_passive_expected_aggregate( + partnership_s_corp_income, + schedule_e_income, + person_weights, + evidence=evidence, + log_odds_shift=shift, + latent_entity_form=latent_entity_form, + ) + + lower = _SOLVER_LOWER_BOUND + upper = _SOLVER_UPPER_BOUND + lower_value = aggregate(lower) + upper_value = aggregate(upper) + if target_value < lower_value or target_value > upper_value: + raise ValueError( + "Passive aggregate target is unattainable inside the solver bounds: " + f"target={target_value}, range=[{lower_value}, {upper_value}]." + ) + for _ in range(_SOLVER_ITERATIONS): + midpoint = (lower + upper) / 2.0 + if aggregate(midpoint) < target_value: + lower = midpoint + else: + upper = midpoint + shift = (lower + upper) / 2.0 + return shift, aggregate(shift) + + +def build_qbi_passive_passthrough_assumptions_payload( + *, + evidence: Mapping[str, Any], + evidence_sha256: str, + partnership_s_corp_income: object, + schedule_e_income: object, + person_weights: object, + replay_artifact: Mapping[str, Any], +) -> dict[str, Any]: + """Solve and persist the one-parameter provisional replay calibration.""" + + validate_qbi_passive_passthrough_resource(evidence) + evidence_digest = _digest(evidence_sha256, "evidence_sha256") + external = _mapping(evidence["external_anchor"], "external_anchor") + bounds = _mapping( + external["passive_passthrough_bounds"], + "external_anchor.passive_passthrough_bounds", + ) + lower = _number( + _mapping(bounds["lower"], "bounds.lower")["amount"], + "bounds.lower.amount", + minimum=0.0, + ) + upper = _number( + _mapping(bounds["upper"], "bounds.upper")["amount"], + "bounds.upper.amount", + minimum=0.0, + ) + target = (lower + upper) / 2.0 + shift, expected = calibrate_qbi_passive_log_odds_shift( + partnership_s_corp_income, + schedule_e_income, + person_weights, + evidence=evidence, + target=target, + ) + arrays = _aligned_vectors( + partnership_s_corp_income=partnership_s_corp_income, + schedule_e_income=schedule_e_income, + person_weights=person_weights, + ) + + provisional_payload: dict[str, Any] = { + "schema_version": _ASSUMPTIONS_SCHEMA_VERSION, + "resource": "qbi_passive_passthrough_assumptions", + "provisional": True, + "assignment_stage": { + "version": _ASSIGNMENT_STAGE_VERSION, + "architecture": "sibling_before_qbi_reconciliation", + "versioning_decision": ( + "Use a version-1 sibling rather than QBI simulation version 4: " + "the current renamed tree consumes 15 archived QBI leaves and " + "does not carry the old opt-in simulation stack." + ), + "output_column": US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + "person_input_columns": list( + US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS + ), + "schedule_e_proxy": ( + "partnership_income + s_corp_income + rental_income + estate_income" + ), + "latent_form_treatment": ( + "When a v3 latent entity form is available it routes only " + "partnership and S-corporation records into eligibility; the " + "SCF probability and share remain band-only because active and " + "non-active SCF businesses are not entity-linked." + ), + }, + "evidence": { + "resource": QBI_PASSIVE_EVIDENCE_RESOURCE, + "schema_version": 1, + "sha256": evidence_digest, + }, + "random_streams": { + "bit_generator": "PCG64", + "root_seed_default": _DEFAULT_ROOT_SEED, + "family_entropy": _RNG_FAMILY_ENTROPY, + "presence_family": _PRESENCE_FAMILY, + "share_family": _SHARE_FAMILY, + "draw_policy": "full_length_before_support_masks", + }, + "calibration": { + "bounds": {"lower": lower, "upper": upper}, + "provisional_target": { + "amount": target, + "choice": "midpoint_of_unresolved_bounds", + }, + "log_odds_shift": shift, + "expected_aggregate": expected, + "replay_relative_tolerance": 0.05, + # A valid placeholder permits the pure seeded assignment to consume + # the otherwise complete assumptions object. It is replaced below + # by the realized full-artifact diagnostic before validation/return. + "seeded_replay": { + "seed": _DEFAULT_ROOT_SEED, + "aggregate": target, + "relative_error": 0.0, + "positive_assigned_rows": 0, + }, + "replay_artifact": { + **dict(replay_artifact), + "person_rows": len(arrays["partnership_s_corp_income"]), + "person_weight_total": float(arrays["person_weights"].sum()), + "positive_passthrough_rows": int( + np.count_nonzero(arrays["partnership_s_corp_income"] > 0.0) + ), + "positive_passthrough_weighted_aggregate": float( + np.dot( + arrays["person_weights"], + np.maximum(arrays["partnership_s_corp_income"], 0.0), + ) + ), + }, + "solver": { + "method": "bisection_on_expected_weighted_aggregate", + "iterations": _SOLVER_ITERATIONS, + "lower_bound": _SOLVER_LOWER_BOUND, + "upper_bound": _SOLVER_UPPER_BOUND, + }, + }, + "notes": [ + "The target is provisional because Form 8960 line 4c does not " + "decompose passive pass-through income from rental and royalty income.", + "Rental income remains unchanged: the current engine includes it " + "fully in NIIT, and this stage assigns only the pass-through leaf.", + "The runtime does not read the restricted replay artifact or solve " + "the calibration shift.", + "The sibling stage neither invokes nor advances any archived QBI " + "random stream and preserves all 15 existing QBI leaves.", + ], + } + assigned = assign_passive_partnership_s_corp_income( + arrays["partnership_s_corp_income"], + arrays["schedule_e_income"], + seed=_DEFAULT_ROOT_SEED, + evidence=evidence, + assumptions=provisional_payload, + ) + achieved = float(np.dot(arrays["person_weights"], assigned)) + provisional_payload["calibration"]["seeded_replay"] = { + "seed": _DEFAULT_ROOT_SEED, + "aggregate": achieved, + "relative_error": abs(achieved / target - 1.0), + "positive_assigned_rows": int(np.count_nonzero(assigned > 0.0)), + } + validate_qbi_passive_passthrough_assumptions(provisional_payload) + return provisional_payload + + +def us_qbi_passive_passthrough_contract_identity() -> dict[str, Any]: + """Return the content-addressed assignment identity for checkpoint pins.""" + + assumptions = load_qbi_passive_passthrough_assumptions() + identity: dict[str, Any] = { + "version": 1, + "assignment_stage_version": _ASSIGNMENT_STAGE_VERSION, + "output_column": US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + "person_input_columns": list(US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS), + "evidence_resource": QBI_PASSIVE_EVIDENCE_RESOURCE, + "evidence_sha256": _resource_sha256(QBI_PASSIVE_EVIDENCE_RESOURCE), + "assumptions_resource": QBI_PASSIVE_ASSUMPTIONS_RESOURCE, + "assumptions_sha256": _resource_sha256(QBI_PASSIVE_ASSUMPTIONS_RESOURCE), + "log_odds_shift": assumptions["calibration"]["log_odds_shift"], + "random_streams": dict(assumptions["random_streams"]), + } + encoded = json.dumps( + identity, + sort_keys=True, + separators=(",", ":"), + allow_nan=False, + ).encode() + identity["sha256"] = hashlib.sha256(encoded).hexdigest() + return identity + + +def with_us_qbi_passive_passthrough_assignment( + frame: Frame, + *, + seed: int = _DEFAULT_ROOT_SEED, +) -> Frame: + """Add the passive pass-through person input without touching QBI leaves.""" + + person = frame.table("person") + missing = sorted( + column + for column in US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS + if column not in person + ) + if missing: + raise ValueError( + "Passive pass-through assignment requires person input(s): " + f"{missing}." + ) + if US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in person: + raise ValueError( + "Passive pass-through assignment refuses to overwrite its owned " + "output column." + ) + numeric = person.loc[ + :, list(US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS) + ].apply(pd.to_numeric, errors="coerce") + if not np.isfinite(numeric.to_numpy(dtype=np.float64)).all(): + raise ValueError("Passive pass-through assignment inputs must be finite.") + passthrough = ( + numeric["partnership_income"].to_numpy(dtype=np.float64) + + numeric["s_corp_income"].to_numpy(dtype=np.float64) + ) + schedule_e = ( + passthrough + + numeric["rental_income"].to_numpy(dtype=np.float64) + + numeric["estate_income"].to_numpy(dtype=np.float64) + ) + assigned = assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + seed=seed, + ) + result = person.copy() + result[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN] = assigned + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + tables.update({link: frame.link(link).copy() for link in frame.links}) + tables["person"] = result + return Frame( + tables, + frame.schema, + {entity: frame.weights_for(entity) for entity in frame.weighted_entities}, + frame.strata, + mass_log=frame.mass_log, + metadata=frame.metadata, + ) diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py new file mode 100644 index 000000000..c2e0368d7 --- /dev/null +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py @@ -0,0 +1,466 @@ +"""Assignment and replay contracts for passive partnership/S-corp income.""" + +from __future__ import annotations + +import hashlib +import importlib.util +import json +import os +from copy import deepcopy +from importlib.resources import files +from pathlib import Path + +import numpy as np +import pandas as pd +import pytest + +from microcosm.build.us_runtime import qbi_passive_passthrough as passive_module +from microcosm.build.us_runtime.qbi_inputs import ( + US_QBI_BOOLEAN_OUTPUT_COLUMNS, + US_QBI_OUTPUT_COLUMNS, +) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + QBI_PASSIVE_EVIDENCE_RESOURCE, + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + assign_passive_partnership_s_corp_income, + calibrate_qbi_passive_log_odds_shift, + load_qbi_passive_passthrough_assumptions, + load_qbi_passive_passthrough_evidence, + validate_qbi_passive_passthrough_assumptions, + with_us_qbi_passive_passthrough_assignment, +) +from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights + +ROOT = Path(__file__).resolve().parents[3] +ASSUMPTIONS_BUILDER_PATH = ( + ROOT / "tools/build_us_qbi_passive_passthrough_assumptions.py" +) +PUF_REPLAY_ENVIRONMENT = "POPU" + "LACE_PUF_2024_H5" +EXPECTED_REPLAY_SHA256 = ( + "8182579ddfecaf5e5b872e2307b88f03e8e8def993171b648f701a19a847f37b" +) +EXPECTED_REPLAY_BYTES = 241_045_964 +EXPECTED_REPLAY_TAX_UNIT_ROWS = 207_692 +EXPECTED_REPLAY_PERSON_ROWS = 484_015 +PROVISIONAL_TARGET = 54_628_492_000.0 + + +def _load_assumptions_builder(): + spec = importlib.util.spec_from_file_location( + "qbi_passive_passthrough_assumptions_builder", + ASSUMPTIONS_BUILDER_PATH, + ) + assert spec is not None and spec.loader is not None + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + return builder + + +def _constant_evidence( + *, + prevalence: float, + shares: list[float] | None = None, + quantiles: tuple[float, float, float, float, float] | None = None, +) -> dict[str, object]: + evidence = deepcopy(load_qbi_passive_passthrough_evidence()) + if shares is None: + shares = [0.5] * len(evidence["cells"]) + if len(shares) != len(evidence["cells"]): + raise AssertionError("The fixture requires one share per income band.") + names = ("q05", "q25", "q50", "q75", "q95") + for cell, share in zip(evidence["cells"], shares, strict=True): + cell["holding_prevalence"]["estimate"] = prevalence + values = quantiles or (share,) * len(names) + cell["conditional_share"]["selected_mean"] = float(np.mean(values)) + cell["conditional_share"]["selected_quantiles"] = dict( + zip(names, values, strict=True) + ) + return evidence + + +def _assumptions_with_shift(shift: float) -> dict[str, object]: + assumptions = deepcopy(load_qbi_passive_passthrough_assumptions()) + assumptions["calibration"]["log_odds_shift"] = shift + validate_qbi_passive_passthrough_assumptions(assumptions) + return assumptions + + +def _frame(person: pd.DataFrame) -> Frame: + person = person.copy(deep=True).reset_index(drop=True) + count = len(person) + ids = np.arange(1, count + 1, dtype=np.int64) + person.insert(0, "person_id", ids) + for entity in ("household", "tax_unit", "spm_unit", "family", "marital_unit"): + person[f"person_{entity}_id"] = ids + tables = { + "person": person, + "household": pd.DataFrame({"household_id": ids}), + "tax_unit": pd.DataFrame({"tax_unit_id": ids}), + "spm_unit": pd.DataFrame({"spm_unit_id": ids}), + "family": pd.DataFrame({"family_id": ids}), + "marital_unit": pd.DataFrame({"marital_unit_id": ids}), + } + return Frame( + tables, + US_SCHEMA, + {"household": Weights(np.ones(count), WeightKind.DESIGN)}, + ) + + +def _qbi_frame() -> Frame: + count = 64 + positions = np.arange(count) + columns: dict[str, np.ndarray] = {} + for offset, name in enumerate(US_QBI_OUTPUT_COLUMNS): + if name in US_QBI_BOOLEAN_OUTPUT_COLUMNS: + columns[name] = (positions + offset) % 3 == 0 + else: + columns[name] = positions.astype(np.float64) + offset + 0.125 + columns.update( + { + "partnership_income": np.where(positions % 3 == 0, 10_000.0, 0.0), + "s_corp_income": np.where(positions % 5 == 0, 20_000.0, 0.0), + "rental_income": positions.astype(np.float64) * 100.0, + "estate_income": positions.astype(np.float64) * 10.0, + } + ) + return _frame(pd.DataFrame(columns)) + + +def test_packaged_assumptions_are_strict_and_pin_evidence_digest( + monkeypatch: pytest.MonkeyPatch, +) -> None: + assumptions = load_qbi_passive_passthrough_assumptions() + evidence_bytes = ( + files("microcosm.build.us").joinpath(QBI_PASSIVE_EVIDENCE_RESOURCE).read_bytes() + ) + + assert assumptions["evidence"]["sha256"] == hashlib.sha256( + evidence_bytes + ).hexdigest() + assert assumptions["calibration"]["provisional_target"]["amount"] == ( + PROVISIONAL_TARGET + ) + assert assumptions["random_streams"] == { + "bit_generator": "PCG64", + "root_seed_default": 0, + "family_entropy": 4722, + "presence_family": 0, + "share_family": 1, + "draw_policy": "full_length_before_support_masks", + } + + extra_key = deepcopy(assumptions) + extra_key["unreviewed"] = True + with pytest.raises(ValueError, match="keys must be exactly"): + validate_qbi_passive_passthrough_assumptions(extra_key) + + drifted_stream = deepcopy(assumptions) + drifted_stream["random_streams"]["family_entropy"] += 1 + with pytest.raises(ValueError, match="random-stream contract drifted"): + validate_qbi_passive_passthrough_assumptions(drifted_stream) + + monkeypatch.setattr(passive_module, "_resource_sha256", lambda _name: "0" * 64) + with pytest.raises(ValueError, match="evidence digest does not match"): + load_qbi_passive_passthrough_assumptions() + + +def test_synthetic_income_bands_select_the_reviewed_share_cells() -> None: + evidence = _constant_evidence( + prevalence=1.0, + shares=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0], + ) + assumptions = _assumptions_with_shift(30.0) + passthrough = np.full(11, 100.0) + schedule_e = np.array( + [ + -1.0, + 0.0, + 1.0, + 25_000.0, + 25_000.01, + 100_000.0, + 100_000.01, + 250_000.0, + 250_000.01, + 1_000_000.0, + 1_000_000.01, + ] + ) + + assigned = assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + evidence=evidence, + assumptions=assumptions, + ) + + np.testing.assert_allclose( + assigned, + [0.0, 0.0, 20.0, 20.0, 40.0, 40.0, 60.0, 60.0, 80.0, 80.0, 100.0], + ) + assert np.all(assigned >= 0.0) + assert np.all(assigned <= passthrough) + + +@pytest.mark.parametrize( + ("forms", "eligible"), + [ + ( + [ + "partnership", + "partnership_or_llc", + "s_corporation", + "sole_proprietorship", + "", + ], + [True, True, True, False, False], + ), + ([1, 2, 3, 0, -1], [True, True, False, False, False]), + ], +) +def test_latent_entity_form_only_routes_eligible_records( + forms: list[object], eligible: list[bool] +) -> None: + assigned = assign_passive_partnership_s_corp_income( + np.full(5, 100.0), + np.full(5, 50_000.0), + latent_entity_form=forms, + evidence=_constant_evidence(prevalence=1.0, shares=[1.0] * 6), + assumptions=_assumptions_with_shift(30.0), + ) + + np.testing.assert_array_equal(assigned, np.asarray(eligible) * 100.0) + + +@pytest.mark.parametrize( + ("passthrough", "schedule_e", "forms", "message"), + [ + ([1.0, np.nan], [1.0, 1.0], None, "must be finite"), + ([1.0, 1.0], [1.0, np.inf], None, "must be finite"), + ([1.0, 1.0], [1.0, 1.0], [1.0, np.nan], "codes must be finite"), + ], +) +def test_assignment_rejects_nonfinite_inputs( + passthrough: list[float], + schedule_e: list[float], + forms: list[float] | None, + message: str, +) -> None: + with pytest.raises(ValueError, match=message): + assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + latent_entity_form=forms, + ) + + +def test_assignment_uses_independent_full_length_rng_families() -> None: + count = 2_048 + seed = 19 + evidence = _constant_evidence( + prevalence=0.5, + quantiles=(0.0, 0.25, 0.5, 0.75, 1.0), + ) + assumptions = _assumptions_with_shift(0.0) + passthrough = np.ones(count) + schedule_e = np.full(count, 50_000.0) + assigned = assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + seed=seed, + evidence=evidence, + assumptions=assumptions, + ) + + streams = assumptions["random_streams"] + presence = np.random.Generator( + np.random.PCG64( + np.random.SeedSequence( + [seed, streams["family_entropy"], streams["presence_family"]] + ) + ) + ).random(count) + share = np.random.Generator( + np.random.PCG64( + np.random.SeedSequence( + [seed, streams["family_entropy"], streams["share_family"]] + ) + ) + ).random(count) + expected = np.where( + presence < 0.5, + np.interp(share, (0.05, 0.25, 0.5, 0.75, 0.95), (0, 0.25, 0.5, 0.75, 1)), + 0.0, + ) + np.testing.assert_array_equal(assigned, expected) + np.testing.assert_array_equal( + assigned, + assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + seed=seed, + evidence=evidence, + assumptions=assumptions, + ), + ) + assert not np.array_equal( + assigned, + assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + seed=seed + 1, + evidence=evidence, + assumptions=assumptions, + ), + ) + + support = np.ones(count, dtype=bool) + support[::4] = False + masked_income = passthrough.copy() + masked_income[~support] = 0.0 + support_masked = assign_passive_partnership_s_corp_income( + masked_income, + schedule_e, + seed=seed, + evidence=evidence, + assumptions=assumptions, + ) + form_masked = assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + seed=seed, + latent_entity_form=np.where(support, "partnership", "ineligible"), + evidence=evidence, + assumptions=assumptions, + ) + np.testing.assert_array_equal(support_masked[support], assigned[support]) + np.testing.assert_array_equal(form_masked[support], assigned[support]) + assert np.count_nonzero(support_masked[~support]) == 0 + assert np.count_nonzero(form_masked[~support]) == 0 + + +def test_frame_wrapper_preserves_all_existing_qbi_columns_byte_for_byte() -> None: + frame = _qbi_frame() + before = frame.table("person") + qbi_bytes = { + name: (before[name].dtype.str, before[name].to_numpy(copy=True).tobytes()) + for name in US_QBI_OUTPUT_COLUMNS + } + + result = with_us_qbi_passive_passthrough_assignment(frame, seed=31) + after = result.table("person") + + assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN not in before + assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in after + for name, (dtype, raw) in qbi_bytes.items(): + assert after[name].dtype.str == dtype + assert after[name].to_numpy(copy=False).tobytes() == raw + passthrough = after["partnership_income"] + after["s_corp_income"] + passive = after[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN] + assert passive.between(0.0, passthrough.clip(lower=0.0)).all() + + +def test_calibration_solver_hits_a_synthetic_target_and_rejects_impossible_one() -> None: + evidence = _constant_evidence(prevalence=0.5, shares=[0.5] * 6) + passthrough = np.array([100.0, 200.0]) + schedule_e = np.array([1.0, 1.0]) + weights = np.array([1.0, 2.0]) + + shift, achieved = calibrate_qbi_passive_log_odds_shift( + passthrough, + schedule_e, + weights, + evidence=evidence, + target=125.0, + ) + + assert shift == pytest.approx(0.0, abs=1e-12) + assert achieved == pytest.approx(125.0, abs=1e-10) + with pytest.raises(ValueError, match="target is unattainable"): + calibrate_qbi_passive_log_odds_shift( + passthrough, + schedule_e, + weights, + evidence=evidence, + target=300.0, + ) + + +def test_assumptions_builder_is_deterministic_on_a_synthetic_replay( + tmp_path: Path, +) -> None: + h5py = pytest.importorskip("h5py") + builder = _load_assumptions_builder() + evidence = _constant_evidence(prevalence=0.5, shares=[0.5] * 6) + evidence_path = tmp_path / QBI_PASSIVE_EVIDENCE_RESOURCE + evidence_path.write_text( + json.dumps(evidence, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + count = 5_000 + passthrough_value = PROVISIONAL_TARGET / (count * 0.25) + replay_path = tmp_path / "synthetic_replay.h5" + ids = np.arange(1, count + 1, dtype=np.int64) + with h5py.File(replay_path, mode="w") as replay: + replay["tax_unit_id"] = ids + replay["household_weight"] = np.ones(count) + replay["person_tax_unit_id"] = ids + replay["partnership_s_corp_income"] = np.full(count, passthrough_value) + replay["rental_income"] = np.zeros(count) + replay["estate_income"] = np.zeros(count) + + first_output = tmp_path / "first.json" + second_output = tmp_path / "second.json" + common = ["--puf-h5", str(replay_path), "--evidence", str(evidence_path)] + assert builder.main([*common, "--output", str(first_output)]) == 0 + assert builder.main([*common, "--output", str(second_output)]) == 0 + + assert first_output.read_bytes() == second_output.read_bytes() + payload = json.loads(first_output.read_text(encoding="utf-8")) + validate_qbi_passive_passthrough_assumptions(payload) + assert payload["calibration"]["log_odds_shift"] == pytest.approx(0.0, abs=1e-12) + assert payload["calibration"]["expected_aggregate"] == pytest.approx( + PROVISIONAL_TARGET, abs=1.0 + ) + assert payload["calibration"]["seeded_replay"]["relative_error"] <= 0.05 + + +@pytest.mark.skipif( + not os.environ.get(PUF_REPLAY_ENVIRONMENT), + reason=f"set {PUF_REPLAY_ENVIRONMENT} to run the restricted replay", +) +def test_restricted_replay_hits_provisional_target_and_pins_artifact() -> None: + builder = _load_assumptions_builder() + replay_path = Path(os.environ[PUF_REPLAY_ENVIRONMENT]).expanduser() + passthrough, schedule_e, weights, artifact = builder.read_replay_artifact( + replay_path + ) + assumptions = load_qbi_passive_passthrough_assumptions() + committed_artifact = assumptions["calibration"]["replay_artifact"] + + assert artifact == { + "filename": "puf_2024.h5", + "sha256": EXPECTED_REPLAY_SHA256, + "bytes": EXPECTED_REPLAY_BYTES, + "tax_unit_rows": EXPECTED_REPLAY_TAX_UNIT_ROWS, + } + assert committed_artifact["sha256"] == EXPECTED_REPLAY_SHA256 + assert committed_artifact["bytes"] == EXPECTED_REPLAY_BYTES + assert committed_artifact["tax_unit_rows"] == EXPECTED_REPLAY_TAX_UNIT_ROWS + assert committed_artifact["person_rows"] == EXPECTED_REPLAY_PERSON_ROWS + + assigned = assign_passive_partnership_s_corp_income( + passthrough, + schedule_e, + seed=assumptions["calibration"]["seeded_replay"]["seed"], + ) + achieved = float(np.dot(weights, assigned)) + target = assumptions["calibration"]["provisional_target"]["amount"] + + assert achieved == pytest.approx( + assumptions["calibration"]["seeded_replay"]["aggregate"], + rel=0.0, + abs=1e-3, + ) + assert abs(achieved / target - 1.0) <= 0.05 diff --git a/tools/build_us_qbi_passive_passthrough_assumptions.py b/tools/build_us_qbi_passive_passthrough_assumptions.py new file mode 100644 index 000000000..ed91271fa --- /dev/null +++ b/tools/build_us_qbi_passive_passthrough_assumptions.py @@ -0,0 +1,182 @@ +#!/usr/bin/env python3 +"""Build replay-calibrated passive pass-through assignment assumptions. + +The restricted PUF is a build-time input only. This tool persists the +artifact identity, provisional bounds and midpoint, solved log-odds shift, +and seeded replay diagnostic. The assignment runtime performs no solve and +does not open the replay artifact. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import os +from pathlib import Path +from typing import Any + +import numpy as np + +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + build_qbi_passive_passthrough_assumptions_payload, +) +from microcosm.build.us_runtime.qbi_passive_passthrough_evidence import ( + load_qbi_passive_passthrough_resource, +) + +REPO_ROOT = Path(__file__).resolve().parents[1] +RESOURCE_DIR = REPO_ROOT / "packages/microcosm-build/src/microcosm/build/us" +DEFAULT_EVIDENCE = RESOURCE_DIR / "qbi_passive_passthrough_v1.json" +DEFAULT_OUTPUT = RESOURCE_DIR / "qbi_passive_passthrough_assumptions_v1.json" +PUF_REPLAY_ENVIRONMENT = "POPU" + "LACE_PUF_2024_H5" + +_PERSON_KEYS = ( + "partnership_s_corp_income", + "rental_income", + "estate_income", +) +_MEMBERSHIP_KEYS = ( + "tax_unit_id", + "household_weight", + "person_tax_unit_id", +) + + +def _parse_args(argv: list[str] | None = None) -> argparse.Namespace: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--puf-h5", + type=Path, + default=os.environ.get(PUF_REPLAY_ENVIRONMENT), + help=( + "Restricted full PUF H5 replay artifact. Defaults to the " + f"{PUF_REPLAY_ENVIRONMENT} environment variable." + ), + ) + parser.add_argument("--evidence", type=Path, default=DEFAULT_EVIDENCE) + parser.add_argument("--output", type=Path, default=DEFAULT_OUTPUT) + arguments = parser.parse_args(argv) + if arguments.puf_h5 is None: + parser.error(f"--puf-h5 or {PUF_REPLAY_ENVIRONMENT} is required") + return arguments + + +def _sha256(path: Path) -> str: + digest = hashlib.sha256() + with path.open("rb") as stream: + for chunk in iter(lambda: stream.read(1024 * 1024), b""): + digest.update(chunk) + return digest.hexdigest() + + +def read_replay_artifact( + path: Path | str, +) -> tuple[np.ndarray, np.ndarray, np.ndarray, dict[str, Any]]: + """Read the exact person inputs and map tax-unit weights to people.""" + + try: + import h5py + except ImportError as error: # pragma: no cover - the US extra supplies it. + raise RuntimeError( + "Building passive pass-through assumptions requires h5py; install " + "the US extra." + ) from error + + artifact_path = Path(path) + if not artifact_path.is_file(): + raise FileNotFoundError( + f"Restricted PUF replay artifact does not exist: {artifact_path}" + ) + required = (*_MEMBERSHIP_KEYS, *_PERSON_KEYS) + with h5py.File(artifact_path, mode="r") as artifact: + missing = [key for key in required if key not in artifact] + if missing: + raise ValueError( + f"Restricted PUF replay artifact is missing arrays {missing}." + ) + values = {key: np.asarray(artifact[key][:]) for key in required} + + tax_unit_ids = np.asarray(values["tax_unit_id"]) + tax_unit_weights = np.asarray(values["household_weight"], dtype=np.float64) + person_tax_unit_ids = np.asarray(values["person_tax_unit_id"]) + if any( + array.ndim != 1 + for array in (tax_unit_ids, tax_unit_weights, person_tax_unit_ids) + ): + raise ValueError("Restricted replay membership arrays must be 1-D.") + if len(tax_unit_ids) != len(tax_unit_weights) or len(tax_unit_ids) == 0: + raise ValueError("Restricted replay tax-unit IDs and weights must align.") + if len(person_tax_unit_ids) == 0: + raise ValueError("Restricted replay person membership must be nonempty.") + if np.any(tax_unit_ids[1:] <= tax_unit_ids[:-1]): + raise ValueError("Restricted replay tax-unit IDs must strictly increase.") + if not np.isfinite(tax_unit_weights).all() or np.any(tax_unit_weights < 0.0): + raise ValueError("Restricted replay weights must be finite and nonnegative.") + positions = np.searchsorted(tax_unit_ids, person_tax_unit_ids) + if np.any(positions >= len(tax_unit_ids)) or not np.array_equal( + tax_unit_ids[positions], person_tax_unit_ids + ): + raise ValueError("Restricted replay contains an unknown tax-unit ID.") + person_weights = tax_unit_weights[positions] + + person_count = len(person_tax_unit_ids) + person_values: dict[str, np.ndarray] = {} + for key in _PERSON_KEYS: + array = np.asarray(values[key], dtype=np.float64) + if array.ndim != 1 or len(array) != person_count: + raise ValueError( + f"Restricted replay array {key!r} must have length {person_count}." + ) + if not np.isfinite(array).all(): + raise ValueError(f"Restricted replay array {key!r} must be finite.") + person_values[key] = array + + passthrough = person_values["partnership_s_corp_income"] + schedule_e = ( + passthrough + + person_values["rental_income"] + + person_values["estate_income"] + ) + metadata = { + "filename": artifact_path.name, + "sha256": _sha256(artifact_path), + "bytes": artifact_path.stat().st_size, + "tax_unit_rows": len(tax_unit_ids), + } + return passthrough, schedule_e, person_weights, metadata + + +def build_assumptions(arguments: argparse.Namespace) -> dict[str, Any]: + evidence_path = Path(arguments.evidence) + evidence = load_qbi_passive_passthrough_resource(evidence_path) + passthrough, schedule_e, weights, artifact = read_replay_artifact( + arguments.puf_h5 + ) + return build_qbi_passive_passthrough_assumptions_payload( + evidence=evidence, + evidence_sha256=_sha256(evidence_path), + partnership_s_corp_income=passthrough, + schedule_e_income=schedule_e, + person_weights=weights, + replay_artifact=artifact, + ) + + +def _write_json(payload: dict[str, Any], path: Path) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + rendered = json.dumps(payload, indent=2, sort_keys=True, allow_nan=False) + path.write_text(rendered + "\n", encoding="utf-8") + + +def main(argv: list[str] | None = None) -> int: + arguments = _parse_args(argv) + payload = build_assumptions(arguments) + output = Path(arguments.output) + _write_json(payload, output) + print(output) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) From 365c7428a6d96533086848278e6db4dcb0f43beb Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 10:59:02 -0400 Subject: [PATCH 05/23] docs: record passive calibration progress --- PROGRESS.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 4aeea35d7..62807067e 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -30,13 +30,22 @@ ported into the current `microcosm.*` tree. - Confirmed the restricted PUF replay artifact is present and pinned its size, digest, row counts, weighted positive pass-through aggregate, and provisional Form 8960 midpoint calibration target. +- Added the reproducible provisional SCF evidence resource. Holding + prevalence rises from 3.35% in the nonpositive Schedule-E band to 38.98% + above $1 million; conditional-share cells in the three thin middle bands + use the documented all-holder fallback. +- Added the version-1 sibling assignment and assumptions build. The persisted + log-odds shift is `-1.157105426398319`; its expected aggregate is the + $54.628492 billion midpoint and the seed-0 replay produces $55.021132 + billion (0.72% high, inside the 5% diagnostic tolerance). +- Verified the restricted replay (12 focused tests), deterministic assumptions + regeneration, strict resource hashes, isolated PCG64 families, latent-form + routing, and byte preservation of all 15 existing QBI leaves. ## Next -- Add the provisional SCF evidence resource and persisted calibration - assumptions. -- Implement and integrate the isolated passive assignment stage while proving - prior QBI outputs are byte-identical. -- Add the diagnostics-only Form 8960 validation rows and restricted replay. -- Run restricted replay if the declared PUF artifact is present, then run the - full workspace tests, lint, contract sweeps, and write the final report. +- Finish integration of the passive sibling into every base/pool path and its + checkpoint, ownership, and release-coverage contracts. +- Add and verify the diagnostics-only Form 8960 validation rows. +- Run the full workspace tests, lint, contract sweeps, and write the final + report. From 3eb1c2e6ed1b447fd9bdaafc86c31d66a47dec57 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 11:03:46 -0400 Subject: [PATCH 06/23] feat(us): add Form 8960 aggregate diagnostics --- .../microcosm/build/us/country_package.json | 1 + .../build/us/repeal_revenue_benchmarks.json | 42 +++ .../build/us_runtime/reform_validation.py | 284 +++++++++++++++++- .../tests/test_reform_validation.py | 180 +++++++++++ 4 files changed, 499 insertions(+), 8 deletions(-) create mode 100644 packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json diff --git a/packages/microcosm-build/src/microcosm/build/us/country_package.json b/packages/microcosm-build/src/microcosm/build/us/country_package.json index 8ffe36152..d22cd2581 100644 --- a/packages/microcosm-build/src/microcosm/build/us/country_package.json +++ b/packages/microcosm-build/src/microcosm/build/us/country_package.json @@ -12,6 +12,7 @@ "qbi_passive_passthrough_assumptions_v1.json", "qbi_passive_passthrough_v1.json", "release_input_coverage_manifest.json", + "repeal_revenue_benchmarks.json", "soca_capital_gain_distribution_shares.json", "soi_baseline_levels.json", "soi_table_2_1_interest_components_ty2015.json", diff --git a/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json b/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json new file mode 100644 index 000000000..ddea7107b --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json @@ -0,0 +1,42 @@ +{ + "_comment": "Standing diagnostics-only administrative aggregate surface. Despite the historical filename, these rows are baseline totals, not repeal simulations or neutralizations.", + "schema_version": 1, + "administrative_aggregate_diagnostics": [ + { + "id": "form_8960_net_investment_income", + "name": "Form 8960 net investment income", + "variable": "net_investment_income", + "period": 2023, + "benchmark": { + "value": 1197238417000, + "year": "TY2023", + "source": "IRS SOI Publication 4801, Form 8960 line 12", + "source_url": "" + }, + "comparison_role": "point_estimate", + "provisional": true, + "diagnostics_only": true, + "description": "Weighted baseline net investment income compared with the TY2023 Form 8960 line 12 administrative amount. Line 12 is net of Form 8960 deductions and modifications, while the modeled variable follows the engine's configured investment-income source list; any expense-coverage difference is part of the diagnostic interpretation. The administrative line covers Forms 8960 filed by individuals, estates, and trusts, while the household microdata do not separately represent every estate or trust return. This is therefore a provisional diagnostic rather than a release gate." + }, + { + "id": "form_8960_line_4c_passive_flowthrough_upper_bound", + "name": "Form 8960 line 4c passive flow-through upper bound", + "variable": "passive_partnership_s_corp_income", + "period": 2023, + "benchmark": { + "value": 109256984000, + "year": "TY2023", + "source": "IRS SOI Publication 4801, Form 8960 line 4c", + "source_url": "" + }, + "comparison_role": "upper_bound", + "bounds": { + "lower": 0, + "upper": 109256984000 + }, + "provisional": true, + "diagnostics_only": true, + "description": "Line 4c combines rental real estate, royalties, partnerships, S corporations, trusts, and other trade-or-business flow-through amounts after the non-section-1411 adjustment. It does not identify the passive partnership/S-corporation component. The lower bound assumes all line 4c income is rental or royalty income; the upper bound assumes all of it is passive pass-through income. Rental income already enters the engine NIIT base in full, so overlap remains an explicit open question and no rental treatment changes here." + } + ] +} diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/reform_validation.py b/packages/microcosm-build/src/microcosm/build/us_runtime/reform_validation.py index 0d7bb19ea..910982b0f 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/reform_validation.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/reform_validation.py @@ -4,9 +4,8 @@ Where ``calibration_diagnostics.json`` reports how well the calibrated weights reproduce their *calibration targets*, ``reform_validation.json`` reports a downstream property the calibration did not directly optimize: how closely the -dataset reproduces the *budget effects of scored policy reforms*. Two kinds of -reform are validated, and each row is labelled so a consumer can tell them -apart: +dataset reproduces the *budget effects of scored policy reforms*. Reform rows +and aggregate diagnostics are labelled so a consumer can tell them apart: * **in-sample** — the JCT tax-expenditure reforms that are themselves calibration targets (``US_JCT_TAX_EXPENDITURE_REFORMS``). The dataset was @@ -15,6 +14,9 @@ * **out-of-sample** — reforms the calibration never saw (e.g. provisions of the 2025 One Big Beautiful Bill Act), curated in ``obbba_reforms.json`` with their JCT scores. These are the genuine test of dataset fidelity. +* **administrative aggregate diagnostics** — plain baseline totals compared + with published amounts, kept in a separate non-gating table. These are not + reforms or calibration targets. The simulation is isolated behind an injected ``simulate`` callable so the payload assembly is unit-testable without policyengine-us; the default factory @@ -48,7 +50,9 @@ __all__ = [ "REFORM_VALIDATION_SCHEMA_VERSION", + "AdministrativeAggregateDiagnosticSpec", "BaselineLevelSpec", + "administrative_aggregate_diagnostic_specs", "state_spm_poverty_level_specs", "ReformValidationSpec", "in_sample_reform_specs", @@ -65,8 +69,9 @@ ] #: Schema version of reform_validation.json. The calibration-diagnostics -#: dashboard keys its reader on it; bump with any shape change. -REFORM_VALIDATION_SCHEMA_VERSION = 1 +#: dashboard keys its reader on it; v2 adds a standing, diagnostics-only +#: administrative aggregate table. +REFORM_VALIDATION_SCHEMA_VERSION = 2 #: The budget effect of a reform is the weighted-sum change of this variable #: between the reform and baseline simulations, unless a spec overrides it. For @@ -500,10 +505,196 @@ def __post_init__(self) -> None: raise ValueError(f"Rate level {self.id} cannot use cap_variable.") +@dataclass(frozen=True) +class AdministrativeAggregateDiagnosticSpec: + """One published aggregate compared with a plain baseline total. + + This is deliberately distinct from :class:`ReformValidationSpec`: an + administrative aggregate does not construct a reform, neutralize a + variable, or participate in any release gate. + """ + + id: str + name: str + variable: str + period: int + benchmark_value: float + benchmark_year: str + source: str + source_url: str + description: str + comparison_role: str + provisional: bool + diagnostics_only: bool + lower_bound: float | None = None + upper_bound: float | None = None + + def __post_init__(self) -> None: + if not self.id or not self.name or not self.variable: + raise ValueError( + "AdministrativeAggregateDiagnosticSpec requires id, name, and variable." + ) + if self.period <= 0: + raise ValueError(f"{self.id}: period must be a positive year.") + if not math.isfinite(self.benchmark_value) or self.benchmark_value <= 0: + raise ValueError(f"{self.id}: benchmark must be finite and positive.") + if self.comparison_role not in {"point_estimate", "upper_bound"}: + raise ValueError( + f"{self.id}: comparison_role must be 'point_estimate' or 'upper_bound'." + ) + if not self.diagnostics_only: + raise ValueError(f"{self.id}: diagnostics_only must be true.") + if self.lower_bound is not None and ( + not math.isfinite(self.lower_bound) or self.lower_bound < 0 + ): + raise ValueError(f"{self.id}: lower_bound must be finite and nonnegative.") + if self.upper_bound is not None and ( + not math.isfinite(self.upper_bound) or self.upper_bound <= 0 + ): + raise ValueError(f"{self.id}: upper_bound must be finite and positive.") + if ( + self.lower_bound is not None + and self.upper_bound is not None + and self.lower_bound > self.upper_bound + ): + raise ValueError(f"{self.id}: lower_bound cannot exceed upper_bound.") + if self.comparison_role == "upper_bound": + if self.lower_bound is None or self.upper_bound is None: + raise ValueError(f"{self.id}: upper-bound rows require both bounds.") + if self.benchmark_value != self.upper_bound: + raise ValueError( + f"{self.id}: benchmark must equal upper_bound for an " + "upper-bound comparison." + ) + + def _soi_baseline_levels_config_path() -> Path: return Path(str(files("microcosm.build.us").joinpath("soi_baseline_levels.json"))) +def _administrative_aggregate_diagnostics_config_path() -> Path: + return Path( + str(files("microcosm.build.us").joinpath("repeal_revenue_benchmarks.json")) + ) + + +def administrative_aggregate_diagnostic_specs( + path: Path | None = None, +) -> tuple[AdministrativeAggregateDiagnosticSpec, ...]: + """Load the standing, non-gating administrative aggregate diagnostics.""" + config_path = path or _administrative_aggregate_diagnostics_config_path() + if not config_path.exists(): + return () + payload = json.loads(config_path.read_text()) + if payload.get("schema_version") != 1: + raise ValueError( + f"{config_path}: aggregate diagnostic schema_version must be 1." + ) + rows = payload.get("administrative_aggregate_diagnostics") + if not isinstance(rows, list): + raise ValueError( + f"{config_path}: administrative_aggregate_diagnostics must be a JSON array." + ) + + specs: list[AdministrativeAggregateDiagnosticSpec] = [] + seen_ids: set[str] = set() + for index, raw in enumerate(rows): + context = f"{config_path}: administrative_aggregate_diagnostics[{index}]" + if not isinstance(raw, dict): + raise ValueError(f"{context} must be a JSON object.") + required = { + "id", + "name", + "variable", + "period", + "benchmark", + "comparison_role", + "provisional", + "diagnostics_only", + "description", + } + missing = sorted(required - raw.keys()) + if missing: + raise ValueError(f"{context} is missing required fields {missing}.") + diagnostic_id = raw["id"] + if not isinstance(diagnostic_id, str) or not diagnostic_id.strip(): + raise ValueError(f"{context}.id must be a non-empty string.") + if diagnostic_id in seen_ids: + raise ValueError(f"{context}.id duplicates {diagnostic_id!r}.") + seen_ids.add(diagnostic_id) + for field in ("name", "variable", "comparison_role", "description"): + value = raw[field] + if not isinstance(value, str) or not value.strip(): + raise ValueError(f"{context}.{field} must be a non-empty string.") + row_period = raw["period"] + if isinstance(row_period, bool) or not isinstance(row_period, int): + raise ValueError(f"{context}.period must be an integer year.") + for field in ("provisional", "diagnostics_only"): + if not isinstance(raw[field], bool): + raise ValueError(f"{context}.{field} must be a boolean.") + benchmark = raw["benchmark"] + if not isinstance(benchmark, dict): + raise ValueError(f"{context}.benchmark must be a JSON object.") + missing_benchmark_fields = sorted( + {"value", "year", "source", "source_url"} - benchmark.keys() + ) + if missing_benchmark_fields: + raise ValueError( + f"{context}.benchmark is missing required fields " + f"{missing_benchmark_fields}." + ) + if isinstance(benchmark["value"], bool): + raise ValueError(f"{context}.benchmark.value must be a number.") + try: + benchmark_value = float(benchmark["value"]) + except (KeyError, TypeError, ValueError) as error: + raise ValueError(f"{context}.benchmark.value must be a number.") from error + for field in ("year", "source", "source_url"): + value = benchmark.get(field, "") + if not isinstance(value, str): + raise ValueError(f"{context}.benchmark.{field} must be a string.") + if not benchmark["year"].strip() or not benchmark["source"].strip(): + raise ValueError( + f"{context}.benchmark.year and source must be non-empty strings." + ) + bounds = raw.get("bounds") + if bounds is not None and not isinstance(bounds, dict): + raise ValueError(f"{context}.bounds must be a JSON object.") + if bounds is not None: + for field in ("lower", "upper"): + value = bounds.get(field) + if isinstance(value, bool) or not isinstance(value, int | float): + raise ValueError(f"{context}.bounds.{field} must be a number.") + + specs.append( + AdministrativeAggregateDiagnosticSpec( + id=diagnostic_id, + name=raw["name"], + variable=raw["variable"], + period=row_period, + benchmark_value=benchmark_value, + benchmark_year=benchmark.get("year", ""), + source=benchmark.get("source", ""), + source_url=benchmark.get("source_url", ""), + description=raw["description"], + comparison_role=raw["comparison_role"], + provisional=raw["provisional"], + diagnostics_only=raw["diagnostics_only"], + lower_bound=( + None + if bounds is None or bounds.get("lower") is None + else float(bounds["lower"]) + ), + upper_bound=( + None + if bounds is None or bounds.get("upper") is None + else float(bounds["upper"]) + ), + ) + ) + return tuple(specs) + + def _baseline_level_specs_from_config( config_path: Path, *, default_category: str ) -> tuple[BaselineLevelSpec, ...]: @@ -697,6 +888,9 @@ def reform_validation_payload( in_sample_estimates: dict[str, float] | None = None, in_sample_targets: dict[str, float] | None = None, baseline_levels: Sequence[BaselineLevelSpec] = (), + administrative_aggregate_diagnostics: Sequence[ + AdministrativeAggregateDiagnosticSpec + ] = (), release_id: str | None = None, ) -> dict[str, Any]: """Score each reform on the dataset and render the JSON-stable payload. @@ -719,6 +913,11 @@ def reform_validation_payload( incremental effect given the lines above it — so the per-line effects sum to the bill total, matching JCT (see ``stacked_obbba_effects``). The shape matches the calibration-diagnostics dashboard's reform_validation reader. + + ``administrative_aggregate_diagnostics`` shares the same baseline object, + but remains outside ``reforms`` and ``out_of_sample_simulated``. Each row is + a plain weighted total with no counterfactual, threshold, or pass/fail + meaning; failures are contained on the affected row. """ estimates = in_sample_estimates or {} targets = in_sample_targets or {} @@ -991,8 +1190,71 @@ def _level_total(level: BaselineLevelSpec) -> float: } ) - # microcosm#456: the shared baseline simulation has served every reform row - # and baseline-level row by now; release it before assembling the payload. + aggregate_diagnostic_rows: list[dict[str, Any]] = [] + for diagnostic in administrative_aggregate_diagnostics: + error_message: str | None = None + try: + modeled_total = ( + None + if simulate is None + else baseline_total(diagnostic.variable, diagnostic.period) + ) + except Exception as error: + # Administrative aggregates are explicitly diagnostics-only. A + # missing engine variable or calculation failure is recorded on + # its row and must not block release payload construction. + modeled_total = None + error_message = f"{type(error).__name__}: {error}" + relative_gap = ( + None + if modeled_total is None + else modeled_total / diagnostic.benchmark_value - 1 + ) + within_bounds = ( + None + if modeled_total is None + or diagnostic.lower_bound is None + or diagnostic.upper_bound is None + else diagnostic.lower_bound <= modeled_total <= diagnostic.upper_bound + ) + aggregate_row: dict[str, Any] = { + "id": diagnostic.id, + "name": diagnostic.name, + "period": diagnostic.period, + "unit": "currency-USD", + "diagnostics_only": diagnostic.diagnostics_only, + "provisional": diagnostic.provisional, + "description": diagnostic.description, + "variable": diagnostic.variable, + "benchmark": _finite(diagnostic.benchmark_value), + "benchmark_year": diagnostic.benchmark_year or None, + "benchmark_source": diagnostic.source or None, + "benchmark_source_url": diagnostic.source_url or None, + "comparison_role": diagnostic.comparison_role, + "lower_bound": ( + None + if diagnostic.lower_bound is None + else _finite(diagnostic.lower_bound) + ), + "upper_bound": ( + None + if diagnostic.upper_bound is None + else _finite(diagnostic.upper_bound) + ), + "modeled_total": ( + None if modeled_total is None else _finite(modeled_total) + ), + "relative_gap": (None if relative_gap is None else _finite(relative_gap)), + "within_bounds": within_bounds, + } + if error_message is not None: + aggregate_row["status"] = "error" + aggregate_row["message"] = error_message + aggregate_diagnostic_rows.append(aggregate_row) + + # microcosm#456: the shared baseline simulation has served every reform, + # baseline-level, and administrative-aggregate row by now; release it + # before assembling the payload. if baseline is not None: release_engine_simulation(baseline) baseline = None @@ -1005,9 +1267,15 @@ def _level_total(level: BaselineLevelSpec) -> float: payload: dict[str, Any] = { "schema_version": REFORM_VALIDATION_SCHEMA_VERSION, "baseline_period": int(period), - "scoring_window": "see per-reform jct.window", + "scoring_window": "see per-row reform or benchmark window", "out_of_sample_simulated": out_of_sample_simulated, "reforms": rows, + "administrative_aggregate_diagnostics": { + "diagnostics_only": True, + "simulated": simulate is not None + or not administrative_aggregate_diagnostics, + "rows": aggregate_diagnostic_rows, + }, } if release_id is not None: payload["release_id"] = release_id diff --git a/packages/microcosm-build/tests/test_reform_validation.py b/packages/microcosm-build/tests/test_reform_validation.py index e547b9d18..de5445034 100644 --- a/packages/microcosm-build/tests/test_reform_validation.py +++ b/packages/microcosm-build/tests/test_reform_validation.py @@ -13,7 +13,9 @@ import microcosm.build.us_runtime.reform_validation as reform_validation_module from microcosm.build.us_runtime.reform_validation import ( REFORM_VALIDATION_SCHEMA_VERSION, + AdministrativeAggregateDiagnosticSpec, ReformValidationSpec, + administrative_aggregate_diagnostic_specs, in_sample_reform_specs, out_of_sample_reform_specs, reform_validation_payload, @@ -527,6 +529,184 @@ def test_write_round_trips(tmp_path): assert json.loads(path.read_text())["reforms"][0]["id"] == "obbba_salt" +def test_shipped_form_8960_aggregate_diagnostics_are_explicitly_non_gating(): + specs = administrative_aggregate_diagnostic_specs() + assert [spec.id for spec in specs] == [ + "form_8960_net_investment_income", + "form_8960_line_4c_passive_flowthrough_upper_bound", + ] + assert all(spec.period == 2023 for spec in specs) + assert all(spec.provisional for spec in specs) + assert all(spec.diagnostics_only for spec in specs) + + nii, passive = specs + assert nii.variable == "net_investment_income" + assert nii.benchmark_value == pytest.approx(1_197_238_417_000) + assert nii.comparison_role == "point_estimate" + assert nii.lower_bound is None + assert nii.upper_bound is None + + assert passive.variable == "passive_partnership_s_corp_income" + assert passive.benchmark_value == pytest.approx(109_256_984_000) + assert passive.comparison_role == "upper_bound" + assert passive.lower_bound == 0 + assert passive.upper_bound == pytest.approx(109_256_984_000) + assert "rental" in passive.description.lower() + assert "upper bound" in passive.description.lower() + + +def test_administrative_aggregate_loader_rejects_a_gating_row(tmp_path): + path = tmp_path / "repeal_revenue_benchmarks.json" + path.write_text( + json.dumps( + { + "schema_version": 1, + "administrative_aggregate_diagnostics": [ + { + "id": "bad_gate", + "name": "Bad gate", + "variable": "net_investment_income", + "period": 2023, + "benchmark": { + "value": 1, + "year": "TY2023", + "source": "Synthetic", + "source_url": "", + }, + "comparison_role": "point_estimate", + "provisional": True, + "diagnostics_only": False, + "description": "Must remain diagnostic-only.", + } + ], + } + ) + ) + with pytest.raises(ValueError, match="diagnostics_only must be true"): + administrative_aggregate_diagnostic_specs(path) + + +def test_administrative_aggregate_diagnostics_share_baseline_and_emit_table(): + calls = [] + + def simulate(reform): + calls.append(reform) + return _FakeSim( + { + "net_investment_income": 1_100_000_000_000, + "passive_partnership_s_corp_income": 55_000_000_000, + } + ) + + payload = reform_validation_payload( + (), + period=2024, + simulate=simulate, + administrative_aggregate_diagnostics=( + AdministrativeAggregateDiagnosticSpec( + id="nii", + name="NII", + variable="net_investment_income", + period=2023, + benchmark_value=1_197_238_417_000, + benchmark_year="TY2023", + source="Form 8960 line 12", + source_url="", + description="Synthetic point comparison.", + comparison_role="point_estimate", + provisional=True, + diagnostics_only=True, + ), + AdministrativeAggregateDiagnosticSpec( + id="passive", + name="Passive", + variable="passive_partnership_s_corp_income", + period=2023, + benchmark_value=109_256_984_000, + benchmark_year="TY2023", + source="Form 8960 line 4c", + source_url="", + description="Synthetic upper-bound comparison.", + comparison_role="upper_bound", + provisional=True, + diagnostics_only=True, + lower_bound=0, + upper_bound=109_256_984_000, + ), + ), + ) + + # Both rows are plain totals from one shared baseline. No reform is built. + assert calls == [None] + table = payload["administrative_aggregate_diagnostics"] + assert table["diagnostics_only"] is True + assert table["simulated"] is True + assert payload["out_of_sample_simulated"] is True + assert payload["reforms"] == [] + + nii, passive = table["rows"] + assert nii["diagnostics_only"] is True + assert nii["provisional"] is True + assert nii["modeled_total"] == pytest.approx(1_100_000_000_000) + assert "neutralized_variable" not in nii + assert "parameter_changes" not in nii + assert nii["relative_gap"] == pytest.approx( + 1_100_000_000_000 / 1_197_238_417_000 - 1 + ) + assert nii["within_bounds"] is None + assert passive["modeled_total"] == pytest.approx(55_000_000_000) + assert passive["comparison_role"] == "upper_bound" + assert passive["within_bounds"] is True + + +def test_administrative_aggregate_error_is_contained_and_not_a_release_gate(): + specs = ( + AdministrativeAggregateDiagnosticSpec( + id="missing", + name="Missing", + variable="missing_measure", + period=2023, + benchmark_value=1, + benchmark_year="TY2023", + source="Synthetic", + source_url="", + description="Deliberately missing measure.", + comparison_role="point_estimate", + provisional=True, + diagnostics_only=True, + ), + AdministrativeAggregateDiagnosticSpec( + id="present", + name="Present", + variable="present_measure", + period=2023, + benchmark_value=50, + benchmark_year="TY2023", + source="Synthetic", + source_url="", + description="Present measure.", + comparison_role="point_estimate", + provisional=True, + diagnostics_only=True, + ), + ) + payload = reform_validation_payload( + (), + period=2024, + simulate=lambda reform: _FakeSim({"present_measure": 45}), + administrative_aggregate_diagnostics=specs, + ) + missing, present = payload["administrative_aggregate_diagnostics"]["rows"] + assert missing["status"] == "error" + assert missing["message"].startswith("KeyError:") + assert missing["modeled_total"] is None + assert missing["relative_gap"] is None + assert present["modeled_total"] == pytest.approx(45) + # This pre-existing field controls the publish guard. The contained + # diagnostics failure does not alter it. + assert payload["out_of_sample_simulated"] is True + + def test_soi_baseline_levels_load_from_default_config(): from microcosm.build.us_runtime.reform_validation import soi_baseline_level_specs From d671b80e97aba0b5c1a94af28d68a1d6457e9fa9 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 11:15:14 -0400 Subject: [PATCH 07/23] feat(us): wire passive passthrough into builds --- .../us/release_input_coverage_manifest.json | 10 +++- .../build/us_runtime/l0_refit_export.py | 4 ++ .../build/us_runtime/multispine_pool.py | 48 +++++++++++++--- .../build/us_runtime/operator_boundary.py | 6 ++ .../us_runtime/release_input_coverage.py | 30 ++++++++-- .../tests/test_release_input_coverage.py | 17 ++++++ .../tests/test_us_fiscal_refresh_builder.py | 39 +++++++++++++ .../tests/test_us_l0_refit_export.py | 4 ++ .../tests/test_us_multispine_pool.py | 56 ++++++++++++++++--- .../tests/test_us_multispine_pool_tool.py | 27 +++++++-- .../tests/test_us_puf_support_base_builder.py | 22 +++++++- .../tests/test_us_spine_blindness.py | 7 ++- tools/build_us_fiscal_refresh_release.py | 31 +++++++++- tools/build_us_multispine_pool.py | 9 +++ tools/build_us_puf_support_base.py | 16 +++++- ...uild_us_release_input_coverage_manifest.py | 10 +++- 16 files changed, 301 insertions(+), 35 deletions(-) diff --git a/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json b/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json index 29fd5bf9d..f31e3deec 100644 --- a/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json +++ b/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json @@ -298,6 +298,10 @@ "partnership_s_corp_income_would_be_qualified": { "status": "required" }, + "passive_partnership_s_corp_income": { + "note": "Section 469 passive subset of partnership and S-corporation income, assigned by the provisional SCF-shaped sibling stage for the NIIT base. Required with no reviewed exclusion so release publication cannot silently drop the new engine input.", + "status": "required" + }, "pre_subsidy_care_expenses": { "note": "Adult/disabled-dependent care expense leaf of the section 21 CDCC (PolicyEngine/microcosm#451 item 1), written by the adult_care_inputs base-builder stage: without it every CDCC reform binding through adult care scores exactly $0 (the #368 absent-input class). Currently absent — the intended red gate until the next base rebuild carries the stage through.", "status": "required" @@ -534,11 +538,11 @@ } }, "counts": { - "required": 163, + "required": 164, "reviewed_exclusion": 7, - "total": 170 + "total": 171 }, - "derivation": "Required surface = input columns in the pinned, sha-verified ecps_parity_reference.json populated layers, plus the documented post-reference fsla_overtime_premium, qualified_passenger_vehicle_loan_interest, five desired retirement-contribution inputs, meets_ssi_disability_criteria required by shipped validation probes, and the #282 Schedule-D capital-gain-distributions route leg schedule_d_capital_gain_distributions (PolicyEngine/microcosm#462). status='reviewed_exclusion' for ecps_parity_known_gaps.json entries (reason+issue from that register); EXCEPT every primary-source restoration pinned by RESTORED_REFERENCE_ECPS_REQUIRED_INPUTS (including the Section 199A QBI family), and the SSI countable-resource asset inputs (bank_account_assets, stock_assets, bond_assets), which are status='required' with NO exclusion per PolicyEngine/microcosm#368 so the gate fails on today's artifacts and asset restoration (Deliverable 2) turns it green. All other populated layers are 'required'. Regenerate with tools/build_us_release_input_coverage_manifest.py.", + "derivation": "Required surface = input columns in the pinned, sha-verified ecps_parity_reference.json populated layers, plus the documented post-reference fsla_overtime_premium, qualified_passenger_vehicle_loan_interest, five desired retirement-contribution inputs, meets_ssi_disability_criteria required by shipped validation probes, the #722 passive pass-through NIIT input, and the #282 Schedule-D capital-gain-distributions route leg schedule_d_capital_gain_distributions (PolicyEngine/microcosm#462). status='reviewed_exclusion' for ecps_parity_known_gaps.json entries (reason+issue from that register); EXCEPT every primary-source restoration pinned by RESTORED_REFERENCE_ECPS_REQUIRED_INPUTS (including the Section 199A QBI family), and the SSI countable-resource asset inputs (bank_account_assets, stock_assets, bond_assets), which are status='required' with NO exclusion per PolicyEngine/microcosm#368 so the gate fails on today's artifacts and asset restoration (Deliverable 2) turns it green. All other populated layers are 'required'. Regenerate with tools/build_us_release_input_coverage_manifest.py.", "description": "Declared full-coverage contract for a US release: every input column the reference eCPS exports must be persisted as a key with non-default signal, or carry a reviewed exclusion. Enforced as a hard release gate (microcosm.build.us_runtime.release_input_coverage) that generalizes assert_required_us_release_source_columns from 5 columns to the full eCPS input surface.", "issue": "PolicyEngine/microcosm#368", "reference": { diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py b/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py index 80adf18ab..0b2caa9db 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py @@ -91,6 +91,9 @@ from microcosm.build.us_runtime.qbi_inputs import ( US_QBI_NONCONSTANT_PERSON_COLUMNS, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, +) from microcosm.build.us_runtime.relationship_inputs import ( US_RELATIONSHIP_INPUTS_NONCONSTANT_PERSON_COLUMNS, ) @@ -178,6 +181,7 @@ *US_RETIREMENT_CONTRIBUTION_NONCONSTANT_PERSON_COLUMNS, *US_RETIREMENT_DISTRIBUTION_NONCONSTANT_PERSON_COLUMNS, *US_QBI_NONCONSTANT_PERSON_COLUMNS, + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, *US_ORG_WAGES_NONCONSTANT_PERSON_COLUMNS, *US_OTHER_HEALTH_INSURANCE_NONCONSTANT_PERSON_COLUMNS, *US_SE_HEALTH_ATTRIBUTION_OUTPUT_COLUMNS, diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py b/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py index 52401171f..eed5afad4 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py @@ -83,6 +83,10 @@ validate_us_qbi_reconciliation_transition, with_us_qbi_input_reconciliation, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS, + with_us_qbi_passive_passthrough_assignment, +) from microcosm.build.us_runtime.relationship_inputs import ( with_us_relationship_inputs, ) @@ -231,9 +235,10 @@ POOL_DERIVE_OPERATOR_ORDER = ( "_complete_schedule_d_input", + "with_us_qbi_passive_passthrough_assignment", "with_us_qbi_input_reconciliation", ) -"""Whole-pool deterministic operators owned by the derive stage.""" +"""Whole-pool post-transfer operators owned by the derive stage.""" POOL_RANDOM_SEED = 0 """Fixed seed shared by pool imputations and seeded input stages.""" @@ -345,9 +350,9 @@ class PoolEngineInputProjectionContract: """Exact installed input registry scanned by the disposable projection.""" POOL_REMAINING_STAGE_INPUT_MANIFEST_SHA256 = ( - "8247a93e5f8f63d3ae71c1de681c29524d4bb8f07e3c6a50dcaf431b1377020f" + "4ec692e3262f396ebacd6144c900b31ef2ae3eabc1062f38e6db6d3ab6f433fa" ) -"""Pinned content digest of all 993 post-transfer consumer/input rows.""" +"""Pinned content digest of all 997 post-transfer consumer/input rows.""" @dataclass(frozen=True) @@ -600,6 +605,13 @@ class SourceOperatorContract: "transferred tax-unit parents exist only on the physically cloned pool", execution_scope=_WHOLE_POOL_EXECUTION_SCOPE, ), + "with_us_qbi_passive_passthrough_assignment": SourceOperatorContract( + "qbi_passive_passthrough", + (_POST_CLONE_PHASE,), + "the independent seeded passive share draw consumes transferred " + "Schedule E components before legacy QBI identity reconciliation", + execution_scope=_WHOLE_POOL_EXECUTION_SCOPE, + ), "with_us_qbi_input_reconciliation": SourceOperatorContract( "qbi_reconciliation", (_POST_CLONE_PHASE,), @@ -607,7 +619,7 @@ class SourceOperatorContract: execution_scope=_WHOLE_POOL_EXECUTION_SCOPE, ), } -"""Total clone-phase registry for all 23 pool-path operator kernels.""" +"""Total clone-phase registry for all 24 pool-path operator kernels.""" POOL_SOURCE_OPERATOR_CONTRACTS = POOL_OPERATOR_CONTRACTS """Backward-compatible name for the now-total pool operator registry.""" @@ -1079,7 +1091,7 @@ def pool_remaining_stage_input_manifest( """Enumerate and statically provision every remaining-stage data read. The manifest starts at a validated ``transferred`` checkpoint and covers - tail preparation, both derive kernels, all thirteen seed-program branches, + tail preparation, all three derive kernels, all thirteen seed-program branches, and the terminal SSI simulation. Simulation leaves come from the pinned source-index graph rather than a handwritten dependency list. """ @@ -1187,6 +1199,17 @@ def surface_provision(variable: str) -> str: fallback="derive_from_finite_transferred_parents", ) + for variable in US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS: + register( + "derive", + "with_us_qbi_passive_passthrough_assignment", + "person", + variable, + execution_scope="whole_pool", + provision=surface_provision(variable), + available_by="transferred", + ) + for variable in US_QBI_RECONCILED_PERSON_COLUMNS: register( "derive", @@ -2806,12 +2829,13 @@ def _frame_row_counts(frame: Frame) -> dict[str, int]: def derive_multispine_pool_inputs(frame: Frame) -> PoolStageOutput: - """Complete deterministic post-transfer inputs without reading a spine. + """Complete post-transfer inputs without reading a source-spine label. Schedule D capital-gain distributions are derived once per tax unit from the transferred parent inputs, then carried by the first person only when the unit has no pre-existing values. Existing non-null values are never - rewritten. The shared QBI reconciliation then restores its documented + rewritten. The independent passive pass-through stream then assigns the + NIIT input before shared QBI reconciliation restores its documented all-or-nothing identities on the imputed PUF-detail surface. """ @@ -2837,11 +2861,18 @@ def reconcile_qbi_with_receipt(input_frame: Frame) -> PoolStageOutput: operator_names=POOL_DERIVE_OPERATOR_ORDER, operators={ "_complete_schedule_d_input": _complete_schedule_d_input, + "with_us_qbi_passive_passthrough_assignment": lambda input_frame: ( + with_us_qbi_passive_passthrough_assignment( + input_frame, + seed=POOL_RANDOM_SEED, + ) + ), "with_us_qbi_input_reconciliation": reconcile_qbi_with_receipt, }, ) schedule_d_receipt = completed.receipt["suboperators"][0]["kernel_receipt"] - qbi_receipt = completed.receipt["suboperators"][1]["kernel_receipt"] + passive_receipt = completed.receipt["suboperators"][1]["kernel_receipt"] + qbi_receipt = completed.receipt["suboperators"][2]["kernel_receipt"] authorized = bind_us_qbi_reconciliation_transition_authority( completed.frame, qbi_receipt, @@ -2859,6 +2890,7 @@ def reconcile_qbi_with_receipt(input_frame: Frame) -> PoolStageOutput: "operator_order": list(POOL_DERIVE_OPERATOR_ORDER), "remaining_stage_input_manifest": remaining_stage_manifest_receipt, "schedule_d_capital_gain_distributions": schedule_d_receipt, + "qbi_passive_passthrough_assignment": passive_receipt, "qbi_input_reconciliation": dict(qbi_receipt), }, qbi_transition_authority_sha256=qbi_receipt["sha256"], diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/operator_boundary.py b/packages/microcosm-build/src/microcosm/build/us_runtime/operator_boundary.py index 6023ef754..62c955859 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/operator_boundary.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/operator_boundary.py @@ -74,6 +74,9 @@ PUF_TAX_DETAIL_DEFAULT_TAX_UNIT_OUTPUTS, ) from microcosm.build.us_runtime.qbi_inputs import US_QBI_RECONCILED_PERSON_COLUMNS +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, +) from microcosm.build.us_runtime.relationship_inputs import ( US_RELATIONSHIP_INPUTS_OUTPUT_COLUMNS, ) @@ -320,6 +323,9 @@ "qbi_reconciliation": { "person": frozenset(US_QBI_RECONCILED_PERSON_COLUMNS), }, + "qbi_passive_passthrough": { + "person": frozenset({US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN}), + }, "housing_assistance": { "spm_unit": frozenset( { diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py b/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py index 40d983c3f..3bc7a9ab8 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py @@ -76,6 +76,9 @@ US_PRIOR_YEAR_INCOME_PERSISTED_OUTPUT_COLUMNS, ) from microcosm.build.us_runtime.qbi_inputs import US_QBI_OUTPUT_COLUMNS +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, +) from microcosm.build.us_runtime.relationship_inputs import ( US_RELATIONSHIP_INPUTS_OUTPUT_COLUMNS, ) @@ -109,6 +112,7 @@ "US_CGD_ROUTE_REQUIRED_INPUTS", "US_RELEASE_INPUT_COVERAGE_RESOURCE", "POST_REFERENCE_ECPS_REQUIRED_INPUTS", + "PROVISIONAL_PENDING_ENGINE_INPUTS", "RESTORED_REFERENCE_ECPS_REQUIRED_INPUTS", "ReformCoverageProbe", "ReleaseInputColumn", @@ -149,9 +153,17 @@ "is_incapable_of_self_care", "health_insurance_premiums", "is_self_employed", + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, } ) +# The source column ships ahead of the engine release that consumes it. Keep +# this exception exact and short-lived: once PolicyEngine-US #9306 is in the +# installed registry, subtracting it below is a no-op. +PROVISIONAL_PENDING_ENGINE_INPUTS = frozenset( + {US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN} +) + # Populated inputs in the frozen reference that have been restored from their # primary-source derivations. Keeping this separate from the post-reference # additions lets the anti-rot check reject any future attempt to put a completed @@ -645,9 +657,10 @@ def assert_release_input_coverage_manifest_current( reflected here. - The three SSI countable-resource asset inputs must be ``required`` with no reviewed exclusion — the #368 red-gate guarantee cannot be quietly undone. - - Every declared column must be a real PolicyEngine-US input leaf, and every - probe's ``binding_inputs`` / ``budget_measure`` must resolve on the live - engine, so the contract cannot guard names the engine no longer has. + - Every declared column must be a real PolicyEngine-US input leaf, apart + from the exact provisional #722 input shipping ahead of its engine + release, and every probe's ``binding_inputs`` must resolve on the live + engine, so the contract cannot otherwise guard names the engine lacks. A no-op for the engine-graph half when no engine is available (the workspace test environment); the checked-in-facts half always runs. @@ -704,6 +717,13 @@ def assert_release_input_coverage_manifest_current( "required manifest column (#462)." ) + for column in PROVISIONAL_PENDING_ENGINE_INPUTS: + if column in reviewed or column not in required: + failures.append( + f"{column}: provisional pending engine input must remain a hard " + "requirement with no reviewed exclusion (#722)." + ) + for column in RESTORED_REFERENCE_ECPS_REQUIRED_INPUTS: if column in reviewed: failures.append( @@ -723,7 +743,9 @@ def assert_release_input_coverage_manifest_current( except ImportError: input_variables = None if input_variables is not None: - non_leaves = sorted(declared - input_variables) + non_leaves = sorted( + declared - input_variables - PROVISIONAL_PENDING_ENGINE_INPUTS + ) if non_leaves: failures.append( "manifest declares column(s) that are not PolicyEngine-US " diff --git a/packages/microcosm-build/tests/test_release_input_coverage.py b/packages/microcosm-build/tests/test_release_input_coverage.py index 5a1601e60..692a8c710 100644 --- a/packages/microcosm-build/tests/test_release_input_coverage.py +++ b/packages/microcosm-build/tests/test_release_input_coverage.py @@ -732,6 +732,23 @@ def test_manifest_is_current(self) -> None: # SSI assets must stay hard requirements. assert_release_input_coverage_manifest_current() + def test_provisional_passive_input_may_precede_engine_registry(self) -> None: + manifest = load_release_input_coverage_manifest() + for engine_has_passive_input in (False, True): + variables = set(manifest.declared_columns) + if not engine_has_passive_input: + variables.remove("passive_partnership_s_corp_income") + engine = type( + "FixtureVariableRegistry", + (), + {"variables": lambda _self, _variables=variables: sorted(_variables)}, + )() + + assert_release_input_coverage_manifest_current( + engine=engine, + manifest=manifest, + ) + def test_medicare_part_b_plural_names_are_deliberate_nonrequirements( self, ) -> None: diff --git a/packages/microcosm-build/tests/test_us_fiscal_refresh_builder.py b/packages/microcosm-build/tests/test_us_fiscal_refresh_builder.py index 1c4c4a623..1d5c8d7ce 100644 --- a/packages/microcosm-build/tests/test_us_fiscal_refresh_builder.py +++ b/packages/microcosm-build/tests/test_us_fiscal_refresh_builder.py @@ -4191,6 +4191,11 @@ def fake_base_population_mass_repair(frame): "with_us_qbi_input_reconciliation", lambda frame: frame, ) + monkeypatch.setattr( + builder, + "_with_qbi_passive_passthrough_if_missing", + lambda frame, *, seed: frame, + ) monkeypatch.setattr( builder, "us_qbi_inputs_signal_gate", @@ -6723,6 +6728,39 @@ def fake_calculate_array(simulation, variable, *, map_to=None): ) +def test_passive_passthrough_assignment_preserves_rebuilt_support( + monkeypatch, +) -> None: + builder = _load_builder_module() + calls: list[tuple[object, int]] = [] + + class FixtureFrame: + def __init__(self, *, already_assigned: bool) -> None: + columns = ( + {"passive_partnership_s_corp_income": [10.0]} + if already_assigned + else {} + ) + self.person = pd.DataFrame(columns) + + def table(self, entity: str) -> pd.DataFrame: + assert entity == "person" + return self.person + + assigned = FixtureFrame(already_assigned=True) + monkeypatch.setattr( + builder, + "with_us_qbi_passive_passthrough_assignment", + lambda frame, *, seed: calls.append((frame, seed)) or assigned, + ) + legacy = FixtureFrame(already_assigned=False) + rebuilt = FixtureFrame(already_assigned=True) + + assert builder._with_qbi_passive_passthrough_if_missing(legacy, seed=42) is assigned + assert builder._with_qbi_passive_passthrough_if_missing(rebuilt, seed=99) is rebuilt + assert calls == [(legacy, 42)] + + def test_aca_source_tax_unit_table_batches_policyengine_inputs(monkeypatch) -> None: builder = _load_builder_module() person = pd.DataFrame( @@ -8703,6 +8741,7 @@ def call_name(call: ast.Call) -> str | None: assert pool_owned_call_sites == guarded_call_sites assert { "with_us_weeks_unemployed", + "_with_qbi_passive_passthrough_if_missing", "with_us_qbi_input_reconciliation", "with_us_childcare_inputs", "with_us_energy_subsidy_input", diff --git a/packages/microcosm-build/tests/test_us_l0_refit_export.py b/packages/microcosm-build/tests/test_us_l0_refit_export.py index d6a756d8f..be32627fb 100644 --- a/packages/microcosm-build/tests/test_us_l0_refit_export.py +++ b/packages/microcosm-build/tests/test_us_l0_refit_export.py @@ -95,6 +95,7 @@ def _us_frame(**person_extra: object) -> Frame: "business_is_sstb": [False, True, False], "qualified_bdc_income": [0.0, 20.0, 0.0], "qualified_reit_and_ptp_income": [100.0, 0.0, 50.0], + "passive_partnership_s_corp_income": [25.0, 0.0, 10.0], "sstb_self_employment_income_before_lsr": [0.0, 1_000.0, 0.0], "sstb_unadjusted_basis_qualified_property": [0.0, 5_000.0, 0.0], "sstb_w2_wages_from_qualified_business": [0.0, 2_000.0, 0.0], @@ -1098,6 +1099,9 @@ def write_dataset(self, bundle, path, period): assert "keogh_distributions" in summary["required_person_source_columns"] assert "business_is_sstb" in summary["required_person_source_columns"] assert "qualified_reit_and_ptp_income" in summary["required_person_source_columns"] + assert ( + "passive_partnership_s_corp_income" in summary["required_person_source_columns"] + ) assert "domestic_production_ald" in summary["required_source_columns"] assert "would_file_taxes_voluntarily" in summary["required_source_columns"] assert ( diff --git a/packages/microcosm-build/tests/test_us_multispine_pool.py b/packages/microcosm-build/tests/test_us_multispine_pool.py index 35e1b8268..1dc3466c8 100644 --- a/packages/microcosm-build/tests/test_us_multispine_pool.py +++ b/packages/microcosm-build/tests/test_us_multispine_pool.py @@ -84,6 +84,10 @@ us_qbi_reconciliation_change_receipt, with_us_qbi_input_reconciliation, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS, +) from microcosm.build.us_runtime.spine_agreement import ( SpineAgreementSpec, default_spine_agreement_registry, @@ -1429,6 +1433,10 @@ def test_remaining_stage_manifest_covers_every_derive_read() -> None: ("person", "schedule_d_capital_gain_distributions"), ("tax_unit", "tax_unit_id"), }, + "with_us_qbi_passive_passthrough_assignment": { + ("person", variable) + for variable in US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS + }, "with_us_qbi_input_reconciliation": { *{("person", variable) for variable in US_QBI_OUTPUT_COLUMNS}, ("person", "self_employment_income_before_lsr"), @@ -1643,9 +1651,9 @@ def test_simulation_projection_defaults_match_pinned_engine_surface() -> None: def test_remaining_stage_manifest_is_unique_complete_and_stable() -> None: manifest = pool_remaining_stage_input_manifest(_installed_variable_metadata_index()) - assert len(manifest) == 993 + assert len(manifest) == 997 assert Counter(entry.stage for entry in manifest) == Counter( - {"derive": 34, "seed": 29, "simulate": 930} + {"derive": 38, "seed": 29, "simulate": 930} ) assert len( { @@ -1658,9 +1666,9 @@ def test_remaining_stage_manifest_is_unique_complete_and_stable() -> None: receipt = pool_remaining_stage_input_manifest_receipt( _installed_variable_metadata_index() ) - assert receipt["entry_count"] == 993 + assert receipt["entry_count"] == 997 assert receipt["stage_counts"] == { - "derive": 34, + "derive": 38, "seed": 29, "simulate": 930, } @@ -2983,8 +2991,8 @@ def observe_guarded_chain( for phase in contract.phases } assert observed_placements == registered_placements - assert len({name for name, _phase in observed_placements}) == 23 - assert len(observed_placements) == 24 + assert len({name for name, _phase in observed_placements}) == 24 + assert len(observed_placements) == 25 def test_derive_stage_rejects_preclone_pool_before_kernels( @@ -3011,6 +3019,11 @@ def unexpected_kernel(frame: Frame) -> Frame: "with_us_qbi_input_reconciliation", unexpected_kernel, ) + monkeypatch.setattr( + multispine_pool_module, + "with_us_qbi_passive_passthrough_assignment", + unexpected_kernel, + ) with pytest.raises(ValueError, match="post_clone.*incompatible clone provenance"): multispine_pool_module.derive_multispine_pool_inputs(assembled) @@ -3032,15 +3045,19 @@ def test_derive_stage_keeps_whole_pool_qbi_reconciliation() -> None: person["self_employment_income_before_lsr"] = 10.0 person["SEMP"] = 10.0 person["sstb_self_employment_income_before_lsr"] = 5.0 + person["partnership_income"] = 100.0 + person["s_corp_income"] = 0.0 + person["rental_income"] = 0.0 + person["estate_income"] = 0.0 frame = _replace_person(frame, person) result = multispine_pool_module.derive_multispine_pool_inputs(frame) derived = result.frame.table("person") assert result.receipt["operator_order"] == list(POOL_DERIVE_OPERATOR_ORDER) - assert result.receipt["remaining_stage_input_manifest"]["entry_count"] == 993 + assert result.receipt["remaining_stage_input_manifest"]["entry_count"] == 997 assert result.receipt["remaining_stage_input_manifest"]["stage_counts"] == { - "derive": 34, + "derive": 38, "seed": 29, "simulate": 930, } @@ -3060,10 +3077,29 @@ def test_derive_stage_keeps_whole_pool_qbi_reconciliation() -> None: == 0 ) assert derived["schedule_d_capital_gain_distributions"].notna().all() + assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in derived assert derived["self_employment_income_before_lsr"].eq(15.0).all() assert derived["sstb_self_employment_income_before_lsr"].eq(0.0).all() +def test_passive_assignment_preserves_archived_qbi_leaf_bytes() -> None: + pytest.importorskip("policyengine_us") + frame = _qbi_ready_derive_frame() + without_passive = with_us_qbi_input_reconciliation( + _complete_schedule_d_input(frame).frame + ).table("person") + + with_passive = multispine_pool_module.derive_multispine_pool_inputs( + frame + ).frame.table("person") + + for column in US_QBI_OUTPUT_COLUMNS: + np.testing.assert_array_equal( + with_passive[column].to_numpy(), + without_passive[column].to_numpy(), + ) + + def _qbi_ready_derive_frame() -> Frame: assembled = assemble_spines( {"asec": _source_frame(), "acs": _source_frame()}, @@ -3078,6 +3114,10 @@ def _qbi_ready_derive_frame() -> Frame: person["self_employment_income_before_lsr"] = 10.0 person["SEMP"] = 10.0 person["sstb_self_employment_income_before_lsr"] = 5.0 + person["partnership_income"] = 100.0 + person["s_corp_income"] = 0.0 + person["rental_income"] = 0.0 + person["estate_income"] = 0.0 return _replace_person(frame, person) diff --git a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py index 7aaf2bb30..177849e04 100644 --- a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py @@ -2307,6 +2307,9 @@ def identity() -> dict[str, object]: pool_tool.us_late_producer_schedule_receipt() ) assert current["pool_code"]["late_producer_schedule"] == expected_schedule + assert current["pool_code"]["us_qbi_passive_passthrough_contract"] == ( + pool_tool.us_qbi_passive_passthrough_contract_identity() + ) changed_schedule = copy.deepcopy(expected_schedule) changed_schedule["payload_sha256"] = "0" * 64 @@ -2433,6 +2436,9 @@ def identity() -> dict[str, object]: assert pool_code["us_qbi_reconciliation_contract"] == ( pool_tool.us_qbi_reconciliation_contract_identity() ) + assert pool_code["us_qbi_passive_passthrough_contract"] == ( + pool_tool.us_qbi_passive_passthrough_contract_identity() + ) assert pool_code["remaining_stage_input_manifest"] == ( pool_tool.pool_remaining_stage_input_manifest_receipt() ) @@ -2467,6 +2473,17 @@ def identity() -> dict[str, object]: lambda: qbi_contract, ) stale_qbi = identity() + with monkeypatch.context() as changed: + passive_contract = copy.deepcopy( + pool_tool.us_qbi_passive_passthrough_contract_identity() + ) + passive_contract["sha256"] = "0" * 64 + changed.setattr( + pool_tool, + "us_qbi_passive_passthrough_contract_identity", + lambda: passive_contract, + ) + stale_passive = identity() with monkeypatch.context() as changed: changed.setattr(pool_tool, "PUF_CAPITAL_GAINS_TAIL_MANIFEST_SCHEMA_VERSION", 1) stale_tail_schema = identity() @@ -2531,6 +2548,7 @@ def changed_source_stage_binding( stale_qrf, stale_acs, stale_qbi, + stale_passive, stale_tail_schema, stale_remaining_manifest, stale_tail_contract, @@ -2538,7 +2556,7 @@ def changed_source_stage_binding( stale_source_asset, ) } - assert len(digests) == 9 + assert len(digests) == 10 # Positive control: discovery accepts the exact current semantic identity # under the same fixture engine version used to construct it. @@ -3259,9 +3277,10 @@ def deterministic_fixture_h5( # checkpoint metadata). "pool_h5": "ced797ecdd44a638c2a3945f07ad612098a7095ca53a5f458699bca6d6e38b3e", "agreement": "f39f0d918bf7ee01dddb5517d8830b8adb541273c5be084307be91397caca3cb", - # Exact pre-#653 schema-4/materializer-3 publication bytes from - # preserved #652 commit 54d2dee6. - "manifest": "14e6b3a409dfe2108253668a65ed32c0365b246f379ad895d8441c939adde65e", + # The payload and agreement bytes remain exact; only the publication + # manifest changes because #722 content-binds the passive sibling's + # evidence, assumptions, and independent RNG contract. + "manifest": "79ca1fd98a1aa4ad9f6b8d2b7d840ae7b80fc19bf5f6bd27e6b1904bf0f4ed94", } diff --git a/packages/microcosm-build/tests/test_us_puf_support_base_builder.py b/packages/microcosm-build/tests/test_us_puf_support_base_builder.py index 7f2d44ddd..a93953db9 100644 --- a/packages/microcosm-build/tests/test_us_puf_support_base_builder.py +++ b/packages/microcosm-build/tests/test_us_puf_support_base_builder.py @@ -773,6 +773,7 @@ def test_reconciled_outer_pipeline_order_is_locked() -> None: "qrf_finalization", "capital_gains_tail_transfer", "capital_gain_distributions", + "qbi_passive_passthrough", "qbi_reconciliation", "wic_post_clone", "housing_assistance", @@ -1118,7 +1119,14 @@ def test_outer_stage_resume_rejects_changed_builder_code( "_builder_code_identity", lambda: {"source_sha256": "first"}, ) + passive_contract = {"sha256": "a" * 64} + monkeypatch.setattr( + builder, + "us_qbi_passive_passthrough_contract_identity", + lambda: passive_contract, + ) first_config = builder._stage_run_config(args) + assert first_config["qbi_passive_passthrough_contract"] == passive_contract builder.StageRuntime( args.checkpoint_dir, builder.OUTER_STAGE_PIPELINE, @@ -1954,6 +1962,7 @@ def test_main_runs_cps_only_inputs_before_clone_and_after_puf_then_fails_gate( prior_year_income_reconciliation_frames: list[object] = [] capital_gains_tail_calls: list[object] = [] capital_gain_distributions_calls: list[object] = [] + passive_passthrough_calls: list[tuple[object, int]] = [] qbi_reconciliation_calls: list[object] = [] monkeypatch.setattr( @@ -2234,6 +2243,16 @@ def fake_capital_gain_distributions(args, frame): fake_capital_gain_distributions, ) + def fake_passive_passthrough(frame, *, seed): + passive_passthrough_calls.append((frame, seed)) + return "passive-passthrough" + + monkeypatch.setattr( + builder, + "with_us_qbi_passive_passthrough_assignment", + fake_passive_passthrough, + ) + def fake_qbi_reconciliation(frame): qbi_reconciliation_calls.append(frame) return "qbi-reconciled" @@ -2513,7 +2532,8 @@ def fake_retirement_distributions_signal_gate(frame): assert capital_gains_tail_calls == [("puf-imputed", None)] assert capital_gain_distributions_calls == ["capital-gains-tail"] - assert qbi_reconciliation_calls == ["capital-gain-distributions"] + assert passive_passthrough_calls == [("capital-gain-distributions", 7)] + assert qbi_reconciliation_calls == ["passive-passthrough"] if failing_gate == "wic_claim": assert child_support_calls == [("housing-direct", 7, 2024)] assert prior_year_income_calls == [("cps", 7, 2024)] diff --git a/packages/microcosm-build/tests/test_us_spine_blindness.py b/packages/microcosm-build/tests/test_us_spine_blindness.py index dc807da71..82ce52baa 100644 --- a/packages/microcosm-build/tests/test_us_spine_blindness.py +++ b/packages/microcosm-build/tests/test_us_spine_blindness.py @@ -74,6 +74,7 @@ "late_producer_dag.py", "multispine_pool.py", "puf_support.py", + "qbi_passive_passthrough.py", "spine_agreement.py", "spine_assembly.py", "us_late_overlap_ownership.py", @@ -161,6 +162,7 @@ "other_health_insurance.py", "prior_year_income.py", "qbi_inputs.py", + "qbi_passive_passthrough.py", "retirement_contributions.py", "retirement_distributions.py", "salt_refund_income.py", @@ -228,6 +230,7 @@ "puf_qrf_worker.py", "puf_source_agi.py", "puf_support.py", + "qbi_passive_passthrough_evidence.py", "puma_ladder.py", "puma_ladder_sources.py", "reform_coverage_smoke.py", @@ -3276,8 +3279,8 @@ def test_pool_build_tool_import_graph_is_source_spine_blind() -> None: for tool in _SPINE_BLIND_BUILD_TOOLS: runtime_graph, missing_modules = _us_runtime_import_graph(tool) - assert len(runtime_graph) == 64, ( - f"{tool.name} must reach the pinned 64-module runtime graph; " + assert len(runtime_graph) == 66, ( + f"{tool.name} must reach the pinned 66-module runtime graph; " f"reached {len(runtime_graph)}" ) assert not missing_modules, ( diff --git a/tools/build_us_fiscal_refresh_release.py b/tools/build_us_fiscal_refresh_release.py index 1a1f73cba..44cc34fbd 100644 --- a/tools/build_us_fiscal_refresh_release.py +++ b/tools/build_us_fiscal_refresh_release.py @@ -87,6 +87,7 @@ US_JCT_TAX_EXPENDITURE_REFORMS, US_MEDICAID_ENROLLMENT_TARGET_TABLE, US_MEDICAID_TAKE_UP_VARIABLE, + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, US_SOURCE_MANIFEST, apply_us_medicaid_enrollment_substitutions, assert_release_input_coverage_manifest_current, @@ -184,6 +185,7 @@ with_us_other_health_insurance_inputs, with_us_pregnancy_inputs, with_us_qbi_input_reconciliation, + with_us_qbi_passive_passthrough_assignment, with_us_relationship_inputs, with_us_retirement_contribution_inputs, with_us_retirement_distribution_inputs, @@ -244,6 +246,7 @@ assert_puf_capital_gains_tail_survives_selection, ) from microcosm.build.us_runtime.reform_validation import ( + administrative_aggregate_diagnostic_specs, default_baseline_level_specs, default_simulate_factory, load_default_reform_specs, @@ -3162,6 +3165,18 @@ def _with_aca_marketplace_source_outputs( ) +def _with_qbi_passive_passthrough_if_missing( + frame: Frame, + *, + seed: int, +) -> Frame: + """Assign the sibling NIIT input only for a legacy support artifact.""" + + if US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in frame.table("person"): + return frame + return with_us_qbi_passive_passthrough_assignment(frame, seed=seed) + + def _medicaid_source_target_table(target_specs: tuple) -> pd.DataFrame: """CMS state Medicaid enrollment counts as the take-up calibration table. @@ -7257,7 +7272,8 @@ def _write_reform_validation( In-sample JCT tax-expenditure reforms come straight from the calibration fit; out-of-sample OBBBA provisions are simulated on the freshly written release H5 (skipped if ``simulate_out_of_sample`` is False, e.g. for a fast - diagnostics-only build). + diagnostics-only build). Administrative aggregate diagnostics use the same + optional baseline simulation and remain non-gating. """ specs = load_default_reform_specs(period=PERIOD) if not simulate_out_of_sample: @@ -7267,9 +7283,11 @@ def _write_reform_validation( "", "!" * 72, "WARNING: --skip-out-of-sample-reforms is set.", - "reform_validation.json will publish the in-sample JCT rows only;", + "reform_validation.json will publish modeled values for in-sample", + "JCT rows only;", "every out-of-sample (OBBBA / tax-expenditure) row will have a null", - "budget effect and the dashboard will show no fidelity test for them.", + "budget effect, and administrative aggregate rows will have a null", + "modeled total. The dashboard will show no fidelity test for them.", "Do NOT use this for a publishable release.", "!" * 72, "", @@ -7287,6 +7305,9 @@ def _write_reform_validation( in_sample_estimates=_in_sample_estimates(result), in_sample_targets=_in_sample_targets(result), baseline_levels=default_baseline_level_specs(), + administrative_aggregate_diagnostics=( + administrative_aggregate_diagnostic_specs() + ), release_id=release_id, ) write_reform_validation(payload, release_dir / "reform_validation.json") @@ -8668,6 +8689,10 @@ def main(argv: Sequence[str] | None = None) -> None: ) ) if pool_frame is None: + base_frame = _with_qbi_passive_passthrough_if_missing( + base_frame, + seed=args.seed, + ) base_frame = with_us_qbi_input_reconciliation(base_frame) qbi_inputs_gate = us_qbi_inputs_signal_gate(base_frame) if not qbi_inputs_gate.passed: diff --git a/tools/build_us_multispine_pool.py b/tools/build_us_multispine_pool.py index d6c0ba72c..d01cbb9e6 100644 --- a/tools/build_us_multispine_pool.py +++ b/tools/build_us_multispine_pool.py @@ -155,6 +155,9 @@ us_qbi_reconciliation_contract_identity, validate_us_qbi_reconciliation_live_output, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + us_qbi_passive_passthrough_contract_identity, +) from microcosm.build.us_runtime.stacked_spine import ( CANONICAL_STACKED_GAP_FILL_SURFACE, CANONICAL_STACKED_POST_PUF_TRANSFER_SURFACE, @@ -963,6 +966,9 @@ def _pool_checkpoint_base_identity( ), "late_producer_schedule": _json_ready(us_late_producer_schedule_receipt()), "derive_operator_order": list(POOL_DERIVE_OPERATOR_ORDER), + "us_qbi_passive_passthrough_contract": ( + us_qbi_passive_passthrough_contract_identity() + ), "primary_qrf_target_order": list(PRIMARY_QRF_TARGET_ORDER), "transfer_target_families": _json_ready(pool_transfer_target_families()), "take_up_contract": take_up_contract_identity(), @@ -1130,6 +1136,9 @@ def _stacked_checkpoint_base_identity( "us_qbi_reconciliation_contract": ( us_qbi_reconciliation_contract_identity() ), + "us_qbi_passive_passthrough_contract": ( + us_qbi_passive_passthrough_contract_identity() + ), "take_up_contract": take_up_contract_identity(), "puf_capital_gains_tail_manifest_schema_version": ( PUF_CAPITAL_GAINS_TAIL_MANIFEST_SCHEMA_VERSION diff --git a/tools/build_us_puf_support_base.py b/tools/build_us_puf_support_base.py index 5bdd07fe5..4bd1558c1 100644 --- a/tools/build_us_puf_support_base.py +++ b/tools/build_us_puf_support_base.py @@ -115,6 +115,7 @@ us_prior_year_income_signal_gate, us_prior_year_income_source_reconciliation_gate, us_qbi_inputs_signal_gate, + us_qbi_passive_passthrough_contract_identity, us_relationship_inputs_signal_gate, us_retirement_contributions_signal_gate, us_retirement_distributions_signal_gate, @@ -139,6 +140,7 @@ with_us_pregnancy_inputs, with_us_prior_year_income_inputs, with_us_qbi_input_reconciliation, + with_us_qbi_passive_passthrough_assignment, with_us_relationship_inputs, with_us_retirement_contribution_inputs, with_us_retirement_distribution_inputs, @@ -171,6 +173,7 @@ "qrf_finalization", PUF_CAPITAL_GAINS_TAIL_STAGE_NAME, CAPITAL_GAIN_DISTRIBUTIONS_STAGE_NAME, + "qbi_passive_passthrough", "qbi_reconciliation", "wic_post_clone", "housing_assistance", @@ -234,6 +237,10 @@ CAPITAL_GAIN_DISTRIBUTIONS_STAGE_NAME, ("run_source_stage[capital_gain_distributions]",), ), + ( + "qbi_passive_passthrough", + ("with_us_qbi_passive_passthrough_assignment",), + ), ("qbi_reconciliation", ("with_us_qbi_input_reconciliation",)), ("wic_post_clone", ("with_us_wic_claim_input",)), ( @@ -720,6 +727,9 @@ def path(value: Path | None) -> str | None: if args.puf_source_year_csv is not None else None ), + "qbi_passive_passthrough_contract": ( + us_qbi_passive_passthrough_contract_identity() + ), "seed": args.seed, "support_spine_spec": path(args.support_spine_spec), "target_year": args.target_year, @@ -1083,6 +1093,8 @@ def _run_all( CAPITAL_GAIN_DISTRIBUTIONS_STAGE_NAME, imputed, ) + imputed = with_us_qbi_passive_passthrough_assignment(imputed, seed=args.seed) + _observe_frame_boundary(boundary_observer, "qbi_passive_passthrough", imputed) imputed = with_us_qbi_input_reconciliation(imputed) _observe_frame_boundary(boundary_observer, "qbi_reconciliation", imputed) imputed = with_us_wic_claim_input( @@ -2473,7 +2485,9 @@ def _post_qrf_frame_stage( ) -> tuple[Frame, dict[str, object]]: signals: dict[str, object] = {} metadata: dict[str, object] = {"signals": signals} - if stage == "qbi_reconciliation": + if stage == "qbi_passive_passthrough": + frame = with_us_qbi_passive_passthrough_assignment(frame, seed=args.seed) + elif stage == "qbi_reconciliation": frame = with_us_qbi_input_reconciliation(frame) elif stage == "wic_post_clone": frame = with_us_wic_claim_input( diff --git a/tools/build_us_release_input_coverage_manifest.py b/tools/build_us_release_input_coverage_manifest.py index 2c4e18d46..a017e2d0d 100644 --- a/tools/build_us_release_input_coverage_manifest.py +++ b/tools/build_us_release_input_coverage_manifest.py @@ -80,12 +80,19 @@ "is_self_employed", "pre_subsidy_care_expenses", "is_incapable_of_self_care", + "passive_partnership_s_corp_income", ) # Per-column annotations for post-reference hard requirements whose absence # from today's artifacts is the intended red gate (the #368 SSI-asset # pattern, extended by #462 to the capital-gain-distributions route). POST_REFERENCE_COLUMN_NOTES = { + "passive_partnership_s_corp_income": ( + "Section 469 passive subset of partnership and S-corporation income, " + "assigned by the provisional SCF-shaped sibling stage for the NIIT " + "base. Required with no reviewed exclusion so release publication " + "cannot silently drop the new engine input." + ), "schedule_d_capital_gain_distributions": ( "Schedule D line 13 route leg of the #282 capital-gain-distributions " "split (memo component of long_term_capital_gains, written by the " @@ -1506,7 +1513,8 @@ def build_manifest() -> dict: "qualified_passenger_vehicle_loan_interest, five desired " "retirement-contribution inputs, " "meets_ssi_disability_criteria required by shipped validation " - "probes, and the #282 Schedule-D capital-gain-distributions " + "probes, the #722 passive pass-through NIIT input, and the #282 " + "Schedule-D capital-gain-distributions " "route leg schedule_d_capital_gain_distributions " "(PolicyEngine/microcosm#462). " "status='reviewed_exclusion' for ecps_parity_known_gaps.json entries " From 218b6cb9ae35846f8170e83433ed8f045073b966 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 11:16:02 -0400 Subject: [PATCH 08/23] docs(us): clarify passive provisional contracts --- PROGRESS.md | 18 ++++-- changelog.d/722-passive-pass-through.added.md | 3 + ...bi_passive_passthrough_assumptions_v1.json | 3 +- .../build/us/repeal_revenue_benchmarks.json | 4 +- .../us_runtime/qbi_passive_passthrough.py | 60 ++++++++----------- .../tests/test_us_qbi_passive_passthrough.py | 4 ++ 6 files changed, 49 insertions(+), 43 deletions(-) create mode 100644 changelog.d/722-passive-pass-through.added.md diff --git a/PROGRESS.md b/PROGRESS.md index 62807067e..7c58a2a05 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -41,11 +41,19 @@ ported into the current `microcosm.*` tree. - Verified the restricted replay (12 focused tests), deterministic assumptions regeneration, strict resource hashes, isolated PCG64 families, latent-form routing, and byte preservation of all 15 existing QBI leaves. +- Integrated the sibling between Schedule-D completion and QBI reconciliation + in multispine and direct support builds, while preserving already-assigned + rebuilt support. The 997-row remaining-stage audit and support/pool + checkpoint identities now bind the evidence, assumptions, shift, and RNG. +- Added the new output to ownership, L0 export, and release-coverage contracts. + The exact pending-engine exception is limited to the input arriving in + PolicyEngine-US PR #9306 and becomes a no-op once that engine version lands. +- Added separate, diagnostics-only Form 8960 line 12 and line 4c aggregate + rows. They cannot affect the release gate and retain row-local error + containment under the currently locked pre-#9306 engine. ## Next -- Finish integration of the passive sibling into every base/pool path and its - checkpoint, ownership, and release-coverage contracts. -- Add and verify the diagnostics-only Form 8960 validation rows. -- Run the full workspace tests, lint, contract sweeps, and write the final - report. +- Run the full workspace tests, lint, manual incumbent sweep, and worktree + guard sanity check. +- Write and commit the final report. diff --git a/changelog.d/722-passive-pass-through.added.md b/changelog.d/722-passive-pass-through.added.md new file mode 100644 index 000000000..dd05a3bfb --- /dev/null +++ b/changelog.d/722-passive-pass-through.added.md @@ -0,0 +1,3 @@ +Add a provisional SCF-shaped, Form 8960-anchored assignment for the passive +partnership and S-corporation income NIIT input, with persisted replay +calibration, release coverage, and diagnostics-only administrative checks. diff --git a/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json index e4d027462..803950899 100644 --- a/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json +++ b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json @@ -57,7 +57,8 @@ "The target is provisional because Form 8960 line 4c does not decompose passive pass-through income from rental and royalty income.", "Rental income remains unchanged: the current engine includes it fully in NIIT, and this stage assigns only the pass-through leaf.", "The runtime does not read the restricted replay artifact or solve the calibration shift.", - "The sibling stage neither invokes nor advances any archived QBI random stream and preserves all 15 existing QBI leaves." + "The sibling stage neither invokes nor advances any archived QBI random stream and preserves all 15 existing QBI leaves.", + "The TY2023 administrative target is applied to the pinned 2024-shaped replay without a population-vintage backcast; this period mismatch is another reason the target remains provisional." ], "provisional": true, "random_streams": { diff --git a/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json b/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json index ddea7107b..a33bcc2e0 100644 --- a/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json +++ b/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json @@ -16,7 +16,7 @@ "comparison_role": "point_estimate", "provisional": true, "diagnostics_only": true, - "description": "Weighted baseline net investment income compared with the TY2023 Form 8960 line 12 administrative amount. Line 12 is net of Form 8960 deductions and modifications, while the modeled variable follows the engine's configured investment-income source list; any expense-coverage difference is part of the diagnostic interpretation. The administrative line covers Forms 8960 filed by individuals, estates, and trusts, while the household microdata do not separately represent every estate or trust return. This is therefore a provisional diagnostic rather than a release gate." + "description": "Weighted baseline net investment income compared with the TY2023 Form 8960 line 12 administrative amount. The diagnostic uses the 2023 policy period on the release artifact's 2024-shaped population without a population-vintage backcast. Line 12 is net of Form 8960 deductions and modifications, while the modeled variable follows the engine's configured investment-income source list; any expense-coverage difference is part of the diagnostic interpretation. The administrative line covers Forms 8960 filed by individuals, estates, and trusts, while the household microdata do not separately represent every estate or trust return. This is therefore a provisional diagnostic rather than a release gate." }, { "id": "form_8960_line_4c_passive_flowthrough_upper_bound", @@ -36,7 +36,7 @@ }, "provisional": true, "diagnostics_only": true, - "description": "Line 4c combines rental real estate, royalties, partnerships, S corporations, trusts, and other trade-or-business flow-through amounts after the non-section-1411 adjustment. It does not identify the passive partnership/S-corporation component. The lower bound assumes all line 4c income is rental or royalty income; the upper bound assumes all of it is passive pass-through income. Rental income already enters the engine NIIT base in full, so overlap remains an explicit open question and no rental treatment changes here." + "description": "Line 4c combines rental real estate, royalties, partnerships, S corporations, trusts, and other trade-or-business flow-through amounts after the non-section-1411 adjustment. It does not identify the passive partnership/S-corporation component. The diagnostic uses the 2023 policy period on the release artifact's 2024-shaped population without a population-vintage backcast. The lower bound assumes all line 4c income is rental or royalty income; the upper bound assumes all of it is passive pass-through income. Rental income already enters the engine NIIT base in full, so overlap remains an explicit open question and no rental treatment changes here." } ] } diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py index f84232982..c4b65e3d4 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py @@ -42,12 +42,8 @@ ] QBI_PASSIVE_EVIDENCE_RESOURCE = "qbi_passive_passthrough_v1.json" -QBI_PASSIVE_ASSUMPTIONS_RESOURCE = ( - "qbi_passive_passthrough_assumptions_v1.json" -) -US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN = ( - "passive_partnership_s_corp_income" -) +QBI_PASSIVE_ASSUMPTIONS_RESOURCE = "qbi_passive_passthrough_assumptions_v1.json" +US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN = "passive_partnership_s_corp_income" US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS: tuple[str, ...] = ( "partnership_income", "s_corp_income", @@ -239,9 +235,7 @@ def _inverse_cdf_means( ) -> np.ndarray: left = quantiles[:, 0] * probabilities[0] middle = np.sum( - (quantiles[:, :-1] + quantiles[:, 1:]) - * np.diff(probabilities) - / 2.0, + (quantiles[:, :-1] + quantiles[:, 1:]) * np.diff(probabilities) / 2.0, axis=1, ) right = quantiles[:, -1] * (1.0 - probabilities[-1]) @@ -430,8 +424,7 @@ def load_qbi_passive_passthrough_assumptions() -> dict[str, Any]: actual_evidence_sha = _resource_sha256(QBI_PASSIVE_EVIDENCE_RESOURCE) if expected_evidence_sha != actual_evidence_sha: raise ValueError( - "Passive assumptions evidence digest does not match the packaged " - "resource." + "Passive assumptions evidence digest does not match the packaged resource." ) return payload @@ -473,9 +466,7 @@ def assign_passive_partnership_s_corp_income( if isinstance(seed, bool) or not isinstance(seed, int) or seed < 0: raise ValueError("Passive assignment seed must be a nonnegative integer.") evidence_payload = ( - load_qbi_passive_passthrough_evidence() - if evidence is None - else dict(evidence) + load_qbi_passive_passthrough_evidence() if evidence is None else dict(evidence) ) assumptions_payload = ( load_qbi_passive_passthrough_assumptions() @@ -484,13 +475,11 @@ def assign_passive_partnership_s_corp_income( ) validate_qbi_passive_passthrough_assumptions(assumptions_payload) shift = float(assumptions_payload["calibration"]["log_odds_shift"]) - passthrough, band_index, shifted, probabilities, quantiles = ( - _assignment_inputs( - partnership_s_corp_income, - schedule_e_income, - evidence=evidence_payload, - log_odds_shift=shift, - ) + passthrough, band_index, shifted, probabilities, quantiles = _assignment_inputs( + partnership_s_corp_income, + schedule_e_income, + evidence=evidence_payload, + log_odds_shift=shift, ) length = len(passthrough) eligible = _latent_form_eligibility(latent_entity_form, length=length) @@ -515,7 +504,9 @@ def assign_passive_partnership_s_corp_income( quantiles[band], ) present = presence_draw < shifted[band_index] - return np.where(eligible & (passthrough > 0.0) & present, passthrough * sampled_share, 0.0) + return np.where( + eligible & (passthrough > 0.0) & present, passthrough * sampled_share, 0.0 + ) def qbi_passive_expected_aggregate( @@ -534,13 +525,11 @@ def qbi_passive_expected_aggregate( ) if np.any(arrays["person_weights"] < 0.0): raise ValueError("Passive replay person weights must be nonnegative.") - passthrough, band_index, shifted, probabilities, quantiles = ( - _assignment_inputs( - arrays["partnership_s_corp_income"], - arrays["schedule_e_income"], - evidence=evidence, - log_odds_shift=log_odds_shift, - ) + passthrough, band_index, shifted, probabilities, quantiles = _assignment_inputs( + arrays["partnership_s_corp_income"], + arrays["schedule_e_income"], + evidence=evidence, + log_odds_shift=log_odds_shift, ) eligible = _latent_form_eligibility( latent_entity_form, @@ -725,6 +714,9 @@ def build_qbi_passive_passthrough_assumptions_payload( "the calibration shift.", "The sibling stage neither invokes nor advances any archived QBI " "random stream and preserves all 15 existing QBI leaves.", + "The TY2023 administrative target is applied to the pinned " + "2024-shaped replay without a population-vintage backcast; this " + "period mismatch is another reason the target remains provisional.", ], } assigned = assign_passive_partnership_s_corp_income( @@ -786,8 +778,7 @@ def with_us_qbi_passive_passthrough_assignment( ) if missing: raise ValueError( - "Passive pass-through assignment requires person input(s): " - f"{missing}." + f"Passive pass-through assignment requires person input(s): {missing}." ) if US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in person: raise ValueError( @@ -799,10 +790,9 @@ def with_us_qbi_passive_passthrough_assignment( ].apply(pd.to_numeric, errors="coerce") if not np.isfinite(numeric.to_numpy(dtype=np.float64)).all(): raise ValueError("Passive pass-through assignment inputs must be finite.") - passthrough = ( - numeric["partnership_income"].to_numpy(dtype=np.float64) - + numeric["s_corp_income"].to_numpy(dtype=np.float64) - ) + passthrough = numeric["partnership_income"].to_numpy(dtype=np.float64) + numeric[ + "s_corp_income" + ].to_numpy(dtype=np.float64) schedule_e = ( passthrough + numeric["rental_income"].to_numpy(dtype=np.float64) diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py index c2e0368d7..7854bc672 100644 --- a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py @@ -349,13 +349,17 @@ def test_frame_wrapper_preserves_all_existing_qbi_columns_byte_for_byte() -> Non } result = with_us_qbi_passive_passthrough_assignment(frame, seed=31) + alternate_seed = with_us_qbi_passive_passthrough_assignment(frame, seed=32) after = result.table("person") + alternate = alternate_seed.table("person") assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN not in before assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in after for name, (dtype, raw) in qbi_bytes.items(): assert after[name].dtype.str == dtype assert after[name].to_numpy(copy=False).tobytes() == raw + assert alternate[name].dtype.str == dtype + assert alternate[name].to_numpy(copy=False).tobytes() == raw passthrough = after["partnership_income"] + after["s_corp_income"] passive = after[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN] assert passive.between(0.0, passthrough.clip(lower=0.0)).all() From 0842acefaf53575dec800bee21df5821bda2dc52 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 11:25:47 -0400 Subject: [PATCH 09/23] test(us): include passive stage in pipeline order --- .../tests/test_us_capital_gain_distributions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/microcosm-build/tests/test_us_capital_gain_distributions.py b/packages/microcosm-build/tests/test_us_capital_gain_distributions.py index d5d5487e8..9113ca9d6 100644 --- a/packages/microcosm-build/tests/test_us_capital_gain_distributions.py +++ b/packages/microcosm-build/tests/test_us_capital_gain_distributions.py @@ -281,9 +281,10 @@ def test_base_outer_stage_records_and_materializes_the_declared_split( stage_index = pipeline_names.index( builder.CAPITAL_GAIN_DISTRIBUTIONS_STAGE_NAME ) - assert pipeline_names[stage_index - 1 : stage_index + 2] == [ + assert pipeline_names[stage_index - 1 : stage_index + 3] == [ builder.PUF_CAPITAL_GAINS_TAIL_STAGE_NAME, builder.CAPITAL_GAIN_DISTRIBUTIONS_STAGE_NAME, + "qbi_passive_passthrough", "qbi_reconciliation", ] assert context["completed"] == pipeline_names[: stage_index + 1] From 3f6ecc73fd2471f224ac8173fd90199b508820a4 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 11:58:41 -0400 Subject: [PATCH 10/23] test(us): complete passive inputs in earnings fixture --- packages/microcosm-build/tests/test_us_stacked_spine.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/microcosm-build/tests/test_us_stacked_spine.py b/packages/microcosm-build/tests/test_us_stacked_spine.py index 4e1b8f9a8..21afdc871 100644 --- a/packages/microcosm-build/tests/test_us_stacked_spine.py +++ b/packages/microcosm-build/tests/test_us_stacked_spine.py @@ -68,6 +68,10 @@ US_QBI_BOOLEAN_OUTPUT_COLUMNS, US_QBI_OUTPUT_COLUMNS, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS, +) from microcosm.build.us_runtime.spine_assembly import assemble_spines from microcosm.build.us_runtime.stacked_spine import ( DEFAULT_STACKED_HOUSEHOLD_MASS_SHARES, @@ -1292,6 +1296,8 @@ def test_puf_finalize_masks_earnings_allocation_to_age_15_plus() -> None: person = frame.table("person") for column in US_QBI_OUTPUT_COLUMNS: person[column] = False if column in US_QBI_BOOLEAN_OUTPUT_COLUMNS else 0.0 + for column in US_QBI_PASSIVE_PASSTHROUGH_PERSON_INPUT_COLUMNS: + person[column] = 0.0 person["long_term_capital_gains_before_response"] = 0.0 person["non_sch_d_capital_gains"] = 0.0 tax_unit = frame.table("tax_unit") @@ -1363,6 +1369,7 @@ def test_puf_finalize_masks_earnings_allocation_to_age_15_plus() -> None: derived_person = derived.frame.table("person") qbi_receipt = derived.receipt["qbi_input_reconciliation"] + assert derived_person[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN].eq(0.0).all() assert ( derived_person.loc[native_child, "self_employment_income_before_lsr"] .eq(0.0) From cc7fe11f8693cb28ede6f6740265c5f7478c39b7 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 12:43:21 -0400 Subject: [PATCH 11/23] style(us): format passive passthrough files --- .../qbi_passive_passthrough_evidence.py | 39 +++++++++---------- .../tests/test_reform_validation.py | 6 +-- .../tests/test_us_qbi_passive_passthrough.py | 10 +++-- ...est_us_qbi_passive_passthrough_evidence.py | 21 +++++----- ..._us_qbi_passive_passthrough_assumptions.py | 8 +--- ...ild_us_qbi_passive_passthrough_evidence.py | 12 ++---- 6 files changed, 41 insertions(+), 55 deletions(-) diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py index 90a888e39..7ee9c0558 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough_evidence.py @@ -90,9 +90,7 @@ FORM_8960_LINE_4B_RETURNS = 4_038_235 FORM_8960_LINE_4C_AMOUNT = 109_256_984_000.0 FORM_8960_LINE_4C_RETURNS = 2_260_296 -FORM_8960_LINE_4C_TO_4A_RATIO = ( - FORM_8960_LINE_4C_AMOUNT / FORM_8960_LINE_4A_AMOUNT -) +FORM_8960_LINE_4C_TO_4A_RATIO = FORM_8960_LINE_4C_AMOUNT / FORM_8960_LINE_4A_AMOUNT _QUANTILE_NAMES = ("q05", "q25", "q50", "q75", "q95") _RESOURCE_NAME = "qbi_passive_passthrough_v1.json" @@ -180,9 +178,7 @@ def _farm_business_value(source: pd.DataFrame) -> np.ndarray: # subtracting its business share. Its subsequent X1136 allocation uses # those reduced copies, not the original balances. first_reduced = np.where(first_farm, first * (1.0 - business_fraction), first) - second_reduced = np.where( - second_farm, second * (1.0 - business_fraction), second - ) + second_reduced = np.where(second_farm, second * (1.0 - business_fraction), second) third_reduced = np.where(third_farm, third * (1.0 - business_fraction), third) other_mortgage = source["x1136"].to_numpy(dtype=np.float64) mortgage_total = first_reduced + second_reduced + third_reduced @@ -250,9 +246,7 @@ def build_scf_passive_passthrough_records(frame: pd.DataFrame) -> pd.DataFrame: raise ValueError("SCF X42001 must be positive for every implicate.") active = ( - source["x3103"].eq(1) - & source["x3104"].eq(1) - & source["x3105"].ge(1) + source["x3103"].eq(1) & source["x3104"].eq(1) & source["x3105"].ge(1) ).to_numpy() if not active.any(): raise ValueError("SCF frame contains no actively managed business households.") @@ -311,7 +305,9 @@ def weighted_inverse_cdf( or not np.isfinite(weight_array).all() or (weight_array <= 0.0).any() ): - raise ValueError("Weighted quantiles require finite values and positive weights.") + raise ValueError( + "Weighted quantiles require finite values and positive weights." + ) if ( not np.isfinite(probability_array).all() or (probability_array < 0.0).any() @@ -518,8 +514,7 @@ def build_qbi_passive_passthrough_resource( records = build_scf_passive_passthrough_records(frame) pooled_holders = records.loc[ - records["holds_nonactive_business"] - & records["positive_share_denominator"] + records["holds_nonactive_business"] & records["positive_share_denominator"] ] if pooled_holders.empty: raise ValueError("SCF records contain no eligible non-active business holders.") @@ -565,9 +560,7 @@ def build_qbi_passive_passthrough_resource( "source_counts": _counts(presence_sample), }, "conditional_share": { - "conditional_on": ( - "X3401 == 1 and ACTBUS + NONACTBUS > 0" - ), + "conditional_on": ("X3401 == 1 and ACTBUS + NONACTBUS > 0"), "requested_mean": _weighted_mean(eligible_holders), "requested_quantiles": _quantiles(eligible_holders), "selected_mean": _weighted_mean(share_sample), @@ -657,7 +650,9 @@ def _validate_counts(value: object, location: str) -> Mapping[str, Any]: number = _finite_number(counts.get(name), f"{location}.{name}") if number < 0.0: raise ValueError(f"{location}.{name} must be nonnegative.") - pooled = _finite_number(counts["pooled_record_count"], f"{location}.pooled_record_count") + pooled = _finite_number( + counts["pooled_record_count"], f"{location}.pooled_record_count" + ) effective = _finite_number( counts["implicate_adjusted_unweighted_n"], f"{location}.implicate_adjusted_unweighted_n", @@ -727,7 +722,9 @@ def validate_qbi_passive_passthrough_resource( presence = _require_mapping( cell.get("holding_prevalence"), f"cells[{index}].holding_prevalence" ) - _probability(presence.get("estimate"), f"cells[{index}].holding_prevalence.estimate") + _probability( + presence.get("estimate"), f"cells[{index}].holding_prevalence.estimate" + ) _probability( presence.get("requested_estimate"), f"cells[{index}].holding_prevalence.requested_estimate", @@ -817,7 +814,9 @@ def validate_qbi_passive_passthrough_resource( for line, (amount, returns_count) in expected_lines.items(): row = _require_mapping(form.get(line), f"external_anchor.form_8960.{line}") if _finite_number(row.get("amount"), f"{line}.amount") != amount: - raise ValueError(f"external_anchor.form_8960.{line}.amount is not reviewed.") + raise ValueError( + f"external_anchor.form_8960.{line}.amount is not reviewed." + ) if row.get("returns_count") != returns_count: raise ValueError( f"external_anchor.form_8960.{line}.returns_count is not reviewed." @@ -862,9 +861,7 @@ def load_qbi_passive_passthrough_resource( """Load and validate the packaged or explicitly supplied evidence JSON.""" resource_path = ( - default_qbi_passive_passthrough_resource_path() - if path is None - else Path(path) + default_qbi_passive_passthrough_resource_path() if path is None else Path(path) ) payload = json.loads(resource_path.read_text(encoding="utf-8")) validate_qbi_passive_passthrough_resource(payload) diff --git a/packages/microcosm-build/tests/test_reform_validation.py b/packages/microcosm-build/tests/test_reform_validation.py index de5445034..b94d4a17b 100644 --- a/packages/microcosm-build/tests/test_reform_validation.py +++ b/packages/microcosm-build/tests/test_reform_validation.py @@ -1073,14 +1073,12 @@ def test_state_reform_specs_shipped_config_loads(): ) # Federal rows score federal income tax against JCT/CBO published figures. assert all( - spec.budget_measure == "income_tax" - for spec in by_category["Federal reform"] + spec.budget_measure == "income_tax" for spec in by_category["Federal reform"] ) # Mechanical rows measure the reform's own spending variable, so the # benchmark is an exact external anchor (population x amount). assert all( - spec.jct_score_type == "mechanical" - for spec in by_category["Mechanical check"] + spec.jct_score_type == "mechanical" for spec in by_category["Mechanical check"] ) diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py index 7854bc672..5406a6a6e 100644 --- a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py @@ -135,9 +135,9 @@ def test_packaged_assumptions_are_strict_and_pin_evidence_digest( files("microcosm.build.us").joinpath(QBI_PASSIVE_EVIDENCE_RESOURCE).read_bytes() ) - assert assumptions["evidence"]["sha256"] == hashlib.sha256( - evidence_bytes - ).hexdigest() + assert ( + assumptions["evidence"]["sha256"] == hashlib.sha256(evidence_bytes).hexdigest() + ) assert assumptions["calibration"]["provisional_target"]["amount"] == ( PROVISIONAL_TARGET ) @@ -365,7 +365,9 @@ def test_frame_wrapper_preserves_all_existing_qbi_columns_byte_for_byte() -> Non assert passive.between(0.0, passthrough.clip(lower=0.0)).all() -def test_calibration_solver_hits_a_synthetic_target_and_rejects_impossible_one() -> None: +def test_calibration_solver_hits_a_synthetic_target_and_rejects_impossible_one() -> ( + None +): evidence = _constant_evidence(prevalence=0.5, shares=[0.5] * 6) passthrough = np.array([100.0, 200.0]) schedule_e = np.array([1.0, 1.0]) diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py index 0f958fec5..737825b48 100644 --- a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_evidence.py @@ -179,12 +179,14 @@ def test_pooled_implicates_and_independent_thin_cell_fallbacks() -> None: assert thin["holding_prevalence"]["estimate_level"] == "exact" assert thin["conditional_share"]["estimate_level"] == "all_income_bands" assert thin["conditional_share"]["source_income_band"] == "all" - assert thin["requested_counts"][ - "nonactive_holder_implicate_adjusted_unweighted_n" - ] == 1.0 - assert thin["conditional_share"]["selected_quantiles"] == payload["cells"][ - 2 - ]["conditional_share"]["selected_quantiles"] + assert ( + thin["requested_counts"]["nonactive_holder_implicate_adjusted_unweighted_n"] + == 1.0 + ) + assert ( + thin["conditional_share"]["selected_quantiles"] + == payload["cells"][2]["conditional_share"]["selected_quantiles"] + ) def test_holding_screener_retains_reported_zero_value_holders() -> None: @@ -196,8 +198,7 @@ def test_holding_screener_retains_reported_zero_value_holders() -> None: assert first["requested_counts"]["nonactive_holder_pooled_record_count"] == 150 first_band_holders = records.loc[ - records["income_band"].eq("nonpositive") - & records["holds_nonactive_business"] + records["income_band"].eq("nonpositive") & records["holds_nonactive_business"] ] assert first_band_holders["nonactive_business_value_share"].eq(0.0).sum() == 5 @@ -253,9 +254,7 @@ def test_schema_rejects_deprovisionalized_or_inconsistent_payload() -> None: validate_qbi_passive_passthrough_resource(broken) broken = deepcopy(payload) - broken["external_anchor"]["passive_passthrough_bounds"]["upper"][ - "amount" - ] = 1.0 + broken["external_anchor"]["passive_passthrough_bounds"]["upper"]["amount"] = 1.0 with pytest.raises(ValueError, match="upper bound"): validate_qbi_passive_passthrough_resource(broken) diff --git a/tools/build_us_qbi_passive_passthrough_assumptions.py b/tools/build_us_qbi_passive_passthrough_assumptions.py index ed91271fa..22a517f23 100644 --- a/tools/build_us_qbi_passive_passthrough_assumptions.py +++ b/tools/build_us_qbi_passive_passthrough_assumptions.py @@ -134,9 +134,7 @@ def read_replay_artifact( passthrough = person_values["partnership_s_corp_income"] schedule_e = ( - passthrough - + person_values["rental_income"] - + person_values["estate_income"] + passthrough + person_values["rental_income"] + person_values["estate_income"] ) metadata = { "filename": artifact_path.name, @@ -150,9 +148,7 @@ def read_replay_artifact( def build_assumptions(arguments: argparse.Namespace) -> dict[str, Any]: evidence_path = Path(arguments.evidence) evidence = load_qbi_passive_passthrough_resource(evidence_path) - passthrough, schedule_e, weights, artifact = read_replay_artifact( - arguments.puf_h5 - ) + passthrough, schedule_e, weights, artifact = read_replay_artifact(arguments.puf_h5) return build_qbi_passive_passthrough_assumptions_payload( evidence=evidence, evidence_sha256=_sha256(evidence_path), diff --git a/tools/build_us_qbi_passive_passthrough_evidence.py b/tools/build_us_qbi_passive_passthrough_evidence.py index 7fd250865..32f46d031 100644 --- a/tools/build_us_qbi_passive_passthrough_evidence.py +++ b/tools/build_us_qbi_passive_passthrough_evidence.py @@ -34,13 +34,9 @@ ) SCF_ARCHIVE_MEMBER = "p22i6.dta" -SCF_ARCHIVE_SHA256 = ( - "409e6811df895766d50b2f597c10b1b3c5813e7d3e0e45d910ad26c0cb07f4eb" -) +SCF_ARCHIVE_SHA256 = "409e6811df895766d50b2f597c10b1b3c5813e7d3e0e45d910ad26c0cb07f4eb" SCF_ARCHIVE_SIZE_BYTES = 8_856_125 -SCF_MEMBER_SHA256 = ( - "61e2fceb1594e4009eb996d6e25d38a5d8e4874930fc2bfce3c87ffa6946ad0a" -) +SCF_MEMBER_SHA256 = "61e2fceb1594e4009eb996d6e25d38a5d8e4874930fc2bfce3c87ffa6946ad0a" SCF_MEMBER_SIZE_BYTES = 236_952_250 REPRODUCTION_COMMAND = ( @@ -147,9 +143,7 @@ def read_scf_source( with extracted.open("wb") as destination: for chunk in iter(lambda: source_stream.read(1024 * 1024), b""): destination.write(chunk) - member_record = _input_record( - extracted, role="scf_2022_archive_member" - ) + member_record = _input_record(extracted, role="scf_2022_archive_member") member_record["container_filename"] = source.name if require_reviewed_bytes: _verify_pin( From a4d93f78bb178a918f5fca43975541ed472feb72 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 19 Aug 2026 13:33:13 -0400 Subject: [PATCH 12/23] docs: complete passive passthrough report --- FINAL_REPORT.md | 291 ++++++++++++++++++++++++++++++------------------ PROGRESS.md | 27 +++-- 2 files changed, 202 insertions(+), 116 deletions(-) diff --git a/FINAL_REPORT.md b/FINAL_REPORT.md index 74cdc96d4..59296eb9e 100644 --- a/FINAL_REPORT.md +++ b/FINAL_REPORT.md @@ -1,111 +1,186 @@ -# Final report: microcosm #462 register alignment - -## Outcome - -Completed the split-PR remediation on `loss-contract-alignment`, based on -`origin/main` at `7b6e10b`. The change is now register alignment only: one -shared critical-target register, one shared congressional-district classifier, -two consumers, builder contract-row gating, and behavioral containment of the -publish contract. - -The critical-row loss multiplier was removed entirely per -[microcosm#492](https://github.com/PolicyEngine/microcosm/issues/492). There is no -constant, CLI option, validation, loss overlay, telemetry, diagnostics/scorer -provenance, or historical replay pin left. `_fiscal_target_loss_weights` is -source-identical to `origin/main`, and its output therefore preserves main's -bit-level behavior for the same registry and family multipliers. - -## Sol round-1 findings - -1. **Table 1.4 selector parity:** removed the builder-only - `accepted_name_prefixes=("irs_soi.",)` constraint. The adapter now has - exactly the shared requirement's substring and suffix selectors. The - outside-prefix reproduction is builder-rejected. -2. **Congressional-district parity:** added exported, stdlib-only - `is_congressional_district_target(name, metadata)` and made the publisher - and builder classifiers thin wrappers. It ORs layout dimension, source-id - token, geography level, geography scope, truthy CD GEOID, and name token. - The builder's exact/semantic, Table 1.4, and zero-support paths now see the - same registry metadata. -3. **Recorded relative-error shape:** a matched row with missing/`None` - `relative_error` now fails with the publish-contract message instead of - silently passing after recomputation. Existing non-numeric and stale-value - checks remain. -4. **Behavioral anti-drift:** the load-bearing test now runs adversarial rows - through both consumers for exact-name, family+role, Table pattern, - missing/non-finite values, and a disallowed incumbent escape at the 0.25 - hard stop. A production Ledger compile supplies six separate CD evidence - rows; builder and publisher exclude identical six-name sets and counts. - Field comparisons remain as fast checks, and any added conjunctive prefix - is proven to trip the guard. - -The [#490](https://github.com/PolicyEngine/microcosm/issues/490) medical 0.25 -adjudication tolerance and its adjacent comment in `us_critical_targets.py` -remain byte-for-byte unchanged, as required. - -## Reproduction receipts - -The Table 1.4 prefix reproduction now returns: - -```text -SOI Table 1.4 national dollar fit failed: other.table_1_4.all.bad_amount@2024: relative_error=1 exceeds 0.25 for SOI Pub 1304 Table 1.4 national dollar rows (soi_table_1_4_national_dollar_rows); target=100.0, final_estimate=200.0. -``` - -The missing-relative-error reproduction now returns: - -```text -SOI Table 1.4 national dollar fit failed: irs_soi.ty2023.table_1_4.all.adversarial_amount@2024: missing recorded relative_error; the publish contract requires a numeric value. -``` - -The CD reproduction has the owner-mandated exclusion result: - -```text -builder_excluded=True -publisher_excluded=True -builder_failures=[] -``` - -Calling that row "rejected" would contradict the required OR-union exclusion -semantics. The two malformed critical rows are rejected; the CD row is -symmetrically excluded by both consumers. +# Final report: microcosm #722 passive pass-through NIIT input + +## Outcome and base + +Completed on `passive-pass-through-722`, based on +`origin/main@9c20c1d2`. + +I inspected the verified #530 chain through `qbi-v3-wiring` but did not stack +on it. Its tip diverges before the repository rename and still imports the +retired `popu` + `lace.*` namespace and uses the retired package layout. +Stacking it would have reintroduced stale names into the current +`microcosm.*` tree, so I ported only the required evidence, calibration, RNG, +and wiring concepts onto current main. + +The result emits `passive_partnership_s_corp_income` as a person-level subset +of positive partnership plus S-corporation income. It does not add that subset +to gross income because the parent income is already present there. + +## Evidence and SCF cells + +The new provisional, spec-only resource +`us/qbi_passive_passthrough_v1.json` is declared in +`country_package.json`. It pools the five SCF 2022 implicates with weight +`X42001 / 5`, defines active businesses from `X3103/X3104/X3105`, and uses +the SCFP `NONACTBUS` value components for holdings without an active +management role. Bands use Schedule-E income `X5714`. + +The prevalence denominator is households with an actively managed business. +All prevalence cells clear effective n = 30. Conditional-share cells use the +band estimate when holder effective n is at least 30; the three thin middle +bands use the pooled all-band holder cell (effective n 236.0; 1,180 pooled +records). + +| X5714 band | Active effective n | Non-active holding prevalence | Holder effective n | Selected non-active value share | Share cell | +|---|---:|---:|---:|---:|---| +| Nonpositive | 454.4 | 3.3493% | 63.0 | 60.2080% | Exact | +| $0–$25k | 102.6 | 4.1324% | 13.8 | 41.0605% | Pooled fallback | +| $25k–$100k | 121.2 | 6.4533% | 11.4 | 41.0605% | Pooled fallback | +| $100k–$250k | 82.6 | 9.6543% | 17.2 | 41.0605% | Pooled fallback | +| $250k–$1m | 117.2 | 21.2269% | 35.2 | 14.3741% | Exact | +| Over $1m | 229.0 | 38.9806% | 95.4 | 32.9077% | Exact | + +The administrative anchor is IRS Publication 4801, Form 8960, TY2023: + +- Line 4a: $1,185,607,258,000 across 4,988,033 returns. +- Line 4b: −$1,076,350,273,000 across 4,038,235 returns. +- Reported line 4c: $109,256,984,000 across 2,260,296 returns. +- Reported line 4c / line 4a survival ratio: 9.215276%. + +The published thousand-dollar rows differ by $1,000 when line 4a and line 4b +are recombined. The resource therefore preserves the independently reported +line 4c value rather than replacing it with derived arithmetic. + +No passive split exists in the checked entity-side partnership tables +23pa01/04/06/10/23 or IRS Table 1.4. Form 8960 line 4 is the only +administrative level available on disk, and the resource says so directly. + +## Assignment and calibration + +I implemented a version-1 sibling stage before QBI reconciliation rather than +`qbi_simulation_version=4`. Current main consumes 15 archived QBI leaves and +does not contain the old opt-in simulator, so a sibling preserves that contract +without advancing an old stream. The stage order is Schedule-D completion, +passive assignment, then QBI reconciliation. + +The pure assignment uses a new PCG64 seed family with entropy 4722 and separate +presence/share children. It draws full-length arrays before support masks. Its +Schedule-E proxy is: + +`partnership_income + s_corp_income + rental_income + estate_income`. + +The array API accepts a v3 latent entity form when available and uses it only +to route partnership/S-corporation eligibility. The current main frame has no +such latent field. SCF probabilities and shares remain band-only because SCF +active and non-active businesses are not entity-linked. + +The assumptions-build step solved and persisted one shift; runtime performs no +calibration and never reads the restricted artifact: + +| Calibration quantity | Result | +|---|---:| +| Lower bound | $0 | +| Upper bound | $109,256,984,000 | +| Provisional midpoint target | $54,628,492,000 | +| Persisted log-odds shift | −1.157105426398319 | +| Expected weighted aggregate | $54,628,491,999.999985 | +| Seed-0 replay aggregate | $55,021,131,518.061035 | +| Replay error versus target | +$392,639,518.061035 (+0.718745%) | +| Positive assigned rows | 6,207 | + +The achieved replay is inside the required ±5% tolerance and inside the +documented $0–$109.257 billion bounds. + +The pinned replay artifact is 241,045,964 bytes with SHA-256 +`8182579ddfecaf5e5b872e2307b88f03e8e8def993171b648f701a19a847f37b`. +It contains 484,015 persons and 207,692 tax units; 83,820 rows have positive +partnership/S-corporation income, whose weighted aggregate is +$1,632,692,702,130.5078. + +## Wiring and diagnostics + +The column is wired through multispine, direct PUF-support, fiscal-refresh, +operator ownership, L0 export, release coverage, and checkpoint identities. +Existing assigned values survive fiscal rebuilds; legacy inputs missing the +column are assigned once. The 997-row remaining-stage manifest now has SHA-256 +`4ec692e3262f396ebacd6144c900b31ef2ae3eabc1062f38e6db6d3ab6f433fa`. + +The #535 standing surface now contains two distinct, provisional, +diagnostics-only, non-gating rows with per-row error containment: + +- `net_investment_income` versus Form 8960 line 12: + $1,197,238,417,000. +- `passive_partnership_s_corp_income` versus reported line 4c as an upper + bound: $0–$109,256,984,000. + +The locked PolicyEngine-US 1.764.6 predates PR #9306. An exact temporary +engine-registry exception permits the new emitted input while that lock is in +place and becomes a no-op once the engine recognizes it. + +## Open questions and explicit limitations + +- Form 8960 line 4c combines rental, royalty, partnership, S-corporation, + trust, and other flow-through income. There is no source-backed rental versus + passive-pass-through decomposition. The lower bound assumes all line 4c is + rental/royalty; the upper bound assumes all is passive pass-through; the + midpoint is deliberately provisional. +- The engine includes `rental_income` in NIIT in full, while Schedule-E + rental is frequently passive. Rental handling is unchanged here. The overlap + must be resolved before promoting the calibration target. +- The passive leaf is a subset of an existing gross-income parent, not a new + gross-income leg. The change affects only NIIT source routing once the engine + update lands. +- TY2023 administrative anchors are applied to the pinned 2024-shaped replay + without a population-vintage backcast. Line 12 also differs from the modeled + surface in deductions/modifications and estate/trust-return coverage. +- Exact historical v1/v2/v3 seeded simulator goldens could not be executed: + that simulator and its tests are absent from current main, and stacking the + stale branches would violate the rename decision above. The available + replacement test proves the independent passive family does not call or + advance old streams and preserves all 15 current archived QBI leaves + byte-for-byte under multiple passive seeds. This is not a claim that the + absent historical golden suite was run. +- Current main exposes no v3 latent entity form to the frame wrapper. The pure + API's latent-form routing is covered synthetically; live assignment therefore + uses the SCF Schedule-E-band cells. +- Until PolicyEngine-US #9306 is present in the lock, the emitted column cannot + change live NIIT calculations. The diagnostic remains contained and + non-gating under the old engine. ## Verification -The requested suite ran with `UV_NO_SYNC=1` to use the already-synced workspace -environment in the network-restricted sandbox: - -```text -uv run --package microcosm-build --extra us --group dev python -m pytest packages/microcosm-data/tests packages/microcosm-build/tests/test_us_fiscal_refresh_builder.py packages/microcosm-build/tests/test_us_state_files_scorer.py -q -264 passed, 3 skipped (267 collected) -``` - -Additional receipts: - -- Complete `test_gates.py`: passed. -- Required multiplier grep: zero Python hits. -- Ruff check: clean on all ten touched Python files. -- Ruff format check: clean on the eight non-exempt touched Python files; the - two historical experiment files were not reformatted, as instructed. -- `git diff --check`: clean. -- The medical adjudication block compares byte-for-byte equal to pre-fix - commit `068854d`. -- Pytest emitted non-failing macOS temporary-directory cleanup warnings; no - test failed. - -## Remediation commits - -- `5077f95` — start microcosm#462 Sol remediation progress. -- `c48ba37` — remove the microcosm#462 loss multiplier per microcosm#492. -- `afa910a` — fix Sol finding 1 selector parity. -- `89f74f4` — fix Sol finding 2 CD classifier parity. -- `77040fb` — fix Sol finding 3 relative-error shape. -- `bad7145` — fix Sol finding 4 behavioral containment. -- `3c96514` — apply the finding-2 classifier's required Ruff formatting. - -Nothing was pushed at the time of this report; the branch was subsequently -pushed and merged as #491 (2026-07-22). - -The sandbox rejected writing -`/Users/maxghenis/PolicyEngine/_reviews/sol-491-fix-out.md` with `Operation not -permitted`; the full completion report is therefore committed here and will be -printed to stdout as the requested fallback. +All commands ran offline with the existing synced environment. + +- Full workspace, exact final code tree: `6,394 passed, 73 skipped` in + 42m45s; exit code 0. Pytest reported 1,890 non-failing warnings. +- Restricted replay with the specified `POPULACE_PUF_2024_H5` artifact: + `12 passed`. +- Evidence, passive assignment, and reform diagnostics focused set: + `64 passed, 1 expected gated skip`. +- Spec-only country-package, executable-entrypoint, and ordinary incumbent + guard set: `51 passed`. +- Repository-wide `uv run ruff check .`: clean. +- All 26 changed Python files: Ruff format check clean. +- `git diff --check origin/main...HEAD`: clean. +- Manual incumbent package-name sweep over every changed Python, TOML, + Markdown, and JSON file: no hits. This was run explicitly because the + ordinary guard skips paths under `.claude/`. +- Deterministic resource regeneration, strict content hashes, checkpoint + identities, release ownership/coverage, replay tolerance, and QBI + byte-preservation contracts pass. + +The towncrier fragment is `changelog.d/722-passive-pass-through.added.md`. +No network access, push, or pull request was used. + +## Commits + +- `ce08745a` — start the progress journal. +- `d1830f00` — record the sibling-stage design. +- `bb390fac` — add SCF/Form 8960 evidence. +- `5dc6a874` — add assignment, assumptions, calibration, and tests. +- `365c7428` — record calibrated replay progress. +- `3eb1c2e6` — add Form 8960 diagnostics. +- `d671b80e` — wire assignment through build surfaces. +- `218b6cb9` — clarify provisional contracts. +- `0842acef` and `3f6ecc73` — update stage-order/sparse fixtures. +- `cc7fe11f` — format branch-owned passive files. diff --git a/PROGRESS.md b/PROGRESS.md index 7c58a2a05..1b130b480 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,11 +2,11 @@ ## State -Implementation is in progress on `passive-pass-through-722`, based on -`origin/main` at `9c20c1d2`. The verified #530 QBI branch chain was inspected -and is not used as a base because its tip still has the retired pre-rename -namespace and package layout. Only the required QBI v3 concepts will be -ported into the current `microcosm.*` tree. +Implementation and offline verification are complete on +`passive-pass-through-722`, based on `origin/main` at `9c20c1d2`. The +verified #530 QBI branch chain was inspected and was not used as a base because +its tip still has the retired pre-rename namespace and package layout. Only the +required QBI v3 concepts were ported into the current `microcosm.*` tree. ## Done @@ -51,9 +51,20 @@ ported into the current `microcosm.*` tree. - Added separate, diagnostics-only Form 8960 line 12 and line 4c aggregate rows. They cannot affect the release gate and retain row-local error containment under the currently locked pre-#9306 engine. +- Completed the exact final-tree workspace suite: 6,394 passed and 73 skipped + in 42m45s. The restricted artifact replay separately passed all 12 tests. +- Completed repository-wide `ruff check .`, changed-file Ruff format checks, + `git diff --check`, the spec-only/entrypoint guards, and a manual incumbent + package-name sweep over the branch diff. The manual sweep is required because + the ordinary tree guard deliberately excludes `.claude/` worktrees. +- Added and committed the towncrier fragment and wrote the completion report + to `FINAL_REPORT.md`. ## Next -- Run the full workspace tests, lint, manual incumbent sweep, and worktree - guard sanity check. -- Write and commit the final report. +- No in-scope work remains for #722. +- After PolicyEngine-US #9306 is present in the locked engine, remove the exact + temporary registry exception and rerun the live NIIT diagnostics. +- Resolve the Form 8960 line 4c rental/royalty versus passive pass-through + decomposition before replacing the provisional midpoint with a promoted + administrative target. From 2b1d15477aebe5e43a95a85dd7e64f92a5ec1ce9 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 21 Aug 2026 06:40:19 -0400 Subject: [PATCH 13/23] docs: reopen passive review progress --- PROGRESS.md | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 1b130b480..84b171924 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,14 +2,33 @@ ## State -Implementation and offline verification are complete on -`passive-pass-through-722`, based on `origin/main` at `9c20c1d2`. The -verified #530 QBI branch chain was inspected and was not used as a base because -its tip still has the retired pre-rename namespace and package layout. Only the -required QBI v3 concepts were ported into the current `microcosm.*` tree. +Dual-review remediation is in progress on `passive-pass-through-722` as of +2026-08-21. The branch starts this pass at `a4d93f78`; the already-fetched +`origin/main` is `2c7a7218`. The supervisor-approved detached conflict +resolution worktree merged the immediately preceding main commit `61869aa5`, +so its three approved resolutions will be carried into the real merge of the +current `origin/main`. Work remains offline: no fetch, push, PR mutation, +publication, or promotion is in scope. + +An unstaged `uv.lock` refresh pre-dated this remediation pass. It is preserved +for reconciliation with the post-merge `uv sync` result rather than discarded +or folded into an unrelated commit. ## Done +- Read the binding adversarial verdict before inspecting or changing the + branch. +- Re-read `CLAUDE.md` and confirmed the PR-CI/certification and root-journal + contracts for this remediation pass. +- Attempted the GitNexus debugging workflow; no GitNexus query/context tools + are configured in this session, so direct source and call-path analysis is + the documented fallback. +- Confirmed the branch, detached pre-approved merge worktree, merge base, and + current `origin/main` identities without network access. +- The implementation and verification bullets below describe the historical + pre-review checkpoint at `a4d93f78`; the verdict supersedes its former + completion claim. + - Read `CLAUDE.md` and established the PR-CI/certification and journal contracts. - Confirmed the primary checkout has unrelated untracked paths and left it @@ -62,9 +81,19 @@ required QBI v3 concepts were ported into the current `microcosm.*` tree. ## Next -- No in-scope work remains for #722. -- After PolicyEngine-US #9306 is present in the locked engine, remove the exact - temporary registry exception and rerun the live NIIT diagnostics. -- Resolve the Form 8960 line 4c rental/royalty versus passive pass-through - decomposition before replacing the provisional midpoint with a promoted - administrative target. +- Commit this remediation baseline journal. +- Merge the current `origin/main` as a real merge commit, adopt the approved + conflict resolutions, and measure the single post-merge runtime graph count. +- Declare the three legacy JSON resources on main's typed file-closure surface, + regenerate the US bundle and engine lock, and sync all packages/extras. +- Replace the vacuous preservation proxy with a nonzero-realization regression + that executes the current-main QBI pipeline and byte-compares every incumbent + QBI column before and after the passive stage. +- Fail the release-input gate when a required manifest variable is absent from + the locked engine registry; cover both absent-variable and all-zero-required + failure modes and document the 1.764.6/#9306 engine-inert boundary honestly. +- Make restricted certification independently re-solve and compare the + calibration shift. +- Run targeted and full workspace tests with the prescribed restricted-data + environment, run Ruff, commit regenerated artifacts, and write the final + report to `FINAL_REPORT.md`. From 43ac64a5cc8431be9ec2a1cfdb9e98a747d517d3 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 21 Aug 2026 07:41:48 -0400 Subject: [PATCH 14/23] fix(us): refresh passive spec-engine contract --- PROGRESS.md | 33 +- docs/evidence/spec-engine/us-f0-coverage.json | 44 ++- .../build/spec_engine/field_usage.py | 18 +- .../build/spec_engine/inventory_coverage.py | 5 +- .../spec_engine/schema/spine.schema.json | 64 ++++ .../stacked_authority_semantics.py | 10 + .../microcosm/build/us/country_package.json | 358 +++++++++--------- .../microcosm/build/us/engine_abi.lock.json | 2 +- .../src/microcosm/build/us/spec/spine.yaml | 23 ++ .../tests/test_spec_engine_coverage_tool.py | 16 +- .../tests/test_spec_engine_field_usage.py | 16 +- .../test_spec_engine_identity_contracts.py | 6 + .../test_spec_engine_inventory_coverage.py | 2 +- .../tests/test_us_multispine_pool_tool.py | 4 +- tools/generate_us_bundle_from_constants.py | 3 + tools/spec_engine_coverage.py | 2 +- .../identity_contracts.py | 6 + 17 files changed, 370 insertions(+), 242 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 52408b888..17de647a9 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -4,13 +4,11 @@ Dual-review remediation is in progress on `passive-pass-through-722` as of 2026-08-21. The real merge of already-fetched `origin/main` at `2c7a7218` is -resolved and ready to commit, with the supervisor-approved resolutions from -the detached `61869aa5` merge reproduced exactly. Work remains offline: no -fetch, push, PR mutation, publication, or promotion is in scope. - -An unstaged `uv.lock` refresh pre-dated this remediation pass. It is preserved -for reconciliation with the post-merge `uv sync` result rather than discarded -or folded into an unrelated commit. +committed as `d9f19c66`, with the supervisor-approved resolutions reproduced +exactly. The post-merge resource closure and first-class typed passive contract +are regenerated and their fail-closed coverage ledger is verified. Work +remains offline: no fetch, push, PR mutation, publication, or promotion is in +scope. ## Done @@ -35,6 +33,24 @@ or folded into an unrelated commit. `tools/generate_us_bundle_from_constants.py::LEGACY_RESOURCE_PATHS`; the loader's `_assert_file_closure` compares that emitted manifest with package files. +- Committed the real merge of current `origin/main` as `d9f19c66`; its second + parent is `2c7a7218` and it is not a rebase or squash. +- Declared the three passive/repeal JSON resources on + `LEGACY_RESOURCE_PATHS`, completed the full generator run, and ran the exact + offline `uv sync --all-packages --all-extras` equivalent against the locked + environment. +- Traced the remaining constants-adapter failure to the passive contract being + present only as generated pool code. Added it to the typed pipeline schema, + compiler identity contract, and stacked-authority projection, then regenerated + the bundle at spec SHA-256 + `11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0`. +- Independently reviewed the changed field-usage claims: 62 new pointers total + (29 authored, 33 resolved), all accounted for by the three typed manifest + rows and the typed passive pipeline/pool-code contract. +- Regenerated the F0 evidence report with exact 41,442/41,442 field coverage + and 40/40 inventory checks. The targeted adapter, schema/identity, + field-ledger, inventory, and coverage suite passes 45 tests; the US generator + check and targeted Ruff checks are also clean. - The implementation and verification bullets below describe the historical pre-review checkpoint at `a4d93f78`; the verdict supersedes its former completion claim. @@ -91,9 +107,6 @@ or folded into an unrelated commit. ## Next -- Commit the resolved real merge of current `origin/main`. -- Declare the three legacy JSON resources on main's typed file-closure surface, - regenerate the US bundle and engine lock, and sync all packages/extras. - Replace the vacuous preservation proxy with a nonzero-realization regression that executes the current-main QBI pipeline and byte-compares every incumbent QBI column before and after the passive stage. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index 7dde306af..3fea56ff9 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -6,7 +6,7 @@ "country": "us", "documentation_sha256": "aed5b95645a5c605671e374ed2a9d511c7fd9dc29c63760c32a205d9f2db9491", "field_usage": { - "authored_normative_field_count": 32161, + "authored_normative_field_count": 32190, "claim_count": 47, "claims": [ { @@ -16,8 +16,8 @@ "legacy_sinks": [], "mode": "front_end_validation", "pointer_class": "all", - "pointer_count": 98, - "pointer_sha256": "cbbda6d2d245f04325c0b5a7b986cb71d24d6e3c81a7a3af1544de7f75be2a1f", + "pointer_count": 107, + "pointer_sha256": "2c2099d3d5ef3d664f74a2e732870391022a852cf49d5cf96810c9a984d2b20b", "rationale": null, "relative_sink_prefix": null, "source_prefix": "/authored/country_package.json", @@ -498,8 +498,8 @@ ], "mode": "legacy_behavior", "pointer_class": "all", - "pointer_count": 88, - "pointer_sha256": "c6e63034c73b2b3ad06df26d03fbf7d63d52aec3a7c3a176b228bacf08d18975", + "pointer_count": 108, + "pointer_sha256": "2598e73f840ef4b3172e06535ed6eeaf8bbdb2eaf571eb4bf265a6c461b7b50b", "rationale": null, "relative_sink_prefix": null, "source_prefix": "/authored/spec~1spine.yaml/pipeline_contract", @@ -690,8 +690,8 @@ ], "mode": "legacy_behavior", "pointer_class": "all", - "pointer_count": 8060, - "pointer_sha256": "eaa9eb5f5d4d4e4e4da624f50aeafe2a085a60dcaac0673d4b1946760f0fde35", + "pointer_count": 8093, + "pointer_sha256": "a5ab579d6a4aeac2f1b2f761f7b12beb2f96af2e47d18086cde3cfe51bff23e1", "rationale": null, "relative_sink_prefix": null, "source_prefix": "/resolved/generated_authorities", @@ -740,21 +740,21 @@ "verifier": "vintages" } ], - "configuration_field_count": 41380, - "consumed_field_count": 41380, + "configuration_field_count": 41442, + "consumed_field_count": 41442, "generation0_effect_counts": { - "legacy_behavior": 37718, - "no_generation0_effect": 3662 + "legacy_behavior": 37771, + "no_generation0_effect": 3671 }, "mode_counts": { "compiler_semantic": 27661, - "front_end_validation": 346, + "front_end_validation": 355, "identity_only": 128, - "legacy_behavior": 13245 + "legacy_behavior": 13298 }, "multiple_primary_use_field_count": 0, - "pointer_inventory_sha256": "b63ffc9bf7cb2fb8ac17e314f64c7b661aba14512071c1a697e5f6ff9ebc74c5", - "resolved_binding_field_count": 9219, + "pointer_inventory_sha256": "80dc21af804cc03e26a1d6d0fe56d1fe40b1b3e629a4f8d39787da7c2f1faf34", + "resolved_binding_field_count": 9252, "unused_field_count": 0 }, "inventory_coverage": { @@ -790,7 +790,7 @@ "source_operators": 16, "source_stages": 37, "stacked_checkpoint_full_components": 12, - "stacked_checkpoint_pool_code_components": 19, + "stacked_checkpoint_pool_code_components": 20, "stacked_checkpoint_static_components": 9, "tail_control_fields": 934, "take_up_pipeline_steps": 24, @@ -1852,7 +1852,7 @@ "alpha", "zeta" ], - "sha256": "2972db18e0f69ac4df4079916355a1bcd9ec5c12f3e19d5650fc47b5a8a0e3e8" + "sha256": "e94262a879001082093c20af72a04bc7458149c1b751855f6826b9767a502eb3" }, "failures": [], "observed": { @@ -1875,7 +1875,7 @@ "alpha", "zeta" ], - "sha256": "2972db18e0f69ac4df4079916355a1bcd9ec5c12f3e19d5650fc47b5a8a0e3e8" + "sha256": "e94262a879001082093c20af72a04bc7458149c1b751855f6826b9767a502eb3" }, "status": "covered" }, @@ -1913,6 +1913,7 @@ "remaining_stage_input_manifest", "simulation_household_batch_size", "take_up_contract", + "us_qbi_passive_passthrough_contract", "us_qbi_reconciliation_contract" ] }, @@ -1937,9 +1938,10 @@ "remaining_stage_input_manifest", "simulation_household_batch_size", "take_up_contract", + "us_qbi_passive_passthrough_contract", "us_qbi_reconciliation_contract" ], - "sha256": "8df3775167f89e79b44cc3606b52b54d488edaee8fc34dd757163dd8b6510fa7" + "sha256": "a2b7b3cb27d79e4270f585c3b23cd6fea67c5c579f1d31b692bbb2690a87d9ba" }, "status": "covered" }, @@ -2438,7 +2440,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "6e9dce8f0fd3e3f0101103a14d6a08ac8527b90b82d48fa8bad2c4cc70dbdfde" + "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0" } }, "report_schema_version": 3, @@ -2448,7 +2450,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "6e9dce8f0fd3e3f0101103a14d6a08ac8527b90b82d48fa8bad2c4cc70dbdfde" + "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/field_usage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/field_usage.py index 6c3c60ae2..03ef38614 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/field_usage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/field_usage.py @@ -26,9 +26,9 @@ ) from .schemas import load_schema_registry -EXPECTED_AUTHORED_FIELD_COUNT = 32_161 -EXPECTED_RESOLVED_BINDING_FIELD_COUNT = 9_219 -EXPECTED_CONFIGURATION_FIELD_COUNT = 41_380 +EXPECTED_AUTHORED_FIELD_COUNT = 32_190 +EXPECTED_RESOLVED_BINDING_FIELD_COUNT = 9_252 +EXPECTED_CONFIGURATION_FIELD_COUNT = 41_442 class FieldUsageError(AssertionError): @@ -325,12 +325,12 @@ def _path_inventory(rows: Sequence[tuple[str, object]]) -> tuple[int, str]: "64182b6be1ea6d95bff345b30a2aa046b6fa7e8ee61a282b225dfa49c28fbfdc", ), "country_manifest": ( - 98, - "cbbda6d2d245f04325c0b5a7b986cb71d24d6e3c81a7a3af1544de7f75be2a1f", + 107, + "2c2099d3d5ef3d664f74a2e732870391022a852cf49d5cf96810c9a984d2b20b", ), "generated_authorities": ( - 8_060, - "eaa9eb5f5d4d4e4e4da624f50aeafe2a085a60dcaac0673d4b1946760f0fde35", + 8_093, + "a5ab579d6a4aeac2f1b2f761f7b12beb2f96af2e47d18086cde3cfe51bff23e1", ), "geography": ( 26, @@ -449,8 +449,8 @@ def _path_inventory(rows: Sequence[tuple[str, object]]) -> tuple[int, str]: "cf0000464013118955571dac2691d4cc1b900c97c6570349b489678cdf937649", ), "spine_pipeline_contract": ( - 88, - "c6e63034c73b2b3ad06df26d03fbf7d63d52aec3a7c3a176b228bacf08d18975", + 108, + "2598e73f840ef4b3172e06535ed6eeaf8bbdb2eaf571eb4bf265a6c461b7b50b", ), "spine_sampling": ( 17, diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index 9bf9ea502..049d9afc0 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -89,6 +89,7 @@ "remaining_stage_input_manifest", "simulation_household_batch_size", "take_up_contract", + "us_qbi_passive_passthrough_contract", "us_qbi_reconciliation_contract", } ) @@ -332,7 +333,7 @@ "acs_person_predictors": "878c788a6f037d7aca12b3586ea034eff04f3034ffa11935a736493042551f25", "authority": "f0b676f6508dbf6bb2b787c42e6b85331bacc57c6649ac7ad15fdaa5884a1b2d", "early_families": "e26a90e2b5c16e23e7c17424d1c2e4ab18ed66b1d0e129248e87c0bab9b3fd5d", - "full_checkpoint": "2972db18e0f69ac4df4079916355a1bcd9ec5c12f3e19d5650fc47b5a8a0e3e8", + "full_checkpoint": "e94262a879001082093c20af72a04bc7458149c1b751855f6826b9767a502eb3", "gap_fill_schedule": "96aefe2853de91ae95f50bc2ccc2c1dd94802c27f21c643981152bbcb13c4e10", "graph_nodes": "a83363de26cad0144b5a98b36b4bca49542e37a7b9fee3d7e541f692deeff864", "late_families": "a160432fc12a85df20ba7fd6687673b3c31786df7a983e2477604ab923b26d18", @@ -421,7 +422,7 @@ "source_operators": 16, "source_stages": 37, "stacked_checkpoint_full_components": 12, - "stacked_checkpoint_pool_code_components": 19, + "stacked_checkpoint_pool_code_components": 20, "stacked_checkpoint_static_components": 9, "tail_control_fields": 934, "take_up_pipeline_steps": 24, diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/spine.schema.json b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/spine.schema.json index f84467d8d..ff884dbf2 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/spine.schema.json +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/spine.schema.json @@ -270,6 +270,7 @@ "post_clone_source_operator_order", "derive_operator_order", "auxiliary_operations", + "qbi_passive_passthrough", "qbi_reconciliation", "simulation_household_batch_size" ], @@ -303,6 +304,9 @@ "x-canonical-order": "set", "items": {"$ref": "#/$defs/operator_id"} }, + "qbi_passive_passthrough": { + "$ref": "#/$defs/qbi_passive_passthrough_contract" + }, "qbi_reconciliation": {"$ref": "#/$defs/qbi_reconciliation_contract"}, "simulation_household_batch_size": { "type": "object", @@ -334,6 +338,66 @@ "type": "string", "pattern": "^_?[a-z][a-z0-9_]*$" }, + "qbi_passive_passthrough_contract": { + "type": "object", + "additionalProperties": false, + "required": [ + "version", + "assignment_stage_version", + "output_column", + "person_input_columns", + "evidence_resource", + "evidence_sha256", + "assumptions_resource", + "assumptions_sha256", + "log_odds_shift", + "random_streams", + "sha256" + ], + "properties": { + "version": {"const": 1}, + "assignment_stage_version": {"const": 1}, + "output_column": {"const": "passive_partnership_s_corp_income"}, + "person_input_columns": { + "type": "array", + "prefixItems": [ + {"const": "partnership_income"}, + {"const": "s_corp_income"}, + {"const": "rental_income"}, + {"const": "estate_income"} + ], + "items": false + }, + "evidence_resource": {"const": "qbi_passive_passthrough_v1.json"}, + "evidence_sha256": {"$ref": "defs.schema.json#/$defs/sha256"}, + "assumptions_resource": { + "const": "qbi_passive_passthrough_assumptions_v1.json" + }, + "assumptions_sha256": {"$ref": "defs.schema.json#/$defs/sha256"}, + "log_odds_shift": {"type": "number"}, + "random_streams": { + "type": "object", + "additionalProperties": false, + "required": [ + "bit_generator", + "draw_policy", + "family_entropy", + "presence_family", + "root_seed_default", + "share_family" + ], + "properties": { + "bit_generator": {"const": "PCG64"}, + "draw_policy": {"const": "full_length_before_support_masks"}, + "family_entropy": {"const": 4722}, + "presence_family": {"const": 0}, + "root_seed_default": {"const": 0}, + "share_family": {"const": 1} + } + }, + "sha256": {"$ref": "defs.schema.json#/$defs/sha256"} + } + }, "qbi_reconciliation_contract": { "type": "object", "additionalProperties": false, diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/stacked_authority_semantics.py b/packages/microcosm-build/src/microcosm/build/spec_engine/stacked_authority_semantics.py index 74e65e2a1..0d78f8b48 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/stacked_authority_semantics.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/stacked_authority_semantics.py @@ -1095,6 +1095,16 @@ def project_stacked_checkpoint_base_identity( "acs_pums_earnings_universe_contract": _acs_earnings_contract( domains["imputation"] ), + "us_qbi_passive_passthrough_contract": deepcopy( + dict( + _mapping( + pipeline.get("qbi_passive_passthrough"), + location=( + "spine/pipeline_contract/qbi_passive_passthrough" + ), + ) + ) + ), "us_qbi_reconciliation_contract": deepcopy( dict( _mapping( diff --git a/packages/microcosm-build/src/microcosm/build/us/country_package.json b/packages/microcosm-build/src/microcosm/build/us/country_package.json index 517c49ba3..426b7779d 100644 --- a/packages/microcosm-build/src/microcosm/build/us/country_package.json +++ b/packages/microcosm-build/src/microcosm/build/us/country_package.json @@ -1,181 +1,181 @@ { - "schema_version": 1, - "country": "us", - "resources": [ - { - "path": "spec/battery.yaml", - "kind": "battery", - "schema_id": "battery.schema.json" - }, - { - "path": "spec/bundle.yaml", - "kind": "bundle", - "schema_id": "bundle.schema.json" - }, - { - "path": "spec/calibration.yaml", - "kind": "calibration", - "schema_id": "calibration.schema.json" - }, - { - "path": "spec/catalogs.yaml", - "kind": "catalogs", - "schema_id": "catalogs.schema.json" - }, - { - "path": "spec/geography.yaml", - "kind": "geography", - "schema_id": "geography.schema.json" - }, - { - "path": "spec/imputation.yaml", - "kind": "imputation", - "schema_id": "imputation.schema.json" - }, - { - "path": "spec/publication.yaml", - "kind": "publication", - "schema_id": "publication.schema.json" - }, - { - "path": "spec/selection.yaml", - "kind": "selection", - "schema_id": "selection.schema.json" - }, - { - "path": "spec/sources.yaml", - "kind": "sources", - "schema_id": "sources.schema.json" - }, - { - "path": "spec/spine.yaml", - "kind": "spine", - "schema_id": "spine.schema.json" - }, - { - "path": "spec/take_up.yaml", - "kind": "take_up", - "schema_id": "take_up.schema.json" - }, - { - "path": "spec/vintages.yaml", - "kind": "vintages", - "schema_id": "vintages.schema.json" - }, - { - "path": "ecps_parity_known_gaps.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "ecps_parity_reference.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "federal_eitc_by_state.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "fiscal_target_references.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "obbba_reforms.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "puf_aggregate_record_disaggregation.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "release_input_coverage_manifest.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "soca_capital_gain_distribution_shares.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "soi_baseline_levels.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "soi_table_2_1_interest_components_ty2015.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "source_stages.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "state_program_levels.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "state_program_reforms.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "state_reforms.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "state_spm_poverty_levels.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "support_spine.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "take_up_contract.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "target_parity_feed_families.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "target_parity_manifest.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "tax_expenditure_reforms.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "qbi_passive_passthrough_assumptions_v1.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "qbi_passive_passthrough_v1.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - }, - { - "path": "repeal_revenue_benchmarks.json", - "kind": "legacy_json", - "schema_id": "legacy_json" - } - ] + "schema_version": 1, + "country": "us", + "resources": [ + { + "path": "spec/battery.yaml", + "kind": "battery", + "schema_id": "battery.schema.json" + }, + { + "path": "spec/bundle.yaml", + "kind": "bundle", + "schema_id": "bundle.schema.json" + }, + { + "path": "spec/calibration.yaml", + "kind": "calibration", + "schema_id": "calibration.schema.json" + }, + { + "path": "spec/catalogs.yaml", + "kind": "catalogs", + "schema_id": "catalogs.schema.json" + }, + { + "path": "spec/geography.yaml", + "kind": "geography", + "schema_id": "geography.schema.json" + }, + { + "path": "spec/imputation.yaml", + "kind": "imputation", + "schema_id": "imputation.schema.json" + }, + { + "path": "spec/publication.yaml", + "kind": "publication", + "schema_id": "publication.schema.json" + }, + { + "path": "spec/selection.yaml", + "kind": "selection", + "schema_id": "selection.schema.json" + }, + { + "path": "spec/sources.yaml", + "kind": "sources", + "schema_id": "sources.schema.json" + }, + { + "path": "spec/spine.yaml", + "kind": "spine", + "schema_id": "spine.schema.json" + }, + { + "path": "spec/take_up.yaml", + "kind": "take_up", + "schema_id": "take_up.schema.json" + }, + { + "path": "spec/vintages.yaml", + "kind": "vintages", + "schema_id": "vintages.schema.json" + }, + { + "path": "ecps_parity_known_gaps.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "ecps_parity_reference.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "federal_eitc_by_state.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "fiscal_target_references.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "obbba_reforms.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "puf_aggregate_record_disaggregation.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "qbi_passive_passthrough_assumptions_v1.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "qbi_passive_passthrough_v1.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "release_input_coverage_manifest.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "repeal_revenue_benchmarks.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "soca_capital_gain_distribution_shares.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "soi_baseline_levels.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "soi_table_2_1_interest_components_ty2015.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "source_stages.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "state_program_levels.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "state_program_reforms.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "state_reforms.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "state_spm_poverty_levels.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "support_spine.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "take_up_contract.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "target_parity_feed_families.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "target_parity_manifest.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, + { + "path": "tax_expenditure_reforms.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + } + ] } diff --git a/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json b/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json index 9a38d4e46..0859ae56c 100644 --- a/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json +++ b/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json @@ -1 +1 @@ -{"engine":{"package":"policyengine-us","version":"1.764.6"},"programs":{"aca":{"consumers":["assigned_aca_ptc","person_receives_aca","selected_marketplace_plan_actuarial_value","selected_marketplace_plan_premium_proxy"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_aca_if_eligible"},"basic_health_program":{"consumers":["basic_health_program_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_basic_health_program_if_eligible"},"chip":{"consumers":["chip_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_chip_if_eligible"},"dc_ptc":{"consumers":["dc_ptc"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_dc_ptc"},"early_head_start":{"consumers":["early_head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_early_head_start_if_eligible"},"eitc":{"consumers":["dc_eitc_without_qualifying_child","eitc","nj_eitc","ok_federal_eitc","wa_working_families_tax_credit","wa_working_families_tax_credit_age_expansion_eligible"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_eitc"},"head_start":{"consumers":["head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_head_start_if_eligible"},"housing_assistance":{"consumers":["housing_assistance"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_housing_assistance_if_eligible"},"medicaid":{"consumers":["medicaid_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicaid_if_eligible"},"medicare":{"consumers":["medicare_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicare_if_eligible"},"snap":{"consumers":["snap"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_snap_if_eligible"},"ssi":{"consumers":["ssi"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_ssi_if_eligible"},"tanf":{"consumers":["tanf"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_tanf_if_eligible"}},"remaining_stage_input_manifest":{"receipt":{"consumer_counts":{"PolicyEngineUSEngine.materialize":12,"_complete_schedule_d_input":5,"_simulation_projection":863,"prepare_stacked_tail_derivation":2,"seed_multispine_pool_inputs":13,"ssi_static_dependency_closure":55,"with_us_qbi_input_reconciliation":27,"with_us_take_up_inputs":16},"engine_input_projection_contract":{"default_count":863,"defaults_sha256":"87f508fbb382036946aa5e225d339e1b593a464ee6cfc644d7d710540b00a9a7","engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"input_count":863,"sha256":"67a66b018c6261a03a88852cce5c5a4cbe9f5595735d17f2f7666e19e464dfbf"},"entry_count":993,"manifest_sha256":"8247a93e5f8f63d3ae71c1de681c29524d4bb8f07e3c6a50dcaf431b1377020f","schema_version":1,"sha256":"54b7196a6cf7d1ae18a6b149833fe5ecf5d998b4b14f8388766341af153ff3df","ssi_dependency_contract":{"edge_count":186,"engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"formula_node_count":62,"input_leaf_count":55,"root":"ssi","sha256":"e3351cdedbe592456b637286ecd04b7079746e1c409e594fbca60a7d28666838"},"stage_counts":{"derive":34,"seed":29,"simulate":930}},"rows":[{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"long_term_capital_gains_before_response"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_sch_d_capital_gains"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":"derive_from_finite_transferred_parents","provision":"optional_transferred_or_schedule_d_derived","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"transferred","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"clone_2","fallback":"absent_or_cleared_then_schedule_d_derived","provision":"optional_existing_derived_leaf","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_raw_acs_source_authority","stage":"derive","variable":"SEMP"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"derive","variable":"age"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"business_is_sstb"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_rent_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"person_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":"person_id_for_unstacked_lineage_digest","provision":"assembly_support_source_identity","stage":"derive","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_channel"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"rental_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"primary_puf_exact_zero_universe","stage":"derive","variable":"s_corp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:primary_puf_qrf_nontransfer","stage":"derive","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"w2_wages_from_qualified_business"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_medicaid_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_ssi_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_tanf_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_eitc"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"family_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"household_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"marital_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"seed","variable":"age"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_household_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_person_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_year"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"spm_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"tax_unit_source_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_household_weight","stage":"simulate","variable":""},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"person_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"family_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"family_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ssp_excluded_institutional_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_balance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"average_home_energy_use_in_state"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bedrooms"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"block_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_corporate_income_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_excise_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbsa_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"congressional_district_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"county_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_tfa_region"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_home_energy_use"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"household_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_owned"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_denver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_wilmington"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_yonkers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_homeless"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_public_housing"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_non_english_speaking_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_on_tribal_land"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_rural"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_sro"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"living_arrangements_allow_for_food_preparation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_state_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"net_worth"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_purchased_qualifying_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_electric_range"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"parent_has_less_than_high_school_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"place_fips"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"puma"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_passenger_vehicle_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldl"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldu"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"state_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tenant_pays_utilities"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tract_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vtd"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zcta"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zip_code"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"marital_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"marital_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"able_contributions_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"adopted_this_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"after_school_expenses"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"age"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_charged_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_resides_in_assisted_living_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_level_b_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_meets_snf_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_receives_elderly_disabled_medicaid_waiver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_care_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_grandfathered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_living_arrangement"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ambulance_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"american_opportunity_credit_claimed_prior_years"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_foreign_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_sra_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"assessed_property_value"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"attends_eligible_educational_institution_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"attends_eligible_educational_institution_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_530a_distribution"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_quality_enhanced_provider"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"business_is_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"business_is_sstb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_factor_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_time_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_weeks_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_welfare_to_work"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_cvrp_vehicle_rebate_amount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_home_supportive_services"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_medical_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_state_disability_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_costs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_payments_from_tax_filer"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"casualty_loss"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_cash_donations"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_non_cash_donations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"charitable_non_cash_donations_non_50_pct_orgs"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_attending_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_days_per_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_hours_per_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_provider_type_group"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_as_dependent_on_another_return"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_ma_covid_19_essential_employee_premium_pay_program_2020"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_care_worker_credit_eligible_care_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_denver_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_glendale_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_greenwood_village_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_sheridan_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cost_of_attending_college"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"count_529_contribution_beneficiaries"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cps_race"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"csrs_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_accredited"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_has_therapeutic_diet"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_lives_with_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_resides_in_boarding_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_pregnancy_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_attending_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_child_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_childcare_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_facility_size"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_in_adult_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_wilmington_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"debt_relief"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dependent_care_employer_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"detailed_occupation_recode"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"divorce_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e00700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e02000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03220"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03230"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03290"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07260"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e11200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e18500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24515"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24518"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e26270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e27200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e32800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e58990"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e62900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87521"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87530"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"early_withdrawal_penalty"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educational_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educator_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_contribution_to_health_insurance_premiums_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_headcount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_1_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_2_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_quarterly_payroll_expense_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_sponsored_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_state_unemployment_tax_rate_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_sheridan_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_mo_st_louis_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_lane_transit_district_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_trimet_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_payroll_tax_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_federal_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_social_security"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_state_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_current_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_lower_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_prior_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_upper_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_social_housing_excess_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"er_visit_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_withheld_payroll_tax"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_community_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_program_track"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"four_year_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fsla_overtime_premium"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_ssp_in_nursing_home_or_institutionalized_hospice"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_losses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_winnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_1098_t_or_exception"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_institution_ein"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_applied_for_unemployment_compensation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_bcc_qualifying_coverage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_champva_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_completed_first_four_years_of_postsecondary_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_developmental_delay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_emergency_medical_condition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_felony_drug_conviction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_health_coverage_other_than_chip"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_indian_health_service_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_individualized_education_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_lifetime_learning_credit_1098_t_or_exception"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_marketplace_health_coverage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_marketplace_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_medicaid_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_never_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_no_prior_formal_early_learning"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_non_marketplace_direct_purchase_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_other_means_tested_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_tricare_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_va_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_insurance_premiums_without_medicare_part_b"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_savings_account_payroll_contributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_ccap_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_oss_care_facility_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_is_on_agricultural_land"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"home_mortgage_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hourly_wage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"hours_worked_last_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_aabd_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_is_bedfast"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"illicit_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"imaging_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_ptq_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_out_of_home_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_licensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_unlicensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"inpatient_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_in_529_plan_indv"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_income_elected_form_4952"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_interest_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_american_indian_or_alaska_native_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_born_outside_us"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_breastfeeding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_complying_with_tanf_work_requirements"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_computer_scientist"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deaf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deceased"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_english_proficient"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_enrolled_at_least_half_time_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_ccdf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_head_start"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_executive_administrative_professional"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_farmer_fisher"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_federal_work_study_participant"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_female"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_fully_disabled_service_connected_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_grandparent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_hispanic"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_adult_residential_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care_group_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_k12_nonpublic_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_community_engagement_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_residential_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_secondary_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_substance_use_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_work_program"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_incapable_of_self_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_incarcerated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_1115_mec_adult"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_community_engagement_seasonal_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medically_frail_or_has_special_medical_needs_for_medicaid_ce"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_migratory_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_paid_hourly"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_parent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_part_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_and_totally_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pregnant"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pursuing_credential_for_american_opportunity_credit"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"is_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_runaway_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_self_employed"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_severely_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_discretionary_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_indian_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_employment_training_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_incentive_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_program_participant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_workfare_participant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_child_of_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_spouse_of_disabled_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_tafdc_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_union_member_or_covered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_unmarried_partner_of_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wccc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_at_nutritional_risk"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_fully_breastfeeding"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_post_1997"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_pre_1998"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_care_receivers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_receives_blind_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"lab_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"life_insurance_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_basis"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_before_response"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_assets_eligible_for_vt_exclusion"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_on_collectibles"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_small_business_stock"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_years_held"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_care_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_is_in_relatives_home_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_pending_federal_benefit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_claiming_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_community_service_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_less_than_half_time_education_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_six_month_average_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_work_program_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_tax_dependent_exception_non_custodial_parent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_part_b_premiums_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_quarters_of_coverage"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_exempt_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_basic_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_service_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"miscellaneous_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_has_guardian"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_housing_assistance_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_uses_representative_payee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_kansas_city_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_snc_facility_base_charge"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_receiving_social_security_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_ccpp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_care_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_qris_step"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_aabd_alternate_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_eligible_parent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_child_care_worker_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_eligible_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"never_eligible_for_social_security_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_grow_nj_kids_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_qualifying_dependents"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_spouse_employed_when_claim_established"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weekly_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weeks_claimed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_working_less_than_full_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_focus_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"non_public_school_tuition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_sch_d_capital_gains"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_yonkers_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"offered_aca_disqualifying_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_educator_expense_deduction_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_federal_conformity_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_has_taken_oh_lump_sum_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_homestead_exemption_qualifying_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_uniformed_services_retirement_income_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"other_medical_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"outpatient_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"over_the_counter_health_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"p08000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_reduced_rate_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_resident"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_base_year_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_credit_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_highest_quarter_wages"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_self_employment_net_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_countable_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_available_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_other_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_head_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_months_in_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pension_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"person_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"personal_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"physician_services_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_care_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_transportation_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_tax_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prescription_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"previous_year_income_available"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_year_minimum_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_adoption_assistance_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_tuition_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"railroad_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"real_estate_taxes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_medicaid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_or_needs_protective_services"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_wic"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_federal_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_ky_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_on_total_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retirement_benefits_from_ss_exempt_employment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_step_rating"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"roth_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_ira_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"s_corp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"salt_refund_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_registered_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_second_child_discount_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit_eligible"},{"available_by":"derived","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"derived_schedule_d_input","stage":"simulate","variable":"schedule_d_capital_gain_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employed_pension_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"short_term_capital_gains"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ss_aime_input"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"ssi_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"ssn_card_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"state_or_federal_salary"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"strike_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"student_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicaid_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_preparation_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_federal_pension_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_roth_conversions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"technical_institution_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tip_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"total_disability_payments"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"traditional_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_ira_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"treasury_tipped_occupation_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unadjusted_basis_qualified_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_12_months_postpartum"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_60_days_postpartum"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unreimbursed_business_employee_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"urgent_care_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_bonds_for_higher_ed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_govt_interest_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"use_reported_ssi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_is_full_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vt_ccfap_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_eceap_slot_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_average_weekly_wage_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_leave_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_qualifying_period_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_day_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_recently_incarcerated_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weekly_hours_worked_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"weekly_snap_work_program_hours"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weeks_unemployed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_breastfeeding_infant_count"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_infant_feeding_category"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"would_claim_wic"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_deceased"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_of_retirement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_in_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_since_us_entry"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_months_since_tea_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_was_tea_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bottled_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"broadband_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_riv_share_eligible_for_emergency_payment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_scc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_clothing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_food_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_housing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_is_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_utilities_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_smc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_entry_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_re_determination_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"coal_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cooking_fuel_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_liheap_heating_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_liheap_housing_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"enrolled_in_ebb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"experienced_covid_income_loss"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fdpir"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_oil_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_expense_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_cooling_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_last_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_association_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"housing_designated_welfare"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_institutional_status"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_vehicle_is_essential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_liheap_eligible_for_crisis_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_ccdf_continuous_income_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_ccdf_initial_income_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_ccdf_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nd_ccap_enrolled"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_tanf_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_disability_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_housing_subsidy_program_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_eaedc_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_liheap_heating_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ccdf_activity_test"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"metered_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_registration_fee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_since_calworks_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mortgage_payments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_has_stepparent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"phone_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_electricity_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_housing_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_snap"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sd_tanf_is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sewage_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"snap_self_employment_income_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_count"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_energy_subsidy"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"spm_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_net_income_reported"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_pre_subsidy_childcare_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_school_lunch_subsidy"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_snap"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"spm_unit_tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_total_income_reported"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_tanf_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"trash_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ottanf_crisis_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_show_all_cash_assistance_programs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_calworks_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"water_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_power_shelter_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"advanced_main_air_circulating_fan_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"air_sealing_ventilation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_form_completed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_non_agi_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_charitable_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"biomass_stove_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_property_tax_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cohabitating_spouses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_amt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_section_179_expense_add_back"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"domestic_production_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_heat_pump_clothes_dryer_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_load_service_center_upgrade_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_stove_cooktop_range_or_oven_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_wiring_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_central_air_conditioner_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_door_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_insulation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_roof_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_window_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_payroll_tax_withheld"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_earned_income_exclusion"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_tax_credit_potential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"form_4972_lumpsum_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_investment_in_529_plan_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_itemized_deductions_adjustment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"geothermal_heat_pump_property_expenditures"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_savings_account_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_water_heater_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_energy_audit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_receives_aged_or_disabled_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_entity_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_withholding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_subtractions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_healthcare_sharing_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_oos_municipal_obligation_interest_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_tax_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_use_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_income_form_4952"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_barred_from_american_opportunity_credit_due_to_improper_claims"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"k12_tuition_and_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_total_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_affordability_payment_subtraction_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_step_4_share_of_child_care_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_qualifying_crp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nc_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_renters_refund_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_components_made_in_north_america"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_critical_minerals_extracted_in_trading_partner_country"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_classification"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_msrp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_senior_freeze"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_geothermal_energy_system_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_solar_energy_systems_equipment_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nyc_unincorporated_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_adjustments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_federal_pension_subtraction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_tax_before_credits_in_prior_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_net_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_primary_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_home_improvement_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_window_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"property_sales_net_capital_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"puerto_rico_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_new_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_used_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_battery_storage_technology_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_furnace_or_hot_water_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_retirement_penalty"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"recapture_of_investment_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"refundable_payroll_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"rent_is_shared_with_another_tax_unit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_energy_savings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"salt_refund_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_benchmark_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"separate_filer_itemizes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"small_wind_energy_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_electric_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_water_heating_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"specified_possession_income"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_eitc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_stillborn_children"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_pprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_sprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tuition_and_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unrecaptured_section_1250_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"unreported_payroll_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"used_clean_vehicle_sale_price"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"utilities_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pte_cotenant_disposable_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_if_eligible_for_refundable_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_taxes_voluntarily"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_additions"},{"available_by":"assembled","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"simulate","variable":"age"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_disabled"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"seed_receipted_value_or_disclosed_engine_default","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"}]}} +{"engine":{"package":"policyengine-us","version":"1.764.6"},"programs":{"aca":{"consumers":["assigned_aca_ptc","person_receives_aca","selected_marketplace_plan_actuarial_value","selected_marketplace_plan_premium_proxy"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_aca_if_eligible"},"basic_health_program":{"consumers":["basic_health_program_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_basic_health_program_if_eligible"},"chip":{"consumers":["chip_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_chip_if_eligible"},"dc_ptc":{"consumers":["dc_ptc"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_dc_ptc"},"early_head_start":{"consumers":["early_head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_early_head_start_if_eligible"},"eitc":{"consumers":["dc_eitc_without_qualifying_child","eitc","nj_eitc","ok_federal_eitc","wa_working_families_tax_credit","wa_working_families_tax_credit_age_expansion_eligible"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_eitc"},"head_start":{"consumers":["head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_head_start_if_eligible"},"housing_assistance":{"consumers":["housing_assistance"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_housing_assistance_if_eligible"},"medicaid":{"consumers":["medicaid_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicaid_if_eligible"},"medicare":{"consumers":["medicare_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicare_if_eligible"},"snap":{"consumers":["snap"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_snap_if_eligible"},"ssi":{"consumers":["ssi"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_ssi_if_eligible"},"tanf":{"consumers":["tanf"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_tanf_if_eligible"}},"remaining_stage_input_manifest":{"receipt":{"consumer_counts":{"PolicyEngineUSEngine.materialize":12,"_complete_schedule_d_input":5,"_simulation_projection":863,"prepare_stacked_tail_derivation":2,"seed_multispine_pool_inputs":13,"ssi_static_dependency_closure":55,"with_us_qbi_input_reconciliation":27,"with_us_qbi_passive_passthrough_assignment":4,"with_us_take_up_inputs":16},"engine_input_projection_contract":{"default_count":863,"defaults_sha256":"87f508fbb382036946aa5e225d339e1b593a464ee6cfc644d7d710540b00a9a7","engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"input_count":863,"sha256":"67a66b018c6261a03a88852cce5c5a4cbe9f5595735d17f2f7666e19e464dfbf"},"entry_count":997,"manifest_sha256":"4ec692e3262f396ebacd6144c900b31ef2ae3eabc1062f38e6db6d3ab6f433fa","schema_version":1,"sha256":"08d6a5ad5750875d36b800202e31720d70c7de6df4689c3bad321c6e21a007d5","ssi_dependency_contract":{"edge_count":186,"engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"formula_node_count":62,"input_leaf_count":55,"root":"ssi","sha256":"e3351cdedbe592456b637286ecd04b7079746e1c409e594fbca60a7d28666838"},"stage_counts":{"derive":38,"seed":29,"simulate":930}},"rows":[{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"long_term_capital_gains_before_response"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_sch_d_capital_gains"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":"derive_from_finite_transferred_parents","provision":"optional_transferred_or_schedule_d_derived","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"transferred","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"clone_2","fallback":"absent_or_cleared_then_schedule_d_derived","provision":"optional_existing_derived_leaf","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_raw_acs_source_authority","stage":"derive","variable":"SEMP"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"derive","variable":"age"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"business_is_sstb"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_rent_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"person_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":"person_id_for_unstacked_lineage_digest","provision":"assembly_support_source_identity","stage":"derive","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_channel"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"rental_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"primary_puf_exact_zero_universe","stage":"derive","variable":"s_corp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:primary_puf_qrf_nontransfer","stage":"derive","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"w2_wages_from_qualified_business"},{"available_by":"transferred","consumer":"with_us_qbi_passive_passthrough_assignment","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income"},{"available_by":"transferred","consumer":"with_us_qbi_passive_passthrough_assignment","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_income"},{"available_by":"transferred","consumer":"with_us_qbi_passive_passthrough_assignment","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"rental_income"},{"available_by":"transferred","consumer":"with_us_qbi_passive_passthrough_assignment","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:primary_puf_qrf_nontransfer","stage":"derive","variable":"s_corp_income"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_medicaid_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_ssi_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_tanf_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_eitc"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"family_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"household_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"marital_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"seed","variable":"age"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_household_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_person_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_year"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"spm_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"tax_unit_source_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_household_weight","stage":"simulate","variable":""},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"person_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"family_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"family_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ssp_excluded_institutional_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_balance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"average_home_energy_use_in_state"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bedrooms"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"block_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_corporate_income_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_excise_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbsa_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"congressional_district_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"county_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_tfa_region"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_home_energy_use"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"household_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_owned"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_denver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_wilmington"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_yonkers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_homeless"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_public_housing"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_non_english_speaking_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_on_tribal_land"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_rural"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_sro"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"living_arrangements_allow_for_food_preparation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_state_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"net_worth"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_purchased_qualifying_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_electric_range"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"parent_has_less_than_high_school_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"place_fips"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"puma"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_passenger_vehicle_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldl"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldu"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"state_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tenant_pays_utilities"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tract_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vtd"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zcta"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zip_code"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"marital_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"marital_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"able_contributions_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"adopted_this_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"after_school_expenses"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"age"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_charged_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_resides_in_assisted_living_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_level_b_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_meets_snf_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_receives_elderly_disabled_medicaid_waiver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_care_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_grandfathered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_living_arrangement"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ambulance_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"american_opportunity_credit_claimed_prior_years"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_foreign_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_sra_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"assessed_property_value"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"attends_eligible_educational_institution_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"attends_eligible_educational_institution_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_530a_distribution"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_quality_enhanced_provider"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"business_is_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"business_is_sstb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_factor_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_time_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_weeks_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_welfare_to_work"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_cvrp_vehicle_rebate_amount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_home_supportive_services"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_medical_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_state_disability_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_costs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_payments_from_tax_filer"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"casualty_loss"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_cash_donations"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_non_cash_donations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"charitable_non_cash_donations_non_50_pct_orgs"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_attending_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_days_per_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_hours_per_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_provider_type_group"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_as_dependent_on_another_return"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_ma_covid_19_essential_employee_premium_pay_program_2020"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_care_worker_credit_eligible_care_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_denver_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_glendale_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_greenwood_village_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_sheridan_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cost_of_attending_college"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"count_529_contribution_beneficiaries"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cps_race"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"csrs_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_accredited"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_has_therapeutic_diet"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_lives_with_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_resides_in_boarding_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_pregnancy_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_attending_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_child_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_childcare_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_facility_size"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_in_adult_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_wilmington_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"debt_relief"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dependent_care_employer_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"detailed_occupation_recode"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"divorce_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e00700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e02000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03220"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03230"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03290"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07260"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e11200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e18500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24515"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24518"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e26270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e27200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e32800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e58990"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e62900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87521"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87530"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"early_withdrawal_penalty"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educational_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educator_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_contribution_to_health_insurance_premiums_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_headcount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_1_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_2_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_quarterly_payroll_expense_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_sponsored_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_state_unemployment_tax_rate_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_sheridan_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_mo_st_louis_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_lane_transit_district_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_trimet_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_payroll_tax_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_federal_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_social_security"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_state_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_current_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_lower_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_prior_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_upper_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_social_housing_excess_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"er_visit_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_withheld_payroll_tax"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_community_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_program_track"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"four_year_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fsla_overtime_premium"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_ssp_in_nursing_home_or_institutionalized_hospice"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_losses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_winnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_1098_t_or_exception"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_institution_ein"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_applied_for_unemployment_compensation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_bcc_qualifying_coverage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_champva_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_completed_first_four_years_of_postsecondary_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_developmental_delay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_emergency_medical_condition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_felony_drug_conviction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_health_coverage_other_than_chip"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_indian_health_service_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_individualized_education_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_lifetime_learning_credit_1098_t_or_exception"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_marketplace_health_coverage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_marketplace_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_medicaid_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_never_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_no_prior_formal_early_learning"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_non_marketplace_direct_purchase_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_other_means_tested_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_tricare_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_va_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_insurance_premiums_without_medicare_part_b"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_savings_account_payroll_contributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_ccap_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_oss_care_facility_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_is_on_agricultural_land"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"home_mortgage_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hourly_wage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"hours_worked_last_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_aabd_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_is_bedfast"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"illicit_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"imaging_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_ptq_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_out_of_home_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_licensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_unlicensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"inpatient_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_in_529_plan_indv"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_income_elected_form_4952"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_interest_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_american_indian_or_alaska_native_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_born_outside_us"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_breastfeeding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_complying_with_tanf_work_requirements"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_computer_scientist"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deaf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deceased"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_english_proficient"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_enrolled_at_least_half_time_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_ccdf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_head_start"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_executive_administrative_professional"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_farmer_fisher"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_federal_work_study_participant"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_female"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_fully_disabled_service_connected_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_grandparent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_hispanic"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_adult_residential_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care_group_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_k12_nonpublic_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_community_engagement_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_residential_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_secondary_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_substance_use_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_work_program"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_incapable_of_self_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_incarcerated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_1115_mec_adult"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_community_engagement_seasonal_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medically_frail_or_has_special_medical_needs_for_medicaid_ce"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_migratory_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_paid_hourly"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_parent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_part_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_and_totally_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pregnant"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pursuing_credential_for_american_opportunity_credit"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"is_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_runaway_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_self_employed"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_severely_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_discretionary_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_indian_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_employment_training_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_incentive_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_program_participant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_workfare_participant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_child_of_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_spouse_of_disabled_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_tafdc_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_union_member_or_covered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_unmarried_partner_of_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wccc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_at_nutritional_risk"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_fully_breastfeeding"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_post_1997"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_pre_1998"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_care_receivers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_receives_blind_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"lab_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"life_insurance_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_basis"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_before_response"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_assets_eligible_for_vt_exclusion"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_on_collectibles"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_small_business_stock"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_years_held"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_care_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_is_in_relatives_home_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_pending_federal_benefit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_claiming_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_community_service_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_less_than_half_time_education_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_six_month_average_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_work_program_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_tax_dependent_exception_non_custodial_parent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_part_b_premiums_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_quarters_of_coverage"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_exempt_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_basic_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_service_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"miscellaneous_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_has_guardian"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_housing_assistance_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_uses_representative_payee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_kansas_city_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_snc_facility_base_charge"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_receiving_social_security_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_ccpp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_care_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_qris_step"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_aabd_alternate_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_eligible_parent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_child_care_worker_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_eligible_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"never_eligible_for_social_security_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_grow_nj_kids_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_qualifying_dependents"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_spouse_employed_when_claim_established"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weekly_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weeks_claimed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_working_less_than_full_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_focus_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"non_public_school_tuition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_sch_d_capital_gains"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_yonkers_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"offered_aca_disqualifying_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_educator_expense_deduction_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_federal_conformity_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_has_taken_oh_lump_sum_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_homestead_exemption_qualifying_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_uniformed_services_retirement_income_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"other_medical_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"outpatient_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"over_the_counter_health_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"p08000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_reduced_rate_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_resident"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_base_year_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_credit_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_highest_quarter_wages"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_self_employment_net_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_countable_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_available_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_other_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_head_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_months_in_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pension_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"person_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"personal_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"physician_services_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_care_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_transportation_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_tax_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prescription_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"previous_year_income_available"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_year_minimum_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_adoption_assistance_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_tuition_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"railroad_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"real_estate_taxes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_medicaid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_or_needs_protective_services"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_wic"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_federal_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_ky_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_on_total_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retirement_benefits_from_ss_exempt_employment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_step_rating"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"roth_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_ira_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"s_corp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"salt_refund_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_registered_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_second_child_discount_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit_eligible"},{"available_by":"derived","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"derived_schedule_d_input","stage":"simulate","variable":"schedule_d_capital_gain_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employed_pension_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"short_term_capital_gains"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ss_aime_input"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"ssi_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"ssn_card_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"state_or_federal_salary"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"strike_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"student_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicaid_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_preparation_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_federal_pension_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_roth_conversions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"technical_institution_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tip_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"total_disability_payments"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"traditional_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_ira_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"treasury_tipped_occupation_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unadjusted_basis_qualified_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_12_months_postpartum"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_60_days_postpartum"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unreimbursed_business_employee_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"urgent_care_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_bonds_for_higher_ed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_govt_interest_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"use_reported_ssi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_is_full_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vt_ccfap_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_eceap_slot_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_average_weekly_wage_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_leave_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_qualifying_period_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_day_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_recently_incarcerated_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weekly_hours_worked_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"weekly_snap_work_program_hours"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weeks_unemployed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_breastfeeding_infant_count"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_infant_feeding_category"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"would_claim_wic"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_deceased"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_of_retirement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_in_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_since_us_entry"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_months_since_tea_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_was_tea_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bottled_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"broadband_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_riv_share_eligible_for_emergency_payment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_scc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_clothing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_food_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_housing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_is_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_utilities_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_smc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_entry_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_re_determination_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"coal_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cooking_fuel_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_liheap_heating_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_liheap_housing_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"enrolled_in_ebb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"experienced_covid_income_loss"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fdpir"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_oil_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_expense_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_cooling_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_last_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_association_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"housing_designated_welfare"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_institutional_status"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_vehicle_is_essential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_liheap_eligible_for_crisis_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_ccdf_continuous_income_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_ccdf_initial_income_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_ccdf_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nd_ccap_enrolled"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_tanf_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_disability_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_housing_subsidy_program_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_eaedc_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_liheap_heating_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ccdf_activity_test"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"metered_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_registration_fee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_since_calworks_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mortgage_payments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_has_stepparent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"phone_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_electricity_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_housing_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_snap"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sd_tanf_is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sewage_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"snap_self_employment_income_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_count"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_energy_subsidy"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"spm_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_net_income_reported"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_pre_subsidy_childcare_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_school_lunch_subsidy"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_snap"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"spm_unit_tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_total_income_reported"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_tanf_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"trash_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ottanf_crisis_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_show_all_cash_assistance_programs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_calworks_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"water_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_power_shelter_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"advanced_main_air_circulating_fan_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"air_sealing_ventilation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_form_completed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_non_agi_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_charitable_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"biomass_stove_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_property_tax_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cohabitating_spouses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_amt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_section_179_expense_add_back"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"domestic_production_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_heat_pump_clothes_dryer_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_load_service_center_upgrade_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_stove_cooktop_range_or_oven_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_wiring_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_central_air_conditioner_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_door_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_insulation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_roof_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_window_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_payroll_tax_withheld"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_earned_income_exclusion"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_tax_credit_potential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"form_4972_lumpsum_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_investment_in_529_plan_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_itemized_deductions_adjustment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"geothermal_heat_pump_property_expenditures"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_savings_account_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_water_heater_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_energy_audit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_receives_aged_or_disabled_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_entity_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_withholding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_subtractions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_healthcare_sharing_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_oos_municipal_obligation_interest_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_tax_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_use_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_income_form_4952"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_barred_from_american_opportunity_credit_due_to_improper_claims"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"k12_tuition_and_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_total_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_affordability_payment_subtraction_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_step_4_share_of_child_care_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_qualifying_crp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nc_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_renters_refund_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_components_made_in_north_america"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_critical_minerals_extracted_in_trading_partner_country"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_classification"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_msrp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_senior_freeze"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_geothermal_energy_system_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_solar_energy_systems_equipment_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nyc_unincorporated_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_adjustments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_federal_pension_subtraction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_tax_before_credits_in_prior_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_net_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_primary_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_home_improvement_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_window_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"property_sales_net_capital_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"puerto_rico_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_new_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_used_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_battery_storage_technology_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_furnace_or_hot_water_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_retirement_penalty"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"recapture_of_investment_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"refundable_payroll_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"rent_is_shared_with_another_tax_unit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_energy_savings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"salt_refund_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_benchmark_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"separate_filer_itemizes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"small_wind_energy_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_electric_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_water_heating_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"specified_possession_income"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_eitc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_stillborn_children"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_pprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_sprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tuition_and_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unrecaptured_section_1250_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"unreported_payroll_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"used_clean_vehicle_sale_price"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"utilities_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pte_cotenant_disposable_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_if_eligible_for_refundable_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_taxes_voluntarily"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_additions"},{"available_by":"assembled","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"simulate","variable":"age"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_disabled"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"seed_receipted_value_or_disclosed_engine_default","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"}]}} diff --git a/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml b/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml index 851394da9..3ac8a9028 100644 --- a/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml +++ b/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml @@ -42,11 +42,34 @@ pipeline_contract: - with_us_education_inputs derive_operator_order: - _complete_schedule_d_input + - with_us_qbi_passive_passthrough_assignment - with_us_qbi_input_reconciliation auxiliary_operations: - assign_us_puma_ladder - calibrate - select_exact_k + qbi_passive_passthrough: + version: 1 + assignment_stage_version: 1 + output_column: passive_partnership_s_corp_income + person_input_columns: + - partnership_income + - s_corp_income + - rental_income + - estate_income + evidence_resource: qbi_passive_passthrough_v1.json + evidence_sha256: 32fac446d5f208a9c3f73c8234184144dd0c1f322ccdf186e5fb94dd774d61a7 + assumptions_resource: qbi_passive_passthrough_assumptions_v1.json + assumptions_sha256: 0283a0afc9efc28bcdda6ad4f21bb29501c156640a4deebedecb1e3da128b358 + log_odds_shift: -1.157105426398319 + random_streams: + bit_generator: PCG64 + draw_policy: full_length_before_support_masks + family_entropy: 4722 + presence_family: 0 + root_seed_default: 0 + share_family: 1 + sha256: cf3686966f12700ce1314e0e5afde5ff208d84c0e5e605c8ab84fc8cd0000aab qbi_reconciliation: version: 2 operation: shared_all_or_nothing_identity_reconciliation diff --git a/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py b/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py index db5e65a74..2a435deee 100644 --- a/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py +++ b/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py @@ -52,22 +52,22 @@ def test_us_coverage_is_exact_complete_and_honest( assert_coverage_complete(coverage_report) assert coverage_report["status"] == "pass" fields = coverage_report["field_usage"] - assert fields["configuration_field_count"] == 41_380 - assert fields["authored_normative_field_count"] == 32_161 - assert fields["resolved_binding_field_count"] == 9_219 - assert fields["consumed_field_count"] == 41_380 + assert fields["configuration_field_count"] == 41_442 + assert fields["authored_normative_field_count"] == 32_190 + assert fields["resolved_binding_field_count"] == 9_252 + assert fields["consumed_field_count"] == 41_442 assert fields["unused_field_count"] == 0 assert fields["multiple_primary_use_field_count"] == 0 assert fields["claim_count"] == 47 assert fields["mode_counts"] == { - "legacy_behavior": 13_245, + "legacy_behavior": 13_298, "compiler_semantic": 27_661, - "front_end_validation": 346, + "front_end_validation": 355, "identity_only": 128, } assert fields["generation0_effect_counts"] == { - "legacy_behavior": 37_718, - "no_generation0_effect": 3_662, + "legacy_behavior": 37_771, + "no_generation0_effect": 3_671, } inventory = coverage_report["inventory_coverage"] diff --git a/packages/microcosm-build/tests/test_spec_engine_field_usage.py b/packages/microcosm-build/tests/test_spec_engine_field_usage.py index 18cb8c768..4ac828bb9 100644 --- a/packages/microcosm-build/tests/test_spec_engine_field_usage.py +++ b/packages/microcosm-build/tests/test_spec_engine_field_usage.py @@ -92,22 +92,22 @@ def _mutated_bundle( def test_exact_complete_ledger_has_one_primary_mode_per_pointer(field_ledger) -> None: - assert len(field_ledger.fields) == EXPECTED_CONFIGURATION_FIELD_COUNT == 41_380 + assert len(field_ledger.fields) == EXPECTED_CONFIGURATION_FIELD_COUNT == 41_442 assert field_ledger.source_counts == { - "authored": 32_161, - "resolved_bindings": 9_219, + "authored": 32_190, + "resolved_bindings": 9_252, } assert field_ledger.mode_counts == { - "legacy_behavior": 13_245, + "legacy_behavior": 13_298, "compiler_semantic": 27_661, - "front_end_validation": 346, + "front_end_validation": 355, "identity_only": 128, } assert field_ledger.generation0_effect_counts == { - "legacy_behavior": 37_718, - "no_generation0_effect": 3_662, + "legacy_behavior": 37_771, + "no_generation0_effect": 3_671, } - assert len({field.pointer for field in field_ledger.fields}) == 41_380 + assert len({field.pointer for field in field_ledger.fields}) == 41_442 def test_eligibility_concepts_are_validation_not_generation0_behavior( diff --git a/packages/microcosm-build/tests/test_spec_engine_identity_contracts.py b/packages/microcosm-build/tests/test_spec_engine_identity_contracts.py index b4693a0e1..6f2106992 100644 --- a/packages/microcosm-build/tests/test_spec_engine_identity_contracts.py +++ b/packages/microcosm-build/tests/test_spec_engine_identity_contracts.py @@ -25,6 +25,9 @@ from microcosm.build.us_runtime.qbi_inputs import ( us_qbi_reconciliation_contract_identity, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + us_qbi_passive_passthrough_contract_identity, +) from microcosm.build.us_runtime.us_late_producer_registry import ( CANONICAL_US_LATE_TRANSFER_GROUPS, ) @@ -75,6 +78,9 @@ def test_pipeline_contract_is_an_exact_generation_zero_projection() -> None: POOL_POST_CLONE_SOURCE_OPERATOR_ORDER ) assert contract["derive_operator_order"] == list(POOL_DERIVE_OPERATOR_ORDER) + assert contract["qbi_passive_passthrough"] == ( + us_qbi_passive_passthrough_contract_identity() + ) assert contract["qbi_reconciliation"] == (us_qbi_reconciliation_contract_identity()) assert contract["simulation_household_batch_size"] == { "value": POOL_SIMULATION_HOUSEHOLD_BATCH_SIZE, diff --git a/packages/microcosm-build/tests/test_spec_engine_inventory_coverage.py b/packages/microcosm-build/tests/test_spec_engine_inventory_coverage.py index 1a514700b..c87b9af10 100644 --- a/packages/microcosm-build/tests/test_spec_engine_inventory_coverage.py +++ b/packages/microcosm-build/tests/test_spec_engine_inventory_coverage.py @@ -90,7 +90,7 @@ "source_operators": 16, "source_stages": 37, "stacked_checkpoint_full_components": 12, - "stacked_checkpoint_pool_code_components": 19, + "stacked_checkpoint_pool_code_components": 20, "stacked_checkpoint_static_components": 9, "tail_control_fields": 934, "take_up_pipeline_steps": 24, diff --git a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py index 0a03b0a85..b6ae71cde 100644 --- a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py @@ -1903,7 +1903,7 @@ def capture_equality(expected: object, actual: object) -> None: "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "6e9dce8f0fd3e3f0101103a14d6a08ac8527b90b82d48fa8bad2c4cc70dbdfde", + "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0", }, } @@ -2106,7 +2106,7 @@ def test_constants_adapter_fixture_checkpoints_are_byte_identical_and_only_recei "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "6e9dce8f0fd3e3f0101103a14d6a08ac8527b90b82d48fa8bad2c4cc70dbdfde", + "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0", } def run_fixture(root: Path, *, config_authority: str) -> dict[str, object]: diff --git a/tools/generate_us_bundle_from_constants.py b/tools/generate_us_bundle_from_constants.py index a00edbb4f..9fe1c4a52 100644 --- a/tools/generate_us_bundle_from_constants.py +++ b/tools/generate_us_bundle_from_constants.py @@ -142,7 +142,10 @@ def _domain_builders() -> dict[str, Callable[[], object]]: "fiscal_target_references.json", "obbba_reforms.json", "puf_aggregate_record_disaggregation.json", + "qbi_passive_passthrough_assumptions_v1.json", + "qbi_passive_passthrough_v1.json", "release_input_coverage_manifest.json", + "repeal_revenue_benchmarks.json", "soca_capital_gain_distribution_shares.json", "soi_baseline_levels.json", "soi_table_2_1_interest_components_ty2015.json", diff --git a/tools/spec_engine_coverage.py b/tools/spec_engine_coverage.py index 9638f7ec0..51e1f851b 100644 --- a/tools/spec_engine_coverage.py +++ b/tools/spec_engine_coverage.py @@ -41,7 +41,7 @@ REPORT_SCHEMA_VERSION = 3 EXPECTED_POINTER_INVENTORY_SHA256 = ( - "b63ffc9bf7cb2fb8ac17e314f64c7b661aba14512071c1a697e5f6ff9ebc74c5" + "80dc21af804cc03e26a1d6d0fe56d1fe40b1b3e629a4f8d39787da7c2f1faf34" ) DEFAULT_REPORT_PATH = ( Path(__file__).resolve().parents[1] diff --git a/tools/us_bundle_generation/identity_contracts.py b/tools/us_bundle_generation/identity_contracts.py index a384613e3..8af32173b 100644 --- a/tools/us_bundle_generation/identity_contracts.py +++ b/tools/us_bundle_generation/identity_contracts.py @@ -21,6 +21,9 @@ from microcosm.build.us_runtime.qbi_inputs import ( us_qbi_reconciliation_contract_identity, ) +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + us_qbi_passive_passthrough_contract_identity, +) from microcosm.build.us_runtime.us_late_producer_registry import ( CANONICAL_US_LATE_TRANSFER_GROUPS, ) @@ -48,6 +51,9 @@ def build_pipeline_contract() -> dict[str, object]: "post_clone_source_operator_order": list(POOL_POST_CLONE_SOURCE_OPERATOR_ORDER), "derive_operator_order": list(POOL_DERIVE_OPERATOR_ORDER), "auxiliary_operations": list(_AUXILIARY_OPERATIONS), + "qbi_passive_passthrough": ( + us_qbi_passive_passthrough_contract_identity() + ), "qbi_reconciliation": us_qbi_reconciliation_contract_identity(), "simulation_household_batch_size": { "value": POOL_SIMULATION_HOUSEHOLD_BATCH_SIZE, From 84bffc60156ba751f22f8c18c871478e3000d66a Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 21 Aug 2026 07:46:21 -0400 Subject: [PATCH 15/23] test(us): require realized passive QBI preservation --- PROGRESS.md | 19 +++++++++++++------ .../tests/test_us_multispine_pool.py | 15 +++++++++++---- .../tests/test_us_qbi_passive_passthrough.py | 18 ++++++++++-------- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 17de647a9..2f4bb9869 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -6,9 +6,9 @@ Dual-review remediation is in progress on `passive-pass-through-722` as of 2026-08-21. The real merge of already-fetched `origin/main` at `2c7a7218` is committed as `d9f19c66`, with the supervisor-approved resolutions reproduced exactly. The post-merge resource closure and first-class typed passive contract -are regenerated and their fail-closed coverage ledger is verified. Work -remains offline: no fetch, push, PR mutation, publication, or promotion is in -scope. +are regenerated and their fail-closed coverage ledger is verified. The +non-vacuous QBI preservation regression is also complete. Work remains offline: +no fetch, push, PR mutation, publication, or promotion is in scope. ## Done @@ -51,6 +51,16 @@ scope. and 40/40 inventory checks. The targeted adapter, schema/identity, field-ledger, inventory, and coverage suite passes 45 tests; the US generator check and targeted Ruff checks are also clean. +- Replaced the vacuous passive wrapper preservation proxy with current-main QBI + reconciliation on both the baseline and passive-staged paths. Seed 13 + realizes exactly two nonzero rows (positions 25 and 36) while all 15 incumbent + QBI leaves retain identical dtype and bytes. +- Strengthened the production multispine regression with a $2 million + partnership-income fixture. Production seed 0 realizes exactly one nonzero + row (position 5, amount `158609.82342210703`) and every incumbent QBI leaf is + byte-identical to the no-passive current-main pipeline. The independent + full-length RNG-family array test remains in place; all three focused tests + pass and targeted Ruff is clean. - The implementation and verification bullets below describe the historical pre-review checkpoint at `a4d93f78`; the verdict supersedes its former completion claim. @@ -107,9 +117,6 @@ scope. ## Next -- Replace the vacuous preservation proxy with a nonzero-realization regression - that executes the current-main QBI pipeline and byte-compares every incumbent - QBI column before and after the passive stage. - Fail the release-input gate when a required manifest variable is absent from the locked engine registry; cover both absent-variable and all-zero-required failure modes and document the 1.764.6/#9306 engine-inert boundary honestly. diff --git a/packages/microcosm-build/tests/test_us_multispine_pool.py b/packages/microcosm-build/tests/test_us_multispine_pool.py index 1dc3466c8..5ccceec32 100644 --- a/packages/microcosm-build/tests/test_us_multispine_pool.py +++ b/packages/microcosm-build/tests/test_us_multispine_pool.py @@ -3085,6 +3085,9 @@ def test_derive_stage_keeps_whole_pool_qbi_reconciliation() -> None: def test_passive_assignment_preserves_archived_qbi_leaf_bytes() -> None: pytest.importorskip("policyengine_us") frame = _qbi_ready_derive_frame() + person = frame.table("person").copy() + person["partnership_income"] = 2_000_000.0 + frame = _replace_person(frame, person) without_passive = with_us_qbi_input_reconciliation( _complete_schedule_d_input(frame).frame ).table("person") @@ -3093,11 +3096,15 @@ def test_passive_assignment_preserves_archived_qbi_leaf_bytes() -> None: frame ).frame.table("person") + passive = with_passive[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN].to_numpy() + assert np.flatnonzero(passive).tolist() == [5] + assert passive[5] == pytest.approx(158_609.82342210703) + for column in US_QBI_OUTPUT_COLUMNS: - np.testing.assert_array_equal( - with_passive[column].to_numpy(), - without_passive[column].to_numpy(), - ) + baseline = without_passive[column].to_numpy(copy=False) + staged = with_passive[column].to_numpy(copy=False) + assert staged.dtype.str == baseline.dtype.str + assert staged.tobytes() == baseline.tobytes() def _qbi_ready_derive_frame() -> Frame: diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py index 5406a6a6e..09f374a9d 100644 --- a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py @@ -18,6 +18,7 @@ from microcosm.build.us_runtime.qbi_inputs import ( US_QBI_BOOLEAN_OUTPUT_COLUMNS, US_QBI_OUTPUT_COLUMNS, + with_us_qbi_input_reconciliation, ) from microcosm.build.us_runtime.qbi_passive_passthrough import ( QBI_PASSIVE_EVIDENCE_RESOURCE, @@ -122,6 +123,9 @@ def _qbi_frame() -> Frame: "s_corp_income": np.where(positions % 5 == 0, 20_000.0, 0.0), "rental_income": positions.astype(np.float64) * 100.0, "estate_income": positions.astype(np.float64) * 10.0, + "self_employment_income_before_lsr": ( + positions.astype(np.float64) + 1_000.0 + ), } ) return _frame(pd.DataFrame(columns)) @@ -340,28 +344,26 @@ def test_assignment_uses_independent_full_length_rng_families() -> None: assert np.count_nonzero(form_masked[~support]) == 0 -def test_frame_wrapper_preserves_all_existing_qbi_columns_byte_for_byte() -> None: +def test_current_qbi_pipeline_preserves_leaf_bytes_when_passive_realizes() -> None: frame = _qbi_frame() - before = frame.table("person") + before = with_us_qbi_input_reconciliation(frame).table("person") qbi_bytes = { name: (before[name].dtype.str, before[name].to_numpy(copy=True).tobytes()) for name in US_QBI_OUTPUT_COLUMNS } - result = with_us_qbi_passive_passthrough_assignment(frame, seed=31) - alternate_seed = with_us_qbi_passive_passthrough_assignment(frame, seed=32) - after = result.table("person") - alternate = alternate_seed.table("person") + after = with_us_qbi_input_reconciliation( + with_us_qbi_passive_passthrough_assignment(frame, seed=13) + ).table("person") assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN not in before assert US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN in after for name, (dtype, raw) in qbi_bytes.items(): assert after[name].dtype.str == dtype assert after[name].to_numpy(copy=False).tobytes() == raw - assert alternate[name].dtype.str == dtype - assert alternate[name].to_numpy(copy=False).tobytes() == raw passthrough = after["partnership_income"] + after["s_corp_income"] passive = after[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN] + assert np.flatnonzero(passive.to_numpy()).tolist() == [25, 36] assert passive.between(0.0, passthrough.clip(lower=0.0)).all() From d99a3edfa6461b9d36c0cdf915f95761d831b7dd Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 21 Aug 2026 08:13:35 -0400 Subject: [PATCH 16/23] fix(us): fail closed on missing engine inputs --- PROGRESS.md | 26 +++++-- docs/evidence/spec-engine/us-f0-coverage.json | 10 +-- docs/us-fact-to-target.md | 7 ++ .../build/spec_engine/inventory_coverage.py | 2 +- ...bi_passive_passthrough_assumptions_v1.json | 1 + .../us/release_input_coverage_manifest.json | 2 +- .../build/us/repeal_revenue_benchmarks.json | 2 +- .../src/microcosm/build/us/spec/spine.yaml | 4 +- .../us_runtime/qbi_passive_passthrough.py | 4 + .../us_runtime/release_input_coverage.py | 74 +++++++++++++++---- .../tests/test_release_input_coverage.py | 53 ++++++++++--- .../tests/test_us_multispine_pool_tool.py | 4 +- ...uild_us_release_input_coverage_manifest.py | 5 +- 13 files changed, 153 insertions(+), 41 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 2f4bb9869..dcc420955 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -7,8 +7,9 @@ Dual-review remediation is in progress on `passive-pass-through-722` as of committed as `d9f19c66`, with the supervisor-approved resolutions reproduced exactly. The post-merge resource closure and first-class typed passive contract are regenerated and their fail-closed coverage ledger is verified. The -non-vacuous QBI preservation regression is also complete. Work remains offline: -no fetch, push, PR mutation, publication, or promotion is in scope. +non-vacuous QBI preservation regression and locked-registry release gate are +also complete. Work remains offline: no fetch, push, PR mutation, publication, +or promotion is in scope. ## Done @@ -61,6 +62,24 @@ no fetch, push, PR mutation, publication, or promotion is in scope. byte-identical to the no-passive current-main pipeline. The independent full-length RNG-family array test remains in place; all three focused tests pass and targeted Ruff is clean. +- Made `us_release_input_coverage_gate` require every hard-required manifest + column to exist in `engine.variables()`, independently of frame presence and + signal. Failures name the version read from `engine_abi.lock.json` and report + `required_missing_from_engine_registry` in gate details. +- Added the two explicit failure-mode regressions + `test_required_all_zero_column_fails_when_registry_contains_it` and + `test_required_column_absent_from_locked_registry_fails_even_with_signal`. + The former proves default-only data stays red even with registry presence; + the latter proves nonzero data stays red when the locked variable is absent. +- Documented in the generated release manifest, passive assumptions, repeal + benchmark resource, and US fact-to-target guide that the passive column is + engine-inert under PolicyEngine-US 1.764.6 and the hard release gate remains + red until the pin advances past 1.764.6 to a release containing #9306. +- Regenerated the manifest and restricted assumptions, then propagated their + identity through the US bundle (spec SHA-256 + `00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931`) + and F0 report. The targeted gate/resource/inventory/adapter suite passes 153 + tests in 8m34s; the generator check and targeted Ruff are clean. - The implementation and verification bullets below describe the historical pre-review checkpoint at `a4d93f78`; the verdict supersedes its former completion claim. @@ -117,9 +136,6 @@ no fetch, push, PR mutation, publication, or promotion is in scope. ## Next -- Fail the release-input gate when a required manifest variable is absent from - the locked engine registry; cover both absent-variable and all-zero-required - failure modes and document the 1.764.6/#9306 engine-inert boundary honestly. - Make restricted certification independently re-solve and compare the calibration shift. - Run targeted and full workspace tests with the prescribed restricted-data diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index 3fea56ff9..c8caacb90 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1852,7 +1852,7 @@ "alpha", "zeta" ], - "sha256": "e94262a879001082093c20af72a04bc7458149c1b751855f6826b9767a502eb3" + "sha256": "8048a795463ea1e5f0d2c113b6eb3d65c112ce08ab526ba96d29ecf7718b7b49" }, "failures": [], "observed": { @@ -1875,7 +1875,7 @@ "alpha", "zeta" ], - "sha256": "e94262a879001082093c20af72a04bc7458149c1b751855f6826b9767a502eb3" + "sha256": "8048a795463ea1e5f0d2c113b6eb3d65c112ce08ab526ba96d29ecf7718b7b49" }, "status": "covered" }, @@ -1941,7 +1941,7 @@ "us_qbi_passive_passthrough_contract", "us_qbi_reconciliation_contract" ], - "sha256": "a2b7b3cb27d79e4270f585c3b23cd6fea67c5c579f1d31b692bbb2690a87d9ba" + "sha256": "d034f564016020002ebb7d6c27e69485d428ad0d81d64f2de48435bb899b239e" }, "status": "covered" }, @@ -2440,7 +2440,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0" + "spec_sha256": "00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931" } }, "report_schema_version": 3, @@ -2450,7 +2450,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0" + "spec_sha256": "00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931" }, "status": "pass" } diff --git a/docs/us-fact-to-target.md b/docs/us-fact-to-target.md index 70ff2dc4f..0ad51e4a5 100644 --- a/docs/us-fact-to-target.md +++ b/docs/us-fact-to-target.md @@ -125,6 +125,13 @@ Probes are **generated data**: author them in manifest with that tool — never hand-edit the JSON (a byte-sync test enforces this). Probe discipline: +Persisting a required source column does not prove that the locked engine can +consume it. The release-input gate also requires every required name to exist +in the locked engine registry. In particular, +`passive_partnership_s_corp_income` remains engine-inert under +PolicyEngine-US 1.764.6, and the gate must remain red until the pin advances +past 1.764.6 to a release containing PolicyEngine-US #9306. + - **Measure the effect first** on the certified artifact; set `min_abs_effect` well under it (~25%). Never guess floors. - **Probe the law year where the channel exists.** Attribution-only columns diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index 049d9afc0..7fb3bcf30 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -333,7 +333,7 @@ "acs_person_predictors": "878c788a6f037d7aca12b3586ea034eff04f3034ffa11935a736493042551f25", "authority": "f0b676f6508dbf6bb2b787c42e6b85331bacc57c6649ac7ad15fdaa5884a1b2d", "early_families": "e26a90e2b5c16e23e7c17424d1c2e4ab18ed66b1d0e129248e87c0bab9b3fd5d", - "full_checkpoint": "e94262a879001082093c20af72a04bc7458149c1b751855f6826b9767a502eb3", + "full_checkpoint": "8048a795463ea1e5f0d2c113b6eb3d65c112ce08ab526ba96d29ecf7718b7b49", "gap_fill_schedule": "96aefe2853de91ae95f50bc2ccc2c1dd94802c27f21c643981152bbcb13c4e10", "graph_nodes": "a83363de26cad0144b5a98b36b4bca49542e37a7b9fee3d7e541f692deeff864", "late_families": "a160432fc12a85df20ba7fd6687673b3c31786df7a983e2477604ab923b26d18", diff --git a/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json index 803950899..a147df187 100644 --- a/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json +++ b/packages/microcosm-build/src/microcosm/build/us/qbi_passive_passthrough_assumptions_v1.json @@ -56,6 +56,7 @@ "notes": [ "The target is provisional because Form 8960 line 4c does not decompose passive pass-through income from rental and royalty income.", "Rental income remains unchanged: the current engine includes it fully in NIIT, and this stage assigns only the pass-through leaf.", + "The output remains engine-inert under locked PolicyEngine-US 1.764.6 because that registry does not expose the variable; the hard release gate stays red until the engine pin advances past 1.764.6 to a release containing PolicyEngine-US #9306.", "The runtime does not read the restricted replay artifact or solve the calibration shift.", "The sibling stage neither invokes nor advances any archived QBI random stream and preserves all 15 existing QBI leaves.", "The TY2023 administrative target is applied to the pinned 2024-shaped replay without a population-vintage backcast; this period mismatch is another reason the target remains provisional." diff --git a/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json b/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json index f31e3deec..5c03c5714 100644 --- a/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json +++ b/packages/microcosm-build/src/microcosm/build/us/release_input_coverage_manifest.json @@ -299,7 +299,7 @@ "status": "required" }, "passive_partnership_s_corp_income": { - "note": "Section 469 passive subset of partnership and S-corporation income, assigned by the provisional SCF-shaped sibling stage for the NIIT base. Required with no reviewed exclusion so release publication cannot silently drop the new engine input.", + "note": "Section 469 passive subset of partnership and S-corporation income, assigned by the provisional SCF-shaped sibling stage for the NIIT base. Required with no reviewed exclusion so release publication cannot silently drop the new engine input. The locked PolicyEngine-US 1.764.6 registry does not expose this variable, so the column remains engine-inert and the release gate stays red until the engine pin advances past 1.764.6 to a release containing PolicyEngine-US #9306.", "status": "required" }, "pre_subsidy_care_expenses": { diff --git a/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json b/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json index a33bcc2e0..1b296c665 100644 --- a/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json +++ b/packages/microcosm-build/src/microcosm/build/us/repeal_revenue_benchmarks.json @@ -36,7 +36,7 @@ }, "provisional": true, "diagnostics_only": true, - "description": "Line 4c combines rental real estate, royalties, partnerships, S corporations, trusts, and other trade-or-business flow-through amounts after the non-section-1411 adjustment. It does not identify the passive partnership/S-corporation component. The diagnostic uses the 2023 policy period on the release artifact's 2024-shaped population without a population-vintage backcast. The lower bound assumes all line 4c income is rental or royalty income; the upper bound assumes all of it is passive pass-through income. Rental income already enters the engine NIIT base in full, so overlap remains an explicit open question and no rental treatment changes here." + "description": "Line 4c combines rental real estate, royalties, partnerships, S corporations, trusts, and other trade-or-business flow-through amounts after the non-section-1411 adjustment. It does not identify the passive partnership/S-corporation component. The diagnostic uses the 2023 policy period on the release artifact's 2024-shaped population without a population-vintage backcast. The lower bound assumes all line 4c income is rental or royalty income; the upper bound assumes all of it is passive pass-through income. Rental income already enters the engine NIIT base in full, so overlap remains an explicit open question and no rental treatment changes here. The passive column remains engine-inert under the locked PolicyEngine-US 1.764.6 registry; the hard release gate stays red until the pin advances past 1.764.6 to a release containing PolicyEngine-US #9306." } ] } diff --git a/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml b/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml index 3ac8a9028..1d68b850b 100644 --- a/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml +++ b/packages/microcosm-build/src/microcosm/build/us/spec/spine.yaml @@ -60,7 +60,7 @@ pipeline_contract: evidence_resource: qbi_passive_passthrough_v1.json evidence_sha256: 32fac446d5f208a9c3f73c8234184144dd0c1f322ccdf186e5fb94dd774d61a7 assumptions_resource: qbi_passive_passthrough_assumptions_v1.json - assumptions_sha256: 0283a0afc9efc28bcdda6ad4f21bb29501c156640a4deebedecb1e3da128b358 + assumptions_sha256: 0be963b0c57042d70afc84a0921613f49f32c19358a8647d75e2ce6555b5d309 log_odds_shift: -1.157105426398319 random_streams: bit_generator: PCG64 @@ -69,7 +69,7 @@ pipeline_contract: presence_family: 0 root_seed_default: 0 share_family: 1 - sha256: cf3686966f12700ce1314e0e5afde5ff208d84c0e5e605c8ab84fc8cd0000aab + sha256: b67ef6deed6dd344aa7ae888c3a9f6ac88c1565914289ca42483d0369d628b18 qbi_reconciliation: version: 2 operation: shared_all_or_nothing_identity_reconciliation diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py index c4b65e3d4..7122a1ab8 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py @@ -710,6 +710,10 @@ def build_qbi_passive_passthrough_assumptions_payload( "decompose passive pass-through income from rental and royalty income.", "Rental income remains unchanged: the current engine includes it " "fully in NIIT, and this stage assigns only the pass-through leaf.", + "The output remains engine-inert under locked PolicyEngine-US " + "1.764.6 because that registry does not expose the variable; the " + "hard release gate stays red until the engine pin advances past " + "1.764.6 to a release containing PolicyEngine-US #9306.", "The runtime does not read the restricted replay artifact or solve " "the calibration shift.", "The sibling stage neither invokes nor advances any archived QBI " diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py b/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py index 3bc7a9ab8..499dcf92c 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/release_input_coverage.py @@ -33,8 +33,10 @@ :func:`assert_release_input_coverage_manifest_current` proves the manifest against the pinned eCPS surface and the live PolicyEngine-US graph, so the register cannot silently rot: it must cover exactly the reference eCPS populated layers, -every declared column must be a real engine input leaf, and the SSI asset inputs -must stay hard requirements. +every declared column must be a real engine input leaf apart from the exact +pending-input declaration, and the SSI asset inputs must stay hard requirements. +That declaration exception never bypasses the release gate's independent locked- +registry requirement. """ from __future__ import annotations @@ -126,6 +128,7 @@ ] US_RELEASE_INPUT_COVERAGE_RESOURCE = "release_input_coverage_manifest.json" +_ENGINE_ABI_LOCK_RESOURCE = "engine_abi.lock.json" # The frozen reference artifact predates the retired pipeline's export of the # pure FLSA overtime-premium input, OBBBA's distinct qualifying passenger- @@ -157,9 +160,11 @@ } ) -# The source column ships ahead of the engine release that consumes it. Keep -# this exception exact and short-lived: once PolicyEngine-US #9306 is in the -# installed registry, subtracting it below is a no-op. +# The source column ships ahead of the engine release that consumes it. This +# exception applies only to manifest declaration validation below; it does not +# exempt the release gate's required=>locked-registry condition. Keep it exact +# and short-lived: once PolicyEngine-US #9306 is in the installed registry, +# subtracting it below is a no-op. PROVISIONAL_PENDING_ENGINE_INPUTS = frozenset( {US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN} ) @@ -432,6 +437,26 @@ def _resource_payload(resource: str) -> Mapping[str, Any]: return raw +def _locked_policyengine_us_version() -> str: + """Read the release gate's engine version from the generated ABI lock.""" + payload = _resource_payload(_ENGINE_ABI_LOCK_RESOURCE) + engine = payload.get("engine") + if not isinstance(engine, Mapping): + raise ValueError( + f"{_ENGINE_ABI_LOCK_RESOURCE}: 'engine' must be a JSON object." + ) + if engine.get("package") != "policyengine-us": + raise ValueError( + f"{_ENGINE_ABI_LOCK_RESOURCE}: expected the policyengine-us package." + ) + version = engine.get("version") + if not isinstance(version, str) or not version.strip(): + raise ValueError( + f"{_ENGINE_ABI_LOCK_RESOURCE}: engine.version must be a nonempty string." + ) + return version + + def load_release_input_coverage_manifest( resource: str = US_RELEASE_INPUT_COVERAGE_RESOURCE, ) -> ReleaseInputCoverageManifest: @@ -564,13 +589,14 @@ def us_release_input_coverage_gate( ) -> GateResult: """Build the named US release input-column coverage gate for an export frame. - Every ``required`` manifest column must be persisted by ``frame`` as a key - with at least one finite/non-null, non-default value; a required column that - is absent or degenerate (no observations, or every value the engine default) - fails the gate, and a reviewed exclusion whose column now carries signal is - stale and fails too (#286 cannot-rot). Run on the calibrated export frame - just before ``write_dataset``, it hard-fails the release like the export-mass - parity gate. + Every ``required`` manifest column must exist in the locked engine registry + and be persisted by ``frame`` as a key with at least one finite/non-null, + non-default value. A required column that is absent from the registry, + absent from the frame, or degenerate (no observations, or every value the + engine default) fails the gate, and a reviewed exclusion whose column now + carries signal is stale and fails too (#286 cannot-rot). Run on the + calibrated export frame just before ``write_dataset``, it hard-fails the + release like the export-mass parity gate. Args: frame: The export :class:`microcosm.frame.Frame`. @@ -584,6 +610,9 @@ def us_release_input_coverage_gate( required = manifest.required_columns reviewed = manifest.reviewed_exclusions relevant = required | set(reviewed) + locked_engine_version = _locked_policyengine_us_version() + engine_registry = {str(variable) for variable in engine.variables()} + missing_from_registry = sorted(required - engine_registry) present_values: dict[str, Any] = {} for entity in frame.entities: @@ -602,7 +631,7 @@ def us_release_input_coverage_gate( present_values["household_weight"] = frame.weights_for("household").values degenerate, no_observed = _degenerate_columns(present_values, engine) - return input_column_coverage_gate( + column_result = input_column_coverage_gate( present_values.keys(), required_columns=required, degenerate_columns=degenerate, @@ -610,6 +639,24 @@ def us_release_input_coverage_gate( reviewed_exclusions=reviewed, name="us_release_input_coverage", ) + registry_failures = tuple( + f"{column}: required release input is absent from the locked " + f"PolicyEngine-US {locked_engine_version} variable registry; the " + "adapter would silently omit it. Advance the engine pin to a version " + "that registers this input before release." + for column in missing_from_registry + ) + return GateResult( + name=column_result.name, + passed=column_result.passed and not registry_failures, + failures=(*column_result.failures, *registry_failures), + details={ + **dict(column_result.details), + "locked_engine_version": locked_engine_version, + "engine_registry_variable_count": len(engine_registry), + "required_missing_from_engine_registry": missing_from_registry, + }, + ) def _coverage_engine() -> Any | None: @@ -661,6 +708,7 @@ def assert_release_input_coverage_manifest_current( from the exact provisional #722 input shipping ahead of its engine release, and every probe's ``binding_inputs`` must resolve on the live engine, so the contract cannot otherwise guard names the engine lacks. + This declaration-only exception does not exempt the runtime release gate. A no-op for the engine-graph half when no engine is available (the workspace test environment); the checked-in-facts half always runs. diff --git a/packages/microcosm-build/tests/test_release_input_coverage.py b/packages/microcosm-build/tests/test_release_input_coverage.py index 692a8c710..eaf4a1214 100644 --- a/packages/microcosm-build/tests/test_release_input_coverage.py +++ b/packages/microcosm-build/tests/test_release_input_coverage.py @@ -11,12 +11,12 @@ 5. a bound reform scoring ~$0 fails the reform-coverage smoke. The frame is a real :class:`~microcosm.frame.Frame`; most tests use an engine stub -exposing only ``default_values`` (the surface the gate uses), and the simulation is -injected (with ``_build_reform`` monkeypatched). One optional regression reproduces -the nullable-boolean failure against the real PolicyEngine-US defaults and full US -entity schema. Separate tests assert the shipped manifest keeps the #368 -red-by-design guarantee: the SSI countable-resource assets stay hard requirements -with no exclusion, and demoting one is rejected. +exposing ``default_values`` and the locked ``variables`` registry, and the +simulation is injected (with ``_build_reform`` monkeypatched). One optional +regression reproduces the nullable-boolean failure against the real PolicyEngine-US +defaults and full US entity schema. Separate tests assert the shipped manifest +keeps the #368 red-by-design guarantee: the SSI countable-resource assets stay hard +requirements with no exclusion, and demoting one is rejected. """ from __future__ import annotations @@ -135,14 +135,22 @@ def _household_weight_frame( class _StubEngine: - """Only ``default_values(names)`` — the single engine surface the gate uses.""" + """The default-value and locked-variable surfaces used by the gate.""" - def __init__(self, defaults: dict[str, object]) -> None: + def __init__( + self, + defaults: dict[str, object], + variables: set[str] | None = None, + ) -> None: self._defaults = dict(defaults) + self._variables = set(defaults) if variables is None else set(variables) def default_values(self, names) -> dict[str, object]: return {name: self._defaults[name] for name in names if name in self._defaults} + def variables(self) -> list[str]: + return sorted(self._variables) + def _manifest( columns: tuple[ReleaseInputColumn, ...], @@ -203,7 +211,7 @@ def test_missing_required_column_fails(self) -> None: for failure in result.failures ) - def test_degenerate_required_column_without_exclusion_fails(self) -> None: + def test_required_all_zero_column_fails_when_registry_contains_it(self) -> None: # Case 3: stock_assets is present but every value is the engine default, # so the export writer's default-broadcast makes it indistinguishable # from absence — and there is no reviewed exclusion to accept it. @@ -217,12 +225,35 @@ def test_degenerate_required_column_without_exclusion_fails(self) -> None: frame, _StubEngine(_DEFAULTS), manifest=_CONTRACT ) assert not result.passed + assert result.details["required_missing_from_engine_registry"] == [] assert "stock_assets" in result.details["degenerate_required"] assert any( "stock_assets" in failure and "default" in failure for failure in result.failures ) + def test_required_column_absent_from_locked_registry_fails_even_with_signal( + self, + ) -> None: + name = "future_engine_input" + manifest = _manifest((ReleaseInputColumn(name, "required"),)) + frame = _person_frame({name: np.asarray([0.0, 125.0])}) + + result = us_release_input_coverage_gate( + frame, + _StubEngine({name: 0.0}, variables=set()), + manifest=manifest, + ) + + assert not result.passed + assert result.details["missing"] == [] + assert result.details["degenerate_required"] == [] + assert result.details["locked_engine_version"] == "1.764.6" + assert result.details["required_missing_from_engine_registry"] == [name] + assert len(result.failures) == 1 + assert name in result.failures[0] + assert "locked PolicyEngine-US 1.764.6 variable registry" in result.failures[0] + def test_all_nonfinite_required_asset_columns_fail(self) -> None: assets = tuple(sorted(SSI_COUNTABLE_RESOURCE_ASSETS)) assert assets == ("bank_account_assets", "bond_assets", "stock_assets") @@ -732,7 +763,9 @@ def test_manifest_is_current(self) -> None: # SSI assets must stay hard requirements. assert_release_input_coverage_manifest_current() - def test_provisional_passive_input_may_precede_engine_registry(self) -> None: + def test_manifest_declaration_may_precede_engine_registry(self) -> None: + # This is only the manifest-authoring exception. The runtime release + # gate independently fails required names absent from the locked graph. manifest = load_release_input_coverage_manifest() for engine_has_passive_input in (False, True): variables = set(manifest.declared_columns) diff --git a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py index b6ae71cde..7d5020c01 100644 --- a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py @@ -1903,7 +1903,7 @@ def capture_equality(expected: object, actual: object) -> None: "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0", + "spec_sha256": "00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931", }, } @@ -2106,7 +2106,7 @@ def test_constants_adapter_fixture_checkpoints_are_byte_identical_and_only_recei "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "11b5f830141d007b53131f6c863d15a6be10787fc6d88aeb147317d2c1f593e0", + "spec_sha256": "00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931", } def run_fixture(root: Path, *, config_authority: str) -> dict[str, object]: diff --git a/tools/build_us_release_input_coverage_manifest.py b/tools/build_us_release_input_coverage_manifest.py index a017e2d0d..b220ec550 100644 --- a/tools/build_us_release_input_coverage_manifest.py +++ b/tools/build_us_release_input_coverage_manifest.py @@ -91,7 +91,10 @@ "Section 469 passive subset of partnership and S-corporation income, " "assigned by the provisional SCF-shaped sibling stage for the NIIT " "base. Required with no reviewed exclusion so release publication " - "cannot silently drop the new engine input." + "cannot silently drop the new engine input. The locked PolicyEngine-US " + "1.764.6 registry does not expose this variable, so the column remains " + "engine-inert and the release gate stays red until the engine pin " + "advances past 1.764.6 to a release containing PolicyEngine-US #9306." ), "schedule_d_capital_gain_distributions": ( "Schedule D line 13 route leg of the #282 capital-gain-distributions " From 894fabe6f328ee89876fc125e23563d235425a0d Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 21 Aug 2026 08:16:58 -0400 Subject: [PATCH 17/23] test(us): independently resolve passive calibration --- PROGRESS.md | 17 +++++--- .../us_runtime/qbi_passive_passthrough.py | 3 +- .../tests/test_us_qbi_passive_passthrough.py | 39 +++++++++++++++++-- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index dcc420955..92dba7d0f 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -7,9 +7,10 @@ Dual-review remediation is in progress on `passive-pass-through-722` as of committed as `d9f19c66`, with the supervisor-approved resolutions reproduced exactly. The post-merge resource closure and first-class typed passive contract are regenerated and their fail-closed coverage ledger is verified. The -non-vacuous QBI preservation regression and locked-registry release gate are -also complete. Work remains offline: no fetch, push, PR mutation, publication, -or promotion is in scope. +non-vacuous QBI preservation regression, locked-registry release gate, and +non-circular restricted calibration certification are also complete. Work +remains offline: no fetch, push, PR mutation, publication, or promotion is in +scope. ## Done @@ -80,6 +81,14 @@ or promotion is in scope. `00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931`) and F0 report. The targeted gate/resource/inventory/adapter suite passes 153 tests in 8m34s; the generator check and targeted Ruff are clean. +- Replaced the circular restricted replay check with an independent solve: the + validator derives the `$54,628,492,000` midpoint from the evidence artifact's + separately pinned bounds, runs the full 128-iteration calibration on the + restricted PUF, and compares the solved `-1.157105426398319` shift to the + persisted value within `1e-12` (expected aggregate within `$1`). The ordinary + assumptions validator also rejects shifts outside the declared solver bounds + instead of discarding the parsed value. All 12 passive tests pass in 53.76s + with the restricted artifact, and targeted Ruff is clean. - The implementation and verification bullets below describe the historical pre-review checkpoint at `a4d93f78`; the verdict supersedes its former completion claim. @@ -136,8 +145,6 @@ or promotion is in scope. ## Next -- Make restricted certification independently re-solve and compare the - calibration shift. - Run targeted and full workspace tests with the prescribed restricted-data environment, run Ruff, commit regenerated artifacts, and write the final report to `FINAL_REPORT.md`. diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py index 7122a1ab8..02f3a52e2 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/qbi_passive_passthrough.py @@ -352,7 +352,8 @@ def validate_qbi_passive_passthrough_assumptions( ) if not math.isclose(expected, amount, rel_tol=1e-10, abs_tol=1.0): raise ValueError("Passive expected aggregate does not hit its target.") - _ = shift + if not _SOLVER_LOWER_BOUND <= shift <= _SOLVER_UPPER_BOUND: + raise ValueError("Passive log-odds shift is outside its solver bounds.") tolerance = _number( calibration.get("replay_relative_tolerance"), "calibration.replay_relative_tolerance", diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py index 09f374a9d..1a985d197 100644 --- a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py @@ -164,6 +164,11 @@ def test_packaged_assumptions_are_strict_and_pin_evidence_digest( with pytest.raises(ValueError, match="random-stream contract drifted"): validate_qbi_passive_passthrough_assumptions(drifted_stream) + out_of_bounds_shift = deepcopy(assumptions) + out_of_bounds_shift["calibration"]["log_odds_shift"] = 31.0 + with pytest.raises(ValueError, match="outside its solver bounds"): + validate_qbi_passive_passthrough_assumptions(out_of_bounds_shift) + monkeypatch.setattr(passive_module, "_resource_sha256", lambda _name: "0" * 64) with pytest.raises(ValueError, match="evidence digest does not match"): load_qbi_passive_passthrough_assumptions() @@ -438,7 +443,9 @@ def test_assumptions_builder_is_deterministic_on_a_synthetic_replay( not os.environ.get(PUF_REPLAY_ENVIRONMENT), reason=f"set {PUF_REPLAY_ENVIRONMENT} to run the restricted replay", ) -def test_restricted_replay_hits_provisional_target_and_pins_artifact() -> None: +def test_restricted_replay_independently_resolves_persisted_shift_and_pins_artifact() -> ( + None +): builder = _load_assumptions_builder() replay_path = Path(os.environ[PUF_REPLAY_ENVIRONMENT]).expanduser() passthrough, schedule_e, weights, artifact = builder.read_replay_artifact( @@ -458,16 +465,40 @@ def test_restricted_replay_hits_provisional_target_and_pins_artifact() -> None: assert committed_artifact["tax_unit_rows"] == EXPECTED_REPLAY_TAX_UNIT_ROWS assert committed_artifact["person_rows"] == EXPECTED_REPLAY_PERSON_ROWS + evidence = load_qbi_passive_passthrough_evidence() + bounds = evidence["external_anchor"]["passive_passthrough_bounds"] + target = (bounds["lower"]["amount"] + bounds["upper"]["amount"]) / 2.0 + solved_shift, solved_expected = calibrate_qbi_passive_log_odds_shift( + passthrough, + schedule_e, + weights, + evidence=evidence, + target=target, + ) + persisted_calibration = assumptions["calibration"] + + assert target == PROVISIONAL_TARGET + assert solved_shift == pytest.approx( + persisted_calibration["log_odds_shift"], + rel=0.0, + abs=1e-12, + ) + assert solved_expected == pytest.approx(target, rel=0.0, abs=1.0) + assert solved_expected == pytest.approx( + persisted_calibration["expected_aggregate"], + rel=0.0, + abs=1.0, + ) + assigned = assign_passive_partnership_s_corp_income( passthrough, schedule_e, - seed=assumptions["calibration"]["seeded_replay"]["seed"], + seed=persisted_calibration["seeded_replay"]["seed"], ) achieved = float(np.dot(weights, assigned)) - target = assumptions["calibration"]["provisional_target"]["amount"] assert achieved == pytest.approx( - assumptions["calibration"]["seeded_replay"]["aggregate"], + persisted_calibration["seeded_replay"]["aggregate"], rel=0.0, abs=1e-3, ) From dcc28c44fee34942c9ddf80bd9caeb637aa84dd4 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 22 Aug 2026 19:57:55 +0200 Subject: [PATCH 18/23] Re-pin ledger mode/effect counts and stage-input manifest rows after merge Measured from the merged tree: mode_counts legacy_behavior 13,297 and front_end_validation 355; generation0 legacy_behavior 37,770 and no_generation0_effect 3,671; remaining stage-input manifest 997 rows (the passive stage adds four). Engine ABI lock regenerated. Co-Authored-By: Claude Fable 5 --- .../tests/test_spec_engine_coverage_tool.py | 8 ++++---- .../microcosm-build/tests/test_spec_engine_engine_abi.py | 4 ++-- .../microcosm-build/tests/test_spec_engine_field_usage.py | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py b/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py index 756281b37..e3fd0ea96 100644 --- a/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py +++ b/packages/microcosm-build/tests/test_spec_engine_coverage_tool.py @@ -60,14 +60,14 @@ def test_us_coverage_is_exact_complete_and_honest( assert fields["multiple_primary_use_field_count"] == 0 assert fields["claim_count"] == 47 assert fields["mode_counts"] == { - "legacy_behavior": 13_244, + "legacy_behavior": 13_297, "compiler_semantic": 27_661, - "front_end_validation": 346, + "front_end_validation": 355, "identity_only": 128, } assert fields["generation0_effect_counts"] == { - "legacy_behavior": 37_717, - "no_generation0_effect": 3_662, + "legacy_behavior": 37_770, + "no_generation0_effect": 3_671, } inventory = coverage_report["inventory_coverage"] diff --git a/packages/microcosm-build/tests/test_spec_engine_engine_abi.py b/packages/microcosm-build/tests/test_spec_engine_engine_abi.py index 8948268da..21392067a 100644 --- a/packages/microcosm-build/tests/test_spec_engine_engine_abi.py +++ b/packages/microcosm-build/tests/test_spec_engine_engine_abi.py @@ -362,8 +362,8 @@ def test_checked_in_us_lock_is_fresh_schema_valid_and_not_authored() -> None: for row in payload["programs"].values() ) remaining = payload["remaining_stage_input_manifest"] - assert len(remaining["rows"]) == 993 - assert remaining["receipt"]["entry_count"] == 993 + assert len(remaining["rows"]) == 997 + assert remaining["receipt"]["entry_count"] == 997 assert remaining["receipt"]["stage_counts"] == { "derive": 34, "seed": 29, diff --git a/packages/microcosm-build/tests/test_spec_engine_field_usage.py b/packages/microcosm-build/tests/test_spec_engine_field_usage.py index 1d099c6c2..0cbcbd229 100644 --- a/packages/microcosm-build/tests/test_spec_engine_field_usage.py +++ b/packages/microcosm-build/tests/test_spec_engine_field_usage.py @@ -98,14 +98,14 @@ def test_exact_complete_ledger_has_one_primary_mode_per_pointer(field_ledger) -> "resolved_bindings": 9_252, } assert field_ledger.mode_counts == { - "legacy_behavior": 13_244, + "legacy_behavior": 13_297, "compiler_semantic": 27_661, - "front_end_validation": 346, + "front_end_validation": 355, "identity_only": 128, } assert field_ledger.generation0_effect_counts == { - "legacy_behavior": 37_717, - "no_generation0_effect": 3_662, + "legacy_behavior": 37_770, + "no_generation0_effect": 3_671, } assert len({field.pointer for field in field_ledger.fields}) == 41_441 From bc0ddb0a0933a1e9fb53a340daf0cede82346cbd Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 22 Aug 2026 21:34:38 +0200 Subject: [PATCH 19/23] Fix merge/re-pin slips: ABI receipt literals (38/29/930, 4ec692e3) and restore passive checkpoint-identity coverage Re-verdict B4: dcc28c44 updated the remaining-stage-input row count to 997 but left the derive count (34 -> 38) and manifest sha (8247a93e -> 4ec692e3) stale; the merge 16c8cfd6 dropped both passive-contract equality assertions, the stale_passive mutation candidate, and the 10-digest expectation from test_us_multispine_pool_tool.py. Both restored; the residual diff of that file against the pre-merge tip is now only the re-measured spec/manifest pins. --- .../tests/test_spec_engine_engine_abi.py | 8 +++----- .../tests/test_us_multispine_pool_tool.py | 20 ++++++++++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/microcosm-build/tests/test_spec_engine_engine_abi.py b/packages/microcosm-build/tests/test_spec_engine_engine_abi.py index 21392067a..51093c24d 100644 --- a/packages/microcosm-build/tests/test_spec_engine_engine_abi.py +++ b/packages/microcosm-build/tests/test_spec_engine_engine_abi.py @@ -365,12 +365,12 @@ def test_checked_in_us_lock_is_fresh_schema_valid_and_not_authored() -> None: assert len(remaining["rows"]) == 997 assert remaining["receipt"]["entry_count"] == 997 assert remaining["receipt"]["stage_counts"] == { - "derive": 34, + "derive": 38, "seed": 29, "simulate": 930, } assert remaining["receipt"]["manifest_sha256"] == ( - "8247a93e5f8f63d3ae71c1de681c29524d4bb8f07e3c6a50dcaf431b1377020f" + "4ec692e3262f396ebacd6144c900b31ef2ae3eabc1062f38e6db6d3ab6f433fa" ) assert ( remaining["receipt"]["ssi_dependency_contract"]["engine_version_ref"] @@ -431,9 +431,7 @@ def absent(package: str) -> str: monkeypatch.setattr(engine_abi, "_installed_engine_version", absent) registry = load_schema_registry() - us_root = ( - Path(__file__).resolve().parents[1] / "src" / "microcosm" / "build" / "us" - ) + us_root = Path(__file__).resolve().parents[1] / "src" / "microcosm" / "build" / "us" spec_dir = us_root / "spec" lock_path = tmp_path / engine_abi.ENGINE_ABI_LOCK_FILENAME parsed = json_module.loads( diff --git a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py index 97bd2ee3d..b5141bc9f 100644 --- a/packages/microcosm-build/tests/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/test_us_multispine_pool_tool.py @@ -2725,6 +2725,9 @@ def identity() -> dict[str, object]: pool_tool.us_late_producer_schedule_receipt() ) assert current["pool_code"]["late_producer_schedule"] == expected_schedule + assert current["pool_code"]["us_qbi_passive_passthrough_contract"] == ( + pool_tool.us_qbi_passive_passthrough_contract_identity() + ) changed_schedule = copy.deepcopy(expected_schedule) changed_schedule["payload_sha256"] = "0" * 64 @@ -2851,6 +2854,9 @@ def identity() -> dict[str, object]: assert pool_code["us_qbi_reconciliation_contract"] == ( pool_tool.us_qbi_reconciliation_contract_identity() ) + assert pool_code["us_qbi_passive_passthrough_contract"] == ( + pool_tool.us_qbi_passive_passthrough_contract_identity() + ) assert pool_code["remaining_stage_input_manifest"] == ( pool_tool.pool_remaining_stage_input_manifest_receipt() ) @@ -2885,6 +2891,17 @@ def identity() -> dict[str, object]: lambda: qbi_contract, ) stale_qbi = identity() + with monkeypatch.context() as changed: + passive_contract = copy.deepcopy( + pool_tool.us_qbi_passive_passthrough_contract_identity() + ) + passive_contract["sha256"] = "0" * 64 + changed.setattr( + pool_tool, + "us_qbi_passive_passthrough_contract_identity", + lambda: passive_contract, + ) + stale_passive = identity() with monkeypatch.context() as changed: changed.setattr(pool_tool, "PUF_CAPITAL_GAINS_TAIL_MANIFEST_SCHEMA_VERSION", 1) stale_tail_schema = identity() @@ -2949,6 +2966,7 @@ def changed_source_stage_binding( stale_qrf, stale_acs, stale_qbi, + stale_passive, stale_tail_schema, stale_remaining_manifest, stale_tail_contract, @@ -2956,7 +2974,7 @@ def changed_source_stage_binding( stale_source_asset, ) } - assert len(digests) == 9 + assert len(digests) == 10 # Positive control: discovery accepts the exact current semantic identity # under the same fixture engine version used to construct it. From 1172a595dc719a4369c5570bd8fdab2ecaea6d23 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 22 Aug 2026 21:37:03 +0200 Subject: [PATCH 20/23] docs: start B1 B3 reverdict closure journal --- PROGRESS.md | 82 +++++++++++++++++------------------------------------ 1 file changed, 26 insertions(+), 56 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index c7d8d2d80..42c86e4be 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -1,65 +1,35 @@ -# Progress: one US target surface +# Progress: passive-pass-through-722 re-verdict closure ## State -Surface unification and scale-identity enforcement are complete on -`one-target-surface`: every US entrypoint -now compiles one national + state + congressional-district target registry, -and the CLI/config switches that could delete CD or JCT target rows are gone. -Parity doctrine now protects that family as a red-line compile. Sparse and dense -artifacts may differ in record count, never target membership. +Re-verdict findings B1 and B3 are being closed offline on +`passive-pass-through-722` from starting HEAD `bc0ddb0a`. No production code, +restricted artifacts, or supervisor-owned tests have been changed. No fetch, +push, pull-request mutation, rebase, reset, checkout, or stash is in scope. ## Done -- Read `CLAUDE.md`, the target-parity declaration, the fiscal compiler and its - never-controls doctrine, the current CD opt-in tests, and - [microcosm#449](https://github.com/PolicyEngine/microcosm/issues/449) / - [microcosm#569](https://github.com/PolicyEngine/microcosm/issues/569). -- Attempted the required `uv sync --all-packages --extra us`. The managed - sandbox denied writes to the default uv cache, then its network restriction - prevented a clean-cache download of `pyvis`. A byte-identical-lock sibling - environment was cloned copy-on-write; tests use that complete environment - with this worktree's package sources first on `PYTHONPATH` because an offline - editable reinstall still requires unavailable build-isolation metadata. -- Attempted the GitNexus refactoring impact workflow. Local indexing completed, - but GitNexus could not register the index because the sandbox forbids writing - `~/.gitnexus/registry.json`; a direct source/call-site audit is the fallback. -- Confirmed the starting worktree was clean and no build or push was run. -- Ran the workspace suite for 1,137 seconds with no failure before interrupting - it inside the unrelated PUF-QRF stale-checkpoint subprocess regression; the - affected US target/compiler shard is the per-commit validation boundary, with - a complete workspace run reserved for the final tree. Ruff is green. -- Established a green 10-file affected-suite baseline covering target - compilation, parity, the release builder/scorers, CD vintage translation, - Ledger profiles, and the generated calibration contract (100% in 349.59s). -- Removed the congressional-district compilation option throughout the fiscal - compiler, builder, fiscal scorer, state-file scorer, ACS local tool, aging - diff, experiments, tests, docs, and generated contract. The canonical CD - crosswalk is now the default at each production entrypoint. -- Removed the diagnostic JCT target-deletion option and its release-gate bypass; - diagnostic tools now score the same registry as releases. -- Removed the parity generator's CD regime switch and regenerated the pinned - manifest to 32 compiled / 52 reviewed families. The generated calibration - contract declares all three geography layers and has no default-layer split. -- The 10-file affected suite reaches 100% with exit 0 after the runtime change; - Ruff, byte compilation, and `git diff --check` pass. -- Promoted the CD family into the parity anti-rot red-line set, pinned the - manifest's 32/52 header counts to parsed family counts, and asserted that its - compiled entry carries no exclusion fields or fence. -- Strengthened the fiscal invariant: the CD aggregate is present in the - compiled registry while the taxable-interest rebase still refuses it as a - national control. The standard 10-file affected suite reaches 100% with exit - 0 after the parity-doctrine change. -- Removed the compiler's per-run support-exclusion parameter, the release CLI - and loader that populated it, its provenance branch, both experiment callers, - and the obsolete sparse Build-J exclusion JSON. -- Added exact signature locks for the compiler, release builder, fiscal scorer, - and state scorer; legacy membership flags are parser-rejected. -- Added a CD-bearing registry identity test across nominal 57,240-record sparse - and 337,704-record dense artifacts. Specs and content-addressed registry - version are identical. The standard affected suite reaches 100% with exit 0. +- Read `CLAUDE.md` and the adjudicated B1/B3 sections of + `sol-run-reverdict-0822.log` before changing the branch. +- Read the prior audit's stream-isolation note: its uncommitted historical + composition produced byte-identical v1/v2/v3 outputs and preserved global + NumPy RNG state. +- Confirmed the worktree starts clean at `bc0ddb0a` on + `passive-pass-through-722`. +- Attempted the GitNexus exploration workflow. No GitNexus repository resource + or query tool is exposed in this session, so direct source and call-path + inspection is the fallback. +- Reserved + `packages/microcosm-build/tests/test_spec_engine_engine_abi.py` and + `packages/microcosm-build/tests/test_us_multispine_pool_tool.py` for their + other owner; this task will not touch them. ## Next -- Quantify the target-row delta and existing 25% timing evidence, run final - verification, then write `FINAL_REPORT.md`. +- Inspect the runtime version gate and historical synthetic harness, then add + the durable parametrized B1 stream-isolation regression. +- Add a test-local aggregate and bisection plus synthetic and env-gated B3 + cross-checks; run the restricted replay once with the supplied artifact. +- Run only targeted tests and touched-file Ruff checks, update the two branch + handoff reports with exact CI/certification scope and commit mappings, and + write the final certification record to `FINAL_REPORT.md`. From bd537c4293dfa8d2f6c974e101a60dc3185f5608 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 22 Aug 2026 22:13:37 +0200 Subject: [PATCH 21/23] test(us): preserve passive isolation across QBI v1-v3 --- PROGRESS.md | 17 +- .../qbi_assumptions_v1.json.fixture | 183 + .../qbi_assumptions_v2.json.fixture | 238 ++ .../qbi_assumptions_v3.json.fixture | 2214 ++++++++++ .../qbi_history/qbi_inputs.py.fixture | 661 +++ .../qbi_history/qbi_simulation.py.fixture | 3781 +++++++++++++++++ ...test_us_qbi_passive_passthrough_history.py | 552 +++ 7 files changed, 7643 insertions(+), 3 deletions(-) create mode 100644 packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v1.json.fixture create mode 100644 packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v2.json.fixture create mode 100644 packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v3.json.fixture create mode 100644 packages/microcosm-build/tests/fixtures/qbi_history/qbi_inputs.py.fixture create mode 100644 packages/microcosm-build/tests/fixtures/qbi_history/qbi_simulation.py.fixture create mode 100644 packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py diff --git a/PROGRESS.md b/PROGRESS.md index 42c86e4be..ea8218b2c 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,7 +2,7 @@ ## State -Re-verdict findings B1 and B3 are being closed offline on +Re-verdict finding B1 is closed locally and B3 is in progress offline on `passive-pass-through-722` from starting HEAD `bc0ddb0a`. No production code, restricted artifacts, or supervisor-owned tests have been changed. No fetch, push, pull-request mutation, rebase, reset, checkout, or stash is in scope. @@ -23,11 +23,22 @@ push, pull-request mutation, rebase, reset, checkout, or stash is in scope. `packages/microcosm-build/tests/test_spec_engine_engine_abi.py` and `packages/microcosm-build/tests/test_us_multispine_pool_tool.py` for their other owner; this task will not touch them. +- Froze the exact historical `qbi-v3-wiring` simulator, post-QRF reconciler, + and v1/v2/v3 assumption resources from `cfbf6330` as SHA-pinned test-only + fixtures. Current HEAD intentionally carries none of that retired runtime. +- Added the CI-executable synthetic B1 regression over the historical runtime's + literal supported-version gate `(1, 2, 3)`. Every parameter realizes a + positive passive row count and weighted aggregate, byte-preserves the full + 15-leaf simulation surface plus its routing-owned self-employment leaf, and + preserves both global NumPy state and every version-family draw (including + the v2/v3 host-classifier seed). +- The targeted B1 node completed with all three parameters passing (exit 0). + Touched-file Ruff check and format check are clean. An earlier duplicate was + manually interrupted during the installed-engine collection import (exit + 130); it produced no test result. No run exited 137. ## Next -- Inspect the runtime version gate and historical synthetic harness, then add - the durable parametrized B1 stream-isolation regression. - Add a test-local aggregate and bisection plus synthetic and env-gated B3 cross-checks; run the restricted replay once with the supplied artifact. - Run only targeted tests and touched-file Ruff checks, update the two branch diff --git a/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v1.json.fixture b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v1.json.fixture new file mode 100644 index 000000000..80387bf17 --- /dev/null +++ b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v1.json.fixture @@ -0,0 +1,183 @@ +{ + "schema_version": 1, + "qbi_simulation_version": 1, + "engine": "archived_source_weighted_v1", + "rng": { + "bit_generator": "PCG64", + "qualification_seed": 41, + "w2_ubia_seed": 42, + "investment_seed": 43, + "sstb_seed": 64 + }, + "source_order": [ + "self_employment_income", + "farm_operations_income", + "farm_rent_income", + "rental_income", + "estate_income", + "partnership_s_corp_income" + ], + "qualification": { + "model": "flat_source_bernoulli", + "probabilities": { + "self_employment_income": 0.95, + "farm_operations_income": 0.98, + "farm_rent_income": 0.8, + "rental_income": 0.7, + "estate_income": 0.6, + "partnership_s_corp_income": 0.9 + } + }, + "sstb": { + "model": "largest_positive_qualified_source_bernoulli", + "source_order": [ + "self_employment_income", + "partnership_s_corp_income", + "estate_income" + ], + "probabilities": { + "self_employment_income": 0.3, + "partnership_s_corp_income": 0.25, + "estate_income": 0.15 + } + }, + "w2": { + "model": "source_weighted_margin_receipts_logit_labor_share", + "profit_margin_distribution": { + "self_employment_income": { + "beta_a": 2.0, + "beta_b": 2.0, + "scale": 0.5, + "shift": 0.05 + }, + "farm_operations_income": { + "beta_a": 2.0, + "beta_b": 4.0, + "scale": 0.45, + "shift": 0.03 + }, + "farm_rent_income": { + "beta_a": 2.0, + "beta_b": 3.0, + "scale": 0.45, + "shift": 0.05 + }, + "rental_income": { + "beta_a": 2.5, + "beta_b": 3.0, + "scale": 0.5, + "shift": 0.05 + }, + "estate_income": { + "beta_a": 2.0, + "beta_b": 3.0, + "scale": 0.45, + "shift": 0.05 + }, + "partnership_s_corp_income": { + "beta_a": 2.0, + "beta_b": 3.5, + "scale": 0.45, + "shift": 0.05 + } + }, + "has_employees_logit": { + "slope_per_dollar": 1.2e-06, + "target_share_among_positive_receipts": 0.18, + "intercept_bisection_iterations": 100 + }, + "labor_ratio_distribution": { + "self_employment_income": { + "beta_a": 2.0, + "beta_b": 2.0, + "scale": 0.25, + "shift": 0.0 + }, + "farm_operations_income": { + "beta_a": 2.0, + "beta_b": 2.5, + "scale": 0.22, + "shift": 0.0 + }, + "farm_rent_income": { + "beta_a": 1.5, + "beta_b": 8.0, + "scale": 0.08, + "shift": 0.0 + }, + "rental_income": { + "beta_a": 1.5, + "beta_b": 8.0, + "scale": 0.08, + "shift": 0.0 + }, + "estate_income": { + "beta_a": 2.0, + "beta_b": 2.5, + "scale": 0.2, + "shift": 0.0 + }, + "partnership_s_corp_income": { + "beta_a": 2.0, + "beta_b": 2.0, + "scale": 0.22, + "shift": 0.0 + } + } + }, + "ubia": { + "model": "source_weighted_capital_bernoulli_lognormal", + "sigma": 1.0, + "multiple_of_qbi": { + "self_employment_income": 1.5, + "farm_operations_income": 4.0, + "farm_rent_income": 8.0, + "rental_income": 10.0, + "estate_income": 3.0, + "partnership_s_corp_income": 3.0 + }, + "capital_intensity_probabilities": { + "self_employment_income": 0.25, + "farm_operations_income": 0.7, + "farm_rent_income": 0.9, + "rental_income": 0.95, + "estate_income": 0.5, + "partnership_s_corp_income": 0.45 + } + }, + "investment": { + "model": "exposure_bernoulli_beta_carveout", + "reit_ptp_exposure_order": [ + "non_qualified_dividend_income", + "partnership_s_corp_income" + ], + "reit_ptp_income_distribution": { + "non_qualified_dividend_income": { + "probability_of_receiving": 0.35, + "beta_a": 2.0, + "beta_b": 18.0, + "scale": 1.0, + "shift": 0.0 + }, + "partnership_s_corp_income": { + "probability_of_receiving": 0.05, + "beta_a": 2.0, + "beta_b": 8.0, + "scale": 0.6, + "shift": 0.0 + } + }, + "bdc_exposure_order": [ + "non_qualified_dividend_income" + ], + "bdc_income_distribution": { + "non_qualified_dividend_income": { + "probability_of_receiving": 0.05, + "beta_a": 2.0, + "beta_b": 18.0, + "scale": 0.3, + "shift": 0.0 + } + } + } +} diff --git a/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v2.json.fixture b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v2.json.fixture new file mode 100644 index 000000000..b0453b129 --- /dev/null +++ b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v2.json.fixture @@ -0,0 +1,238 @@ +{ + "schema_version": 2, + "qbi_simulation_version": 2, + "engine": "derived_qualification_host_sstb_v2", + "rng": { + "bit_generator": "PCG64", + "seeds": { + "qualification": 2041, + "sstb": 2064, + "w2": 2042, + "ubia": 2044, + "investment": 2043 + } + }, + "source_order": [ + "self_employment_income", + "farm_operations_income", + "farm_rent_income", + "rental_income", + "estate_income", + "partnership_s_corp_income" + ], + "qualification_derivations": { + "self_employment_income": { + "mode": "derived", + "prior": null, + "rationale": "Statutory active trade-or-business source: the engine derives the preliminary flag as Schedule C source != 0, then the host gate requires positive Schedule C income before SSTB classification or routing." + }, + "farm_operations_income": { + "mode": "derived", + "prior": null, + "rationale": "Statutory active farm trade-or-business source: the engine derives Schedule F farm operations as source != 0." + }, + "farm_rent_income": { + "mode": "prior", + "prior": { + "probability": 0.8 + }, + "rationale": "Retain the 0.80 residual prior because farm rent can be a trade or business, but the host record does not identify the participation and operational facts needed to resolve that status." + }, + "rental_income": { + "mode": "prior", + "prior": { + "probability": 0.7 + }, + "rationale": "Retain the 0.70 residual prior because rental trade-or-business status and the Section 199A rental-real-estate safe-harbor facts are not observed on the host record." + }, + "estate_income": { + "mode": "prior", + "prior": { + "probability": 0.6 + }, + "rationale": "Retain the weakest residual prior, 0.60: aggregate estate income does not identify whether a distribution retains qualified-business character. This is explicitly flagged for v3 evidence work." + }, + "partnership_s_corp_income": { + "mode": "prior", + "prior": { + "probability": 0.9 + }, + "rationale": "Retain the 0.90 prior as a proxy for guaranteed-payment and reasonable-compensation exclusions that the aggregate source cannot separate. JCT 2022 entity shares (S corporations 53% and partnerships 17% of QBI deducted) anchor the importance of this combined source pending v3 entity-level treatment." + } + }, + "sstb_classification": { + "mode": "crosswalk", + "crosswalk_resource": "sstb_crosswalk_v1.json", + "occupation_column": "PEIOOCC", + "industry_column": null, + "agi_column": "AGI", + "ambiguous_prior": 0.0, + "ambiguous_prior_status": "superseded_by_code_specific_live_crosswalk", + "agi_band_format": "lower_inclusive:upper_exclusive", + "passive_passthrough_sstb_prior_by_agi": { + "-inf:200000": 0.264, + "200000:inf": 0.17 + }, + "passive_passthrough_prior_status": "provisional_published_aggregate_derivation", + "rationale": "Positive Schedule C income uses per-code probabilities from the live crosswalk: host industry is primary when configured, detailed occupation is the current fallback, and absent codes have probability 0. For passive-only pass-through income, OTA WP-118's ordinary-income-limited deduction falls from $221.00B to $162.76B under an all-income SSTB restriction, so ($221.00B - $162.76B) / $221.00B = $58.24B / $221.00B = 0.2635, rounded to the 0.264 below-threshold population prior. Restoring the income exception raises deductions to $183.46B, leaving ($221.00B - $183.46B) / $221.00B = $37.54B / $221.00B = 0.1699, rounded to the conservative 0.170 above-threshold residual after SSTB selection out. JCT's 2022 split puts $120.81B / $216.08B = 55.91% of deduction dollars above the phaseout, confirming the upper band is material but not identifying its conditional SSTB rate. The $200,000 AGI split is a provisional coarse proxy for filing-status-specific modified-taxable-income thresholds.", + "follow_up": "The resource ships the 2017 Census industry map as a future primary seam, but the frozen census_cps person columns currently provide PEIOOCC and AGI without a detailed-industry field, so industry_column remains null." + }, + "w2": { + "model": "source_weighted_margin_receipts_logit_labor_share", + "profit_margin_distribution": { + "self_employment_income": { + "beta_a": 2.0, + "beta_b": 2.0, + "scale": 0.5, + "shift": 0.05 + }, + "farm_operations_income": { + "beta_a": 2.0, + "beta_b": 4.0, + "scale": 0.45, + "shift": 0.03 + }, + "farm_rent_income": { + "beta_a": 2.0, + "beta_b": 3.0, + "scale": 0.45, + "shift": 0.05 + }, + "rental_income": { + "beta_a": 2.5, + "beta_b": 3.0, + "scale": 0.5, + "shift": 0.05 + }, + "estate_income": { + "beta_a": 2.0, + "beta_b": 3.0, + "scale": 0.45, + "shift": 0.05 + }, + "partnership_s_corp_income": { + "beta_a": 2.0, + "beta_b": 3.5, + "scale": 0.45, + "shift": 0.05 + } + }, + "has_employees_logit": { + "slope_per_dollar": 1.2e-06, + "target_share_among_positive_receipts": 0.18, + "intercept_bisection_iterations": 100 + }, + "labor_ratio_distribution": { + "self_employment_income": { + "beta_a": 2.0, + "beta_b": 2.0, + "scale": 0.25, + "shift": 0.0 + }, + "farm_operations_income": { + "beta_a": 2.0, + "beta_b": 2.5, + "scale": 0.22, + "shift": 0.0 + }, + "farm_rent_income": { + "beta_a": 1.5, + "beta_b": 8.0, + "scale": 0.08, + "shift": 0.0 + }, + "rental_income": { + "beta_a": 1.5, + "beta_b": 8.0, + "scale": 0.08, + "shift": 0.0 + }, + "estate_income": { + "beta_a": 2.0, + "beta_b": 2.5, + "scale": 0.2, + "shift": 0.0 + }, + "partnership_s_corp_income": { + "beta_a": 2.0, + "beta_b": 2.0, + "scale": 0.22, + "shift": 0.0 + } + } + }, + "ubia": { + "model": "source_weighted_capital_bernoulli_lognormal", + "sigma": 1.0, + "multiple_of_qbi": { + "self_employment_income": 1.5, + "farm_operations_income": 4.0, + "farm_rent_income": 8.0, + "rental_income": 10.0, + "estate_income": 3.0, + "partnership_s_corp_income": 3.0 + }, + "capital_intensity_probabilities": { + "self_employment_income": 0.25, + "farm_operations_income": 0.7, + "farm_rent_income": 0.9, + "rental_income": 0.95, + "estate_income": 0.5, + "partnership_s_corp_income": 0.45 + } + }, + "investment": { + "model": "exposure_bernoulli_beta_carveout", + "reit_ptp_anchor": { + "provisional": true, + "published_income_dollars": 21070000000.0, + "published_component_dollars": 4200000000.0, + "comparison_component_2022_dollars": 2900000000.0, + "replay_factor_band": [ + 0.3, + 3.0 + ], + "rationale": "SOI Publication 4801 TY2023 reports Form 8995 line 6 REIT/PTP income of $21.07B and line 9 component of $4.20B; JCT reports a $2.90B 2022 component. The aggregate identifies receiving probability times Beta share, not their decomposition. Holding the dividend exposure and both v1 Beta scales fixed while raising the partnership/S-corporation receiving probability from 0.05 to a provisional 0.09 produces about $20.94B, or 0.994 times the income anchor, on the fixed-seed PUF replay. The [0.3, 3.0] replay factor band is provisional." + }, + "reit_ptp_exposure_order": [ + "non_qualified_dividend_income", + "partnership_s_corp_income" + ], + "reit_ptp_income_distribution": { + "non_qualified_dividend_income": { + "probability_of_receiving": 0.35, + "beta_a": 2.0, + "beta_b": 18.0, + "scale": 1.0, + "shift": 0.0 + }, + "partnership_s_corp_income": { + "probability_of_receiving": 0.09, + "beta_a": 2.0, + "beta_b": 8.0, + "scale": 0.6, + "shift": 0.0 + } + }, + "bdc_anchor": { + "provisional": true, + "published_income_dollars": null, + "published_component_dollars": null, + "comparison_component_2022_dollars": null, + "replay_factor_band": null, + "rationale": "No published BDC aggregate anchor was found in the persisted evidence. Retain the v1 probability and Beta scale because the regulatory economics imply a small dividend carveout; the fixed-seed PUF replay is about $0.143B. This scale remains provisional pending v3." + }, + "bdc_exposure_order": [ + "non_qualified_dividend_income" + ], + "bdc_income_distribution": { + "non_qualified_dividend_income": { + "probability_of_receiving": 0.05, + "beta_a": 2.0, + "beta_b": 18.0, + "scale": 0.3, + "shift": 0.0 + } + } + } +} diff --git a/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v3.json.fixture b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v3.json.fixture new file mode 100644 index 000000000..340440973 --- /dev/null +++ b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_assumptions_v3.json.fixture @@ -0,0 +1,2214 @@ +{ + "employer_presence": { + "base_probability_by_form": { + "partnership": { + "0_to_25k": 0.598774083673617, + "100k_to_250k": 0.7799534378880195, + "250k_to_1m": 0.8869047899647315, + "25k_to_100k": 0.6973815387905316, + "nonpositive": 0.5717691851538709, + "over_1m": 0.8736301797903322 + }, + "s_corporation": { + "0_to_25k": 0.8086165776302614, + "100k_to_250k": 0.9526964513135215, + "250k_to_1m": 0.9910026295536019, + "25k_to_100k": 0.6376636361544837, + "nonpositive": 0.68726306951286, + "over_1m": 0.9441866076576505 + }, + "sole_proprietorship": { + "0_to_25k": 0.3903193913520407, + "100k_to_250k": 0.40454231339018715, + "250k_to_1m": 0.40454231339018715, + "25k_to_100k": 0.5118197817476212, + "nonpositive": 0.2854719748561733, + "over_1m": 0.40454231339018715 + } + }, + "base_probability_source_level_by_form": { + "partnership": { + "0_to_25k": "income_form", + "100k_to_250k": "income_form", + "250k_to_1m": "income_form", + "25k_to_100k": "income_form", + "nonpositive": "income_form", + "over_1m": "income_form" + }, + "s_corporation": { + "0_to_25k": "form", + "100k_to_250k": "income_form", + "250k_to_1m": "income_form", + "25k_to_100k": "income_form", + "nonpositive": "income_form", + "over_1m": "income_form" + }, + "sole_proprietorship": { + "0_to_25k": "income_form", + "100k_to_250k": "form", + "250k_to_1m": "form", + "25k_to_100k": "income_form", + "nonpositive": "income_form", + "over_1m": "form" + } + }, + "calibration": { + "expected_overall_zero_employee_share": 0.842, + "expected_zero_employee_share_by_form": { + "partnership": 0.8000000000000002, + "s_corporation": 0.37323240048397105, + "sole_proprietorship": 0.95 + }, + "log_odds_shift_by_form": { + "partnership": -2.3076956692827935, + "s_corporation": -0.9906098787763655, + "sole_proprietorship": -2.598762342032285 + }, + "overall_zero_employee_target": 0.842, + "rationale": "The sole-proprietorship and partnership statements 'more than 95%' and 'more than 80%' are encoded at the binding 0.95 and 0.80 targets. The S-corporation target is the residual [0.842*sum(form replay weights) - 0.95*sole weight - 0.80*partnership weight] / S-corporation weight, so the full-artifact expected weighted zero-employee share is exactly 0.842. A single persisted log-odds shift per form preserves the SCF income-band shape. The simulation does not solve calibration parameters.", + "replay": { + "artifact_bytes": 241045964, + "artifact_filename": "puf_2024.h5", + "artifact_sha256": "8182579ddfecaf5e5b872e2307b88f03e8e8def993171b648f701a19a847f37b", + "form_income_band_record_counts": { + "partnership": { + "0_to_25k": 3332, + "100k_to_250k": 2371, + "250k_to_1m": 3995, + "25k_to_100k": 2662, + "nonpositive": 0, + "over_1m": 5655 + }, + "s_corporation": { + "0_to_25k": 10297, + "100k_to_250k": 7373, + "250k_to_1m": 12526, + "25k_to_100k": 8087, + "nonpositive": 0, + "over_1m": 17542 + }, + "sole_proprietorship": { + "0_to_25k": 31037, + "100k_to_250k": 4841, + "250k_to_1m": 4564, + "25k_to_100k": 10700, + "nonpositive": 0, + "over_1m": 1774 + } + }, + "form_income_band_weights": { + "partnership": { + "0_to_25k": 1067372.5538101504, + "100k_to_250k": 326916.0507736496, + "250k_to_1m": 215162.48532373708, + "25k_to_100k": 660391.1109488549, + "nonpositive": 0.0, + "over_1m": 63990.59496758337 + }, + "s_corporation": { + "0_to_25k": 3275184.573270716, + "100k_to_250k": 961581.2967205928, + "250k_to_1m": 656578.9332579599, + "25k_to_100k": 2028618.17747515, + "nonpositive": 0.0, + "over_1m": 200534.61636200157 + }, + "sole_proprietorship": { + "0_to_25k": 25430444.5113663, + "100k_to_250k": 829546.9382608522, + "250k_to_1m": 260542.25298536988, + "25k_to_100k": 5282308.304772086, + "nonpositive": 0.0, + "over_1m": 19538.349740357484 + } + }, + "form_record_counts": { + "partnership": 18015, + "s_corporation": 55825, + "sole_proprietorship": 52916 + }, + "form_record_weights": { + "partnership": 2333832.7958239755, + "s_corporation": 7122497.59708642, + "sole_proprietorship": 31822380.35712497 + }, + "person_rows": 484015, + "person_weight_total": 317181074.5235834, + "positive_qbi_record_count": 126756, + "positive_qbi_weight": 41278710.75003537, + "tax_unit_rows": 207692 + }, + "solver": { + "iterations": 200, + "lower_bound": -100.0, + "method": "bisection_on_expected_weighted_zero_share", + "probability_clip": 1e-12, + "upper_bound": 100.0 + }, + "target_zero_employee_share_by_form": { + "partnership": 0.8, + "s_corporation": 0.37323240048397105, + "sole_proprietorship": 0.95 + } + }, + "income_band_order": [ + "nonpositive", + "0_to_25k", + "25k_to_100k", + "100k_to_250k", + "250k_to_1m", + "over_1m" + ], + "industry_marginalization": "Sum requested SCF counts across all eight industry bins within income band and legal form. Use the grouped income/form rate when effective n is at least 30; otherwise use the grouped form-level rate.", + "minimum_effective_n": 30.0, + "model": "scf_income_form_log_odds_shift" + }, + "engine": "derived_qualification_host_sstb_evidence_wage_capital_v3", + "evidence": { + "employer_structure_resource": "qbi_employer_structure_v1.json", + "employer_structure_schema_version": 1, + "employer_structure_sha256": "76d849a8da425208a2c615cde9667b493e8ab8beb984b2b685243d7073bc3b76", + "v2_assumptions_resource": "qbi_assumptions_v2.json", + "v2_assumptions_schema_version": 2, + "v2_assumptions_sha256": "2fabf4f4a0547418663546bc71106880f3dba0a7a23be81681659790b603ca1f", + "wage_capital_resource": "qbi_wage_capital_priors_v1.json", + "wage_capital_schema_version": 1, + "wage_capital_sha256": "94431bba2b4fab287857786d87e5a86ef509cd06bd6639dfbbf6dbe0b45950b8" + }, + "industry_mixture": { + "eligibility": { + "exclude_unallocable": true, + "nonaggregate": true, + "positive_receipts": true, + "requires_ubia_intensity": true, + "requires_wage_share": true + }, + "forms": { + "partnership": { + "all_industry_receipts_thousands": 8061139481.0, + "capital_measure": "gross_depreciable_assets_over_receipts", + "component_count": 18, + "components": [ + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "002 | Agriculture, forestry, fishing, and hunting", + "probability": 0.006913622214879819, + "proxy": false, + "published_label": "Agriculture, forestry, fishing, and hunting", + "ubia_intensity": 4.021152316744556, + "wage_share": 0.14617949832584426 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "003 | Mining", + "probability": 0.028143259089683122, + "proxy": false, + "published_label": "Mining", + "ubia_intensity": 1.4905545716911335, + "wage_share": 0.08566419324839146 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "004 | Utilities", + "probability": 0.025819185918410835, + "proxy": false, + "published_label": "Utilities", + "ubia_intensity": 2.5989076483407105, + "wage_share": 0.023615131775542565 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "005 | Construction", + "probability": 0.07656424930720483, + "proxy": false, + "published_label": "Construction", + "ubia_intensity": 0.13445204432304195, + "wage_share": 0.1465303905130043 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "006 | Manufacturing", + "probability": 0.1606207848023439, + "proxy": false, + "published_label": "Manufacturing", + "ubia_intensity": 0.4590112555617758, + "wage_share": 0.08483205899845037 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "007 | Wholesale trade", + "probability": 0.14742049826250606, + "proxy": false, + "published_label": "Wholesale trade", + "ubia_intensity": 0.12021564122924576, + "wage_share": 0.050797787984149974 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "008 | Retail trade", + "probability": 0.10392146431290344, + "proxy": false, + "published_label": "Retail trade", + "ubia_intensity": 0.13021552351869128, + "wage_share": 0.0811637494313635 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "009 | Transportation and warehousing", + "probability": 0.043949052338206396, + "proxy": false, + "published_label": "Transportation and warehousing", + "ubia_intensity": 1.7419601325384275, + "wage_share": 0.10170798479949053 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "010 | Information", + "probability": 0.05246194771152578, + "proxy": false, + "published_label": "Information", + "ubia_intensity": 0.810601028541107, + "wage_share": 0.09591438348434059 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "011 | Finance and insurance", + "probability": 0.05093002781018, + "proxy": false, + "published_label": "Finance and insurance", + "ubia_intensity": 0.49249656424051225, + "wage_share": 0.34957473736625444 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "012 | Real estate and rental and leasing", + "probability": 0.03691770359072916, + "proxy": false, + "published_label": "Real estate and rental and leasing", + "ubia_intensity": 23.22214326243929, + "wage_share": 0.18680218416771752 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "013 | Professional, scientific, and technical services", + "probability": 0.10444876383544507, + "proxy": false, + "published_label": "Professional, scientific, and technical services", + "ubia_intensity": 0.1529636696770001, + "wage_share": 0.30497465192757134 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "014 | Management of companies (holding companies)", + "probability": 0.007336529051762164, + "proxy": false, + "published_label": "Management of companies (holding companies)", + "ubia_intensity": 0.9415945686482614, + "wage_share": 0.31206945109148365 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "015 | Administrative and support and waste management and remediation services", + "probability": 0.024345319968500204, + "proxy": false, + "published_label": "Administrative and support and waste management and remediation services", + "ubia_intensity": 0.20036146563722318, + "wage_share": 0.42297029080409365 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "016 | Health care and social assistance", + "probability": 0.056396048228061164, + "proxy": false, + "published_label": "Health care and social assistance", + "ubia_intensity": 0.3779559994810658, + "wage_share": 0.3269331009698196 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "017 | Arts, entertainment, and recreation", + "probability": 0.017363764057494322, + "proxy": false, + "published_label": "Arts, entertainment, and recreation", + "ubia_intensity": 0.8562958615841583, + "wage_share": 0.33460689531837157 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "018 | Accommodation and food services", + "probability": 0.04495998224683739, + "proxy": false, + "published_label": "Accommodation and food services", + "ubia_intensity": 1.1678961489935917, + "wage_share": 0.2519927616767467 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "019 | Educational and Other services [5]", + "probability": 0.011487797253326326, + "proxy": false, + "published_label": "Educational and Other services [5]", + "ubia_intensity": 0.46393055966381674, + "wage_share": 0.28790670058170675 + } + ], + "eligible_receipts_thousands": 8061139482.0, + "proxy": false, + "receipts_coverage": 1.0, + "scf_legal_form_group": "partnership_or_llc", + "tax_year": 2023 + }, + "s_corporation": { + "all_industry_receipts_thousands": 10429590929.0, + "capital_measure": "gross_depreciable_assets_over_receipts", + "component_count": 73, + "components": [ + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "003 | Agriculture, forestry, fishing, and hunting > Agricultural production", + "probability": 0.009584622268069075, + "proxy": false, + "published_label": "Agricultural production", + "ubia_intensity": 0.9468127896114183, + "wage_share": 0.11548492737885584 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "004 | Agriculture, forestry, fishing, and hunting > Forestry and logging", + "probability": 0.001255562272519957, + "proxy": false, + "published_label": "Forestry and logging", + "ubia_intensity": 0.9939069354985679, + "wage_share": 0.11666099911659976 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "005 | Agriculture, forestry, fishing, and hunting > Support activities and fishing, hunting and trapping", + "probability": 0.004252145465304824, + "proxy": false, + "published_label": "Support activities and fishing, hunting and trapping", + "ubia_intensity": 0.5335867206227614, + "wage_share": 0.14772284475686726 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "006 | Mining", + "probability": 0.007009793334946048, + "proxy": false, + "published_label": "Mining", + "ubia_intensity": 0.6653018575392319, + "wage_share": 0.09350532902674828 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "007 | Utilities", + "probability": 0.0020943500439751695, + "proxy": false, + "published_label": "Utilities", + "ubia_intensity": 0.15941813104160746, + "wage_share": 0.04153053049774907 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "009 | Construction > Construction of buildings", + "probability": 0.0695025768836551, + "proxy": false, + "published_label": "Construction of buildings", + "ubia_intensity": 0.08783040974800416, + "wage_share": 0.061221949259979626 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "010 | Construction > Heavy and civil engineering construction and land subdivision", + "probability": 0.019150168323625375, + "proxy": false, + "published_label": "Heavy and civil engineering construction and land subdivision", + "ubia_intensity": 0.4729018129183705, + "wage_share": 0.07058179354961445 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "011 | Construction > Specialty trade contractors", + "probability": 0.08925526020870968, + "proxy": false, + "published_label": "Specialty trade contractors", + "ubia_intensity": 0.21978172663320575, + "wage_share": 0.11032008335980079 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "013 | Manufacturing > Food manufacturing", + "probability": 0.017867634882893453, + "proxy": false, + "published_label": "Food manufacturing", + "ubia_intensity": 0.32812501197884003, + "wage_share": 0.05568442402891978 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "014 | Manufacturing > Beverage and tobacco product manufacturing", + "probability": 0.0022370310959458025, + "proxy": false, + "published_label": "Beverage and tobacco product manufacturing", + "ubia_intensity": 0.726410650713503, + "wage_share": 0.12138564907809152 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "015 | Manufacturing > Textile mills and textile product mills", + "probability": 0.0016358686417888857, + "proxy": false, + "published_label": "Textile mills and textile product mills", + "ubia_intensity": 0.2487598635524103, + "wage_share": 0.11962451025364823 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "016 | Manufacturing > Apparel manufacturing", + "probability": 0.0010477882069769777, + "proxy": false, + "published_label": "Apparel manufacturing", + "ubia_intensity": 0.12881821318762823, + "wage_share": 0.1322875417197735 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "017 | Manufacturing > Leather and allied product manufacturing", + "probability": 0.0005866874683607422, + "proxy": false, + "published_label": "Leather and allied product manufacturing", + "ubia_intensity": 0.3200855928417445, + "wage_share": 0.16153149626172572 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "018 | Manufacturing > Wood product manufacturing", + "probability": 0.005967184956678335, + "proxy": false, + "published_label": "Wood product manufacturing", + "ubia_intensity": 0.35864586231603296, + "wage_share": 0.07284589421811945 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "019 | Manufacturing > Paper manufacturing", + "probability": 0.003017579075129927, + "proxy": false, + "published_label": "Paper manufacturing", + "ubia_intensity": 0.47746548747976786, + "wage_share": 0.08430575312193417 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "020 | Manufacturing > Printing and related support activities", + "probability": 0.0036018291415985913, + "proxy": false, + "published_label": "Printing and related support activities", + "ubia_intensity": 0.40010786365235157, + "wage_share": 0.14692189666156452 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "021 | Manufacturing > Petroleum and coal products manufacturing", + "probability": 0.0016239983296179132, + "proxy": false, + "published_label": "Petroleum and coal products manufacturing", + "ubia_intensity": 0.3305072699604116, + "wage_share": 0.05754613865752347 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "022 | Manufacturing > Chemical manufacturing", + "probability": 0.0048846077984467775, + "proxy": false, + "published_label": "Chemical manufacturing", + "ubia_intensity": 0.34979358014135187, + "wage_share": 0.1241086118960656 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "023 | Manufacturing > Plastics and rubber products manufacturing", + "probability": 0.006805722013465502, + "proxy": false, + "published_label": "Plastics and rubber products manufacturing", + "ubia_intensity": 0.39993175111680473, + "wage_share": 0.0760261658989317 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "024 | Manufacturing > Nonmetallic mineral product manufacturing", + "probability": 0.0036255237517440536, + "proxy": false, + "published_label": "Nonmetallic mineral product manufacturing", + "ubia_intensity": 0.6472115187976343, + "wage_share": 0.08533796713909554 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "025 | Manufacturing > Primary metal manufacturing", + "probability": 0.005134764411719604, + "proxy": false, + "published_label": "Primary metal manufacturing", + "ubia_intensity": 0.3242946066444009, + "wage_share": 0.053088882424975316 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "026 | Manufacturing > Fabricated metal product manufacturing", + "probability": 0.01547625085299926, + "proxy": false, + "published_label": "Fabricated metal product manufacturing", + "ubia_intensity": 0.46054035317536696, + "wage_share": 0.09970366973071787 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "027 | Manufacturing > Machinery manufacturing", + "probability": 0.007984178769622402, + "proxy": false, + "published_label": "Machinery manufacturing", + "ubia_intensity": 0.37900986745682774, + "wage_share": 0.11914639470873623 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "028 | Manufacturing > Computer and electronic product manufacturing", + "probability": 0.004230729281378897, + "proxy": false, + "published_label": "Computer and electronic product manufacturing", + "ubia_intensity": 0.2526634341822504, + "wage_share": 0.11274842165343192 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "029 | Manufacturing > Electrical equipment, appliance, and component manufacturing", + "probability": 0.0032654587091705298, + "proxy": false, + "published_label": "Electrical equipment, appliance, and component manufacturing", + "ubia_intensity": 0.30447594660591404, + "wage_share": 0.1176599822634172 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "030 | Manufacturing > Transportation equipment manufacturing", + "probability": 0.005729203101706667, + "proxy": false, + "published_label": "Transportation equipment manufacturing", + "ubia_intensity": 0.29410630052195097, + "wage_share": 0.08425654816209913 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "031 | Manufacturing > Furniture and related product manufacturing", + "probability": 0.003605588028768683, + "proxy": false, + "published_label": "Furniture and related product manufacturing", + "ubia_intensity": 0.2650210578233663, + "wage_share": 0.1014116360008449 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "032 | Manufacturing > Miscellaneous manufacturing", + "probability": 0.006220274709695908, + "proxy": false, + "published_label": "Miscellaneous manufacturing", + "ubia_intensity": 0.2920911879976261, + "wage_share": 0.1682260148329965 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "034 | Wholesale trade > Durable goods", + "probability": 0.08867760049418082, + "proxy": false, + "published_label": "Durable goods", + "ubia_intensity": 0.10845909903713573, + "wage_share": 0.08767201343525455 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "035 | Wholesale trade > Nondurable goods", + "probability": 0.0868772110350766, + "proxy": false, + "published_label": "Nondurable goods", + "ubia_intensity": 0.08920990016751737, + "wage_share": 0.05618501875841321 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "036 | Wholesale trade > Wholesale trade agents and brokers", + "probability": 0.00035133401760617256, + "proxy": false, + "published_label": "Wholesale trade agents and brokers", + "ubia_intensity": 0.1554596756722918, + "wage_share": 0.31576606296936044 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "038 | Retail trade > Motor vehicle dealers and parts dealers", + "probability": 0.08766419675727215, + "proxy": false, + "published_label": "Motor vehicle dealers and parts dealers", + "ubia_intensity": 0.06661282291690171, + "wage_share": 0.07083080963108217 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "039 | Retail trade > Building material and garden equipment and supplies dealers", + "probability": 0.013390435911909564, + "proxy": false, + "published_label": "Building material and garden equipment and supplies dealers", + "ubia_intensity": 0.20198805477918946, + "wage_share": 0.10798830653309748 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "040 | Retail trade > Food, beverage, and liquor retailers", + "probability": 0.022673515188667625, + "proxy": false, + "published_label": "Food, beverage, and liquor retailers", + "ubia_intensity": 0.18844952090170658, + "wage_share": 0.103262759607055 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "041 | Retail trade > Furniture, home furnishings, electronics, and appliance retailers", + "probability": 0.011103912930178652, + "proxy": false, + "published_label": "Furniture, home furnishings, electronics, and appliance retailers", + "ubia_intensity": 0.10751405048640518, + "wage_share": 0.13140159533860712 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "042 | Retail trade > General merchandise retailers", + "probability": 0.002293049280365759, + "proxy": false, + "published_label": "General merchandise retailers", + "ubia_intensity": 0.07703259170534613, + "wage_share": 0.09357000340084141 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "043 | Retail trade > Health and personal care retailers", + "probability": 0.007437166149869778, + "proxy": false, + "published_label": "Health and personal care retailers", + "ubia_intensity": 0.08507023921977354, + "wage_share": 0.10641135629885427 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "044 | Retail trade > Gasoline stations and fuel dealers", + "probability": 0.03337627567865186, + "proxy": false, + "published_label": "Gasoline stations and fuel dealers", + "ubia_intensity": 0.16339327028362105, + "wage_share": 0.04356287184237745 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "045 | Retail trade > Clothing and clothing accessories retailers", + "probability": 0.004539987609030925, + "proxy": false, + "published_label": "Clothing and clothing accessories retailers", + "ubia_intensity": 0.14661765368008656, + "wage_share": 0.15151107639937494 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "046 | Retail trade > Sporting goods, hobby, book, music, and miscellaneous retailers", + "probability": 0.012898442862400826, + "proxy": false, + "published_label": "Sporting goods, hobby, book, music, and miscellaneous retailers", + "ubia_intensity": 0.12867409843808292, + "wage_share": 0.13119217526763652 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "048 | Transportation and warehousing > Air, rail, and water transportation", + "probability": 0.00206309675798154, + "proxy": false, + "published_label": "Air, rail, and water transportation", + "ubia_intensity": 1.3561022360691746, + "wage_share": 0.16017480114852065 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "049 | Transportation and warehousing > Truck transportation", + "probability": 0.026543629475829084, + "proxy": false, + "published_label": "Truck transportation", + "ubia_intensity": 0.35829315288410246, + "wage_share": 0.12338293158480826 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "050 | Transportation and warehousing > Transit and ground passenger transportation", + "probability": 0.0013916818158311829, + "proxy": false, + "published_label": "Transit and ground passenger transportation", + "ubia_intensity": 0.5097170985180723, + "wage_share": 0.2798935832997786 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "051 | Transportation and warehousing > Pipeline transportation", + "probability": 1.0034857000173832e-05, + "proxy": false, + "published_label": "Pipeline transportation", + "ubia_intensity": 5.4950348473924535, + "wage_share": 0.27997116077865897 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "052 | Transportation and warehousing > Other transportation and support activities", + "probability": 0.008581998007830702, + "proxy": false, + "published_label": "Other transportation and support activities", + "ubia_intensity": 0.2310129659894844, + "wage_share": 0.16442529895081762 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "053 | Transportation and warehousing > Warehousing and storage", + "probability": 0.0017809498598447995, + "proxy": false, + "published_label": "Warehousing and storage", + "ubia_intensity": 0.42483232295044443, + "wage_share": 0.12237372398558811 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "055 | Information > Motion picture and sound recording industries", + "probability": 0.002371958321712956, + "proxy": false, + "published_label": "Motion picture and sound recording industries", + "ubia_intensity": 0.40370451528164203, + "wage_share": 0.1918622574016857 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "056 | Information > Publishing industries", + "probability": 0.002411898161930586, + "proxy": false, + "published_label": "Publishing industries", + "ubia_intensity": 0.24549776165448908, + "wage_share": 0.27290269071412077 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "057 | Information > Broadcasting & Content Providers", + "probability": 0.0004654333080221361, + "proxy": false, + "published_label": "Broadcasting & Content Providers", + "ubia_intensity": 0.6107735532613229, + "wage_share": 0.2906095357950876 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "058 | Information > Telecommunications (including wired, wireless, satellite, cable and other program distribution, resellers, agents, other telecommunications, and internet service providers)", + "probability": 0.0024968592759379796, + "proxy": false, + "published_label": "Telecommunications (including wired, wireless, satellite, cable and other program distribution, resellers, agents, other telecommunications, and internet service providers)", + "ubia_intensity": 0.2853438601492071, + "wage_share": 0.13909022697480855 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "059 | Information > Computing infrastructure providers, data processing, web hosting, and related services", + "probability": 0.001278133441717339, + "proxy": false, + "published_label": "Computing infrastructure providers, data processing, web hosting, and related services", + "ubia_intensity": 0.1426136745723399, + "wage_share": 0.20677999387000315 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "060 | Information > Web search portals, libraries, archives, and other info. services", + "probability": 0.0005381695979674192, + "proxy": false, + "published_label": "Web search portals, libraries, archives, and other info. services", + "ubia_intensity": 0.192090395480226, + "wage_share": 0.2609094362059079 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "063 | Finance and insurance > Nondepository credit intermediation", + "probability": 0.0038350404723383005, + "proxy": false, + "published_label": "Nondepository credit intermediation", + "ubia_intensity": 0.15458448157261928, + "wage_share": 0.4605889212676919 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "064 | Finance and insurance > Securities, commodity contracts, other financial investments, and related activities", + "probability": 0.004933949679880673, + "proxy": false, + "published_label": "Securities, commodity contracts, other financial investments, and related activities", + "ubia_intensity": 0.19606496771431622, + "wage_share": 0.43932255590186803 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "066 | Finance and insurance > Funds, trusts, and other financial vehicles", + "probability": 0.00011467818180609132, + "proxy": false, + "published_label": "Funds, trusts, and other financial vehicles", + "ubia_intensity": 0.30876870379779203, + "wage_share": 0.35347948680850205 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "068 | Real estate and rental and leasing > Real estate", + "probability": 0.015163411424684723, + "proxy": false, + "published_label": "Real estate", + "ubia_intensity": 1.739178645501144, + "wage_share": 0.35082079161128554 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "069 | Real estate and rental and leasing > Rental and leasing services", + "probability": 0.004092142914100274, + "proxy": false, + "published_label": "Rental and leasing services", + "ubia_intensity": 1.4660676942463706, + "wage_share": 0.12819906983511403 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "070 | Real estate and rental and leasing > Lessors of nonfinancial intangible assets (except copyrighted works)", + "probability": 0.0002478612090688454, + "proxy": false, + "published_label": "Lessors of nonfinancial intangible assets (except copyrighted works)", + "ubia_intensity": 0.38136583353441633, + "wage_share": 0.15574137353955367 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "071 | Professional, scientific, and technical services", + "probability": 0.08010113287185187, + "proxy": false, + "published_label": "Professional, scientific, and technical services", + "ubia_intensity": 0.12032143156355575, + "wage_share": 0.2749175636252367 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "072 | Management of companies (holding companies)", + "probability": 0.0009042185118658918, + "proxy": false, + "published_label": "Management of companies (holding companies)", + "ubia_intensity": 1.8182920714442692, + "wage_share": 0.7842937399850215 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "074 | Administrative and support and waste management and remediation services > Administrative and support services", + "probability": 0.03545563165424957, + "proxy": false, + "published_label": "Administrative and support services", + "ubia_intensity": 0.18912616373545985, + "wage_share": 0.268009105786806 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "075 | Administrative and support and waste management and remediation services > Waste management and remediation services", + "probability": 0.004536929449582529, + "proxy": false, + "published_label": "Waste management and remediation services", + "ubia_intensity": 0.5984349713407858, + "wage_share": 0.16575097130174815 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "076 | Educational services", + "probability": 0.003050266036151065, + "proxy": false, + "published_label": "Educational services", + "ubia_intensity": 0.27655410751376636, + "wage_share": 0.2856848605576933 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "078 | Health care and social assistance > Offices of health practitioners and outpatient care centers", + "probability": 0.035061925893085474, + "proxy": false, + "published_label": "Offices of health practitioners and outpatient care centers", + "ubia_intensity": 0.22364188516710512, + "wage_share": 0.3716063886304464 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "079 | Health care and social assistance > Miscellaneous health care and social assistance", + "probability": 0.00821107110677599, + "proxy": false, + "published_label": "Miscellaneous health care and social assistance", + "ubia_intensity": 0.14734247012957205, + "wage_share": 0.41230414118742603 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "080 | Health care and social assistance > Hospitals, nursing, and residential care facilities", + "probability": 0.004754629751611553, + "proxy": false, + "published_label": "Hospitals, nursing, and residential care facilities", + "ubia_intensity": 0.36947218962936224, + "wage_share": 0.45784843733084196 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "082 | Arts, entertainment, and recreation > Other arts, entertainment, and recreation", + "probability": 0.007518893633100889, + "proxy": false, + "published_label": "Other arts, entertainment, and recreation", + "ubia_intensity": 0.18540048758074476, + "wage_share": 0.27819105308744835 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "083 | Arts, entertainment, and recreation > Amusement, gambling, and recreation industries", + "probability": 0.004260289495753107, + "proxy": false, + "published_label": "Amusement, gambling, and recreation industries", + "ubia_intensity": 0.6377676744622056, + "wage_share": 0.21279407622365146 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "085 | Accommodation and food services > Accommodation", + "probability": 0.0030346422388959618, + "proxy": false, + "published_label": "Accommodation", + "ubia_intensity": 1.8665137103151317, + "wage_share": 0.20763761144466825 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "086 | Accommodation and food services > Food services and drinking places", + "probability": 0.03492814718937979, + "proxy": false, + "published_label": "Food services and drinking places", + "ubia_intensity": 0.2881163773472031, + "wage_share": 0.23021061795874698 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "088 | Other services > Repair and maintenance", + "probability": 0.013777671131683194, + "proxy": false, + "published_label": "Repair and maintenance", + "ubia_intensity": 0.27931070116102935, + "wage_share": 0.19456416198296003 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "089 | Other services > Personal and laundry services", + "probability": 0.008065131342915687, + "proxy": false, + "published_label": "Personal and laundry services", + "ubia_intensity": 0.31581750676741865, + "wage_share": 0.27085197356944146 + }, + { + "capital_measure": "gross_depreciable_assets_over_receipts", + "industry_key": "090 | Other services > Religious, grantmaking, civic, professional, and similar organizations", + "probability": 8.298298588775328e-05, + "proxy": false, + "published_label": "Religious, grantmaking, civic, professional, and similar organizations", + "ubia_intensity": 0.22537524760762212, + "wage_share": 0.28727482818588473 + } + ], + "eligible_receipts_thousands": 10366365958.0, + "proxy": false, + "receipts_coverage": 0.9939379241783874, + "scf_legal_form_group": "s_corporation", + "tax_year": 2022 + }, + "sole_proprietorship": { + "all_industry_receipts_thousands": 2063191945.0, + "capital_measure": "depreciation_deduction_flow_over_receipts", + "component_count": 103, + "components": [ + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "003 | Agriculture, forestry, hunting, and fishing > Animal production (including breeding of cats and dogs)", + "probability": 0.0012979003963812562, + "proxy": true, + "published_label": "Animal production (including breeding of cats and dogs)", + "ubia_intensity": 0.12371144839254952, + "wage_share": 0.045734803365208423 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "004 | Agriculture, forestry, hunting, and fishing > Forestry and logging (including forest nurseries, timber tracts)", + "probability": 0.004564829896869313, + "proxy": true, + "published_label": "Forestry and logging (including forest nurseries, timber tracts)", + "ubia_intensity": 0.10977479072217418, + "wage_share": 0.0910846412539972 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "005 | Agriculture, forestry, hunting, and fishing > Fishing, hunting, and trapping", + "probability": 0.0015626249553097429, + "proxy": true, + "published_label": "Fishing, hunting, and trapping", + "ubia_intensity": 0.20483143061544268, + "wage_share": 0.02578508484622146 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "006 | Agriculture, forestry, hunting, and fishing > Support activities for agriculture and forestry", + "probability": 0.008289524525648517, + "proxy": true, + "published_label": "Support activities for agriculture and forestry", + "ubia_intensity": 0.08251793363249421, + "wage_share": 0.08016815428728405 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "008 | Mining > Oil and gas extraction", + "probability": 0.0037968259917333853, + "proxy": true, + "published_label": "Oil and gas extraction", + "ubia_intensity": 0.06164790957633291, + "wage_share": 0.057490393340799466 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "009 | Mining > Other mining", + "probability": 0.0004928488408964902, + "proxy": true, + "published_label": "Other mining", + "ubia_intensity": 0.10451324338946587, + "wage_share": 0.13599678574503432 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "010 | Mining > Support activities for mining", + "probability": 0.002229148441188641, + "proxy": true, + "published_label": "Support activities for mining", + "ubia_intensity": 0.08601248429592885, + "wage_share": 0.10903478184442524 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "011 | Utilities", + "probability": 0.0009780818570623994, + "proxy": true, + "published_label": "Utilities", + "ubia_intensity": 0.17149827538187973, + "wage_share": 0.10597135634252415 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "013 | Construction > Construction of buildings", + "probability": 0.0596729125022449, + "proxy": true, + "published_label": "Construction of buildings", + "ubia_intensity": 0.031416016117521414, + "wage_share": 0.10497404482620899 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "014 | Construction > Heavy and civil engineering construction", + "probability": 0.005687244676601245, + "proxy": true, + "published_label": "Heavy and civil engineering construction", + "ubia_intensity": 0.06588811582375342, + "wage_share": 0.15593421265334714 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "015 | Construction > Specialty trade contractors", + "probability": 0.13502414431482657, + "proxy": true, + "published_label": "Specialty trade contractors", + "ubia_intensity": 0.04312979872647048, + "wage_share": 0.11075789413185018 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "017 | Manufacturing > Food manufacturing", + "probability": 0.005223504441907772, + "proxy": true, + "published_label": "Food manufacturing", + "ubia_intensity": 0.04031971110548605, + "wage_share": 0.12695587274296147 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "021 | Manufacturing > Wood products", + "probability": 0.0017979669311240763, + "proxy": true, + "published_label": "Wood products", + "ubia_intensity": 0.04243897819895547, + "wage_share": 0.13634532038721803 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "022 | Manufacturing > Paper products", + "probability": 8.279393666213607e-05, + "proxy": true, + "published_label": "Paper products", + "ubia_intensity": 0.013679475092852127, + "wage_share": 0.08723987168373964 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "023 | Manufacturing > Printing and related support activities", + "probability": 0.0008714241647408269, + "proxy": true, + "published_label": "Printing and related support activities", + "ubia_intensity": 0.04557496668127461, + "wage_share": 0.09730751034428448 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "026 | Manufacturing > Plastic and rubber products", + "probability": 0.0004635233581328415, + "proxy": true, + "published_label": "Plastic and rubber products", + "ubia_intensity": 0.017447438996687496, + "wage_share": 0.3090947516412776 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "027 | Manufacturing > Nonmetallic mineral products", + "probability": 0.0009399278219404839, + "proxy": true, + "published_label": "Nonmetallic mineral products", + "ubia_intensity": 0.027023035290013025, + "wage_share": 0.12693514326622812 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "028 | Manufacturing > Primary metal industries", + "probability": 0.0003648838122775142, + "proxy": true, + "published_label": "Primary metal industries", + "ubia_intensity": 0.04190032360229364, + "wage_share": 0.1115336796193725 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "029 | Manufacturing > Fabricated metal products", + "probability": 0.0028880482444905583, + "proxy": true, + "published_label": "Fabricated metal products", + "ubia_intensity": 0.06365112035019435, + "wage_share": 0.15291073748066633 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "030 | Manufacturing > Machinery", + "probability": 0.0011630408933311909, + "proxy": true, + "published_label": "Machinery", + "ubia_intensity": 0.0636753699746684, + "wage_share": 0.0844293543865465 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "031 | Manufacturing > Computer and electronic products", + "probability": 0.00038759351222904926, + "proxy": true, + "published_label": "Computer and electronic products", + "ubia_intensity": 0.02807868790420133, + "wage_share": 0.13202997763165897 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "032 | Manufacturing > Electrical equipment, appliances, and components", + "probability": 0.0008515616244681133, + "proxy": true, + "published_label": "Electrical equipment, appliances, and components", + "ubia_intensity": 0.03472950602345157, + "wage_share": 0.13265742392020488 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "033 | Manufacturing > Transportation equipment", + "probability": 0.0009660363023880989, + "proxy": true, + "published_label": "Transportation equipment", + "ubia_intensity": 0.05409617555797289, + "wage_share": 0.06510054303324249 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "034 | Manufacturing > Furniture and related products", + "probability": 0.0011740612609785449, + "proxy": true, + "published_label": "Furniture and related products", + "ubia_intensity": 0.04094433802771654, + "wage_share": 0.11611961329455035 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "035 | Manufacturing > Miscellaneous manufacturing", + "probability": 0.003917452315671476, + "proxy": true, + "published_label": "Miscellaneous manufacturing", + "ubia_intensity": 0.0373249739940731, + "wage_share": 0.14962778661914658 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "037 | Wholesale trade (merchant wholesalers) > Durable goods, including machinery, woods, metals, etc.", + "probability": 0.017879226127708495, + "proxy": true, + "published_label": "Durable goods, including machinery, woods, metals, etc.", + "ubia_intensity": 0.024034448039455713, + "wage_share": 0.041518239138034874 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "038 | Wholesale trade (merchant wholesalers) > Nondurable goods, including food, fiber, chemicals, etc.", + "probability": 0.015276432899363108, + "proxy": true, + "published_label": "Nondurable goods, including food, fiber, chemicals, etc.", + "ubia_intensity": 0.016856752988736377, + "wage_share": 0.049317202194894855 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "039 | Wholesale trade (merchant wholesalers) > Wholesale electronic markets and agents and brokers", + "probability": 0.0062448903666224445, + "proxy": true, + "published_label": "Wholesale electronic markets and agents and brokers", + "ubia_intensity": 0.015417419819619098, + "wage_share": 0.02181394910291053 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "041 | Retail trade > Motor vehicle and parts dealers", + "probability": 0.023889411527931406, + "proxy": true, + "published_label": "Motor vehicle and parts dealers", + "ubia_intensity": 0.012316389446083287, + "wage_share": 0.047279042650177974 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "042 | Retail trade > Building material and garden equipment and supplies dealers", + "probability": 0.005595278537764962, + "proxy": true, + "published_label": "Building material and garden equipment and supplies dealers", + "ubia_intensity": 0.03753789811925712, + "wage_share": 0.0804975105653164 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "043 | Retail trade > Food and beverage stores", + "probability": 0.019054566122224482, + "proxy": true, + "published_label": "Food and beverage stores", + "ubia_intensity": 0.01608433931361616, + "wage_share": 0.09963541731674821 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "044 | Retail trade > Furniture and home furnishing retailers", + "probability": 0.0022526915967149698, + "proxy": true, + "published_label": "Furniture and home furnishing retailers", + "ubia_intensity": 0.015055550801263567, + "wage_share": 0.09380755535546187 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "045 | Retail trade > Electronic and appliance retailers (including computers)", + "probability": 0.0013904113459012508, + "proxy": true, + "published_label": "Electronic and appliance retailers (including computers)", + "ubia_intensity": 0.01618953320493229, + "wage_share": 0.07265924291609022 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "046 | Retail trade > General merchandise retailers", + "probability": 0.007631284781444173, + "proxy": true, + "published_label": "General merchandise retailers", + "ubia_intensity": 0.011125441324503457, + "wage_share": 0.025609589338248015 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "047 | Retail trade > Health and personal care retailers", + "probability": 0.0053929594233735455, + "proxy": true, + "published_label": "Health and personal care retailers", + "ubia_intensity": 0.020895938192830348, + "wage_share": 0.06263030941662567 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "048 | Retail trade > Gasoline stations", + "probability": 0.007077774414054918, + "proxy": true, + "published_label": "Gasoline stations", + "ubia_intensity": 0.017330149238707546, + "wage_share": 0.049020624451137806 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "049 | Retail trade > Clothing and accessories retailers", + "probability": 0.0065306959558720235, + "proxy": true, + "published_label": "Clothing and accessories retailers", + "ubia_intensity": 0.0213169197380259, + "wage_share": 0.05903304965212581 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "050 | Retail trade > Sporting goods, hobby, book, and music retailers", + "probability": 0.004200448986761378, + "proxy": true, + "published_label": "Sporting goods, hobby, book, and music retailers", + "ubia_intensity": 0.022481639235944782, + "wage_share": 0.08178170966215995 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "051 | Retail trade > Miscellaneous store retailers", + "probability": 0.021487516715348372, + "proxy": true, + "published_label": "Miscellaneous store retailers", + "ubia_intensity": 0.02588705676417276, + "wage_share": 0.06897721607247559 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "053 | Transportation and warehousing > Air and rail transportation", + "probability": 0.0012178797556417844, + "proxy": true, + "published_label": "Air and rail transportation", + "ubia_intensity": 0.3216318577447432, + "wage_share": 0.08082380039873797 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "054 | Transportation and warehousing > Water transportation", + "probability": 0.000647594457758468, + "proxy": true, + "published_label": "Water transportation", + "ubia_intensity": 0.16823571475951418, + "wage_share": 0.14542883629427458 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "055 | Transportation and warehousing > Truck transportation", + "probability": 0.059920871560095006, + "proxy": true, + "published_label": "Truck transportation", + "ubia_intensity": 0.06840730178444568, + "wage_share": 0.05188319406039381 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "056 | Transportation and warehousing > Taxi, limousine service, and ridesharing service", + "probability": 0.02316984757885459, + "proxy": true, + "published_label": "Taxi, limousine service, and ridesharing service", + "ubia_intensity": 0.03868315148401905, + "wage_share": 0.004568162094046752 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "059 | Transportation and warehousing > Scenic and sightseeing transportation", + "probability": 0.0003625736054360049, + "proxy": true, + "published_label": "Scenic and sightseeing transportation", + "ubia_intensity": 0.35079407736186, + "wage_share": 0.1571582548791835 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "060 | Transportation and warehousing > Support activities for transportation (including motor vehicle towing)", + "probability": 0.004627926831889556, + "proxy": true, + "published_label": "Support activities for transportation (including motor vehicle towing)", + "ubia_intensity": 0.08774111303365888, + "wage_share": 0.07992083620942 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "061 | Transportation and warehousing > Couriers and messengers", + "probability": 0.010058228312923715, + "proxy": true, + "published_label": "Couriers and messengers", + "ubia_intensity": 0.03853653107315266, + "wage_share": 0.024304084409281435 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "062 | Transportation and warehousing > Warehousing and storage facilities", + "probability": 0.0005628889689955003, + "proxy": true, + "published_label": "Warehousing and storage facilities", + "ubia_intensity": 0.06314692278340825, + "wage_share": 0.09787437994993066 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "064 | Information > Motion picture and sound recording", + "probability": 0.0033875903989503057, + "proxy": true, + "published_label": "Motion picture and sound recording", + "ubia_intensity": 0.05133114744769269, + "wage_share": 0.052388729291986146 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "065 | Information > Publishing industries", + "probability": 0.0007855452375821718, + "proxy": true, + "published_label": "Publishing industries", + "ubia_intensity": 0.012287743665903546, + "wage_share": 0.1209215074192604 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "068 | Information > Web search portals", + "probability": 0.0011170122484039314, + "proxy": true, + "published_label": "Web search portals", + "ubia_intensity": 0.011678540459140819, + "wage_share": 0.045050689705466475 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "070 | Finance and insurance > Credit intermediation and related activities", + "probability": 0.0019256223605949043, + "proxy": true, + "published_label": "Credit intermediation and related activities", + "ubia_intensity": 0.021446143608881623, + "wage_share": 0.048192000835723024 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "074 | Finance and insurance > Securities, commodity contracts, and other financial investments > Securities and commodity exchanges", + "probability": 0.0027810772860258513, + "proxy": true, + "published_label": "Securities and commodity exchanges", + "ubia_intensity": 0.0025446169738327705, + "wage_share": 0.008820170982287327 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "075 | Finance and insurance > Securities, commodity contracts, and other financial investments > Other financial investment activities (investment advice)", + "probability": 0.034755070752229715, + "proxy": true, + "published_label": "Other financial investment activities (investment advice)", + "ubia_intensity": 0.0061937172958741555, + "wage_share": 0.03465186770375407 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "077 | Finance and insurance > Insurance agents, brokers, and related activities > Insurance agencies and brokerages", + "probability": 0.017360907911204895, + "proxy": true, + "published_label": "Insurance agencies and brokerages", + "ubia_intensity": 0.02214324285896712, + "wage_share": 0.07509888781682303 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "078 | Finance and insurance > Insurance agents, brokers, and related activities > Other insurance related activities and other financial vehicles", + "probability": 0.004583197350900378, + "proxy": true, + "published_label": "Other insurance related activities and other financial vehicles", + "ubia_intensity": 0.01728457460700744, + "wage_share": 0.036753638176527784 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "079 | Finance and insurance > Funds, trusts, and other financial vehicles", + "probability": 0.00015244798257470804, + "proxy": true, + "published_label": "Funds, trusts, and other financial vehicles", + "ubia_intensity": 0.0061406613495709785, + "wage_share": 0.007790083536361169 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "082 | Real estate and rental and leasing > Real estate > Lessors of real estate (including miniwarehouses and self storage)", + "probability": 0.0025948683283230824, + "proxy": true, + "published_label": "Lessors of real estate (including miniwarehouses and self storage)", + "ubia_intensity": 0.1447966203388544, + "wage_share": 0.044681467017779315 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "083 | Real estate and rental and leasing > Real estate > Offices of real estate agents, brokers, property managers, and appraisers", + "probability": 0.03471126535397714, + "proxy": true, + "published_label": "Offices of real estate agents, brokers, property managers, and appraisers", + "ubia_intensity": 0.03472468009400639, + "wage_share": 0.037079684305531754 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "084 | Real estate and rental and leasing > Real estate > Other activities related to real estate", + "probability": 0.01508614414780962, + "proxy": true, + "published_label": "Other activities related to real estate", + "ubia_intensity": 0.03334568130929659, + "wage_share": 0.059142221250866635 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "086 | Real estate and rental and leasing > Rental and leasing services > Automotive equipment rental and leasing", + "probability": 0.0009742660868507091, + "proxy": true, + "published_label": "Automotive equipment rental and leasing", + "ubia_intensity": 0.40543909116913895, + "wage_share": 0.03333322579465705 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "087 | Real estate and rental and leasing > Rental and leasing services > Consumer electronics and appliances rental", + "probability": 8.284946544336056e-05, + "proxy": true, + "published_label": "Consumer electronics and appliances rental", + "ubia_intensity": 0.29028219508956515, + "wage_share": 0.08948296902366695 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "094 | Real estate and rental and leasing > Rental and leasing services > Commercial and industrial machinery and equipment rental and leasing", + "probability": 0.002085762650938484, + "proxy": true, + "published_label": "Commercial and industrial machinery and equipment rental and leasing", + "ubia_intensity": 0.46706989281069655, + "wage_share": 0.08873821628439549 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "095 | Real estate and rental and leasing > Lessors of nonfinancial intangible assets (except copyrighted works)", + "probability": 8.654370096406885e-05, + "proxy": true, + "published_label": "Lessors of nonfinancial intangible assets (except copyrighted works)", + "ubia_intensity": 0.00421294755001362, + "wage_share": 0.0050785387851457284 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "097 | Professional, scientific, and technical services > Legal services", + "probability": 0.02264628922651525, + "proxy": true, + "published_label": "Legal services", + "ubia_intensity": 0.012211926017779247, + "wage_share": 0.10401126034045745 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "098 | Professional, scientific, and technical services > Offices of certified public accountants", + "probability": 0.0021904569293729865, + "proxy": true, + "published_label": "Offices of certified public accountants", + "ubia_intensity": 0.014499903979689133, + "wage_share": 0.16712556323744615 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "099 | Professional, scientific, and technical services > Other accounting services", + "probability": 0.006133253942822028, + "proxy": true, + "published_label": "Other accounting services", + "ubia_intensity": 0.04969417634653415, + "wage_share": 0.07118361453826312 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "101 | Professional, scientific, and technical services > Architectural, engineering, and related services > Architectural services", + "probability": 0.004647225178790771, + "proxy": true, + "published_label": "Architectural services", + "ubia_intensity": 0.05969791395305766, + "wage_share": 0.13436790434103418 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "102 | Professional, scientific, and technical services > Architectural, engineering, and related services > Engineering services", + "probability": 0.00454087184705308, + "proxy": true, + "published_label": "Engineering services", + "ubia_intensity": 0.025231072657741358, + "wage_share": 0.08670281966382488 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "103 | Professional, scientific, and technical services > Architectural, engineering, and related services > Drafting, building inspections, and geophysical surveying", + "probability": 0.0014002881349692363, + "proxy": true, + "published_label": "Drafting, building inspections, and geophysical surveying", + "ubia_intensity": 0.02044415380552016, + "wage_share": 0.06454565928355677 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "106 | Professional, scientific, and technical services > Specialized design services", + "probability": 0.007508121944688262, + "proxy": true, + "published_label": "Specialized design services", + "ubia_intensity": 0.02888740786263072, + "wage_share": 0.03579587904443665 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "107 | Professional, scientific, and technical services > Computer systems design services", + "probability": 0.00880061299960797, + "proxy": true, + "published_label": "Computer systems design services", + "ubia_intensity": 0.020209687502120578, + "wage_share": 0.1207618651466047 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "109 | Professional, scientific, and technical services > Other professional, scientific, and technical services > Management, scientific, and technical consulting services", + "probability": 0.035143987525792474, + "proxy": true, + "published_label": "Management, scientific, and technical consulting services", + "ubia_intensity": 0.02444437123940146, + "wage_share": 0.058156327017460596 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "110 | Professional, scientific, and technical services > Other professional, scientific, and technical services > Scientific research and development services", + "probability": 0.000998701893728043, + "proxy": true, + "published_label": "Scientific research and development services", + "ubia_intensity": 0.044614522760199365, + "wage_share": 0.0698327040633809 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "111 | Professional, scientific, and technical services > Other professional, scientific, and technical services > Advertising and related services", + "probability": 0.007139207581064132, + "proxy": true, + "published_label": "Advertising and related services", + "ubia_intensity": 0.02264529016942546, + "wage_share": 0.08338254510361474 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "115 | Administrative and support and waste management and remediation services > Management of companies and enterprises", + "probability": 0.0002752221178620478, + "proxy": true, + "published_label": "Management of companies and enterprises", + "ubia_intensity": 0.04404836907592072, + "wage_share": 0.15596228993655983 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "116 | Administrative and support and waste management and remediation services > Administrative and support services", + "probability": 0.0599414434019694, + "proxy": true, + "published_label": "Administrative and support services", + "ubia_intensity": 0.0543975617438944, + "wage_share": 0.11233576231453109 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "117 | Administrative and support and waste management and remediation services > Waste management and remediation services", + "probability": 0.0022631336268673064, + "proxy": true, + "published_label": "Waste management and remediation services", + "ubia_intensity": 0.10010020506275143, + "wage_share": 0.12343231389901395 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "118 | Educational services", + "probability": 0.008804958388667, + "proxy": true, + "published_label": "Educational services", + "ubia_intensity": 0.031318016504202975, + "wage_share": 0.07001586926576044 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "121 | Health care and social assistance > Ambulatory health care services > Offices of physicians (except mental health specialists)", + "probability": 0.014612096514065458, + "proxy": true, + "published_label": "Offices of physicians (except mental health specialists)", + "ubia_intensity": 0.019106436332451317, + "wage_share": 0.1214809006442151 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "122 | Health care and social assistance > Ambulatory health care services > Offices of physicians, mental health specialists", + "probability": 0.003351719853992141, + "proxy": true, + "published_label": "Offices of physicians, mental health specialists", + "ubia_intensity": 0.017202588554687166, + "wage_share": 0.08284578468982903 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "123 | Health care and social assistance > Ambulatory health care services > Offices of dentists", + "probability": 0.00940412651063345, + "proxy": true, + "published_label": "Offices of dentists", + "ubia_intensity": 0.032037533997429216, + "wage_share": 0.25639708718800003 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "124 | Health care and social assistance > Ambulatory health care services > Offices of chiropractors", + "probability": 0.001909229321435868, + "proxy": true, + "published_label": "Offices of chiropractors", + "ubia_intensity": 0.02199548588226966, + "wage_share": 0.13176822699877022 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "125 | Health care and social assistance > Ambulatory health care services > Offices of optometrists", + "probability": 0.0019787508316724983, + "proxy": true, + "published_label": "Offices of optometrists", + "ubia_intensity": 0.03277281491402404, + "wage_share": 0.21734784078583594 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "126 | Health care and social assistance > Ambulatory health care services > Offices of mental health practitioners and social therapists", + "probability": 0.010076266785118847, + "proxy": true, + "published_label": "Offices of mental health practitioners and social therapists", + "ubia_intensity": 0.024677216337253956, + "wage_share": 0.06668350421556526 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "127 | Health care and social assistance > Ambulatory health care services > Offices of podiatrists", + "probability": 0.0005044302587767822, + "proxy": true, + "published_label": "Offices of podiatrists", + "ubia_intensity": 0.008215661370606189, + "wage_share": 0.11457789196784354 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "128 | Health care and social assistance > Ambulatory health care services > Outpatient care centers and other miscellaneous health practitioners", + "probability": 0.007149562651049646, + "proxy": true, + "published_label": "Outpatient care centers and other miscellaneous health practitioners", + "ubia_intensity": 0.030000858004755736, + "wage_share": 0.08831455406869738 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "129 | Health care and social assistance > Ambulatory health care services > Medical and diagnostic laboratories", + "probability": 0.0007524940879122162, + "proxy": true, + "published_label": "Medical and diagnostic laboratories", + "ubia_intensity": 0.061461198467612194, + "wage_share": 0.1014152240487145 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "130 | Health care and social assistance > Ambulatory health care services > Home health care services", + "probability": 0.007340059373604514, + "proxy": true, + "published_label": "Home health care services", + "ubia_intensity": 0.032035773823177474, + "wage_share": 0.1760253264691092 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "131 | Health care and social assistance > Ambulatory health care services > Other ambulatory health care services (including ambulance services, blood, and organ banks)", + "probability": 0.0013040913316313598, + "proxy": true, + "published_label": "Other ambulatory health care services (including ambulance services, blood, and organ banks)", + "ubia_intensity": 0.028391110168449824, + "wage_share": 0.11434976857933178 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "132 | Health care and social assistance > Hospitals", + "probability": 0.0006628711588723215, + "proxy": true, + "published_label": "Hospitals", + "ubia_intensity": 0.029394610895802645, + "wage_share": 0.3414824778246328 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "133 | Health care and social assistance > Nursing and residential care facilities", + "probability": 0.004782324084227813, + "proxy": true, + "published_label": "Nursing and residential care facilities", + "ubia_intensity": 0.03324159712146051, + "wage_share": 0.24117265343670125 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "134 | Health care and social assistance > Social assistance", + "probability": 0.013439573819411972, + "proxy": true, + "published_label": "Social assistance", + "ubia_intensity": 0.027870084631611426, + "wage_share": 0.10528893098756187 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "138 | Arts, entertainment, and recreation > Amusement, gambling, and recreation industries", + "probability": 0.007921934994927375, + "proxy": true, + "published_label": "Amusement, gambling, and recreation industries", + "ubia_intensity": 0.05661894918379034, + "wage_share": 0.11462657234264009 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "141 | Accommodation, food services, and drinking places > Accommodation > Travel accommodation (including hotels, motels, and bed and breakfast inns)", + "probability": 0.0030886538245104155, + "proxy": true, + "published_label": "Travel accommodation (including hotels, motels, and bed and breakfast inns)", + "ubia_intensity": 0.1546682636834881, + "wage_share": 0.14911584867892483 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "142 | Accommodation, food services, and drinking places > Accommodation > RV (recreational vehicle) parks and recreational camps", + "probability": 0.0005438897441138996, + "proxy": true, + "published_label": "RV (recreational vehicle) parks and recreational camps", + "ubia_intensity": 0.17064133410129814, + "wage_share": 0.10952263537787915 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "143 | Accommodation, food services, and drinking places > Accommodation > Rooming and boarding houses", + "probability": 0.0003445209891173537, + "proxy": true, + "published_label": "Rooming and boarding houses", + "ubia_intensity": 0.23428868584670265, + "wage_share": 0.07750321973411915 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "144 | Accommodation, food services, and drinking places > Restaurants (full & limited service) and drinking places", + "probability": 0.0404504593008396, + "proxy": true, + "published_label": "Restaurants (full & limited service) and drinking places", + "ubia_intensity": 0.030369172778579347, + "wage_share": 0.18780353055796617 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "147 | Other services > Auto repair and maintenance > Automotive mechanical and electrical repair and maintenance", + "probability": 0.011524742901205977, + "proxy": true, + "published_label": "Automotive mechanical and electrical repair and maintenance", + "ubia_intensity": 0.0453057507945977, + "wage_share": 0.09689728257677839 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "148 | Other services > Auto repair and maintenance > Automotive body shops", + "probability": 0.005049057108696061, + "proxy": true, + "published_label": "Automotive body shops", + "ubia_intensity": 0.039266169383931473, + "wage_share": 0.10910398012252437 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "149 | Other services > Auto repair and maintenance > Other auto repair and maintenance (including oil change, lubrication, and car washes)", + "probability": 0.005051069765087236, + "proxy": true, + "published_label": "Other auto repair and maintenance (including oil change, lubrication, and car washes)", + "ubia_intensity": 0.04688538416160483, + "wage_share": 0.1191803061743473 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "150 | Other services > Miscellaneous repairs", + "probability": 0.012802319763659071, + "proxy": true, + "published_label": "Miscellaneous repairs", + "ubia_intensity": 0.037229131418472186, + "wage_share": 0.09353361591357673 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "151 | Other services > Personal and laundry services", + "probability": 0.05025276436665891, + "proxy": true, + "published_label": "Personal and laundry services", + "ubia_intensity": 0.034120181127390854, + "wage_share": 0.06388283582775697 + }, + { + "capital_measure": "depreciation_deduction_flow_over_receipts", + "industry_key": "152 | Other services > Religious, grantmaking, civic, professional, and similar organizations", + "probability": 0.0016397397644506084, + "proxy": true, + "published_label": "Religious, grantmaking, civic, professional, and similar organizations", + "ubia_intensity": 0.02074161728642754, + "wage_share": 0.014876049955720717 + } + ], + "eligible_receipts_thousands": 1908919981.0, + "proxy": true, + "receipts_coverage": 0.925226557628888, + "scf_legal_form_group": "sole_or_informal", + "tax_year": 2023 + } + }, + "model": "receipts_weighted_finest_classified_soi_rows", + "rationale": "PUF records carry no industry. Industry heterogeneity is represented distributionally, not assigned: within each latent legal form, the record draws once from finest classified nonaggregate SOI rows with probability proportional to receipts, then uses that component's wage share and UBIA intensity. Receipts coverage is capped at one when independently rounded detail rows exceed the rounded all-industry row." + }, + "investment": { + "bdc_anchor": { + "comparison_component_2022_dollars": null, + "provisional": true, + "published_component_dollars": null, + "published_income_dollars": null, + "rationale": "No published BDC aggregate anchor was found in the persisted evidence. Retain the v1 probability and Beta scale because the regulatory economics imply a small dividend carveout; the fixed-seed PUF replay is about $0.143B. This scale remains provisional pending v3.", + "replay_factor_band": null + }, + "bdc_exposure_order": [ + "non_qualified_dividend_income" + ], + "bdc_income_distribution": { + "non_qualified_dividend_income": { + "beta_a": 2.0, + "beta_b": 18.0, + "probability_of_receiving": 0.05, + "scale": 0.3, + "shift": 0.0 + } + }, + "model": "exposure_bernoulli_beta_carveout", + "reit_ptp_anchor": { + "comparison_component_2022_dollars": 2900000000.0, + "provisional": true, + "published_component_dollars": 4200000000.0, + "published_income_dollars": 21070000000.0, + "rationale": "SOI Publication 4801 TY2023 reports Form 8995 line 6 REIT/PTP income of $21.07B and line 9 component of $4.20B; JCT reports a $2.90B 2022 component. The aggregate identifies receiving probability times Beta share, not their decomposition. Holding the dividend exposure and both v1 Beta scales fixed while raising the partnership/S-corporation receiving probability from 0.05 to a provisional 0.09 produces about $20.94B, or 0.994 times the income anchor, on the fixed-seed PUF replay. The [0.3, 3.0] replay factor band is provisional.", + "replay_factor_band": [ + 0.3, + 3.0 + ] + }, + "reit_ptp_exposure_order": [ + "non_qualified_dividend_income", + "partnership_s_corp_income" + ], + "reit_ptp_income_distribution": { + "non_qualified_dividend_income": { + "beta_a": 2.0, + "beta_b": 18.0, + "probability_of_receiving": 0.35, + "scale": 1.0, + "shift": 0.0 + }, + "partnership_s_corp_income": { + "beta_a": 2.0, + "beta_b": 8.0, + "probability_of_receiving": 0.09, + "scale": 0.6, + "shift": 0.0 + } + } + }, + "profit_margin": { + "interpolation": "piecewise_linear_with_endpoint_clamp", + "model": "scf_form_empirical_inverse_cdf", + "probabilities": [ + 0.05, + 0.25, + 0.5, + 0.75, + 0.95 + ], + "quantiles_by_form": { + "partnership": [ + 0.04071428571428572, + 0.2, + 0.432, + 0.825, + 1.0 + ], + "s_corporation": [ + 0.022222222222222223, + 0.08, + 0.23076923076923078, + 0.5, + 1.0 + ], + "sole_proprietorship": [ + 0.053125, + 0.3, + 0.6711111111111111, + 1.0, + 1.0 + ] + }, + "rationale": "Receipts equal positive qualified business income divided by a seeded draw from the persisted form-level SCF empirical profit-margin inverse. Linear interpolation connects q05, q25, q50, q75, and q95; draws below q05 or above q95 clamp to the nearest endpoint. This replaces the v1/v2 invented Beta margins." + }, + "qbi_simulation_version": 3, + "qualification_derivations": { + "estate_income": { + "mode": "prior", + "prior": { + "probability": 0.6 + }, + "rationale": "Retain the weakest residual prior, 0.60: aggregate estate income does not identify whether a distribution retains qualified-business character. This is explicitly flagged for v3 evidence work." + }, + "farm_operations_income": { + "mode": "derived", + "prior": null, + "rationale": "Statutory active farm trade-or-business source: the engine derives Schedule F farm operations as source != 0." + }, + "farm_rent_income": { + "mode": "prior", + "prior": { + "probability": 0.8 + }, + "rationale": "Retain the 0.80 residual prior because farm rent can be a trade or business, but the host record does not identify the participation and operational facts needed to resolve that status." + }, + "partnership_s_corp_income": { + "mode": "prior", + "prior": { + "probability": 0.9 + }, + "rationale": "Retain the 0.90 prior as a proxy for guaranteed-payment and reasonable-compensation exclusions that the aggregate source cannot separate. JCT 2022 entity shares (S corporations 53% and partnerships 17% of QBI deducted) anchor the importance of this combined source pending v3 entity-level treatment." + }, + "rental_income": { + "mode": "prior", + "prior": { + "probability": 0.7 + }, + "rationale": "Retain the 0.70 residual prior because rental trade-or-business status and the Section 199A rental-real-estate safe-harbor facts are not observed on the host record." + }, + "self_employment_income": { + "mode": "derived", + "prior": null, + "rationale": "Statutory active trade-or-business source: the engine derives the preliminary flag as Schedule C source != 0, then the host gate requires positive Schedule C income before SSTB classification or routing." + } + }, + "record_form": { + "form_order": [ + "sole_proprietorship", + "partnership", + "s_corporation" + ], + "jct_qbi_entity_shares": { + "estate_and_trust": 0.02, + "partnership": 0.17, + "s_corporation": 0.53, + "sole_proprietorship": 0.28 + }, + "partnership_probability": 0.24285714285714285, + "passthrough_source": "partnership_s_corp_income", + "rationale": "A positive qualified partnership_s_corp_income component takes record-level precedence and is split using JCT QBI deduction shares 17/(17+53) and 53/(17+53). Every other positive-QBI record uses the sole-proprietorship evidence proxy. This is a latent simulation form, not an assigned observed entity type; the PUF does not identify industry or legal form within its other aggregate business-income sources.", + "s_corporation_probability": 0.7571428571428571, + "sole_proprietorship_sources": [ + "self_employment_income", + "farm_operations_income", + "farm_rent_income", + "rental_income", + "estate_income" + ] + }, + "rng": { + "bit_generator": "PCG64", + "seeds": { + "employer_gate": 3043, + "entity_split": 3041, + "investment": 2043, + "latent_industry": 3042, + "margin_quantile": 3044, + "qualification": 2041, + "sstb": 2064, + "ubia_dispersion": 3045 + } + }, + "schema_version": 3, + "source_order": [ + "self_employment_income", + "farm_operations_income", + "farm_rent_income", + "rental_income", + "estate_income", + "partnership_s_corp_income" + ], + "sstb_classification": { + "agi_band_format": "lower_inclusive:upper_exclusive", + "agi_column": "AGI", + "ambiguous_prior": 0.0, + "ambiguous_prior_status": "superseded_by_code_specific_live_crosswalk", + "crosswalk_resource": "sstb_crosswalk_v1.json", + "follow_up": "The resource ships the 2017 Census industry map as a future primary seam, but the frozen census_cps person columns currently provide PEIOOCC and AGI without a detailed-industry field, so industry_column remains null.", + "industry_column": null, + "mode": "crosswalk", + "occupation_column": "PEIOOCC", + "passive_passthrough_prior_status": "provisional_published_aggregate_derivation", + "passive_passthrough_sstb_prior_by_agi": { + "-inf:200000": 0.264, + "200000:inf": 0.17 + }, + "rationale": "Positive Schedule C income uses per-code probabilities from the live crosswalk: host industry is primary when configured, detailed occupation is the current fallback, and absent codes have probability 0. For passive-only pass-through income, OTA WP-118's ordinary-income-limited deduction falls from $221.00B to $162.76B under an all-income SSTB restriction, so ($221.00B - $162.76B) / $221.00B = $58.24B / $221.00B = 0.2635, rounded to the 0.264 below-threshold population prior. Restoring the income exception raises deductions to $183.46B, leaving ($221.00B - $183.46B) / $221.00B = $37.54B / $221.00B = 0.1699, rounded to the conservative 0.170 above-threshold residual after SSTB selection out. JCT's 2022 split puts $120.81B / $216.08B = 55.91% of deduction dollars above the phaseout, confirming the upper band is material but not identifying its conditional SSTB rate. The $200,000 AGI split is a provisional coarse proxy for filing-status-specific modified-taxable-income thresholds." + }, + "ubia": { + "dispersion": { + "forms": { + "partnership": { + "receipts_weight_effective_industry_count": 10.925132136575865, + "receipts_weighted_log_intensity_sd": 1.232972002301773, + "sigma": 0.3730266549334975 + }, + "s_corporation": { + "receipts_weight_effective_industry_count": 19.533677794780417, + "receipts_weighted_log_intensity_sd": 0.7167581982380723, + "sigma": 0.16217378734400031 + }, + "sole_proprietorship": { + "receipts_weight_effective_industry_count": 23.53513031065801, + "receipts_weighted_log_intensity_sd": 0.6163001042648324, + "sigma": 0.12703808473210823 + } + }, + "model": "mean_one_lognormal", + "rationale": "For each form, sigma equals the receipts-weighted standard deviation of log SOI industry intensity divided by the square root of the receipts-weight effective industry count (1/sum(weight^2)). This retains modest within-component dispersion while the latent industry mixture carries the observed cross-industry heterogeneity. The runtime multiplier exp(sigma*z - sigma^2/2) has mean one." + }, + "model": "soi_industry_intensity_times_receipts_mean_one_lognormal", + "rationale": "UBIA is the latent industry's persisted intensity times SCF-margin-implied receipts and a mean-one seeded multiplier. Sole-proprietor intensity remains explicitly proxy=true because its public evidence is depreciation flow over receipts rather than an asset stock. The v1/v2 lognormal multiple of QBI is not used." + }, + "w2": { + "model": "employer_gate_soi_wage_share_times_receipts", + "non_employer_wages": 0.0, + "plausibility_band": { + "all_industry_wage_bill_dollars_by_form": { + "partnership": 1308541653000.0, + "s_corporation": 1514251813000.0, + "sole_proprietorship": 175013634000.0 + }, + "formula": "lower=(0.28*sole_proprietorship+0.17*partnership+0.53*s_corporation)/0.98; upper=sole_proprietorship+partnership+s_corporation", + "jct_supported_form_shares": { + "partnership": 0.17, + "s_corporation": 0.53, + "sole_proprietorship": 0.28 + }, + "lower_dollars": 1095927917775.5103, + "rationale": "This provisional magnitude envelope is derived from the persisted SOI all-industry wage bills. Its lower edge is their supported-form JCT QBI-share-weighted composite and its upper edge is their sum. It is a broad plausibility diagnostic, not a confidence interval or calibration target.", + "supported_form_share_denominator": 0.98, + "upper_dollars": 2997807100000.0 + }, + "rationale": "Employer records receive the latent industry's SOI wage share times SCF-margin-implied receipts; non-employers receive zero. Partnership wages include cost of labor and salaries but exclude guaranteed payments. S-corporation wages include officer compensation and salaries.", + "s_corporation_officer_compensation_included": true + } +} diff --git a/packages/microcosm-build/tests/fixtures/qbi_history/qbi_inputs.py.fixture b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_inputs.py.fixture new file mode 100644 index 000000000..f48b5de7a --- /dev/null +++ b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_inputs.py.fixture @@ -0,0 +1,661 @@ +"""Archived PUF Section 199A input family for the US build. + +The retired eCPS PUF pipeline used a pinned, seeded QBI simulation to create +source-level qualification flags, SSTB classification and self-employment +splits, allocable W-2 wages / UBIA, and qualified REIT/PTP and BDC income. +Release 1.8.0 did not physically carry that surface: a later retired loader +generated it while mutating the downloaded file. Populace now runs the +versioned source simulation in :mod:`qbi_simulation` before the shared weighted +PUF QRF places the leaves on the PUF support channel. + +This module restores the cross-column identities after imputation. In +particular, the archived PUF model is all-or-nothing at tax-record grain: the +SSTB flag routes the entire predicted Schedule C amount to the SSTB leaf and +duplicates the total W-2 wage and UBIA pools into their SSTB-allocable leaves. +The base W-2/UBIA leaves remain total pools, not non-SSTB complements. +PolicyEngine-US owns the QBI deduction formulas and statutory limits. +""" + +from __future__ import annotations + +from collections.abc import Mapping +from importlib.resources import files +from typing import TYPE_CHECKING, Any + +import numpy as np +import pandas as pd + +from populace.build.gates import GateResult +from populace.build.source_manifest import SourceStageSpec, load_source_manifest +from populace.frame import US_SCHEMA, Frame + +if TYPE_CHECKING: + from populace.build.us_runtime.qbi_simulation import ( + QbiSimulationAssumptionsV2, + QbiSimulationAssumptionsV3, + SstbCrosswalk, + ) + +__all__ = [ + "QBI_ARCHIVED_ASSUMPTIONS_URL", + "QBI_ARCHIVED_CLONE_URL", + "QBI_ARCHIVED_DERIVATION_URL", + "QBI_ARCHIVED_EXPORT_URL", + "QBI_ARCHIVED_IMPUTATION_URL", + "QBI_ARCHIVED_PUF_ARTIFACT_URL", + "QBI_ARCHIVED_SIMULATION_URL", + "US_QBI_BOOLEAN_OUTPUT_COLUMNS", + "US_QBI_NONCONSTANT_PERSON_COLUMNS", + "US_QBI_NONNEGATIVE_OUTPUT_COLUMNS", + "US_QBI_OUTPUT_COLUMNS", + "US_QBI_STAGE_NAME", + "US_QBI_V2_HOST_REQUIRED_SOURCE_COLUMNS", + "us_qbi_inputs_signal_gate", + "us_qbi_inputs_stage_spec", + "us_qbi_inputs_summary", + "with_host_sstb_classification", + "with_us_qbi_input_reconciliation", +] + +_ARCHIVED_DATA_REPOSITORY = "policyengine-" + "us-data" +_ARCHIVED_COMMIT = "42ed5d45c56df80d754fbe24cce21cfeb8d05cbe" +_ARCHIVED_ROOT = ( + "https://github.com/PolicyEngine/" + f"{_ARCHIVED_DATA_REPOSITORY}/blob/{_ARCHIVED_COMMIT}/" + "policyengine_" + "us_data/" +) +QBI_ARCHIVED_DERIVATION_URL = _ARCHIVED_ROOT + "datasets/puf/puf.py#L748-L787" +QBI_ARCHIVED_SIMULATION_URL = _ARCHIVED_ROOT + "datasets/puf/puf.py#L105-L405" +QBI_ARCHIVED_EXPORT_URL = _ARCHIVED_ROOT + "datasets/puf/puf.py#L860-L879" +QBI_ARCHIVED_ASSUMPTIONS_URL = ( + _ARCHIVED_ROOT + "datasets/puf/qbi_assumptions.yaml#L1-L118" +) +QBI_ARCHIVED_IMPUTATION_URL = _ARCHIVED_ROOT + "calibration/puf_impute.py#L99-L198" +QBI_ARCHIVED_CLONE_URL = _ARCHIVED_ROOT + "calibration/puf_impute.py#L513-L685" +QBI_ARCHIVED_PUF_ARTIFACT_URL = _ARCHIVED_ROOT + "datasets/puf/puf.py#L1655-L1660" + +US_QBI_STAGE_NAME = "puf_tax_detail" + +_GENERAL_QUALIFICATION_FLAGS: tuple[str, ...] = ( + "estate_income_would_be_qualified", + "farm_operations_income_would_be_qualified", + "farm_rent_income_would_be_qualified", + "partnership_s_corp_income_would_be_qualified", + "rental_income_would_be_qualified", + "self_employment_income_would_be_qualified", +) +_SSTB_QUALIFICATION_FLAG = "sstb_self_employment_income_would_be_qualified" +US_QBI_BOOLEAN_OUTPUT_COLUMNS: tuple[str, ...] = ( + *_GENERAL_QUALIFICATION_FLAGS, + _SSTB_QUALIFICATION_FLAG, + # Keep the classifier last so the chained QRF can condition the SSTB draw + # on the qualification flags it must agree with. + "business_is_sstb", +) +US_QBI_NONNEGATIVE_OUTPUT_COLUMNS: tuple[str, ...] = ( + "qualified_bdc_income", + "qualified_reit_and_ptp_income", + "sstb_unadjusted_basis_qualified_property", + "sstb_w2_wages_from_qualified_business", + "unadjusted_basis_qualified_property", + "w2_wages_from_qualified_business", +) +US_QBI_OUTPUT_COLUMNS: tuple[str, ...] = ( + *US_QBI_BOOLEAN_OUTPUT_COLUMNS, + "qualified_bdc_income", + "qualified_reit_and_ptp_income", + "sstb_self_employment_income_before_lsr", + "sstb_unadjusted_basis_qualified_property", + "sstb_w2_wages_from_qualified_business", + "unadjusted_basis_qualified_property", + "w2_wages_from_qualified_business", +) +US_QBI_NONCONSTANT_PERSON_COLUMNS = US_QBI_OUTPUT_COLUMNS +US_QBI_V2_HOST_REQUIRED_SOURCE_COLUMNS: tuple[str, ...] = ( + "AGI", + "PEIOOCC", +) + +_PERSON_SUPPORT_CHANNEL_COLUMN = "person_support_channel" +_BASE_ASEC_SUPPORT_CHANNEL = "asec" +_SELF_EMPLOYMENT_COLUMN = "self_employment_income_before_lsr" +_SSTB_SELF_EMPLOYMENT_COLUMN = "sstb_self_employment_income_before_lsr" +_BOOLEAN_SHARE_BANDS: dict[str, tuple[float, float]] = { + "business_is_sstb": (0.001, 0.25), + **{column: (0.01, 0.9999) for column in _GENERAL_QUALIFICATION_FLAGS}, + _SSTB_QUALIFICATION_FLAG: (0.0001, 0.25), +} +_NUMERIC_NONZERO_SHARE_BANDS: dict[str, tuple[float, float]] = { + "qualified_bdc_income": (0.0001, 0.15), + "qualified_reit_and_ptp_income": (0.001, 0.35), + _SSTB_SELF_EMPLOYMENT_COLUMN: (0.0001, 0.25), + "sstb_unadjusted_basis_qualified_property": (0.0001, 0.25), + "sstb_w2_wages_from_qualified_business": (0.0001, 0.20), + "unadjusted_basis_qualified_property": (0.001, 0.45), + "w2_wages_from_qualified_business": (0.001, 0.35), +} +_INVARIANT_ATOL = 1e-8 + + +def us_qbi_inputs_stage_spec() -> SourceStageSpec: + """Load and validate the shared PUF stage's QBI output contract.""" + + manifest = load_source_manifest( + files("populace.build.us").joinpath("source_stages.json") + ) + spec = manifest.stage_map()[US_QBI_STAGE_NAME] + missing = sorted(set(US_QBI_OUTPUT_COLUMNS) - set(spec.outputs)) + if missing: + raise ValueError( + f"{US_QBI_STAGE_NAME!r} manifest stage does not declare QBI " + f"output(s) {missing}." + ) + return spec + + +def _numeric(person: pd.DataFrame, column: str) -> np.ndarray: + values = pd.to_numeric(person[column], errors="coerce").to_numpy(dtype=np.float64) + nonfinite = int(np.count_nonzero(~np.isfinite(values))) + if nonfinite: + raise ValueError( + f"US QBI input {column!r} contains {nonfinite} nonfinite value(s)." + ) + return values + + +def _optional_numeric(person: pd.DataFrame, column: str) -> np.ndarray: + if column not in person: + return np.zeros(len(person), dtype=np.float64) + return _numeric(person, column) + + +def with_us_qbi_input_reconciliation(frame: Frame) -> Frame: + """Restore archived all-or-nothing SSTB split identities after PUF QRF.""" + + if frame.schema != US_SCHEMA: + raise ValueError("US QBI input reconciliation requires the US schema.") + person = frame.table("person") + required = {*US_QBI_OUTPUT_COLUMNS, _SELF_EMPLOYMENT_COLUMN} + missing = sorted(required - set(person.columns)) + if missing: + raise ValueError( + "US QBI input reconciliation requires PUF-imputed source column(s): " + f"{missing}." + ) + + result = person.copy(deep=True) + asec_mask = np.zeros(len(result), dtype=bool) + if _PERSON_SUPPORT_CHANNEL_COLUMN in result: + asec_mask = ( + result[_PERSON_SUPPORT_CHANNEL_COLUMN].to_numpy(dtype=object) + == _BASE_ASEC_SUPPORT_CHANNEL + ) + + flags: dict[str, np.ndarray] = {} + for column in US_QBI_BOOLEAN_OUTPUT_COLUMNS: + values = _numeric(result, column) + flags[column] = values > 0.0 + # Populace's base ASEC support has no observations from the PUF QBI source + # simulation. Deliberately preserve PolicyEngine's ordinary qualification + # defaults on that channel and do not invent an SSTB classification there. + # This is a hermetic two-channel choice, not a claim about the retired + # clone implementation (which imputed absent PUF variables onto both halves). + for column in _GENERAL_QUALIFICATION_FLAGS: + flags[column][asec_mask] = True + flags["business_is_sstb"][asec_mask] = False + flags[_SSTB_QUALIFICATION_FLAG][asec_mask] = False + + non_sstb_self_employment = _numeric(result, _SELF_EMPLOYMENT_COLUMN) + sstb_self_employment = _numeric(result, _SSTB_SELF_EMPLOYMENT_COLUMN) + total_self_employment = non_sstb_self_employment + sstb_self_employment + + base_self_employment_qualified = ( + flags["self_employment_income_would_be_qualified"] + | flags[_SSTB_QUALIFICATION_FLAG] + ) + partnership_s_corp_income = _optional_numeric( + result, "partnership_income" + ) + _optional_numeric(result, "s_corp_income") + estate_income = _optional_numeric(result, "estate_income") + has_positive_qualified_mapped_source = ( + ((total_self_employment > 0.0) & base_self_employment_qualified) + | ( + (partnership_s_corp_income > 0.0) + & flags["partnership_s_corp_income_would_be_qualified"] + ) + | ((estate_income > 0.0) & flags["estate_income_would_be_qualified"]) + ) + business_is_sstb = flags["business_is_sstb"] & has_positive_qualified_mapped_source + return _with_qbi_routing( + frame, + result=result, + flags=flags, + business_is_sstb=business_is_sstb, + base_self_employment_qualified=base_self_employment_qualified, + total_self_employment=total_self_employment, + partnership_s_corp_income=partnership_s_corp_income, + ) + + +def with_host_sstb_classification( + frame: Frame, + *, + qbi_simulation_version: int, + assumptions: QbiSimulationAssumptionsV2 | QbiSimulationAssumptionsV3 | None = None, + sstb_crosswalk: SstbCrosswalk | Mapping[str, Any] | None = None, +) -> Frame: + """Apply v2/v3 qualification derivations and host-conditioned SSTB routing. + + This pure post-QRF transform classifies positive qualified Schedule C + income from host industry when configured, falling back to detailed + occupation. The live crosswalk supplies every mapped probability; codes + absent from the relevant map are non-SSTB with probability zero. + Records with no positive qualified Schedule C income but positive qualified + partnership/S-corporation or estate income use the versioned AGI-band + passive prior. + """ + + from populace.build.us_runtime.qbi_simulation import ( + QBI_SIMULATION_V2, + QBI_SIMULATION_V3, + QbiSimulationAssumptionsV2, + QbiSimulationAssumptionsV3, + load_qbi_simulation_assumptions, + resolve_sstb_crosswalk, + ) + + if qbi_simulation_version not in (QBI_SIMULATION_V2, QBI_SIMULATION_V3): + raise ValueError( + "Host SSTB classification requires qbi_simulation_version=2 or 3." + ) + if frame.schema != US_SCHEMA: + raise ValueError("Host SSTB classification requires the US schema.") + resolved_assumptions = assumptions or load_qbi_simulation_assumptions( + qbi_simulation_version + ) + if not isinstance( + resolved_assumptions, + (QbiSimulationAssumptionsV2, QbiSimulationAssumptionsV3), + ): + raise TypeError("Host SSTB classification requires v2 or v3 assumptions.") + if resolved_assumptions.qbi_simulation_version != qbi_simulation_version: + raise ValueError( + "Host SSTB classification version does not match its assumptions." + ) + resolved_assumptions.validate() + crosswalk = resolve_sstb_crosswalk( + resolved_assumptions, + sstb_crosswalk, + ) + classification = resolved_assumptions.sstb_classification + + person = frame.table("person") + prior_flag_columns = { + f"{derivation.source}_would_be_qualified" + for derivation in resolved_assumptions.qualification_derivations + if derivation.mode == "prior" + } + required = { + _SELF_EMPLOYMENT_COLUMN, + _SSTB_SELF_EMPLOYMENT_COLUMN, + "qualified_bdc_income", + "qualified_reit_and_ptp_income", + "unadjusted_basis_qualified_property", + "w2_wages_from_qualified_business", + classification.occupation_column, + classification.agi_column, + *prior_flag_columns, + } + if classification.industry_column is not None: + required.add(classification.industry_column) + missing = sorted(required - set(person.columns)) + if missing: + raise ValueError( + f"Host SSTB classification requires post-QRF source column(s): {missing}." + ) + + result = person.copy(deep=True) + total_self_employment = _numeric( + result, + _SELF_EMPLOYMENT_COLUMN, + ) + _numeric(result, _SSTB_SELF_EMPLOYMENT_COLUMN) + partnership_s_corp_income = _optional_numeric( + result, + "partnership_income", + ) + _optional_numeric(result, "s_corp_income") + source_values = { + "self_employment_income": total_self_employment, + "farm_operations_income": _optional_numeric( + result, + "farm_operations_income", + ), + "farm_rent_income": _optional_numeric(result, "farm_rent_income"), + "rental_income": _optional_numeric(result, "rental_income"), + "estate_income": _optional_numeric(result, "estate_income"), + "partnership_s_corp_income": partnership_s_corp_income, + } + + flags: dict[str, np.ndarray] = {} + for derivation in resolved_assumptions.qualification_derivations: + column = f"{derivation.source}_would_be_qualified" + if derivation.mode == "derived": + flags[column] = source_values[derivation.source] != 0.0 + else: + flags[column] = _numeric(result, column) > 0.0 + base_self_employment_qualified = flags["self_employment_income_would_be_qualified"] + + host_probabilities = _host_sstb_probabilities( + result, + occupation_column=classification.occupation_column, + occupation_mapping=crosswalk.mapping_for("occupation"), + industry_column=classification.industry_column, + industry_mapping=crosswalk.mapping_for("industry"), + ) + rng = np.random.default_rng(resolved_assumptions.sstb_seed) + schedule_c_qualified = ( + total_self_employment > 0.0 + ) & base_self_employment_qualified + schedule_c_sstb = rng.random(len(result)) < host_probabilities + + estate_income = source_values["estate_income"] + has_positive_qualified_passive_income = ( + (partnership_s_corp_income > 0.0) + & flags["partnership_s_corp_income_would_be_qualified"] + ) | ((estate_income > 0.0) & flags["estate_income_would_be_qualified"]) + passive_only = ~schedule_c_qualified & has_positive_qualified_passive_income + passive_probabilities = _passive_sstb_probabilities( + _numeric(result, classification.agi_column), + resolved_assumptions, + ) + passive_draw = rng.random(len(result)) < passive_probabilities + business_is_sstb = (schedule_c_qualified & schedule_c_sstb) | ( + passive_only & passive_draw + ) + flags["business_is_sstb"] = business_is_sstb + flags[_SSTB_QUALIFICATION_FLAG] = np.zeros(len(result), dtype=bool) + + routed = _with_qbi_routing( + frame, + result=result, + flags=flags, + business_is_sstb=business_is_sstb, + base_self_employment_qualified=base_self_employment_qualified, + total_self_employment=total_self_employment, + partnership_s_corp_income=partnership_s_corp_income, + ) + invariant_failures = { + name: count + for name, count in us_qbi_inputs_summary(routed)["invariants"].items() + if count + } + if invariant_failures: + raise AssertionError( + "Host SSTB classification violated QBI reconciliation invariants: " + f"{invariant_failures}." + ) + return routed + + +def _host_sstb_probabilities( + person: pd.DataFrame, + *, + occupation_column: str, + occupation_mapping: Mapping[int, float], + industry_column: str | None, + industry_mapping: Mapping[int, float], +) -> np.ndarray: + resolved = np.full(len(person), None, dtype=object) + unresolved = np.ones(len(person), dtype=bool) + if industry_column is not None: + industry = _mapped_sstb_values( + person[industry_column], + industry_mapping, + ) + observed = pd.notna(industry) + resolved[observed] = industry[observed] + unresolved &= ~observed + occupation = _mapped_sstb_values( + person[occupation_column], + occupation_mapping, + ) + observed = unresolved & pd.notna(occupation) + resolved[observed] = occupation[observed] + resolved[pd.isna(resolved)] = 0.0 + return resolved.astype(np.float64) + + +def _mapped_sstb_values( + values: pd.Series, + mapping: Mapping[int, float], +) -> np.ndarray: + numeric = pd.to_numeric(values, errors="coerce") + return numeric.map(mapping).to_numpy(dtype=object) + + +def _passive_sstb_probabilities( + agi: np.ndarray, + assumptions: QbiSimulationAssumptionsV2 | QbiSimulationAssumptionsV3, +) -> np.ndarray: + result = np.zeros(len(agi), dtype=np.float64) + assigned = np.zeros(len(agi), dtype=bool) + for band in assumptions.sstb_classification.passive_passthrough_sstb_prior_by_agi: + in_band = (agi >= band.lower) & (agi < band.upper) + result[in_band] = band.probability + assigned |= in_band + if not np.all(assigned): + raise ValueError("QBI passive SSTB AGI bands did not cover every record.") + return result + + +def _with_qbi_routing( + frame: Frame, + *, + result: pd.DataFrame, + flags: dict[str, np.ndarray], + business_is_sstb: np.ndarray, + base_self_employment_qualified: np.ndarray, + total_self_employment: np.ndarray, + partnership_s_corp_income: np.ndarray, +) -> Frame: + flags["business_is_sstb"] = business_is_sstb + flags["self_employment_income_would_be_qualified"] = ( + ~business_is_sstb & base_self_employment_qualified + ) + flags[_SSTB_QUALIFICATION_FLAG] = business_is_sstb & base_self_employment_qualified + + result[_SELF_EMPLOYMENT_COLUMN] = np.where( + business_is_sstb, + 0.0, + total_self_employment, + ) + result[_SSTB_SELF_EMPLOYMENT_COLUMN] = np.where( + business_is_sstb, + total_self_employment, + 0.0, + ) + + w2_wages = _numeric(result, "w2_wages_from_qualified_business") + ubia = _numeric(result, "unadjusted_basis_qualified_property") + result["sstb_w2_wages_from_qualified_business"] = np.where( + business_is_sstb, + w2_wages, + 0.0, + ) + result["sstb_unadjusted_basis_qualified_property"] = np.where( + business_is_sstb, + ubia, + 0.0, + ) + non_qualified_dividends = np.maximum( + _optional_numeric(result, "non_qualified_dividend_income"), + 0.0, + ) + result["qualified_bdc_income"] = np.minimum( + _numeric(result, "qualified_bdc_income"), + non_qualified_dividends, + ) + result["qualified_reit_and_ptp_income"] = np.minimum( + _numeric(result, "qualified_reit_and_ptp_income"), + non_qualified_dividends + np.maximum(partnership_s_corp_income, 0.0), + ) + for column, values in flags.items(): + result[column] = values.astype(bool) + + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + tables["person"] = result + return Frame( + tables, + frame.schema, + {entity: frame.weights_for(entity) for entity in frame.weighted_entities}, + frame.strata, + mass_log=frame.mass_log, + ) + + +def us_qbi_inputs_summary(frame: Frame) -> dict[str, object]: + """Return weighted signal, validity, and split-identity diagnostics.""" + + person = frame.table("person") + weights = np.asarray(frame.resolve_weights("person").values, dtype=np.float64) + total_weight = float(weights.sum()) + columns: dict[str, dict[str, object]] = {} + for column in US_QBI_OUTPUT_COLUMNS: + values = pd.to_numeric(person[column], errors="coerce").to_numpy( + dtype=np.float64 + ) + finite = np.isfinite(values) + nonzero = finite & (values != 0.0) + nonzero_share = ( + float(weights[nonzero].sum()) / total_weight if total_weight > 0.0 else 0.0 + ) + band = ( + _BOOLEAN_SHARE_BANDS[column] + if column in _BOOLEAN_SHARE_BANDS + else _NUMERIC_NONZERO_SHARE_BANDS[column] + ) + columns[column] = { + "nonzero_share": nonzero_share, + "nonzero_share_band": list(band), + "nonfinite": int(np.count_nonzero(~finite)), + "negative": int(np.count_nonzero(finite & (values < 0.0))), + } + + business = person["business_is_sstb"].astype(bool).to_numpy() + self_employment = pd.to_numeric( + person[_SELF_EMPLOYMENT_COLUMN], errors="coerce" + ).to_numpy(dtype=np.float64) + sstb_self_employment = pd.to_numeric( + person[_SSTB_SELF_EMPLOYMENT_COLUMN], errors="coerce" + ).to_numpy(dtype=np.float64) + w2 = pd.to_numeric( + person["w2_wages_from_qualified_business"], errors="coerce" + ).to_numpy(dtype=np.float64) + sstb_w2 = pd.to_numeric( + person["sstb_w2_wages_from_qualified_business"], errors="coerce" + ).to_numpy(dtype=np.float64) + ubia = pd.to_numeric( + person["unadjusted_basis_qualified_property"], errors="coerce" + ).to_numpy(dtype=np.float64) + sstb_ubia = pd.to_numeric( + person["sstb_unadjusted_basis_qualified_property"], errors="coerce" + ).to_numpy(dtype=np.float64) + self_qualified = ( + person["self_employment_income_would_be_qualified"].astype(bool).to_numpy() + ) + sstb_qualified = person[_SSTB_QUALIFICATION_FLAG].astype(bool).to_numpy() + non_qualified_dividends = np.maximum( + _optional_numeric(person, "non_qualified_dividend_income"), + 0.0, + ) + partnership_s_corp_income = _optional_numeric( + person, "partnership_income" + ) + _optional_numeric(person, "s_corp_income") + qualified_bdc_income = _numeric(person, "qualified_bdc_income") + qualified_reit_and_ptp_income = _numeric(person, "qualified_reit_and_ptp_income") + invariants = { + "sstb_rows_with_non_sstb_income": int( + np.count_nonzero(business & ~np.isclose(self_employment, 0.0)) + ), + "non_sstb_rows_with_sstb_income": int( + np.count_nonzero(~business & ~np.isclose(sstb_self_employment, 0.0)) + ), + "sstb_w2_split_mismatches": int( + np.count_nonzero( + ~np.isclose(sstb_w2, np.where(business, w2, 0.0), atol=_INVARIANT_ATOL) + ) + ), + "sstb_ubia_split_mismatches": int( + np.count_nonzero( + ~np.isclose( + sstb_ubia, + np.where(business, ubia, 0.0), + atol=_INVARIANT_ATOL, + ) + ) + ), + "self_employment_qualification_overlap": int( + np.count_nonzero(self_qualified & sstb_qualified) + ), + "sstb_qualification_route_mismatches": int( + np.count_nonzero(sstb_qualified & ~business) + ), + "non_sstb_qualification_route_mismatches": int( + np.count_nonzero(self_qualified & business) + ), + "qualified_bdc_exposure_mismatches": int( + np.count_nonzero( + qualified_bdc_income > non_qualified_dividends + _INVARIANT_ATOL + ) + ), + "qualified_reit_ptp_exposure_mismatches": int( + np.count_nonzero( + qualified_reit_and_ptp_income + > non_qualified_dividends + + np.maximum(partnership_s_corp_income, 0.0) + + _INVARIANT_ATOL + ) + ), + } + return {"columns": columns, "invariants": invariants} + + +def us_qbi_inputs_signal_gate(frame: Frame) -> GateResult: + """Require nondefault QBI signal and archived SSTB split identities.""" + + person = frame.table("person") + missing = sorted( + {*US_QBI_OUTPUT_COLUMNS, _SELF_EMPLOYMENT_COLUMN} - set(person.columns) + ) + if missing: + return GateResult( + name="qbi_inputs_signal", + passed=False, + failures=(f"person columns missing: {missing}.",), + details={"missing": missing}, + ) + + summary = us_qbi_inputs_summary(frame) + failures: list[str] = [] + for column, details in summary["columns"].items(): + if details["nonfinite"]: + failures.append( + f"{column}: {int(details['nonfinite'])} nonfinite value(s)." + ) + if column in US_QBI_NONNEGATIVE_OUTPUT_COLUMNS and details["negative"]: + failures.append(f"{column}: {int(details['negative'])} negative value(s).") + share = float(details["nonzero_share"]) + low, high = details["nonzero_share_band"] + if not (low <= share <= high): + failures.append( + f"{column}: nonzero share {share:.6f} outside plausibility " + f"band [{low}, {high}]." + ) + for name, count in summary["invariants"].items(): + if count: + failures.append(f"{name}: {int(count)} violating row(s).") + return GateResult( + name="qbi_inputs_signal", + passed=not failures, + failures=tuple(failures), + details=summary, + ) diff --git a/packages/microcosm-build/tests/fixtures/qbi_history/qbi_simulation.py.fixture b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_simulation.py.fixture new file mode 100644 index 000000000..2f81fa531 --- /dev/null +++ b/packages/microcosm-build/tests/fixtures/qbi_history/qbi_simulation.py.fixture @@ -0,0 +1,3781 @@ +"""Versioned Section 199A simulation for raw or legacy PUF arrays. + +The pinned 1.8.0 PUF physically carries only an older deterministic W-2 +business-wage proxy. A later retired data-package loader made that +artifact appear to contain the current 15-leaf QBI surface by simulating the +missing inputs and writing them into the downloaded file during ``load()``. + +This module ports that version-1 model into Populace as pure, seeded NumPy +logic, retains the opt-in v2 qualification/SSTB route, and adds opt-in v3 +evidence-based employer, wage, and capital machinery. Callers must name +``qbi_simulation_version`` explicitly; no version is inferred from an +unversioned artifact, and version 1 remains the production default. +""" + +from __future__ import annotations + +import json +from collections.abc import Mapping, Sequence +from dataclasses import dataclass, fields +from functools import lru_cache +from importlib.resources import files +from typing import Any + +import numpy as np + +from populace.build.source_manifest import SourceStageSpec, load_source_manifest +from populace.build.us_runtime.qbi_inputs import US_QBI_OUTPUT_COLUMNS + +__all__ = [ + "QBI_SIMULATION_ARCHIVED_ASSUMPTIONS_URL", + "QBI_SIMULATION_ARCHIVED_BACKFILL_URL", + "QBI_SIMULATION_ARCHIVED_DERIVATION_URL", + "QBI_SIMULATION_ARCHIVED_IMPLEMENTATION_URL", + "QBI_SIMULATION_ASSUMPTIONS_RESOURCE", + "QBI_SIMULATION_ASSUMPTIONS_RESOURCES", + "QBI_SIMULATION_SOURCE_NAMES", + "QBI_SIMULATION_SUPPORTED_VERSIONS", + "QBI_SIMULATION_VERSION", + "QBI_SIMULATION_V2", + "QBI_SIMULATION_V3", + "AggregateEvidenceAnchor", + "AgiSstbPriorBand", + "BetaParameters", + "ExposureBetaParameters", + "QualificationDerivation", + "QbiSimulationAssumptions", + "QbiSimulationAssumptionsV2", + "QbiSimulationAssumptionsV3", + "QbiSimulationInputs", + "QbiV3FormAssumptions", + "QbiV3IndustryComponent", + "QbiV3WageCapitalResult", + "QbiV3WagePlausibilityBand", + "SstbClassificationAssumptions", + "SstbCrosswalk", + "SstbCrosswalkEntry", + "load_qbi_simulation_assumptions", + "load_sstb_crosswalk", + "parse_qbi_simulation_assumptions", + "parse_sstb_crosswalk", + "qbi_qrf_excluded_targets", + "qbi_simulation_summary", + "resolve_sstb_crosswalk", + "simulate_qbi_inputs", + "simulate_qbi_v3_wage_capital", + "us_qbi_simulation_stage_spec", + "with_qbi_simulation_from_puf_arrays", +] + +_ARCHIVED_COMMIT = "42ed5d45c56df80d754fbe24cce21cfeb8d05cbe" +_ARCHIVED_ROOT = ( + "https://github.com/PolicyEngine/policyengine-" + + "us-data/blob/" + + _ARCHIVED_COMMIT + + "/policyengine_" + + "us_data/" +) +QBI_SIMULATION_ARCHIVED_IMPLEMENTATION_URL = ( + _ARCHIVED_ROOT + "datasets/puf/puf.py#L105-L405" +) +QBI_SIMULATION_ARCHIVED_DERIVATION_URL = ( + _ARCHIVED_ROOT + "datasets/puf/puf.py#L748-L787" +) +QBI_SIMULATION_ARCHIVED_BACKFILL_URL = _ARCHIVED_ROOT + "datasets/puf/puf.py#L993-L1302" +QBI_SIMULATION_ARCHIVED_ASSUMPTIONS_URL = ( + _ARCHIVED_ROOT + "datasets/puf/qbi_assumptions.yaml#L1-L118" +) + +QBI_SIMULATION_VERSION = 1 +QBI_SIMULATION_V2 = 2 +QBI_SIMULATION_V3 = 3 +QBI_SIMULATION_SUPPORTED_VERSIONS = ( + QBI_SIMULATION_VERSION, + QBI_SIMULATION_V2, + QBI_SIMULATION_V3, +) +QBI_SIMULATION_ASSUMPTIONS_RESOURCE = "qbi_assumptions_v1.json" +QBI_SIMULATION_ASSUMPTIONS_RESOURCES = { + QBI_SIMULATION_VERSION: QBI_SIMULATION_ASSUMPTIONS_RESOURCE, + QBI_SIMULATION_V2: "qbi_assumptions_v2.json", + QBI_SIMULATION_V3: "qbi_assumptions_v3.json", +} +QBI_SIMULATION_SOURCE_NAMES: tuple[str, ...] = ( + "self_employment_income", + "farm_operations_income", + "farm_rent_income", + "rental_income", + "estate_income", + "partnership_s_corp_income", +) +_QUALIFICATION_FLAG_BY_SOURCE = { + source: f"{source}_would_be_qualified" for source in QBI_SIMULATION_SOURCE_NAMES +} +_SSTB_SELF_EMPLOYMENT_QUALIFICATION_FLAG = ( + "sstb_self_employment_income_would_be_qualified" +) +_SSTB_SELF_EMPLOYMENT_OUTPUT = "sstb_self_employment_income_before_lsr" +_NON_SSTB_SELF_EMPLOYMENT_SOURCE = "self_employment_income" +_SUPPORTED_MODEL_KINDS = { + "qualification": "flat_source_bernoulli", + "sstb": "largest_positive_qualified_source_bernoulli", + "w2": "source_weighted_margin_receipts_logit_labor_share", + "ubia": "source_weighted_capital_bernoulli_lognormal", + "investment": "exposure_bernoulli_beta_carveout", +} +_V2_QUALIFICATION_MODES = frozenset({"derived", "prior"}) +_V2_SSTB_CLASSIFICATION_MODE = "crosswalk" +_V3_ENGINE = "derived_qualification_host_sstb_evidence_wage_capital_v3" +_V3_LEGAL_FORMS = ( + "sole_proprietorship", + "partnership", + "s_corporation", +) +_V3_INCOME_BANDS = ( + "nonpositive", + "0_to_25k", + "25k_to_100k", + "100k_to_250k", + "250k_to_1m", + "over_1m", +) +_V3_MARGIN_PROBABILITIES = (0.05, 0.25, 0.5, 0.75, 0.95) +_V3_PARTNERSHIP_PROBABILITY = 17.0 / 70.0 +_V3_S_CORPORATION_PROBABILITY = 53.0 / 70.0 +_SSTB_CROSSWALK_SCHEMA_VERSION = 1 +_SSTB_CROSSWALK_LIVE_STATUS = "live" +_SSTB_CLASSIFICATIONS = frozenset( + { + "clear_sstb", + "non_sstb", + "ambiguous", + } +) + + +@dataclass(frozen=True) +class BetaParameters: + """Parameters for a shifted and scaled beta draw.""" + + beta_a: float + beta_b: float + scale: float = 1.0 + shift: float = 0.0 + + +@dataclass(frozen=True) +class ExposureBetaParameters: + """Bernoulli receipt probability plus an exposure-share beta draw.""" + + source: str + probability_of_receiving: float + beta: BetaParameters + + +@dataclass(frozen=True) +class AggregateEvidenceAnchor: + """Published aggregate and provisional replay-diagnostic contract.""" + + provisional: bool + published_income_dollars: float | None + published_component_dollars: float | None + comparison_component_2022_dollars: float | None + replay_factor_band: tuple[float, float] | None + rationale: str + + def validate(self, label: str) -> None: + """Reject incomplete or internally inconsistent evidence metadata.""" + + if self.provisional is not True: + raise ValueError(f"{label} aggregate anchor must be provisional.") + if not isinstance(self.rationale, str) or not self.rationale.strip(): + raise ValueError(f"{label} aggregate anchor rationale must be nonempty.") + for name, value in ( + ("published_income_dollars", self.published_income_dollars), + ("published_component_dollars", self.published_component_dollars), + ( + "comparison_component_2022_dollars", + self.comparison_component_2022_dollars, + ), + ): + if value is not None and (not np.isfinite(value) or value < 0.0): + raise ValueError( + f"{label} aggregate anchor {name} must be null or nonnegative." + ) + if self.replay_factor_band is None: + if self.published_income_dollars is not None: + raise ValueError( + f"{label} published income anchor requires a replay factor band." + ) + return + lower, upper = self.replay_factor_band + if not 0.0 < lower <= upper: + raise ValueError( + f"{label} replay factor band must be positive and ordered." + ) + if self.published_income_dollars is None: + raise ValueError( + f"{label} replay factor band requires a published income anchor." + ) + + +@dataclass(frozen=True) +class QualificationDerivation: + """One source's deterministic rule or documented residual prior.""" + + source: str + mode: str + prior_probability: float | None + rationale: str + + +@dataclass(frozen=True) +class AgiSstbPriorBand: + """One lower-inclusive, upper-exclusive passive SSTB prior band.""" + + label: str + lower: float + upper: float + probability: float + + +@dataclass(frozen=True) +class SstbClassificationAssumptions: + """Host-record SSTB classification inputs and residual priors.""" + + mode: str + crosswalk_resource: str + occupation_column: str + industry_column: str | None + agi_column: str + ambiguous_prior: float + ambiguous_prior_status: str + agi_band_format: str + passive_passthrough_sstb_prior_by_agi: tuple[AgiSstbPriorBand, ...] + passive_passthrough_prior_status: str + rationale: str + follow_up: str + + +@dataclass(frozen=True) +class SstbCrosswalkEntry: + """One validated Census code and its Section 199A SSTB probability.""" + + code: int + classification: str + probability: float + provisional: bool + basis: str | None + + def validate(self, family: str) -> None: + """Validate classification-to-probability and evidence metadata.""" + + if isinstance(self.code, bool) or not isinstance(self.code, int): + raise ValueError(f"SSTB crosswalk {family} codes must be integers.") + if not 0 <= self.code <= 9_999: + raise ValueError( + f"SSTB crosswalk {family} codes must be four-digit Census codes." + ) + if self.classification not in _SSTB_CLASSIFICATIONS: + raise ValueError( + f"SSTB crosswalk {family} code {self.code:04d} has unknown " + f"classification {self.classification!r}." + ) + _validate_probabilities( + f"SSTB crosswalk {family} probability for {self.code:04d}", + (self.probability,), + ) + deterministic_probability = { + "clear_sstb": 1.0, + "non_sstb": 0.0, + }.get(self.classification) + if ( + deterministic_probability is not None + and self.probability != deterministic_probability + ): + raise ValueError( + f"SSTB crosswalk {self.classification} code {self.code:04d} " + f"must have probability {deterministic_probability}." + ) + if self.classification == "ambiguous": + if not 0.0 < self.probability < 1.0: + raise ValueError( + f"Ambiguous SSTB code {self.code:04d} must have a prior " + "strictly between zero and one." + ) + if self.provisional is not True: + raise ValueError( + f"Ambiguous SSTB code {self.code:04d} must be provisional." + ) + if not isinstance(self.basis, str) or not self.basis.strip(): + raise ValueError( + f"Ambiguous SSTB code {self.code:04d} must cite its basis." + ) + elif self.provisional or self.basis is not None: + raise ValueError( + f"Deterministic SSTB code {self.code:04d} must not carry " + "provisional prior metadata." + ) + + +@dataclass(frozen=True) +class SstbCrosswalk: + """Validated Census host-code probability crosswalk.""" + + schema_version: int + crosswalk_version: str + status: str + industry_vintage: str + occupation_vintage: str + legal_basis: str + wiring_notes: tuple[str, ...] + sstb_category_values: tuple[str, ...] + occupation_entries: tuple[SstbCrosswalkEntry, ...] + industry_entries: tuple[SstbCrosswalkEntry, ...] + + def entries_for(self, family: str) -> tuple[SstbCrosswalkEntry, ...]: + """Return one signal family's validated entries.""" + + if family == "occupation": + return self.occupation_entries + if family == "industry": + return self.industry_entries + raise ValueError(f"Unknown SSTB crosswalk family {family!r}.") + + def mapping_for(self, family: str) -> dict[int, float]: + """Return one signal family's code-to-probability mapping.""" + + return {entry.code: entry.probability for entry in self.entries_for(family)} + + def validate(self) -> None: + """Reject malformed instances, including caller-constructed objects.""" + + if self.schema_version != _SSTB_CROSSWALK_SCHEMA_VERSION: + raise ValueError( + f"Unsupported SSTB crosswalk schema_version {self.schema_version!r}." + ) + if self.status != _SSTB_CROSSWALK_LIVE_STATUS: + raise ValueError("QBI v2 requires a live SSTB crosswalk.") + for name, value in ( + ("crosswalk_version", self.crosswalk_version), + ("industry_vintage", self.industry_vintage), + ("occupation_vintage", self.occupation_vintage), + ("legal_basis", self.legal_basis), + ): + if not isinstance(value, str) or not value: + raise ValueError(f"SSTB crosswalk {name} must be a nonempty string.") + if not self.wiring_notes or not all( + isinstance(note, str) and note.strip() for note in self.wiring_notes + ): + raise ValueError("SSTB crosswalk wiring_notes must be nonempty strings.") + if not self.sstb_category_values or not all( + isinstance(category, str) and category + for category in self.sstb_category_values + ): + raise ValueError( + "SSTB crosswalk sstb_category_values must be nonempty strings." + ) + for family, entries in ( + ("occupation", self.occupation_entries), + ("industry", self.industry_entries), + ): + seen: set[int] = set() + for entry in entries: + entry.validate(family) + if entry.code in seen: + raise ValueError( + f"SSTB crosswalk {family} mapping contains duplicate " + f"code {entry.code:04d}." + ) + seen.add(entry.code) + if not self.occupation_entries or not self.industry_entries: + raise ValueError("Live SSTB crosswalk must carry both Census maps.") + + +@dataclass(frozen=True) +class QbiSimulationAssumptions: + """Immutable, order-explicit assumptions consumed by the simulation core.""" + + schema_version: int + qbi_simulation_version: int + engine: str + bit_generator: str + qualification_seed: int + w2_ubia_seed: int + investment_seed: int + sstb_seed: int + source_order: tuple[str, ...] + qualification_model: str + qualification_probabilities: tuple[float, ...] + sstb_model: str + sstb_source_order: tuple[str, ...] + sstb_probabilities: tuple[float, ...] + w2_model: str + profit_margin_parameters: tuple[BetaParameters, ...] + has_employees_slope_per_dollar: float + has_employees_target_share: float + intercept_bisection_iterations: int + labor_ratio_parameters: tuple[BetaParameters, ...] + ubia_model: str + ubia_sigma: float + ubia_multiples: tuple[float, ...] + capital_intensity_probabilities: tuple[float, ...] + investment_model: str + reit_ptp_exposures: tuple[ExposureBetaParameters, ...] + bdc_exposures: tuple[ExposureBetaParameters, ...] + + def validate(self) -> None: + """Reject malformed assumptions before consuming any random stream.""" + + if self.schema_version != 1: + raise ValueError( + f"Unsupported QBI assumptions schema_version {self.schema_version!r}." + ) + if self.qbi_simulation_version != QBI_SIMULATION_VERSION: + raise ValueError( + "QBI assumptions carry unsupported qbi_simulation_version " + f"{self.qbi_simulation_version!r}." + ) + if self.source_order != QBI_SIMULATION_SOURCE_NAMES: + raise ValueError( + "QBI v1 source_order must preserve the archived random-stream " + f"order {QBI_SIMULATION_SOURCE_NAMES!r}, got {self.source_order!r}." + ) + models = { + "qualification": self.qualification_model, + "sstb": self.sstb_model, + "w2": self.w2_model, + "ubia": self.ubia_model, + "investment": self.investment_model, + } + for family, expected in _SUPPORTED_MODEL_KINDS.items(): + if models[family] != expected: + raise ValueError( + f"QBI v1 {family} model must be {expected!r}, " + f"got {models[family]!r}." + ) + if self.bit_generator != "PCG64": + raise ValueError( + "QBI v1 requires NumPy PCG64 to reproduce the archived streams." + ) + source_count = len(self.source_order) + ordered_parameter_families = { + "qualification_probabilities": self.qualification_probabilities, + "profit_margin_parameters": self.profit_margin_parameters, + "labor_ratio_parameters": self.labor_ratio_parameters, + "ubia_multiples": self.ubia_multiples, + "capital_intensity_probabilities": (self.capital_intensity_probabilities), + } + for name, values in ordered_parameter_families.items(): + if len(values) != source_count: + raise ValueError( + f"QBI assumptions {name} has {len(values)} value(s); " + f"expected {source_count}." + ) + if len(self.sstb_source_order) != len(self.sstb_probabilities): + raise ValueError("QBI SSTB sources and probabilities must align.") + if not set(self.sstb_source_order) <= set(self.source_order): + raise ValueError("QBI SSTB sources must be modeled QBI sources.") + _validate_probabilities( + "qualification probabilities", self.qualification_probabilities + ) + _validate_probabilities("SSTB probabilities", self.sstb_probabilities) + _validate_probabilities( + "capital-intensity probabilities", + self.capital_intensity_probabilities, + ) + if not 0.0 < self.has_employees_target_share < 1.0: + raise ValueError("QBI employee target share must lie strictly in (0, 1).") + if self.has_employees_slope_per_dollar < 0.0: + raise ValueError("QBI employee-logit slope must be nonnegative.") + if self.intercept_bisection_iterations <= 0: + raise ValueError("QBI logit calibration requires positive iterations.") + if self.ubia_sigma < 0.0: + raise ValueError("QBI UBIA lognormal sigma must be nonnegative.") + if any(value < 0.0 for value in self.ubia_multiples): + raise ValueError("QBI UBIA multiples must be nonnegative.") + for name, parameters in ( + ("profit margin", self.profit_margin_parameters), + ("labor ratio", self.labor_ratio_parameters), + ): + for parameter in parameters: + _validate_beta_parameters(name, parameter) + for name, exposures in ( + ("REIT/PTP", self.reit_ptp_exposures), + ("BDC", self.bdc_exposures), + ): + for exposure in exposures: + if not 0.0 <= exposure.probability_of_receiving <= 1.0: + raise ValueError( + f"QBI {name} receipt probability for {exposure.source!r} " + "must lie in [0, 1]." + ) + _validate_beta_parameters(name, exposure.beta) + + +@dataclass(frozen=True) +class QbiSimulationAssumptionsV2: + """Strict v2 assumptions with host SSTB and per-family random streams.""" + + schema_version: int + qbi_simulation_version: int + engine: str + bit_generator: str + qualification_seed: int + sstb_seed: int + w2_seed: int + ubia_seed: int + investment_seed: int + source_order: tuple[str, ...] + qualification_derivations: tuple[QualificationDerivation, ...] + sstb_classification: SstbClassificationAssumptions + w2_model: str + profit_margin_parameters: tuple[BetaParameters, ...] + has_employees_slope_per_dollar: float + has_employees_target_share: float + intercept_bisection_iterations: int + labor_ratio_parameters: tuple[BetaParameters, ...] + ubia_model: str + ubia_sigma: float + ubia_multiples: tuple[float, ...] + capital_intensity_probabilities: tuple[float, ...] + investment_model: str + reit_ptp_anchor: AggregateEvidenceAnchor + bdc_anchor: AggregateEvidenceAnchor + reit_ptp_exposures: tuple[ExposureBetaParameters, ...] + bdc_exposures: tuple[ExposureBetaParameters, ...] + + @property + def qualification_by_source(self) -> dict[str, QualificationDerivation]: + """Return the source-indexed qualification contract.""" + + return { + derivation.source: derivation + for derivation in self.qualification_derivations + } + + def validate(self) -> None: + """Reject malformed v2 assumptions before consuming any family stream.""" + + if self.schema_version != 2: + raise ValueError( + f"Unsupported QBI v2 assumptions schema_version " + f"{self.schema_version!r}." + ) + if self.qbi_simulation_version != QBI_SIMULATION_V2: + raise ValueError( + "QBI v2 assumptions carry unsupported qbi_simulation_version " + f"{self.qbi_simulation_version!r}." + ) + if self.source_order != QBI_SIMULATION_SOURCE_NAMES: + raise ValueError( + "QBI v2 source_order must preserve the engine order " + f"{QBI_SIMULATION_SOURCE_NAMES!r}, got {self.source_order!r}." + ) + if self.bit_generator != "PCG64": + raise ValueError("QBI v2 requires NumPy PCG64 family streams.") + family_seeds = { + "qualification": self.qualification_seed, + "sstb": self.sstb_seed, + "w2": self.w2_seed, + "ubia": self.ubia_seed, + "investment": self.investment_seed, + } + if any(seed < 0 for seed in family_seeds.values()): + raise ValueError("QBI v2 family seeds must be nonnegative integers.") + if len(set(family_seeds.values())) != len(family_seeds): + raise ValueError("QBI v2 family seeds must be distinct.") + derivation_sources = tuple( + derivation.source for derivation in self.qualification_derivations + ) + if derivation_sources != self.source_order: + raise ValueError( + "QBI v2 qualification derivations must follow source_order." + ) + for derivation in self.qualification_derivations: + if derivation.mode not in _V2_QUALIFICATION_MODES: + raise ValueError( + "Unknown QBI v2 qualification mode " + f"{derivation.mode!r} for {derivation.source!r}." + ) + if not derivation.rationale.strip(): + raise ValueError( + f"QBI v2 qualification rationale for " + f"{derivation.source!r} must be nonempty." + ) + if derivation.mode == "derived": + if derivation.prior_probability is not None: + raise ValueError( + f"Derived QBI source {derivation.source!r} must not " + "declare a prior." + ) + elif derivation.prior_probability is None: + raise ValueError( + f"Prior-mode QBI source {derivation.source!r} must declare " + "a probability." + ) + else: + _validate_probabilities( + f"qualification prior for {derivation.source!r}", + (derivation.prior_probability,), + ) + + classification = self.sstb_classification + if classification.mode != _V2_SSTB_CLASSIFICATION_MODE: + raise ValueError( + f"Unknown QBI v2 SSTB classification mode {classification.mode!r}." + ) + if not classification.crosswalk_resource.endswith(".json"): + raise ValueError("QBI v2 SSTB crosswalk_resource must name a JSON file.") + if "/" in classification.crosswalk_resource: + raise ValueError( + "QBI v2 SSTB crosswalk_resource must be a package basename." + ) + if classification.industry_column == classification.occupation_column: + raise ValueError( + "QBI v2 SSTB industry and occupation columns must be distinct." + ) + _validate_probabilities( + "ambiguous SSTB prior", + (classification.ambiguous_prior,), + ) + if classification.agi_band_format != ("lower_inclusive:upper_exclusive"): + raise ValueError("Unsupported QBI v2 AGI band format.") + _validate_agi_prior_bands(classification.passive_passthrough_sstb_prior_by_agi) + + models = { + "w2": self.w2_model, + "ubia": self.ubia_model, + "investment": self.investment_model, + } + for family, expected in ( + ("w2", _SUPPORTED_MODEL_KINDS["w2"]), + ("ubia", _SUPPORTED_MODEL_KINDS["ubia"]), + ("investment", _SUPPORTED_MODEL_KINDS["investment"]), + ): + if models[family] != expected: + raise ValueError( + f"QBI v2 {family} model must be {expected!r}, " + f"got {models[family]!r}." + ) + source_count = len(self.source_order) + ordered_parameter_families = { + "profit_margin_parameters": self.profit_margin_parameters, + "labor_ratio_parameters": self.labor_ratio_parameters, + "ubia_multiples": self.ubia_multiples, + "capital_intensity_probabilities": (self.capital_intensity_probabilities), + } + for name, values in ordered_parameter_families.items(): + if len(values) != source_count: + raise ValueError( + f"QBI v2 assumptions {name} has {len(values)} value(s); " + f"expected {source_count}." + ) + _validate_probabilities( + "capital-intensity probabilities", + self.capital_intensity_probabilities, + ) + if not 0.0 < self.has_employees_target_share < 1.0: + raise ValueError("QBI employee target share must lie strictly in (0, 1).") + if self.has_employees_slope_per_dollar < 0.0: + raise ValueError("QBI employee-logit slope must be nonnegative.") + if self.intercept_bisection_iterations <= 0: + raise ValueError("QBI logit calibration requires positive iterations.") + if self.ubia_sigma < 0.0: + raise ValueError("QBI UBIA lognormal sigma must be nonnegative.") + if any(value < 0.0 for value in self.ubia_multiples): + raise ValueError("QBI UBIA multiples must be nonnegative.") + for name, parameters in ( + ("profit margin", self.profit_margin_parameters), + ("labor ratio", self.labor_ratio_parameters), + ): + for parameter in parameters: + _validate_beta_parameters(name, parameter) + for name, exposures in ( + ("REIT/PTP", self.reit_ptp_exposures), + ("BDC", self.bdc_exposures), + ): + for exposure in exposures: + if not 0.0 <= exposure.probability_of_receiving <= 1.0: + raise ValueError( + f"QBI {name} receipt probability for {exposure.source!r} " + "must lie in [0, 1]." + ) + _validate_beta_parameters(name, exposure.beta) + self.reit_ptp_anchor.validate("REIT/PTP") + self.bdc_anchor.validate("BDC") + + +@dataclass(frozen=True) +class QbiV3IndustryComponent: + """One receipts-weighted latent SOI industry component.""" + + industry_key: str + published_label: str + probability: float + wage_share: float + ubia_intensity: float + proxy: bool + capital_measure: str + + +@dataclass(frozen=True) +class QbiV3FormAssumptions: + """Evidence parameters for one latent v3 legal form.""" + + legal_form: str + tax_year: int + scf_legal_form_group: str + capital_measure: str + proxy: bool + eligible_receipts_thousands: float + all_industry_receipts_thousands: float + receipts_coverage: float + industry_components: tuple[QbiV3IndustryComponent, ...] + employer_base_probabilities: tuple[float, ...] + zero_employee_target: float + employer_log_odds_shift: float + expected_zero_employee_share: float + margin_quantiles: tuple[float, ...] + ubia_log_intensity_sd: float + ubia_effective_industry_count: float + ubia_sigma: float + + +@dataclass(frozen=True) +class QbiV3WagePlausibilityBand: + """Persisted SOI-derived aggregate W-2 replay band.""" + + lower_dollars: float + upper_dollars: float + rationale: str + + +@dataclass(frozen=True) +class QbiSimulationAssumptionsV3: + """Strict v3 assumptions with evidence-based wage and capital machinery.""" + + schema_version: int + qbi_simulation_version: int + engine: str + bit_generator: str + qualification_seed: int + sstb_seed: int + investment_seed: int + entity_split_seed: int + latent_industry_seed: int + employer_gate_seed: int + margin_quantile_seed: int + ubia_dispersion_seed: int + source_order: tuple[str, ...] + qualification_derivations: tuple[QualificationDerivation, ...] + sstb_classification: SstbClassificationAssumptions + employer_structure_resource: str + wage_capital_resource: str + form_order: tuple[str, ...] + sole_proprietorship_sources: tuple[str, ...] + passthrough_source: str + partnership_probability: float + s_corporation_probability: float + industry_model: str + employer_model: str + income_band_order: tuple[str, ...] + overall_zero_employee_target: float + expected_overall_zero_employee_share: float + forms: tuple[QbiV3FormAssumptions, ...] + margin_model: str + margin_probabilities: tuple[float, ...] + margin_interpolation: str + w2_model: str + wage_plausibility_band: QbiV3WagePlausibilityBand + ubia_model: str + investment_model: str + reit_ptp_anchor: AggregateEvidenceAnchor + bdc_anchor: AggregateEvidenceAnchor + reit_ptp_exposures: tuple[ExposureBetaParameters, ...] + bdc_exposures: tuple[ExposureBetaParameters, ...] + + @property + def qualification_by_source(self) -> dict[str, QualificationDerivation]: + """Return the source-indexed qualification contract.""" + + return { + derivation.source: derivation + for derivation in self.qualification_derivations + } + + @property + def form_by_name(self) -> dict[str, QbiV3FormAssumptions]: + """Return the legal-form-indexed evidence contract.""" + + return {form.legal_form: form for form in self.forms} + + def validate(self) -> None: + """Reject malformed v3 assumptions before consuming any family stream.""" + + _validate_v3_assumptions(self) + + +@dataclass(frozen=True) +class QbiV3WageCapitalResult: + """Read-only v3 wage/capital draw diagnostics outside the 15-leaf output.""" + + w2_wages: np.ndarray + ubia: np.ndarray + positive_qbi: np.ndarray + legal_form: np.ndarray + has_employees: np.ndarray + receipts: np.ndarray + + def __post_init__(self) -> None: + arrays = { + "w2_wages": np.asarray(self.w2_wages, dtype=np.float64), + "ubia": np.asarray(self.ubia, dtype=np.float64), + "positive_qbi": np.asarray(self.positive_qbi, dtype=bool), + "legal_form": np.asarray(self.legal_form, dtype=str), + "has_employees": np.asarray(self.has_employees, dtype=bool), + "receipts": np.asarray(self.receipts, dtype=np.float64), + } + lengths: set[int] = set() + for name, values in arrays.items(): + if values.ndim != 1: + raise ValueError(f"QBI v3 diagnostic {name!r} must be one-dimensional.") + lengths.add(len(values)) + object.__setattr__(self, name, values) + if len(lengths) != 1: + raise ValueError("QBI v3 diagnostic arrays must have one common length.") + for name in ("w2_wages", "ubia", "receipts"): + values = arrays[name] + if np.any(~np.isfinite(values)) or np.any(values < 0.0): + raise ValueError( + f"QBI v3 diagnostic {name!r} must be finite and nonnegative." + ) + unknown_forms = set(arrays["legal_form"]) - {*_V3_LEGAL_FORMS, "none"} + if unknown_forms: + raise ValueError( + f"QBI v3 diagnostics contain unknown legal forms {unknown_forms!r}." + ) + if np.any(arrays["has_employees"] & ~arrays["positive_qbi"]): + raise ValueError("QBI v3 employer gates require positive QBI.") + + +@dataclass(frozen=True) +class QbiSimulationInputs: + """Normalized one-dimensional sources required by every model version.""" + + self_employment_income: np.ndarray + farm_operations_income: np.ndarray + farm_rent_income: np.ndarray + rental_income: np.ndarray + estate_income: np.ndarray + partnership_s_corp_income: np.ndarray + non_qualified_dividend_income: np.ndarray + + def __post_init__(self) -> None: + lengths: set[int] = set() + for field in fields(self): + values = np.asarray(getattr(self, field.name), dtype=np.float64) + if values.ndim != 1: + raise ValueError(f"QBI input {field.name!r} must be one-dimensional.") + nonfinite = int(np.count_nonzero(~np.isfinite(values))) + if nonfinite: + raise ValueError( + f"QBI input {field.name!r} has {nonfinite} nonfinite value(s)." + ) + object.__setattr__(self, field.name, values) + lengths.add(len(values)) + if len(lengths) != 1: + raise ValueError( + f"QBI input arrays must have one common length, got {sorted(lengths)}." + ) + + def source(self, name: str) -> np.ndarray: + """Return a named modeled source.""" + + if name not in QBI_SIMULATION_SOURCE_NAMES: + raise KeyError(f"Unknown QBI source {name!r}.") + return getattr(self, name) + + @property + def n(self) -> int: + """Return the common row count.""" + + return len(self.self_employment_income) + + @classmethod + def from_puf_arrays( + cls, + arrays: Mapping[str, Sequence[Any]], + ) -> QbiSimulationInputs: + """Normalize raw-PUF or legacy processed-PUF arrays. + + Missing modeled sources become zero arrays, matching the archived + load-time migration. In particular, release 1.8.0 has no + ``farm_operations_income`` array, but its absent source still consumes + the full v1 qualification, margin, and labor random draws. + """ + + n = _infer_person_length(arrays) + self_employment_key = _first_present( + arrays, + ( + "self_employment_income", + "self_employment_income_before_lsr", + "E00900", + ), + ) + self_employment_income = _array_or_zeros(arrays, self_employment_key, n=n) + if self_employment_key in { + "self_employment_income", + "self_employment_income_before_lsr", + }: + sstb_key = _first_present( + arrays, + ( + "sstb_self_employment_income", + _SSTB_SELF_EMPLOYMENT_OUTPUT, + ), + ) + if sstb_key is not None: + self_employment_income = self_employment_income + _array_or_zeros( + arrays, sstb_key, n=n + ) + + farm_operations_income = _first_array( + arrays, ("farm_operations_income", "E02100"), n=n + ) + farm_rent_income = _first_array(arrays, ("farm_rent_income", "E27200"), n=n) + rental_income = _first_array(arrays, ("rental_income",), n=n) + if rental_income is None: + rental_income = _difference_or_zeros(arrays, "E25850", "E25860", n=n) + estate_income = _first_array(arrays, ("estate_income",), n=n) + if estate_income is None: + estate_income = _difference_or_zeros(arrays, "E26390", "E26400", n=n) + + partnership_s_corp_income = _first_array( + arrays, ("partnership_s_corp_income",), n=n + ) + if partnership_s_corp_income is None and ( + "partnership_income" in arrays or "s_corp_income" in arrays + ): + partnership_s_corp_income = _array_or_zeros( + arrays, "partnership_income", n=n + ) + _array_or_zeros(arrays, "s_corp_income", n=n) + if partnership_s_corp_income is None and { + "E25980", + "E25960", + "E26190", + "E26180", + } <= set(arrays): + partnership_s_corp_income = ( + _array_or_zeros(arrays, "E25980", n=n) + - _array_or_zeros(arrays, "E25960", n=n) + + _array_or_zeros(arrays, "E26190", n=n) + - _array_or_zeros(arrays, "E26180", n=n) + ) + if partnership_s_corp_income is None: + partnership_s_corp_income = _first_array(arrays, ("E26270",), n=n) + + non_qualified_dividend_income = _first_array( + arrays, ("non_qualified_dividend_income",), n=n + ) + if non_qualified_dividend_income is None and { + "E00600", + "E00650", + } <= set(arrays): + non_qualified_dividend_income = _difference_or_zeros( + arrays, "E00600", "E00650", n=n + ) + if non_qualified_dividend_income is None: + non_qualified_dividend_income = _first_array( + arrays, ("ordinary_dividend_income",), n=n + ) + + return cls( + self_employment_income=self_employment_income, + farm_operations_income=_zeros_if_none(farm_operations_income, n), + farm_rent_income=_zeros_if_none(farm_rent_income, n), + rental_income=_zeros_if_none(rental_income, n), + estate_income=_zeros_if_none(estate_income, n), + partnership_s_corp_income=_zeros_if_none(partnership_s_corp_income, n), + non_qualified_dividend_income=_zeros_if_none( + non_qualified_dividend_income, n + ), + ) + + +@lru_cache(maxsize=3) +def load_qbi_simulation_assumptions( + qbi_simulation_version: int, +) -> QbiSimulationAssumptions | QbiSimulationAssumptionsV2 | QbiSimulationAssumptionsV3: + """Load and strictly validate one packaged QBI assumptions version.""" + + if qbi_simulation_version not in QBI_SIMULATION_SUPPORTED_VERSIONS: + raise ValueError( + "Unsupported qbi_simulation_version " + f"{qbi_simulation_version!r}; supported versions: " + f"{QBI_SIMULATION_SUPPORTED_VERSIONS!r}." + ) + resource = files("populace.build.us").joinpath( + QBI_SIMULATION_ASSUMPTIONS_RESOURCES[qbi_simulation_version] + ) + with resource.open("r", encoding="utf-8") as stream: + payload = json.load(stream) + return parse_qbi_simulation_assumptions( + payload, + qbi_simulation_version=qbi_simulation_version, + ) + + +def parse_qbi_simulation_assumptions( + payload: Any, + *, + qbi_simulation_version: int, +) -> QbiSimulationAssumptions | QbiSimulationAssumptionsV2 | QbiSimulationAssumptionsV3: + """Parse one assumptions mapping under its requested versioned schema.""" + + if qbi_simulation_version not in QBI_SIMULATION_SUPPORTED_VERSIONS: + raise ValueError( + "Unsupported qbi_simulation_version " + f"{qbi_simulation_version!r}; supported versions: " + f"{QBI_SIMULATION_SUPPORTED_VERSIONS!r}." + ) + root = _require_mapping(payload, "QBI assumptions") + payload_version = _integer( + root.get("qbi_simulation_version"), + "qbi_simulation_version", + ) + if payload_version != qbi_simulation_version: + raise ValueError( + "Requested qbi_simulation_version " + f"{qbi_simulation_version!r} does not match assumptions version " + f"{payload_version!r}." + ) + if qbi_simulation_version == QBI_SIMULATION_VERSION: + return _parse_v1_qbi_simulation_assumptions(root) + if qbi_simulation_version == QBI_SIMULATION_V2: + return _parse_v2_qbi_simulation_assumptions(root) + return _parse_v3_qbi_simulation_assumptions(root) + + +def _parse_v1_qbi_simulation_assumptions( + root: Mapping[str, Any], +) -> QbiSimulationAssumptions: + rng = _child_mapping(root, "rng") + qualification = _child_mapping(root, "qualification") + sstb = _child_mapping(root, "sstb") + w2 = _child_mapping(root, "w2") + employee_logit = _child_mapping(w2, "has_employees_logit") + ubia = _child_mapping(root, "ubia") + investment = _child_mapping(root, "investment") + source_order = _string_tuple(root.get("source_order"), "source_order") + sstb_source_order = _string_tuple(sstb.get("source_order"), "sstb.source_order") + reit_order = _string_tuple( + investment.get("reit_ptp_exposure_order"), + "investment.reit_ptp_exposure_order", + ) + bdc_order = _string_tuple( + investment.get("bdc_exposure_order"), + "investment.bdc_exposure_order", + ) + + assumptions = QbiSimulationAssumptions( + schema_version=_integer(root.get("schema_version"), "schema_version"), + qbi_simulation_version=_integer( + root.get("qbi_simulation_version"), "qbi_simulation_version" + ), + engine=_string(root.get("engine"), "engine"), + bit_generator=_string(rng.get("bit_generator"), "rng.bit_generator"), + qualification_seed=_integer( + rng.get("qualification_seed"), "rng.qualification_seed" + ), + w2_ubia_seed=_integer(rng.get("w2_ubia_seed"), "rng.w2_ubia_seed"), + investment_seed=_integer(rng.get("investment_seed"), "rng.investment_seed"), + sstb_seed=_integer(rng.get("sstb_seed"), "rng.sstb_seed"), + source_order=source_order, + qualification_model=_string(qualification.get("model"), "qualification.model"), + qualification_probabilities=_ordered_scalars( + _child_mapping(qualification, "probabilities"), + source_order, + "qualification.probabilities", + ), + sstb_model=_string(sstb.get("model"), "sstb.model"), + sstb_source_order=sstb_source_order, + sstb_probabilities=_ordered_scalars( + _child_mapping(sstb, "probabilities"), + sstb_source_order, + "sstb.probabilities", + ), + w2_model=_string(w2.get("model"), "w2.model"), + profit_margin_parameters=_ordered_betas( + _child_mapping(w2, "profit_margin_distribution"), + source_order, + "w2.profit_margin_distribution", + ), + has_employees_slope_per_dollar=_number( + employee_logit.get("slope_per_dollar"), + "w2.has_employees_logit.slope_per_dollar", + ), + has_employees_target_share=_number( + employee_logit.get("target_share_among_positive_receipts"), + "w2.has_employees_logit.target_share_among_positive_receipts", + ), + intercept_bisection_iterations=_integer( + employee_logit.get("intercept_bisection_iterations"), + "w2.has_employees_logit.intercept_bisection_iterations", + ), + labor_ratio_parameters=_ordered_betas( + _child_mapping(w2, "labor_ratio_distribution"), + source_order, + "w2.labor_ratio_distribution", + ), + ubia_model=_string(ubia.get("model"), "ubia.model"), + ubia_sigma=_number(ubia.get("sigma"), "ubia.sigma"), + ubia_multiples=_ordered_scalars( + _child_mapping(ubia, "multiple_of_qbi"), + source_order, + "ubia.multiple_of_qbi", + ), + capital_intensity_probabilities=_ordered_scalars( + _child_mapping(ubia, "capital_intensity_probabilities"), + source_order, + "ubia.capital_intensity_probabilities", + ), + investment_model=_string(investment.get("model"), "investment.model"), + reit_ptp_exposures=_ordered_exposures( + _child_mapping(investment, "reit_ptp_income_distribution"), + reit_order, + "investment.reit_ptp_income_distribution", + ), + bdc_exposures=_ordered_exposures( + _child_mapping(investment, "bdc_income_distribution"), + bdc_order, + "investment.bdc_income_distribution", + ), + ) + assumptions.validate() + return assumptions + + +def _parse_v2_qbi_simulation_assumptions( + root: Mapping[str, Any], +) -> QbiSimulationAssumptionsV2: + _validate_v2_payload_keys(root) + rng = _child_mapping(root, "rng") + seeds = _child_mapping(rng, "seeds") + derivations = _child_mapping(root, "qualification_derivations") + classification = _child_mapping(root, "sstb_classification") + w2 = _child_mapping(root, "w2") + employee_logit = _child_mapping(w2, "has_employees_logit") + ubia = _child_mapping(root, "ubia") + investment = _child_mapping(root, "investment") + source_order = _string_tuple(root.get("source_order"), "source_order") + reit_order = _string_tuple( + investment.get("reit_ptp_exposure_order"), + "investment.reit_ptp_exposure_order", + ) + bdc_order = _string_tuple( + investment.get("bdc_exposure_order"), + "investment.bdc_exposure_order", + ) + + qualification_derivations: list[QualificationDerivation] = [] + for source in source_order: + entry = _require_mapping( + derivations[source], + f"qualification_derivations.{source}", + ) + prior_payload = entry.get("prior") + prior_probability: float | None = None + if prior_payload is not None: + prior = _require_mapping( + prior_payload, + f"qualification_derivations.{source}.prior", + ) + prior_probability = _number( + prior.get("probability"), + f"qualification_derivations.{source}.prior.probability", + ) + qualification_derivations.append( + QualificationDerivation( + source=source, + mode=_string( + entry.get("mode"), + f"qualification_derivations.{source}.mode", + ), + prior_probability=prior_probability, + rationale=_string( + entry.get("rationale"), + f"qualification_derivations.{source}.rationale", + ), + ) + ) + + assumptions = QbiSimulationAssumptionsV2( + schema_version=_integer(root.get("schema_version"), "schema_version"), + qbi_simulation_version=_integer( + root.get("qbi_simulation_version"), + "qbi_simulation_version", + ), + engine=_string(root.get("engine"), "engine"), + bit_generator=_string(rng.get("bit_generator"), "rng.bit_generator"), + qualification_seed=_integer( + seeds.get("qualification"), + "rng.seeds.qualification", + ), + sstb_seed=_integer(seeds.get("sstb"), "rng.seeds.sstb"), + w2_seed=_integer(seeds.get("w2"), "rng.seeds.w2"), + ubia_seed=_integer(seeds.get("ubia"), "rng.seeds.ubia"), + investment_seed=_integer( + seeds.get("investment"), + "rng.seeds.investment", + ), + source_order=source_order, + qualification_derivations=tuple(qualification_derivations), + sstb_classification=SstbClassificationAssumptions( + mode=_string( + classification.get("mode"), + "sstb_classification.mode", + ), + crosswalk_resource=_string( + classification.get("crosswalk_resource"), + "sstb_classification.crosswalk_resource", + ), + occupation_column=_string( + classification.get("occupation_column"), + "sstb_classification.occupation_column", + ), + industry_column=_optional_string( + classification.get("industry_column"), + "sstb_classification.industry_column", + ), + agi_column=_string( + classification.get("agi_column"), + "sstb_classification.agi_column", + ), + ambiguous_prior=_number( + classification.get("ambiguous_prior"), + "sstb_classification.ambiguous_prior", + ), + ambiguous_prior_status=_string( + classification.get("ambiguous_prior_status"), + "sstb_classification.ambiguous_prior_status", + ), + agi_band_format=_string( + classification.get("agi_band_format"), + "sstb_classification.agi_band_format", + ), + passive_passthrough_sstb_prior_by_agi=_parse_agi_prior_bands( + _child_mapping( + classification, + "passive_passthrough_sstb_prior_by_agi", + ) + ), + passive_passthrough_prior_status=_string( + classification.get("passive_passthrough_prior_status"), + "sstb_classification.passive_passthrough_prior_status", + ), + rationale=_string( + classification.get("rationale"), + "sstb_classification.rationale", + ), + follow_up=_string( + classification.get("follow_up"), + "sstb_classification.follow_up", + ), + ), + w2_model=_string(w2.get("model"), "w2.model"), + profit_margin_parameters=_ordered_betas( + _child_mapping(w2, "profit_margin_distribution"), + source_order, + "w2.profit_margin_distribution", + ), + has_employees_slope_per_dollar=_number( + employee_logit.get("slope_per_dollar"), + "w2.has_employees_logit.slope_per_dollar", + ), + has_employees_target_share=_number( + employee_logit.get("target_share_among_positive_receipts"), + "w2.has_employees_logit.target_share_among_positive_receipts", + ), + intercept_bisection_iterations=_integer( + employee_logit.get("intercept_bisection_iterations"), + "w2.has_employees_logit.intercept_bisection_iterations", + ), + labor_ratio_parameters=_ordered_betas( + _child_mapping(w2, "labor_ratio_distribution"), + source_order, + "w2.labor_ratio_distribution", + ), + ubia_model=_string(ubia.get("model"), "ubia.model"), + ubia_sigma=_number(ubia.get("sigma"), "ubia.sigma"), + ubia_multiples=_ordered_scalars( + _child_mapping(ubia, "multiple_of_qbi"), + source_order, + "ubia.multiple_of_qbi", + ), + capital_intensity_probabilities=_ordered_scalars( + _child_mapping(ubia, "capital_intensity_probabilities"), + source_order, + "ubia.capital_intensity_probabilities", + ), + investment_model=_string(investment.get("model"), "investment.model"), + reit_ptp_anchor=_parse_aggregate_evidence_anchor( + _child_mapping(investment, "reit_ptp_anchor"), + "investment.reit_ptp_anchor", + ), + bdc_anchor=_parse_aggregate_evidence_anchor( + _child_mapping(investment, "bdc_anchor"), + "investment.bdc_anchor", + ), + reit_ptp_exposures=_ordered_exposures( + _child_mapping(investment, "reit_ptp_income_distribution"), + reit_order, + "investment.reit_ptp_income_distribution", + ), + bdc_exposures=_ordered_exposures( + _child_mapping(investment, "bdc_income_distribution"), + bdc_order, + "investment.bdc_income_distribution", + ), + ) + assumptions.validate() + return assumptions + + +def _parse_v3_qbi_simulation_assumptions( + root: Mapping[str, Any], +) -> QbiSimulationAssumptionsV3: + """Parse the strictly validated evidence-consuming v3 resource.""" + + # Keep the resource builder and runtime on one complete schema contract. + # This import is deliberately local: the builder imports selected simulation + # helpers lazily when producing the resource. + from populace.build.us_runtime.qbi_v3_assumptions import ( + validate_qbi_v3_assumptions_payload, + ) + + validate_qbi_v3_assumptions_payload(root) + rng = _child_mapping(root, "rng") + seeds = _child_mapping(rng, "seeds") + derivations = _child_mapping(root, "qualification_derivations") + classification = _child_mapping(root, "sstb_classification") + evidence = _child_mapping(root, "evidence") + record_form = _child_mapping(root, "record_form") + industry_mixture = _child_mapping(root, "industry_mixture") + mixture_forms = _child_mapping(industry_mixture, "forms") + employer = _child_mapping(root, "employer_presence") + employer_base = _child_mapping(employer, "base_probability_by_form") + calibration = _child_mapping(employer, "calibration") + zero_targets = _child_mapping( + calibration, + "target_zero_employee_share_by_form", + ) + employer_shifts = _child_mapping(calibration, "log_odds_shift_by_form") + expected_zero_shares = _child_mapping( + calibration, + "expected_zero_employee_share_by_form", + ) + profit_margin = _child_mapping(root, "profit_margin") + margin_curves = _child_mapping(profit_margin, "quantiles_by_form") + w2 = _child_mapping(root, "w2") + wage_band = _child_mapping(w2, "plausibility_band") + ubia = _child_mapping(root, "ubia") + ubia_dispersion = _child_mapping(ubia, "dispersion") + dispersion_forms = _child_mapping(ubia_dispersion, "forms") + investment = _child_mapping(root, "investment") + source_order = _string_tuple(root.get("source_order"), "source_order") + form_order = _string_tuple(record_form.get("form_order"), "record_form.form_order") + income_band_order = _string_tuple( + employer.get("income_band_order"), + "employer_presence.income_band_order", + ) + margin_probabilities = _number_tuple( + profit_margin.get("probabilities"), + "profit_margin.probabilities", + ) + reit_order = _string_tuple( + investment.get("reit_ptp_exposure_order"), + "investment.reit_ptp_exposure_order", + ) + bdc_order = _string_tuple( + investment.get("bdc_exposure_order"), + "investment.bdc_exposure_order", + ) + + qualification_derivations: list[QualificationDerivation] = [] + for source in source_order: + entry = _require_mapping( + derivations[source], + f"qualification_derivations.{source}", + ) + prior_payload = entry.get("prior") + prior_probability: float | None = None + if prior_payload is not None: + prior = _require_mapping( + prior_payload, + f"qualification_derivations.{source}.prior", + ) + prior_probability = _number( + prior.get("probability"), + f"qualification_derivations.{source}.prior.probability", + ) + qualification_derivations.append( + QualificationDerivation( + source=source, + mode=_string( + entry.get("mode"), + f"qualification_derivations.{source}.mode", + ), + prior_probability=prior_probability, + rationale=_string( + entry.get("rationale"), + f"qualification_derivations.{source}.rationale", + ), + ) + ) + + forms: list[QbiV3FormAssumptions] = [] + for legal_form in form_order: + mixture = _require_mapping( + mixture_forms[legal_form], + f"industry_mixture.forms.{legal_form}", + ) + raw_components = mixture.get("components") + if not isinstance(raw_components, list): + raise ValueError( + f"industry_mixture.forms.{legal_form}.components must be a list." + ) + components: list[QbiV3IndustryComponent] = [] + for index, raw_component in enumerate(raw_components): + component = _require_mapping( + raw_component, + f"industry_mixture.forms.{legal_form}.components[{index}]", + ) + components.append( + QbiV3IndustryComponent( + industry_key=_string( + component.get("industry_key"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].industry_key", + ), + published_label=_string( + component.get("published_label"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].published_label", + ), + probability=_number( + component.get("probability"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].probability", + ), + wage_share=_number( + component.get("wage_share"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].wage_share", + ), + ubia_intensity=_number( + component.get("ubia_intensity"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].ubia_intensity", + ), + proxy=_boolean( + component.get("proxy"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].proxy", + ), + capital_measure=_string( + component.get("capital_measure"), + f"industry_mixture.forms.{legal_form}." + f"components[{index}].capital_measure", + ), + ) + ) + form_dispersion = _require_mapping( + dispersion_forms[legal_form], + f"ubia.dispersion.forms.{legal_form}", + ) + forms.append( + QbiV3FormAssumptions( + legal_form=legal_form, + tax_year=_integer( + mixture.get("tax_year"), + f"industry_mixture.forms.{legal_form}.tax_year", + ), + scf_legal_form_group=_string( + mixture.get("scf_legal_form_group"), + f"industry_mixture.forms.{legal_form}.scf_legal_form_group", + ), + capital_measure=_string( + mixture.get("capital_measure"), + f"industry_mixture.forms.{legal_form}.capital_measure", + ), + proxy=_boolean( + mixture.get("proxy"), + f"industry_mixture.forms.{legal_form}.proxy", + ), + eligible_receipts_thousands=_number( + mixture.get("eligible_receipts_thousands"), + f"industry_mixture.forms.{legal_form}.eligible_receipts_thousands", + ), + all_industry_receipts_thousands=_number( + mixture.get("all_industry_receipts_thousands"), + f"industry_mixture.forms.{legal_form}." + "all_industry_receipts_thousands", + ), + receipts_coverage=_number( + mixture.get("receipts_coverage"), + f"industry_mixture.forms.{legal_form}.receipts_coverage", + ), + industry_components=tuple(components), + employer_base_probabilities=_ordered_scalars( + _require_mapping( + employer_base[legal_form], + f"employer_presence.base_probability_by_form.{legal_form}", + ), + income_band_order, + f"employer_presence.base_probability_by_form.{legal_form}", + ), + zero_employee_target=_number( + zero_targets.get(legal_form), + "employer_presence.calibration." + f"target_zero_employee_share_by_form.{legal_form}", + ), + employer_log_odds_shift=_number( + employer_shifts.get(legal_form), + "employer_presence.calibration." + f"log_odds_shift_by_form.{legal_form}", + ), + expected_zero_employee_share=_number( + expected_zero_shares.get(legal_form), + "employer_presence.calibration." + f"expected_zero_employee_share_by_form.{legal_form}", + ), + margin_quantiles=_number_tuple( + margin_curves.get(legal_form), + f"profit_margin.quantiles_by_form.{legal_form}", + ), + ubia_log_intensity_sd=_number( + form_dispersion.get("receipts_weighted_log_intensity_sd"), + f"ubia.dispersion.forms.{legal_form}." + "receipts_weighted_log_intensity_sd", + ), + ubia_effective_industry_count=_number( + form_dispersion.get("receipts_weight_effective_industry_count"), + f"ubia.dispersion.forms.{legal_form}." + "receipts_weight_effective_industry_count", + ), + ubia_sigma=_number( + form_dispersion.get("sigma"), + f"ubia.dispersion.forms.{legal_form}.sigma", + ), + ) + ) + + assumptions = QbiSimulationAssumptionsV3( + schema_version=_integer(root.get("schema_version"), "schema_version"), + qbi_simulation_version=_integer( + root.get("qbi_simulation_version"), + "qbi_simulation_version", + ), + engine=_string(root.get("engine"), "engine"), + bit_generator=_string(rng.get("bit_generator"), "rng.bit_generator"), + qualification_seed=_integer( + seeds.get("qualification"), + "rng.seeds.qualification", + ), + sstb_seed=_integer(seeds.get("sstb"), "rng.seeds.sstb"), + investment_seed=_integer( + seeds.get("investment"), + "rng.seeds.investment", + ), + entity_split_seed=_integer( + seeds.get("entity_split"), + "rng.seeds.entity_split", + ), + latent_industry_seed=_integer( + seeds.get("latent_industry"), + "rng.seeds.latent_industry", + ), + employer_gate_seed=_integer( + seeds.get("employer_gate"), + "rng.seeds.employer_gate", + ), + margin_quantile_seed=_integer( + seeds.get("margin_quantile"), + "rng.seeds.margin_quantile", + ), + ubia_dispersion_seed=_integer( + seeds.get("ubia_dispersion"), + "rng.seeds.ubia_dispersion", + ), + source_order=source_order, + qualification_derivations=tuple(qualification_derivations), + sstb_classification=SstbClassificationAssumptions( + mode=_string( + classification.get("mode"), + "sstb_classification.mode", + ), + crosswalk_resource=_string( + classification.get("crosswalk_resource"), + "sstb_classification.crosswalk_resource", + ), + occupation_column=_string( + classification.get("occupation_column"), + "sstb_classification.occupation_column", + ), + industry_column=_optional_string( + classification.get("industry_column"), + "sstb_classification.industry_column", + ), + agi_column=_string( + classification.get("agi_column"), + "sstb_classification.agi_column", + ), + ambiguous_prior=_number( + classification.get("ambiguous_prior"), + "sstb_classification.ambiguous_prior", + ), + ambiguous_prior_status=_string( + classification.get("ambiguous_prior_status"), + "sstb_classification.ambiguous_prior_status", + ), + agi_band_format=_string( + classification.get("agi_band_format"), + "sstb_classification.agi_band_format", + ), + passive_passthrough_sstb_prior_by_agi=_parse_agi_prior_bands( + _child_mapping( + classification, + "passive_passthrough_sstb_prior_by_agi", + ) + ), + passive_passthrough_prior_status=_string( + classification.get("passive_passthrough_prior_status"), + "sstb_classification.passive_passthrough_prior_status", + ), + rationale=_string( + classification.get("rationale"), + "sstb_classification.rationale", + ), + follow_up=_string( + classification.get("follow_up"), + "sstb_classification.follow_up", + ), + ), + employer_structure_resource=_string( + evidence.get("employer_structure_resource"), + "evidence.employer_structure_resource", + ), + wage_capital_resource=_string( + evidence.get("wage_capital_resource"), + "evidence.wage_capital_resource", + ), + form_order=form_order, + sole_proprietorship_sources=_string_tuple( + record_form.get("sole_proprietorship_sources"), + "record_form.sole_proprietorship_sources", + ), + passthrough_source=_string( + record_form.get("passthrough_source"), + "record_form.passthrough_source", + ), + partnership_probability=_number( + record_form.get("partnership_probability"), + "record_form.partnership_probability", + ), + s_corporation_probability=_number( + record_form.get("s_corporation_probability"), + "record_form.s_corporation_probability", + ), + industry_model=_string( + industry_mixture.get("model"), + "industry_mixture.model", + ), + employer_model=_string( + employer.get("model"), + "employer_presence.model", + ), + income_band_order=income_band_order, + overall_zero_employee_target=_number( + calibration.get("overall_zero_employee_target"), + "employer_presence.calibration.overall_zero_employee_target", + ), + expected_overall_zero_employee_share=_number( + calibration.get("expected_overall_zero_employee_share"), + "employer_presence.calibration.expected_overall_zero_employee_share", + ), + forms=tuple(forms), + margin_model=_string( + profit_margin.get("model"), + "profit_margin.model", + ), + margin_probabilities=margin_probabilities, + margin_interpolation=_string( + profit_margin.get("interpolation"), + "profit_margin.interpolation", + ), + w2_model=_string(w2.get("model"), "w2.model"), + wage_plausibility_band=QbiV3WagePlausibilityBand( + lower_dollars=_number( + wage_band.get("lower_dollars"), + "w2.plausibility_band.lower_dollars", + ), + upper_dollars=_number( + wage_band.get("upper_dollars"), + "w2.plausibility_band.upper_dollars", + ), + rationale=_string( + wage_band.get("rationale"), + "w2.plausibility_band.rationale", + ), + ), + ubia_model=_string(ubia.get("model"), "ubia.model"), + investment_model=_string(investment.get("model"), "investment.model"), + reit_ptp_anchor=_parse_aggregate_evidence_anchor( + _child_mapping(investment, "reit_ptp_anchor"), + "investment.reit_ptp_anchor", + ), + bdc_anchor=_parse_aggregate_evidence_anchor( + _child_mapping(investment, "bdc_anchor"), + "investment.bdc_anchor", + ), + reit_ptp_exposures=_ordered_exposures( + _child_mapping(investment, "reit_ptp_income_distribution"), + reit_order, + "investment.reit_ptp_income_distribution", + ), + bdc_exposures=_ordered_exposures( + _child_mapping(investment, "bdc_income_distribution"), + bdc_order, + "investment.bdc_income_distribution", + ), + ) + assumptions.validate() + return assumptions + + +def load_sstb_crosswalk(resource_name: str) -> SstbCrosswalk: + """Load one packaged SSTB crosswalk and reject placeholder content.""" + + if not resource_name.endswith(".json") or "/" in resource_name: + raise ValueError("SSTB crosswalk resource must be a package JSON basename.") + resource = files("populace.build.us").joinpath(resource_name) + with resource.open("r", encoding="utf-8") as stream: + payload = json.load(stream) + return parse_sstb_crosswalk(payload) + + +def parse_sstb_crosswalk(payload: Any) -> SstbCrosswalk: + """Validate the live SSTB crosswalk, failing closed on placeholders.""" + + root = _require_mapping(payload, "SSTB crosswalk") + status = _string(root.get("status"), "SSTB crosswalk.status") + if status == "placeholder": + raise ValueError( + "SSTB crosswalk status is 'placeholder'; v2 classification fails " + "closed until reviewed mapping content is packaged." + ) + _require_exact_keys( + root, + ( + "schema_version", + "crosswalk_version", + "status", + "meta", + "industry_2017", + "industry_explicit_nonsstb_neighbors", + "occupation_2018", + "occupation_explicit_nonsstb_notes", + ), + "SSTB crosswalk", + ) + schema_version = _integer( + root.get("schema_version"), + "SSTB crosswalk.schema_version", + ) + if schema_version != _SSTB_CROSSWALK_SCHEMA_VERSION: + raise ValueError( + f"Unsupported SSTB crosswalk schema_version {schema_version!r}." + ) + if status != _SSTB_CROSSWALK_LIVE_STATUS: + raise ValueError(f"Unsupported SSTB crosswalk status {status!r}.") + meta = _child_mapping(root, "meta") + _require_exact_keys( + meta, + ( + "industry_vintage", + "occupation_vintage", + "legal_basis", + "wiring_notes", + "sstb_category_values", + ), + "SSTB crosswalk.meta", + ) + categories = _string_tuple( + meta.get("sstb_category_values"), + "SSTB crosswalk.meta.sstb_category_values", + ) + _validate_explicit_nonsstb_entries( + root.get("industry_explicit_nonsstb_neighbors"), + "SSTB crosswalk.industry_explicit_nonsstb_neighbors", + ) + _validate_explicit_nonsstb_entries( + root.get("occupation_explicit_nonsstb_notes"), + "SSTB crosswalk.occupation_explicit_nonsstb_notes", + ) + crosswalk = SstbCrosswalk( + schema_version=schema_version, + crosswalk_version=_string( + root.get("crosswalk_version"), + "SSTB crosswalk.crosswalk_version", + ), + status=status, + industry_vintage=_string( + meta.get("industry_vintage"), + "SSTB crosswalk.meta.industry_vintage", + ), + occupation_vintage=_string( + meta.get("occupation_vintage"), + "SSTB crosswalk.meta.occupation_vintage", + ), + legal_basis=_string( + meta.get("legal_basis"), + "SSTB crosswalk.meta.legal_basis", + ), + wiring_notes=_string_tuple( + meta.get("wiring_notes"), + "SSTB crosswalk.meta.wiring_notes", + ), + sstb_category_values=categories, + occupation_entries=_parse_crosswalk_entries( + root.get("occupation_2018"), + family="occupation", + classification_system_key="soc", + categories=categories, + ), + industry_entries=_parse_crosswalk_entries( + root.get("industry_2017"), + family="industry", + classification_system_key="naics", + categories=categories, + ), + ) + crosswalk.validate() + return crosswalk + + +def us_qbi_simulation_stage_spec() -> SourceStageSpec: + """Load and validate the manifest contract for the QBI source stage.""" + + manifest = load_source_manifest( + files("populace.build.us").joinpath("source_stages.json") + ) + spec = manifest.stage_map()["puf_tax_detail"] + missing = sorted(set(US_QBI_OUTPUT_COLUMNS) - set(spec.outputs)) + if missing: + raise ValueError( + "puf_tax_detail manifest does not declare QBI simulation output(s) " + f"{missing}." + ) + version_is_pinned = any( + artifact.get("populace_qbi_simulation_version") == QBI_SIMULATION_VERSION + for artifact in spec.artifacts + ) + if not version_is_pinned: + raise ValueError( + "puf_tax_detail artifact declaration must pin structured " + "populace_qbi_simulation_version=" + f"{QBI_SIMULATION_VERSION}." + ) + qrf_operations = tuple( + operation + for operation in spec.operations + if operation.kind == "fit_weighted_qrf" + ) + if len(qrf_operations) != 1: + raise ValueError( + "puf_tax_detail must declare exactly one fit_weighted_qrf operation." + ) + exclusions = _require_mapping( + qrf_operations[0].parameters.get("qbi_target_exclusions_by_simulation_version"), + "qbi_target_exclusions_by_simulation_version", + ) + version_keys = tuple(str(version) for version in QBI_SIMULATION_SUPPORTED_VERSIONS) + _require_exact_keys( + exclusions, + version_keys, + "qbi_target_exclusions_by_simulation_version", + ) + for version in QBI_SIMULATION_SUPPORTED_VERSIONS: + declared = exclusions[str(version)] + if not isinstance(declared, list) or not all( + isinstance(column, str) and column for column in declared + ): + raise ValueError("QBI target exclusions must be lists of nonempty strings.") + expected = qbi_qrf_excluded_targets(version) + if tuple(declared) != expected: + raise ValueError( + "puf_tax_detail QBI target exclusions disagree with version " + f"{version} assumptions: expected {expected!r}, " + f"got {tuple(declared)!r}." + ) + return spec + + +def qbi_qrf_excluded_targets( + qbi_simulation_version: int, +) -> tuple[str, ...]: + """Return QBI leaves derived after, rather than imputed by, the QRF.""" + + if qbi_simulation_version == QBI_SIMULATION_VERSION: + return () + assumptions = load_qbi_simulation_assumptions(qbi_simulation_version) + if not isinstance( + assumptions, + (QbiSimulationAssumptionsV2, QbiSimulationAssumptionsV3), + ): + raise TypeError("QBI v2/v3 target selection requires modern assumptions.") + excluded = { + _QUALIFICATION_FLAG_BY_SOURCE[derivation.source] + for derivation in assumptions.qualification_derivations + if derivation.mode == "derived" + } + excluded.add(_SSTB_SELF_EMPLOYMENT_QUALIFICATION_FLAG) + return tuple(column for column in US_QBI_OUTPUT_COLUMNS if column in excluded) + + +def simulate_qbi_inputs( + inputs: QbiSimulationInputs, + *, + assumptions: ( + QbiSimulationAssumptions + | QbiSimulationAssumptionsV2 + | QbiSimulationAssumptionsV3 + ), + qbi_simulation_version: int, + sstb_crosswalk: SstbCrosswalk | Mapping[str, Any] | None = None, +) -> dict[str, np.ndarray]: + """Run a version-gated Section 199A simulation. + + Returns exactly the 15 names in :data:`US_QBI_OUTPUT_COLUMNS`. The ordinary + Schedule C complement is deliberately returned by the stage wrapper, + because it replaces a source column rather than adding a QBI-contract leaf. + """ + + if qbi_simulation_version != assumptions.qbi_simulation_version: + raise ValueError( + "Requested qbi_simulation_version " + f"{qbi_simulation_version!r} does not match assumptions version " + f"{assumptions.qbi_simulation_version!r}." + ) + if qbi_simulation_version not in QBI_SIMULATION_SUPPORTED_VERSIONS: + raise ValueError( + f"Unsupported qbi_simulation_version {qbi_simulation_version!r}." + ) + assumptions.validate() + + if qbi_simulation_version == QBI_SIMULATION_VERSION: + if not isinstance(assumptions, QbiSimulationAssumptions): + raise TypeError("QBI v1 simulation requires v1 assumptions.") + qualification_rng = _rng( + assumptions.qualification_seed, + assumptions.bit_generator, + ) + qualification_flags = tuple( + qualification_rng.random(inputs.n) < probability + for probability in assumptions.qualification_probabilities + ) + qualified_components = _qualified_components( + inputs, + source_order=assumptions.source_order, + qualification_flags=qualification_flags, + ) + w2_rng = _rng(assumptions.w2_ubia_seed, assumptions.bit_generator) + w2_wages, ubia = _simulate_w2_and_ubia( + qualified_components, + assumptions=assumptions, + rng=w2_rng, + ) + flag_by_source = dict( + zip(assumptions.source_order, qualification_flags, strict=True) + ) + business_is_sstb = _simulate_business_is_sstb( + inputs, + qualification_flags=flag_by_source, + assumptions=assumptions, + rng=_rng(assumptions.sstb_seed, assumptions.bit_generator), + ) + elif qbi_simulation_version == QBI_SIMULATION_V2: + if not isinstance(assumptions, QbiSimulationAssumptionsV2): + raise TypeError("QBI v2 simulation requires v2 assumptions.") + resolve_sstb_crosswalk(assumptions, sstb_crosswalk) + qualification_flags = _derive_v2_qualification_flags( + inputs, + assumptions=assumptions, + ) + qualified_components = _qualified_components( + inputs, + source_order=assumptions.source_order, + qualification_flags=qualification_flags, + ) + w2_wages = _simulate_w2( + qualified_components, + assumptions=assumptions, + rng=_rng(assumptions.w2_seed, assumptions.bit_generator), + ) + ubia = _simulate_ubia( + qualified_components, + assumptions=assumptions, + rng=_rng(assumptions.ubia_seed, assumptions.bit_generator), + ) + flag_by_source = dict( + zip(assumptions.source_order, qualification_flags, strict=True) + ) + # The PUF donor has no host occupation or industry. V2 emits a neutral + # preliminary route; the authoritative SSTB classifier runs after QRF + # placement on the cloned host record. + business_is_sstb = np.zeros(inputs.n, dtype=bool) + else: + if not isinstance(assumptions, QbiSimulationAssumptionsV3): + raise TypeError("QBI v3 simulation requires v3 assumptions.") + resolve_sstb_crosswalk(assumptions, sstb_crosswalk) + qualification_flags = _derive_v2_qualification_flags( + inputs, + assumptions=assumptions, + ) + wage_capital = simulate_qbi_v3_wage_capital( + inputs, + assumptions=assumptions, + qualification_flags=qualification_flags, + ) + w2_wages = wage_capital.w2_wages + ubia = wage_capital.ubia + flag_by_source = dict( + zip(assumptions.source_order, qualification_flags, strict=True) + ) + # V3 carries v2's host-authoritative SSTB route unchanged. + business_is_sstb = np.zeros(inputs.n, dtype=bool) + + qualified_reit_and_ptp_income, qualified_bdc_income = _simulate_investment_qbi( + inputs, + assumptions=assumptions, + rng=_rng(assumptions.investment_seed, assumptions.bit_generator), + ) + + self_employment_qualified = flag_by_source["self_employment_income"] + results: dict[str, np.ndarray] = { + _QUALIFICATION_FLAG_BY_SOURCE[source]: qualified + for source, qualified in flag_by_source.items() + } + results["self_employment_income_would_be_qualified"] = np.where( + business_is_sstb, + False, + self_employment_qualified, + ) + results[_SSTB_SELF_EMPLOYMENT_QUALIFICATION_FLAG] = np.where( + business_is_sstb, + self_employment_qualified, + False, + ) + results["business_is_sstb"] = business_is_sstb + results["qualified_bdc_income"] = qualified_bdc_income + results["qualified_reit_and_ptp_income"] = qualified_reit_and_ptp_income + results[_SSTB_SELF_EMPLOYMENT_OUTPUT] = np.where( + business_is_sstb, + inputs.self_employment_income, + 0.0, + ) + results["sstb_unadjusted_basis_qualified_property"] = np.where( + business_is_sstb, + ubia, + 0.0, + ) + results["sstb_w2_wages_from_qualified_business"] = np.where( + business_is_sstb, + w2_wages, + 0.0, + ) + results["unadjusted_basis_qualified_property"] = ubia + results["w2_wages_from_qualified_business"] = w2_wages + return {column: results[column] for column in US_QBI_OUTPUT_COLUMNS} + + +def with_qbi_simulation_from_puf_arrays( + arrays: Mapping[str, Sequence[Any]], + *, + qbi_simulation_version: int, + assumptions: ( + QbiSimulationAssumptions + | QbiSimulationAssumptionsV2 + | QbiSimulationAssumptionsV3 + | None + ) = None, + sstb_crosswalk: SstbCrosswalk | Mapping[str, Any] | None = None, +) -> dict[str, Sequence[Any]]: + """Return PUF arrays with a repository-owned QBI simulation applied. + + The input mapping is never mutated. Existing QBI leaves, including release + 1.8.0's stale deterministic W-2 proxy, are replaced. The returned mapping + also replaces ``self_employment_income`` with its non-SSTB complement so + the separately emitted SSTB leaf does not double Schedule C income. + """ + + resolved_assumptions = assumptions or load_qbi_simulation_assumptions( + qbi_simulation_version + ) + inputs = QbiSimulationInputs.from_puf_arrays(arrays) + outputs = simulate_qbi_inputs( + inputs, + assumptions=resolved_assumptions, + qbi_simulation_version=qbi_simulation_version, + sstb_crosswalk=sstb_crosswalk, + ) + result: dict[str, Sequence[Any]] = dict(arrays) + result[_NON_SSTB_SELF_EMPLOYMENT_SOURCE] = np.where( + outputs["business_is_sstb"], + 0.0, + inputs.self_employment_income, + ) + result.update(outputs) + return result + + +def qbi_simulation_summary( + outputs: Mapping[str, Sequence[Any]], + *, + weights: Sequence[float] | None = None, +) -> dict[str, dict[str, float | int]]: + """Return aggregate-only distribution diagnostics for all 15 leaves.""" + + missing = [column for column in US_QBI_OUTPUT_COLUMNS if column not in outputs] + if missing: + raise ValueError(f"QBI simulation summary missing output(s): {missing}.") + first = np.asarray(outputs[US_QBI_OUTPUT_COLUMNS[0]]) + resolved_weights = ( + np.ones(len(first), dtype=np.float64) + if weights is None + else np.asarray(weights, dtype=np.float64) + ) + if resolved_weights.ndim != 1 or len(resolved_weights) != len(first): + raise ValueError("QBI summary weights must align one-for-one with outputs.") + if np.any(~np.isfinite(resolved_weights)) or np.any(resolved_weights < 0.0): + raise ValueError("QBI summary weights must be finite and nonnegative.") + total_weight = float(resolved_weights.sum()) + summary: dict[str, dict[str, float | int]] = {} + for column in US_QBI_OUTPUT_COLUMNS: + values = np.asarray(outputs[column], dtype=np.float64) + if values.ndim != 1 or len(values) != len(first): + raise ValueError(f"QBI summary output {column!r} has the wrong shape.") + finite = np.isfinite(values) + nonzero = finite & (values != 0.0) + nonzero_weight = float(resolved_weights[nonzero].sum()) + summary[column] = { + "nonzero_rows": int(np.count_nonzero(nonzero)), + "nonzero_share": ( + nonzero_weight / total_weight if total_weight > 0.0 else 0.0 + ), + "weighted_mean": ( + float(np.sum(np.where(finite, values, 0.0) * resolved_weights)) + / total_weight + if total_weight > 0.0 + else 0.0 + ), + "nonfinite": int(np.count_nonzero(~finite)), + "negative": int(np.count_nonzero(finite & (values < 0.0))), + } + return summary + + +def resolve_sstb_crosswalk( + assumptions: QbiSimulationAssumptionsV2 | QbiSimulationAssumptionsV3, + crosswalk: SstbCrosswalk | Mapping[str, Any] | None, +) -> SstbCrosswalk: + resolved = ( + load_sstb_crosswalk(assumptions.sstb_classification.crosswalk_resource) + if crosswalk is None + else ( + crosswalk + if isinstance(crosswalk, SstbCrosswalk) + else parse_sstb_crosswalk(crosswalk) + ) + ) + resolved.validate() + return resolved + + +def _derive_v2_qualification_flags( + inputs: QbiSimulationInputs, + *, + assumptions: QbiSimulationAssumptionsV2 | QbiSimulationAssumptionsV3, +) -> tuple[np.ndarray, ...]: + rng = _rng(assumptions.qualification_seed, assumptions.bit_generator) + flags: list[np.ndarray] = [] + for derivation in assumptions.qualification_derivations: + if derivation.mode == "derived": + flags.append(inputs.source(derivation.source) != 0.0) + continue + if derivation.prior_probability is None: + raise ValueError( + f"QBI prior source {derivation.source!r} lacks a probability." + ) + flags.append(rng.random(inputs.n) < derivation.prior_probability) + return tuple(flags) + + +def simulate_qbi_v3_wage_capital( + inputs: QbiSimulationInputs, + *, + assumptions: QbiSimulationAssumptionsV3, + qualification_flags: tuple[np.ndarray, ...] | None = None, +) -> QbiV3WageCapitalResult: + """Run the evidence-based v3 wage/capital families with diagnostics.""" + + assumptions.validate() + resolved_flags = ( + _derive_v2_qualification_flags(inputs, assumptions=assumptions) + if qualification_flags is None + else _validated_qualification_flags( + qualification_flags, + source_count=len(assumptions.source_order), + n=inputs.n, + ) + ) + qualified_components = _qualified_components( + inputs, + source_order=assumptions.source_order, + qualification_flags=resolved_flags, + ) + qbi = qualified_components.sum(axis=1) + positive_qbi = qbi > 0.0 + + entity_draw = _rng( + assumptions.entity_split_seed, + assumptions.bit_generator, + ).random(inputs.n) + passthrough_index = assumptions.source_order.index(assumptions.passthrough_source) + has_positive_passthrough = qualified_components[:, passthrough_index] > 0.0 + partnership = ( + positive_qbi + & has_positive_passthrough + & (entity_draw < assumptions.partnership_probability) + ) + s_corporation = positive_qbi & has_positive_passthrough & ~partnership + sole_proprietorship = positive_qbi & ~has_positive_passthrough + legal_form = np.full(inputs.n, "none", dtype=" 0.0), + ) + + # V3 persists the full SCF order, including a nonpositive donor band. + # Positive-QBI simulation records therefore occupy indices 1 through 5. + income_band_index = 1 + np.searchsorted( + np.asarray((25_000.0, 100_000.0, 250_000.0, 1_000_000.0)), + qbi, + side="left", + ) + employee_probability = np.zeros(inputs.n, dtype=np.float64) + for legal_form_name in assumptions.form_order: + mask = legal_form == legal_form_name + if not np.any(mask): + continue + form = form_by_name[legal_form_name] + base_probability = np.asarray( + form.employer_base_probabilities, + dtype=np.float64, + )[income_band_index[mask]] + base_log_odds = np.log(base_probability / (1.0 - base_probability)) + employee_probability[mask] = _logistic( + base_log_odds + form.employer_log_odds_shift + ) + employer_draw = _rng( + assumptions.employer_gate_seed, + assumptions.bit_generator, + ).random(inputs.n) + has_employees = positive_qbi & (employer_draw < employee_probability) + w2_wages = receipts * wage_share * has_employees + + ubia_standard_normal = _rng( + assumptions.ubia_dispersion_seed, + assumptions.bit_generator, + ).standard_normal(inputs.n) + ubia_dispersion = np.ones(inputs.n, dtype=np.float64) + for legal_form_name in assumptions.form_order: + mask = legal_form == legal_form_name + if not np.any(mask): + continue + sigma = form_by_name[legal_form_name].ubia_sigma + ubia_dispersion[mask] = np.exp( + sigma * ubia_standard_normal[mask] - (sigma**2 / 2.0) + ) + ubia = receipts * ubia_intensity * ubia_dispersion + return QbiV3WageCapitalResult( + w2_wages=w2_wages, + ubia=ubia, + positive_qbi=positive_qbi, + legal_form=legal_form, + has_employees=has_employees, + receipts=receipts, + ) + + +def _validated_qualification_flags( + qualification_flags: tuple[np.ndarray, ...], + *, + source_count: int, + n: int, +) -> tuple[np.ndarray, ...]: + if len(qualification_flags) != source_count: + raise ValueError( + "QBI v3 qualification flags must align one-for-one with source_order." + ) + result: list[np.ndarray] = [] + for values in qualification_flags: + flag = np.asarray(values, dtype=bool) + if flag.ndim != 1 or len(flag) != n: + raise ValueError( + f"QBI v3 qualification flags must be one-dimensional length {n}." + ) + result.append(flag) + return tuple(result) + + +def _qualified_components( + inputs: QbiSimulationInputs, + *, + source_order: tuple[str, ...], + qualification_flags: tuple[np.ndarray, ...], +) -> np.ndarray: + return np.column_stack( + [ + inputs.source(source) * qualified + for source, qualified in zip( + source_order, + qualification_flags, + strict=True, + ) + ] + ) + + +def _simulate_w2_and_ubia( + qualified_components: np.ndarray, + *, + assumptions: QbiSimulationAssumptions, + rng: np.random.Generator, +) -> tuple[np.ndarray, np.ndarray]: + qbi = qualified_components.sum(axis=1) + margins = _draw_source_weighted_beta( + qualified_components, + assumptions.profit_margin_parameters, + rng, + ) + revenues = np.divide( + np.maximum(qbi, 0.0), + margins, + out=np.zeros_like(qbi, dtype=np.float64), + where=margins > 0.0, + ) + intercept = _calibrate_logit_intercept( + revenues, + slope=assumptions.has_employees_slope_per_dollar, + target_share=assumptions.has_employees_target_share, + iterations=assumptions.intercept_bisection_iterations, + ) + employee_probability = np.where( + revenues == 0.0, + 0.0, + _logistic(intercept + assumptions.has_employees_slope_per_dollar * revenues), + ) + has_employees = rng.binomial(n=1, p=employee_probability) + labor_ratios = _draw_source_weighted_beta( + qualified_components, + assumptions.labor_ratio_parameters, + rng, + ) + w2_wages = revenues * labor_ratios * has_employees + + capital_probability = np.clip( + _source_weighted_parameter( + qualified_components, + assumptions.capital_intensity_probabilities, + ), + 0.0, + 1.0, + ) + is_capital_intensive = rng.binomial(n=1, p=capital_probability).astype(bool) + ubia_multiple = _source_weighted_parameter( + qualified_components, + assumptions.ubia_multiples, + ) + target_mean = ubia_multiple * np.maximum(qbi, 0.0) + eligible = is_capital_intensive & (target_mean > 0.0) + safe_target_mean = np.where(target_mean > 0.0, target_mean, 1.0) + mu = np.log(safe_target_mean) - (assumptions.ubia_sigma**2 / 2.0) + ubia = np.where( + eligible, + rng.lognormal(mean=mu, sigma=assumptions.ubia_sigma), + 0.0, + ) + return w2_wages, ubia + + +def _simulate_w2( + qualified_components: np.ndarray, + *, + assumptions: QbiSimulationAssumptionsV2, + rng: np.random.Generator, +) -> np.ndarray: + qbi = qualified_components.sum(axis=1) + margins = _draw_source_weighted_beta( + qualified_components, + assumptions.profit_margin_parameters, + rng, + ) + revenues = np.divide( + np.maximum(qbi, 0.0), + margins, + out=np.zeros_like(qbi, dtype=np.float64), + where=margins > 0.0, + ) + intercept = _calibrate_logit_intercept( + revenues, + slope=assumptions.has_employees_slope_per_dollar, + target_share=assumptions.has_employees_target_share, + iterations=assumptions.intercept_bisection_iterations, + ) + employee_probability = np.where( + revenues == 0.0, + 0.0, + _logistic(intercept + assumptions.has_employees_slope_per_dollar * revenues), + ) + has_employees = rng.binomial(n=1, p=employee_probability) + labor_ratios = _draw_source_weighted_beta( + qualified_components, + assumptions.labor_ratio_parameters, + rng, + ) + return revenues * labor_ratios * has_employees + + +def _simulate_ubia( + qualified_components: np.ndarray, + *, + assumptions: QbiSimulationAssumptionsV2, + rng: np.random.Generator, +) -> np.ndarray: + qbi = qualified_components.sum(axis=1) + capital_probability = np.clip( + _source_weighted_parameter( + qualified_components, + assumptions.capital_intensity_probabilities, + ), + 0.0, + 1.0, + ) + is_capital_intensive = rng.binomial(n=1, p=capital_probability).astype(bool) + ubia_multiple = _source_weighted_parameter( + qualified_components, + assumptions.ubia_multiples, + ) + target_mean = ubia_multiple * np.maximum(qbi, 0.0) + eligible = is_capital_intensive & (target_mean > 0.0) + safe_target_mean = np.where(target_mean > 0.0, target_mean, 1.0) + mu = np.log(safe_target_mean) - (assumptions.ubia_sigma**2 / 2.0) + return np.where( + eligible, + rng.lognormal(mean=mu, sigma=assumptions.ubia_sigma), + 0.0, + ) + + +def _simulate_business_is_sstb( + inputs: QbiSimulationInputs, + *, + qualification_flags: Mapping[str, np.ndarray], + assumptions: QbiSimulationAssumptions, + rng: np.random.Generator, +) -> np.ndarray: + sources = np.column_stack( + [ + np.maximum(inputs.source(source), 0.0) * qualification_flags[source] + for source in assumptions.sstb_source_order + ] + ) + has_sstb_source = sources.sum(axis=1) > 0.0 + largest_source = np.argmax(sources, axis=1) + probabilities = np.asarray(assumptions.sstb_probabilities)[largest_source] + probabilities = np.where(has_sstb_source, probabilities, 0.0) + return rng.binomial(n=1, p=probabilities).astype(bool) + + +def _simulate_investment_qbi( + inputs: QbiSimulationInputs, + *, + assumptions: ( + QbiSimulationAssumptions + | QbiSimulationAssumptionsV2 + | QbiSimulationAssumptionsV3 + ), + rng: np.random.Generator, +) -> tuple[np.ndarray, np.ndarray]: + exposure_bases = { + "non_qualified_dividend_income": inputs.non_qualified_dividend_income, + "partnership_s_corp_income": inputs.partnership_s_corp_income, + } + qualified_reit_and_ptp_income = np.zeros(inputs.n, dtype=np.float64) + for exposure in assumptions.reit_ptp_exposures: + qualified_reit_and_ptp_income += _sample_exposure_scaled_beta( + exposure_bases[exposure.source], + exposure, + rng, + ) + qualified_bdc_income = np.zeros(inputs.n, dtype=np.float64) + for exposure in assumptions.bdc_exposures: + qualified_bdc_income += _sample_exposure_scaled_beta( + exposure_bases[exposure.source], + exposure, + rng, + ) + return qualified_reit_and_ptp_income, qualified_bdc_income + + +def _sample_exposure_scaled_beta( + base: np.ndarray, + parameters: ExposureBetaParameters, + rng: np.random.Generator, +) -> np.ndarray: + positive_base = np.maximum(np.asarray(base, dtype=np.float64), 0.0) + receives = (positive_base > 0.0) & ( + rng.random(len(positive_base)) < parameters.probability_of_receiving + ) + share = ( + rng.beta( + parameters.beta.beta_a, + parameters.beta.beta_b, + len(positive_base), + ) + * parameters.beta.scale + + parameters.beta.shift + ) + share = np.clip(share, 0.0, 1.0) + return np.where(receives, positive_base * share, 0.0) + + +def _draw_source_weighted_beta( + qualified_components: np.ndarray, + parameters: tuple[BetaParameters, ...], + rng: np.random.Generator, +) -> np.ndarray: + positive_components = np.maximum(qualified_components, 0.0) + positive_total = positive_components.sum(axis=1) + weighted_draw = np.zeros(len(qualified_components), dtype=np.float64) + for index, parameter in enumerate(parameters): + draw = ( + rng.beta( + parameter.beta_a, + parameter.beta_b, + len(qualified_components), + ) + * parameter.scale + + parameter.shift + ) + weighted_draw += positive_components[:, index] * draw + return np.divide( + weighted_draw, + positive_total, + out=np.zeros_like(positive_total, dtype=np.float64), + where=positive_total > 0.0, + ) + + +def _source_weighted_parameter( + qualified_components: np.ndarray, + parameters: tuple[float, ...], +) -> np.ndarray: + positive_components = np.maximum(qualified_components, 0.0) + positive_total = positive_components.sum(axis=1) + weighted_value = np.zeros(len(qualified_components), dtype=np.float64) + for index, value in enumerate(parameters): + weighted_value += positive_components[:, index] * value + return np.divide( + weighted_value, + positive_total, + out=np.zeros_like(positive_total, dtype=np.float64), + where=positive_total > 0.0, + ) + + +def _calibrate_logit_intercept( + revenues: np.ndarray, + *, + slope: float, + target_share: float, + iterations: int, +) -> float: + positive = revenues > 0.0 + if not np.any(positive): + return 0.0 + clipped_target = np.clip(float(target_share), 1e-9, 1.0 - 1e-9) + slope_term = float(slope) * revenues[positive] + target_logit = np.log(clipped_target / (1.0 - clipped_target)) + lower = target_logit - np.max(slope_term) - 80.0 + upper = target_logit - np.min(slope_term) + 80.0 + for _ in range(iterations): + midpoint = (lower + upper) / 2.0 + mean_probability = _logistic(midpoint + slope_term).mean() + if mean_probability < clipped_target: + lower = midpoint + else: + upper = midpoint + return (lower + upper) / 2.0 + + +def _logistic(values: np.ndarray) -> np.ndarray: + return 1.0 / (1.0 + np.exp(-np.clip(values, -700.0, 700.0))) + + +def _rng(seed: int, bit_generator: str) -> np.random.Generator: + if bit_generator != "PCG64": + raise ValueError(f"Unsupported QBI bit generator {bit_generator!r}.") + return np.random.default_rng(seed) + + +def _infer_person_length(arrays: Mapping[str, Sequence[Any]]) -> int: + candidates = ( + "person_tax_unit_id", + "person_id", + "self_employment_income", + "self_employment_income_before_lsr", + "E00900", + "partnership_s_corp_income", + "partnership_income", + "s_corp_income", + "farm_rent_income", + "rental_income", + "estate_income", + "non_qualified_dividend_income", + ) + for name in candidates: + if name not in arrays: + continue + values = np.asarray(arrays[name]) + if values.ndim == 1: + return len(values) + raise ValueError( + "QBI simulation cannot infer row count from the supplied PUF arrays." + ) + + +def _first_present( + arrays: Mapping[str, Sequence[Any]], + names: tuple[str, ...], +) -> str | None: + return next((name for name in names if name in arrays), None) + + +def _first_array( + arrays: Mapping[str, Sequence[Any]], + names: tuple[str, ...], + *, + n: int, +) -> np.ndarray | None: + name = _first_present(arrays, names) + return None if name is None else _array_or_zeros(arrays, name, n=n) + + +def _array_or_zeros( + arrays: Mapping[str, Sequence[Any]], + name: str | None, + *, + n: int, +) -> np.ndarray: + if name is None or name not in arrays: + return np.zeros(n, dtype=np.float64) + values = np.asarray(arrays[name], dtype=np.float64) + if values.ndim != 1 or len(values) != n: + raise ValueError( + f"QBI source {name!r} must be a one-dimensional array of length {n}." + ) + values = np.where(np.isnan(values), 0.0, values) + nonfinite = int(np.count_nonzero(~np.isfinite(values))) + if nonfinite: + raise ValueError(f"QBI source {name!r} has {nonfinite} infinite value(s).") + return values + + +def _difference_or_zeros( + arrays: Mapping[str, Sequence[Any]], + minuend: str, + subtrahend: str, + *, + n: int, +) -> np.ndarray: + if minuend not in arrays and subtrahend not in arrays: + return np.zeros(n, dtype=np.float64) + return _array_or_zeros(arrays, minuend, n=n) - _array_or_zeros( + arrays, subtrahend, n=n + ) + + +def _zeros_if_none(values: np.ndarray | None, n: int) -> np.ndarray: + return np.zeros(n, dtype=np.float64) if values is None else values + + +def _validate_probabilities(name: str, values: tuple[float, ...]) -> None: + if any(not 0.0 <= value <= 1.0 for value in values): + raise ValueError(f"QBI {name} must lie in [0, 1].") + + +def _validate_beta_parameters(name: str, parameters: BetaParameters) -> None: + if parameters.beta_a <= 0.0 or parameters.beta_b <= 0.0: + raise ValueError(f"QBI {name} beta shapes must be positive.") + if parameters.scale < 0.0: + raise ValueError(f"QBI {name} beta scale must be nonnegative.") + + +def _require_mapping(value: Any, label: str) -> Mapping[str, Any]: + if not isinstance(value, Mapping): + raise ValueError(f"{label} must be a mapping.") + return value + + +def _child_mapping(parent: Mapping[str, Any], key: str) -> Mapping[str, Any]: + return _require_mapping(parent.get(key), key) + + +def _string(value: Any, label: str) -> str: + if not isinstance(value, str) or not value: + raise ValueError(f"{label} must be a nonempty string.") + return value + + +def _string_tuple(value: Any, label: str) -> tuple[str, ...]: + if not isinstance(value, list) or not all( + isinstance(item, str) and item for item in value + ): + raise ValueError(f"{label} must be a list of nonempty strings.") + if len(value) != len(set(value)): + raise ValueError(f"{label} must not contain duplicates.") + return tuple(value) + + +def _number(value: Any, label: str) -> float: + if isinstance(value, bool) or not isinstance(value, (int, float)): + raise ValueError(f"{label} must be numeric.") + result = float(value) + if not np.isfinite(result): + raise ValueError(f"{label} must be finite.") + return result + + +def _number_tuple(value: Any, label: str) -> tuple[float, ...]: + if not isinstance(value, list): + raise ValueError(f"{label} must be a list of numbers.") + return tuple(_number(item, f"{label}[{index}]") for index, item in enumerate(value)) + + +def _integer(value: Any, label: str) -> int: + if isinstance(value, bool) or not isinstance(value, int): + raise ValueError(f"{label} must be an integer.") + return value + + +def _boolean(value: Any, label: str) -> bool: + if not isinstance(value, bool): + raise ValueError(f"{label} must be boolean.") + return value + + +def _optional_string(value: Any, label: str) -> str | None: + if value is None: + return None + return _string(value, label) + + +def _validate_v3_finite_values(label: str, values: Sequence[float]) -> None: + """Reject non-finite public v3 dataclass inputs with a field-level error.""" + + try: + all_finite = all(np.isfinite(value) for value in values) + except TypeError as error: + raise ValueError(f"QBI v3 {label} must be finite numbers.") from error + if not all_finite: + raise ValueError(f"QBI v3 {label} must be finite.") + + +def _validate_v3_finite_assumption_values( + assumptions: QbiSimulationAssumptionsV3, +) -> None: + """Require every v3 float field to be finite except the AGI sentinels.""" + + for derivation in assumptions.qualification_derivations: + if derivation.prior_probability is not None: + _validate_v3_finite_values( + f"qualification prior for {derivation.source!r}", + (derivation.prior_probability,), + ) + + classification = assumptions.sstb_classification + _validate_v3_finite_values( + "ambiguous SSTB prior", + (classification.ambiguous_prior,), + ) + bands = classification.passive_passthrough_sstb_prior_by_agi + for index, band in enumerate(bands): + _validate_v3_finite_values( + f"passive SSTB AGI prior {band.label!r}", + (band.probability,), + ) + # The first lower and last upper endpoints are deliberate -inf/+inf + # all-AGI sentinels. Every other endpoint must be an ordinary float. + interior_endpoints = (() if index == 0 else (band.lower,)) + ( + () if index == len(bands) - 1 else (band.upper,) + ) + _validate_v3_finite_values( + f"passive SSTB AGI band {band.label!r} interior endpoints", + interior_endpoints, + ) + + _validate_v3_finite_values( + "passthrough entity probabilities", + ( + assumptions.partnership_probability, + assumptions.s_corporation_probability, + ), + ) + _validate_v3_finite_values( + "overall zero-employee values", + ( + assumptions.overall_zero_employee_target, + assumptions.expected_overall_zero_employee_share, + ), + ) + _validate_v3_finite_values( + "margin probabilities", + assumptions.margin_probabilities, + ) + + for form in assumptions.forms: + form_label = form.legal_form + _validate_v3_finite_values( + f"{form_label} receipts metadata", + ( + form.eligible_receipts_thousands, + form.all_industry_receipts_thousands, + form.receipts_coverage, + ), + ) + for component in form.industry_components: + _validate_v3_finite_values( + f"{form_label} industry component {component.industry_key!r}", + ( + component.probability, + component.wage_share, + component.ubia_intensity, + ), + ) + _validate_v3_finite_values( + f"{form_label} employer base probabilities", + form.employer_base_probabilities, + ) + _validate_v3_finite_values( + f"{form_label} zero-employee values", + ( + form.zero_employee_target, + form.expected_zero_employee_share, + ), + ) + _validate_v3_finite_values( + f"{form_label} employer log-odds shift", + (form.employer_log_odds_shift,), + ) + _validate_v3_finite_values( + f"{form_label} margin quantiles", + form.margin_quantiles, + ) + _validate_v3_finite_values( + f"{form_label} UBIA dispersion metadata", + ( + form.ubia_log_intensity_sd, + form.ubia_effective_industry_count, + form.ubia_sigma, + ), + ) + + _validate_v3_finite_values( + "W-2 plausibility band", + ( + assumptions.wage_plausibility_band.lower_dollars, + assumptions.wage_plausibility_band.upper_dollars, + ), + ) + for name, anchor in ( + ("REIT/PTP", assumptions.reit_ptp_anchor), + ("BDC", assumptions.bdc_anchor), + ): + anchor_values = [ + value + for value in ( + anchor.published_income_dollars, + anchor.published_component_dollars, + anchor.comparison_component_2022_dollars, + ) + if value is not None + ] + if anchor.replay_factor_band is not None: + anchor_values.extend(anchor.replay_factor_band) + _validate_v3_finite_values(f"{name} aggregate anchor", anchor_values) + + for name, exposures in ( + ("REIT/PTP", assumptions.reit_ptp_exposures), + ("BDC", assumptions.bdc_exposures), + ): + for exposure in exposures: + _validate_v3_finite_values( + f"{name} receipt probability for {exposure.source!r}", + (exposure.probability_of_receiving,), + ) + _validate_v3_finite_values( + f"{name} beta parameters for {exposure.source!r}", + ( + exposure.beta.beta_a, + exposure.beta.beta_b, + exposure.beta.scale, + exposure.beta.shift, + ), + ) + + +def _validate_v3_assumptions(assumptions: QbiSimulationAssumptionsV3) -> None: + if assumptions.schema_version != 3: + raise ValueError( + "Unsupported QBI v3 assumptions schema_version " + f"{assumptions.schema_version!r}." + ) + if assumptions.qbi_simulation_version != QBI_SIMULATION_V3: + raise ValueError( + "QBI v3 assumptions carry unsupported qbi_simulation_version " + f"{assumptions.qbi_simulation_version!r}." + ) + if assumptions.engine != _V3_ENGINE: + raise ValueError( + f"QBI v3 engine must be {_V3_ENGINE!r}, got {assumptions.engine!r}." + ) + if assumptions.bit_generator != "PCG64": + raise ValueError("QBI v3 requires NumPy PCG64 family streams.") + if assumptions.source_order != QBI_SIMULATION_SOURCE_NAMES: + raise ValueError( + "QBI v3 source_order must preserve the engine order " + f"{QBI_SIMULATION_SOURCE_NAMES!r}, got {assumptions.source_order!r}." + ) + family_seeds = { + "qualification": assumptions.qualification_seed, + "sstb": assumptions.sstb_seed, + "investment": assumptions.investment_seed, + "entity_split": assumptions.entity_split_seed, + "latent_industry": assumptions.latent_industry_seed, + "employer_gate": assumptions.employer_gate_seed, + "margin_quantile": assumptions.margin_quantile_seed, + "ubia_dispersion": assumptions.ubia_dispersion_seed, + } + if any(seed < 0 for seed in family_seeds.values()): + raise ValueError("QBI v3 family seeds must be nonnegative integers.") + if len(set(family_seeds.values())) != len(family_seeds): + raise ValueError("QBI v3 family seeds must be distinct.") + if ( + assumptions.qualification_seed, + assumptions.sstb_seed, + assumptions.investment_seed, + ) != (2041, 2064, 2043): + raise ValueError( + "QBI v3 must retain the exact v2 qualification, SSTB, and " + "investment family seeds." + ) + _validate_v3_finite_assumption_values(assumptions) + + derivation_sources = tuple( + derivation.source for derivation in assumptions.qualification_derivations + ) + if derivation_sources != assumptions.source_order: + raise ValueError("QBI v3 qualification derivations must follow source_order.") + for derivation in assumptions.qualification_derivations: + if derivation.mode not in _V2_QUALIFICATION_MODES: + raise ValueError( + "Unknown QBI v3 qualification mode " + f"{derivation.mode!r} for {derivation.source!r}." + ) + if not derivation.rationale.strip(): + raise ValueError( + f"QBI v3 qualification rationale for " + f"{derivation.source!r} must be nonempty." + ) + if derivation.mode == "derived": + if derivation.prior_probability is not None: + raise ValueError( + f"Derived QBI source {derivation.source!r} must not " + "declare a prior." + ) + elif derivation.prior_probability is None: + raise ValueError( + f"Prior-mode QBI source {derivation.source!r} must declare " + "a probability." + ) + else: + _validate_probabilities( + f"qualification prior for {derivation.source!r}", + (derivation.prior_probability,), + ) + + classification = assumptions.sstb_classification + if classification.mode != _V2_SSTB_CLASSIFICATION_MODE: + raise ValueError( + f"Unknown QBI v3 SSTB classification mode {classification.mode!r}." + ) + if not classification.crosswalk_resource.endswith(".json"): + raise ValueError("QBI v3 SSTB crosswalk_resource must name a JSON file.") + if "/" in classification.crosswalk_resource: + raise ValueError("QBI v3 SSTB crosswalk_resource must be a package basename.") + if classification.industry_column == classification.occupation_column: + raise ValueError( + "QBI v3 SSTB industry and occupation columns must be distinct." + ) + _validate_probabilities( + "ambiguous SSTB prior", + (classification.ambiguous_prior,), + ) + if classification.agi_band_format != "lower_inclusive:upper_exclusive": + raise ValueError("Unsupported QBI v3 AGI band format.") + _validate_agi_prior_bands(classification.passive_passthrough_sstb_prior_by_agi) + + for resource_name in ( + assumptions.employer_structure_resource, + assumptions.wage_capital_resource, + ): + if not resource_name.endswith(".json") or "/" in resource_name: + raise ValueError( + "QBI v3 evidence resources must be package JSON basenames." + ) + if assumptions.form_order != _V3_LEGAL_FORMS: + raise ValueError(f"QBI v3 form_order must be {_V3_LEGAL_FORMS!r}.") + if assumptions.sole_proprietorship_sources != assumptions.source_order[:-1]: + raise ValueError( + "QBI v3 sole-proprietorship sources must be the first five " + "source_order entries." + ) + if assumptions.passthrough_source != assumptions.source_order[-1]: + raise ValueError( + "QBI v3 passthrough source must be the final source_order entry." + ) + if not np.isclose( + assumptions.partnership_probability, + _V3_PARTNERSHIP_PROBABILITY, + rtol=0.0, + atol=1e-15, + ): + raise ValueError("QBI v3 partnership probability must equal 17 / 70.") + if not np.isclose( + assumptions.s_corporation_probability, + _V3_S_CORPORATION_PROBABILITY, + rtol=0.0, + atol=1e-15, + ): + raise ValueError("QBI v3 S-corporation probability must equal 53 / 70.") + if not np.isclose( + assumptions.partnership_probability + assumptions.s_corporation_probability, + 1.0, + rtol=0.0, + atol=1e-15, + ): + raise ValueError("QBI v3 passthrough entity probabilities must sum to one.") + if assumptions.income_band_order != _V3_INCOME_BANDS: + raise ValueError( + "QBI v3 employer income bands must preserve the complete SCF order." + ) + _validate_probabilities( + "overall zero-employee target", + (assumptions.overall_zero_employee_target,), + ) + _validate_probabilities( + "expected overall zero-employee share", + (assumptions.expected_overall_zero_employee_share,), + ) + if ( + abs( + assumptions.expected_overall_zero_employee_share + - assumptions.overall_zero_employee_target + ) + > 0.02 + ): + raise ValueError( + "QBI v3 expected overall zero-employee share misses its target by " + "more than two percentage points." + ) + if assumptions.margin_probabilities != _V3_MARGIN_PROBABILITIES: + raise ValueError( + "QBI v3 margin probabilities must preserve the SCF five-point grid." + ) + expected_models = { + "industry": "receipts_weighted_finest_classified_soi_rows", + "employer": "scf_income_form_log_odds_shift", + "margin": "scf_form_empirical_inverse_cdf", + "margin interpolation": "piecewise_linear_with_endpoint_clamp", + "w2": "employer_gate_soi_wage_share_times_receipts", + "ubia": "soi_industry_intensity_times_receipts_mean_one_lognormal", + "investment": _SUPPORTED_MODEL_KINDS["investment"], + } + observed_models = { + "industry": assumptions.industry_model, + "employer": assumptions.employer_model, + "margin": assumptions.margin_model, + "margin interpolation": assumptions.margin_interpolation, + "w2": assumptions.w2_model, + "ubia": assumptions.ubia_model, + "investment": assumptions.investment_model, + } + for family, expected in expected_models.items(): + if observed_models[family] != expected: + raise ValueError( + f"QBI v3 {family} model must be {expected!r}, " + f"got {observed_models[family]!r}." + ) + + form_names = tuple(form.legal_form for form in assumptions.forms) + if form_names != assumptions.form_order: + raise ValueError("QBI v3 form assumptions must follow form_order.") + for form in assumptions.forms: + if form.tax_year <= 0: + raise ValueError(f"QBI v3 {form.legal_form} tax year must be positive.") + if not form.scf_legal_form_group: + raise ValueError( + f"QBI v3 {form.legal_form} SCF legal-form group must be nonempty." + ) + if ( + form.eligible_receipts_thousands <= 0.0 + or form.all_industry_receipts_thousands <= 0.0 + or not 0.0 < form.receipts_coverage <= 1.0 + ): + raise ValueError(f"QBI v3 {form.legal_form} receipts metadata is invalid.") + if not form.industry_components: + raise ValueError( + f"QBI v3 {form.legal_form} industry mixture must be nonempty." + ) + component_keys = tuple( + component.industry_key for component in form.industry_components + ) + if len(component_keys) != len(set(component_keys)): + raise ValueError(f"QBI v3 {form.legal_form} industry keys must be unique.") + probabilities = tuple( + component.probability for component in form.industry_components + ) + if any(probability <= 0.0 for probability in probabilities) or not np.isclose( + sum(probabilities), + 1.0, + rtol=0.0, + atol=1e-12, + ): + raise ValueError( + f"QBI v3 {form.legal_form} industry probabilities must be " + "positive and sum to one." + ) + for component in form.industry_components: + if component.wage_share < 0.0 or component.ubia_intensity < 0.0: + raise ValueError( + f"QBI v3 {form.legal_form} wage and UBIA intensities " + "must be nonnegative." + ) + if ( + component.proxy != form.proxy + or component.capital_measure != form.capital_measure + ): + raise ValueError( + f"QBI v3 {form.legal_form} industry metadata disagrees " + "with its form." + ) + if len(form.employer_base_probabilities) != len( + assumptions.income_band_order + ) or any( + not 0.0 < probability < 1.0 + for probability in form.employer_base_probabilities + ): + raise ValueError( + f"QBI v3 {form.legal_form} employer base probabilities " + "must align to the SCF income bands and lie in (0, 1)." + ) + _validate_probabilities( + f"{form.legal_form} zero-employee target", + (form.zero_employee_target, form.expected_zero_employee_share), + ) + if abs(form.expected_zero_employee_share - form.zero_employee_target) > 0.02: + raise ValueError( + f"QBI v3 {form.legal_form} expected zero-employee share " + "misses its target by more than two percentage points." + ) + if ( + len(form.margin_quantiles) != len(assumptions.margin_probabilities) + or any(value <= 0.0 for value in form.margin_quantiles) + or any( + right < left + for left, right in zip( + form.margin_quantiles, + form.margin_quantiles[1:], + strict=False, + ) + ) + ): + raise ValueError( + f"QBI v3 {form.legal_form} margin quantiles must be positive, " + "ordered, and align to the probability grid." + ) + if ( + form.ubia_log_intensity_sd < 0.0 + or form.ubia_effective_industry_count <= 0.0 + or form.ubia_sigma < 0.0 + ): + raise ValueError( + f"QBI v3 {form.legal_form} UBIA dispersion metadata is invalid." + ) + + band = assumptions.wage_plausibility_band + if ( + band.lower_dollars < 0.0 + or band.upper_dollars < band.lower_dollars + or not band.rationale.strip() + ): + raise ValueError("QBI v3 W-2 plausibility band is invalid.") + for name, exposures in ( + ("REIT/PTP", assumptions.reit_ptp_exposures), + ("BDC", assumptions.bdc_exposures), + ): + for exposure in exposures: + if not 0.0 <= exposure.probability_of_receiving <= 1.0: + raise ValueError( + f"QBI {name} receipt probability for {exposure.source!r} " + "must lie in [0, 1]." + ) + _validate_beta_parameters(name, exposure.beta) + assumptions.reit_ptp_anchor.validate("REIT/PTP") + assumptions.bdc_anchor.validate("BDC") + + +def _validate_v2_payload_keys(root: Mapping[str, Any]) -> None: + """Require every v2 object to match the complete declared schema.""" + + _require_exact_keys( + root, + ( + "schema_version", + "qbi_simulation_version", + "engine", + "rng", + "source_order", + "qualification_derivations", + "sstb_classification", + "w2", + "ubia", + "investment", + ), + "QBI v2 assumptions", + ) + rng = _child_mapping(root, "rng") + _require_exact_keys(rng, ("bit_generator", "seeds"), "rng") + _require_exact_keys( + _child_mapping(rng, "seeds"), + ("qualification", "sstb", "w2", "ubia", "investment"), + "rng.seeds", + ) + + source_order = _string_tuple(root.get("source_order"), "source_order") + derivations = _child_mapping(root, "qualification_derivations") + _require_exact_keys( + derivations, + source_order, + "qualification_derivations", + ) + for source in source_order: + label = f"qualification_derivations.{source}" + entry = _require_mapping(derivations[source], label) + _require_exact_keys(entry, ("mode", "prior", "rationale"), label) + prior = entry.get("prior") + if prior is not None: + _require_exact_keys( + _require_mapping(prior, f"{label}.prior"), + ("probability",), + f"{label}.prior", + ) + + classification = _child_mapping(root, "sstb_classification") + _require_exact_keys( + classification, + ( + "mode", + "crosswalk_resource", + "occupation_column", + "industry_column", + "agi_column", + "ambiguous_prior", + "ambiguous_prior_status", + "agi_band_format", + "passive_passthrough_sstb_prior_by_agi", + "passive_passthrough_prior_status", + "rationale", + "follow_up", + ), + "sstb_classification", + ) + + w2 = _child_mapping(root, "w2") + _require_exact_keys( + w2, + ( + "model", + "profit_margin_distribution", + "has_employees_logit", + "labor_ratio_distribution", + ), + "w2", + ) + _validate_strict_beta_mapping( + _child_mapping(w2, "profit_margin_distribution"), + source_order, + "w2.profit_margin_distribution", + ) + employee_logit = _child_mapping(w2, "has_employees_logit") + _require_exact_keys( + employee_logit, + ( + "slope_per_dollar", + "target_share_among_positive_receipts", + "intercept_bisection_iterations", + ), + "w2.has_employees_logit", + ) + _validate_strict_beta_mapping( + _child_mapping(w2, "labor_ratio_distribution"), + source_order, + "w2.labor_ratio_distribution", + ) + + ubia = _child_mapping(root, "ubia") + _require_exact_keys( + ubia, + ( + "model", + "sigma", + "multiple_of_qbi", + "capital_intensity_probabilities", + ), + "ubia", + ) + _require_exact_keys( + _child_mapping(ubia, "multiple_of_qbi"), + source_order, + "ubia.multiple_of_qbi", + ) + _require_exact_keys( + _child_mapping(ubia, "capital_intensity_probabilities"), + source_order, + "ubia.capital_intensity_probabilities", + ) + + investment = _child_mapping(root, "investment") + _require_exact_keys( + investment, + ( + "model", + "reit_ptp_anchor", + "reit_ptp_exposure_order", + "reit_ptp_income_distribution", + "bdc_anchor", + "bdc_exposure_order", + "bdc_income_distribution", + ), + "investment", + ) + reit_order = _string_tuple( + investment.get("reit_ptp_exposure_order"), + "investment.reit_ptp_exposure_order", + ) + bdc_order = _string_tuple( + investment.get("bdc_exposure_order"), + "investment.bdc_exposure_order", + ) + _validate_strict_exposure_mapping( + _child_mapping(investment, "reit_ptp_income_distribution"), + reit_order, + "investment.reit_ptp_income_distribution", + ) + _validate_strict_exposure_mapping( + _child_mapping(investment, "bdc_income_distribution"), + bdc_order, + "investment.bdc_income_distribution", + ) + + +def _validate_strict_beta_mapping( + values: Mapping[str, Any], + order: tuple[str, ...], + label: str, +) -> None: + _require_exact_keys(values, order, label) + for source in order: + _require_exact_keys( + _require_mapping(values[source], f"{label}.{source}"), + ("beta_a", "beta_b", "scale", "shift"), + f"{label}.{source}", + ) + + +def _validate_strict_exposure_mapping( + values: Mapping[str, Any], + order: tuple[str, ...], + label: str, +) -> None: + _require_exact_keys(values, order, label) + for source in order: + _require_exact_keys( + _require_mapping(values[source], f"{label}.{source}"), + ( + "probability_of_receiving", + "beta_a", + "beta_b", + "scale", + "shift", + ), + f"{label}.{source}", + ) + + +def _parse_aggregate_evidence_anchor( + values: Mapping[str, Any], + label: str, +) -> AggregateEvidenceAnchor: + _require_exact_keys( + values, + ( + "provisional", + "published_income_dollars", + "published_component_dollars", + "comparison_component_2022_dollars", + "replay_factor_band", + "rationale", + ), + label, + ) + raw_band = values.get("replay_factor_band") + factor_band: tuple[float, float] | None = None + if raw_band is not None: + if not isinstance(raw_band, list) or len(raw_band) != 2: + raise ValueError(f"{label}.replay_factor_band must be null or [low, high].") + factor_band = ( + _number(raw_band[0], f"{label}.replay_factor_band[0]"), + _number(raw_band[1], f"{label}.replay_factor_band[1]"), + ) + + def optional_number(key: str) -> float | None: + value = values.get(key) + return None if value is None else _number(value, f"{label}.{key}") + + anchor = AggregateEvidenceAnchor( + provisional=values.get("provisional"), + published_income_dollars=optional_number("published_income_dollars"), + published_component_dollars=optional_number("published_component_dollars"), + comparison_component_2022_dollars=optional_number( + "comparison_component_2022_dollars" + ), + replay_factor_band=factor_band, + rationale=_string(values.get("rationale"), f"{label}.rationale"), + ) + anchor.validate(label) + return anchor + + +def _parse_agi_prior_bands( + values: Mapping[str, Any], +) -> tuple[AgiSstbPriorBand, ...]: + if not values: + raise ValueError("QBI v2 passive SSTB AGI priors must not be empty.") + bands: list[AgiSstbPriorBand] = [] + for label, probability in values.items(): + if not isinstance(label, str) or label.count(":") != 1: + raise ValueError( + "QBI v2 passive SSTB AGI band names must use 'lower:upper' syntax." + ) + lower_label, upper_label = label.split(":") + lower = _parse_band_endpoint(lower_label, f"{label} lower endpoint") + upper = _parse_band_endpoint(upper_label, f"{label} upper endpoint") + bands.append( + AgiSstbPriorBand( + label=label, + lower=lower, + upper=upper, + probability=_number( + probability, + ( + "sstb_classification." + f"passive_passthrough_sstb_prior_by_agi.{label}" + ), + ), + ) + ) + result = tuple(sorted(bands, key=lambda band: band.lower)) + _validate_agi_prior_bands(result) + return result + + +def _parse_band_endpoint(value: str, label: str) -> float: + if value == "-inf": + return float("-inf") + if value == "inf": + return float("inf") + try: + result = float(value) + except ValueError as error: + raise ValueError(f"QBI v2 AGI {label} must be numeric or infinite.") from error + if not np.isfinite(result): + raise ValueError(f"QBI v2 AGI {label} must use '-inf' or 'inf'.") + return result + + +def _validate_agi_prior_bands(bands: tuple[AgiSstbPriorBand, ...]) -> None: + if not bands: + raise ValueError("QBI v2 passive SSTB AGI priors must not be empty.") + if bands[0].lower != float("-inf") or bands[-1].upper != float("inf"): + raise ValueError("QBI v2 passive SSTB AGI priors must cover all AGI values.") + for index, band in enumerate(bands): + if band.lower >= band.upper: + raise ValueError(f"QBI v2 AGI band {band.label!r} is empty or reversed.") + _validate_probabilities( + f"passive SSTB AGI prior {band.label!r}", + (band.probability,), + ) + if index and bands[index - 1].upper != band.lower: + raise ValueError( + "QBI v2 passive SSTB AGI priors must be contiguous and non-overlapping." + ) + + +def _parse_crosswalk_entries( + value: Any, + *, + family: str, + classification_system_key: str, + categories: tuple[str, ...], +) -> tuple[SstbCrosswalkEntry, ...]: + label = f"SSTB crosswalk.{family}_2018" + if family == "industry": + label = "SSTB crosswalk.industry_2017" + if not isinstance(value, list) or not value: + raise ValueError(f"{label} must be a nonempty list.") + result: list[SstbCrosswalkEntry] = [] + for index, raw_entry in enumerate(value): + entry_label = f"{label}[{index}]" + entry = _require_mapping(raw_entry, entry_label) + classification = _string( + entry.get("classification"), + f"{entry_label}.classification", + ) + expected_keys = ( + "census_code", + "census_title", + classification_system_key, + "sstb_category", + "classification", + "probability", + "rationale", + ) + if classification == "ambiguous": + expected_keys += ("provisional", "basis") + _require_exact_keys(entry, expected_keys, entry_label) + raw_code = entry.get("census_code") + if ( + not isinstance(raw_code, str) + or len(raw_code) != 4 + or not raw_code.isdigit() + ): + raise ValueError(f"{entry_label}.census_code must use four decimal digits.") + _string(entry.get("census_title"), f"{entry_label}.census_title") + _string( + entry.get(classification_system_key), + f"{entry_label}.{classification_system_key}", + ) + entry_categories = _string_tuple( + entry.get("sstb_category"), + f"{entry_label}.sstb_category", + ) + unknown_categories = sorted(set(entry_categories) - set(categories)) + if unknown_categories: + raise ValueError( + f"{entry_label}.sstb_category has unknown value(s) " + f"{unknown_categories}." + ) + _string(entry.get("rationale"), f"{entry_label}.rationale") + result.append( + SstbCrosswalkEntry( + code=int(raw_code), + classification=classification, + probability=_number( + entry.get("probability"), + f"{entry_label}.probability", + ), + provisional=entry.get("provisional", False), + basis=( + _string(entry.get("basis"), f"{entry_label}.basis") + if "basis" in entry + else None + ), + ) + ) + return tuple(sorted(result, key=lambda entry: entry.code)) + + +def _validate_explicit_nonsstb_entries(value: Any, label: str) -> None: + if not isinstance(value, list) or not value: + raise ValueError(f"{label} must be a nonempty list.") + for index, raw_entry in enumerate(value): + entry_label = f"{label}[{index}]" + entry = _require_mapping(raw_entry, entry_label) + _require_exact_keys( + entry, + ("census_code", "census_title", "why", "probability"), + entry_label, + ) + for key in ("census_code", "census_title", "why"): + _string(entry.get(key), f"{entry_label}.{key}") + probability = _number( + entry.get("probability"), + f"{entry_label}.probability", + ) + if probability != 0.0: + raise ValueError( + f"{entry_label}.probability must be 0.0 for documented non-SSTB codes." + ) + + +def _ordered_scalars( + values: Mapping[str, Any], + order: tuple[str, ...], + label: str, +) -> tuple[float, ...]: + _require_exact_keys(values, order, label) + return tuple(_number(values[name], f"{label}.{name}") for name in order) + + +def _ordered_betas( + values: Mapping[str, Any], + order: tuple[str, ...], + label: str, +) -> tuple[BetaParameters, ...]: + _require_exact_keys(values, order, label) + return tuple( + _beta_parameters( + _require_mapping(values[name], f"{label}.{name}"), + f"{label}.{name}", + ) + for name in order + ) + + +def _ordered_exposures( + values: Mapping[str, Any], + order: tuple[str, ...], + label: str, +) -> tuple[ExposureBetaParameters, ...]: + _require_exact_keys(values, order, label) + exposures: list[ExposureBetaParameters] = [] + for source in order: + parameters = _require_mapping(values[source], f"{label}.{source}") + exposures.append( + ExposureBetaParameters( + source=source, + probability_of_receiving=_number( + parameters.get("probability_of_receiving"), + f"{label}.{source}.probability_of_receiving", + ), + beta=_beta_parameters(parameters, f"{label}.{source}"), + ) + ) + return tuple(exposures) + + +def _beta_parameters( + values: Mapping[str, Any], + label: str, +) -> BetaParameters: + return BetaParameters( + beta_a=_number(values.get("beta_a"), f"{label}.beta_a"), + beta_b=_number(values.get("beta_b"), f"{label}.beta_b"), + scale=_number(values.get("scale", 1.0), f"{label}.scale"), + shift=_number(values.get("shift", 0.0), f"{label}.shift"), + ) + + +def _require_exact_keys( + values: Mapping[str, Any], + order: tuple[str, ...], + label: str, +) -> None: + missing = sorted(set(order) - set(values)) + extra = sorted(set(values) - set(order)) + if missing or extra: + raise ValueError( + f"{label} keys must match its explicit order; " + f"missing={missing}, extra={extra}." + ) diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py new file mode 100644 index 000000000..afdc77f3c --- /dev/null +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py @@ -0,0 +1,552 @@ +"""Historical QBI stream isolation for the passive sibling stage.""" + +from __future__ import annotations + +import hashlib +import json +import sys +from contextlib import contextmanager +from pathlib import Path +from types import ModuleType +from typing import Any + +import numpy as np +import pandas as pd +import pytest + +from microcosm.build.us_runtime.qbi_inputs import US_QBI_OUTPUT_COLUMNS +from microcosm.build.us_runtime.qbi_passive_passthrough import ( + US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN, + with_us_qbi_passive_passthrough_assignment, +) +from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights + +_HISTORY_COMMIT = "cfbf6330493e9b2c1bf2b1e79fd4e0b0b181b184" +_HISTORY_FIXTURE_DIRECTORY = Path(__file__).parent / "fixtures/qbi_history" +_HISTORY_FIXTURE_SHA256 = { + "qbi_simulation.py.fixture": ( + "4bbc2fd6f2271b22d32120c7662647c759befe8bb5456995190053e68bcf1316" + ), + "qbi_inputs.py.fixture": ( + "fae18a126f4b84ff8e81ecf533a47795f5e3a1b7497e487045eb1ea430189c94" + ), + "qbi_assumptions_v1.json.fixture": ( + "2df48450ca4bb28f7ddad5f3b517b2052d1f75e988c8685e9d42fadc6e59d7c0" + ), + "qbi_assumptions_v2.json.fixture": ( + "2fabf4f4a0547418663546bc71106880f3dba0a7a23be81681659790b603ca1f" + ), + "qbi_assumptions_v3.json.fixture": ( + "22a190ab57015415c054aca77fd150af6fc4b6d535b846179b9f099a0a7e9bf2" + ), +} + +# The historical runtime explicitly returns these 15 leaves for every exposed +# version. Repeating the literals per version makes additions or contractions +# to any one version a deliberate test edit rather than an inherited constant. +_COMPLETE_QBI_OUTPUTS_BY_VERSION = { + 1: frozenset( + { + "estate_income_would_be_qualified", + "farm_operations_income_would_be_qualified", + "farm_rent_income_would_be_qualified", + "partnership_s_corp_income_would_be_qualified", + "rental_income_would_be_qualified", + "self_employment_income_would_be_qualified", + "sstb_self_employment_income_would_be_qualified", + "business_is_sstb", + "qualified_bdc_income", + "qualified_reit_and_ptp_income", + "sstb_self_employment_income_before_lsr", + "sstb_unadjusted_basis_qualified_property", + "sstb_w2_wages_from_qualified_business", + "unadjusted_basis_qualified_property", + "w2_wages_from_qualified_business", + } + ), + 2: frozenset( + { + "estate_income_would_be_qualified", + "farm_operations_income_would_be_qualified", + "farm_rent_income_would_be_qualified", + "partnership_s_corp_income_would_be_qualified", + "rental_income_would_be_qualified", + "self_employment_income_would_be_qualified", + "sstb_self_employment_income_would_be_qualified", + "business_is_sstb", + "qualified_bdc_income", + "qualified_reit_and_ptp_income", + "sstb_self_employment_income_before_lsr", + "sstb_unadjusted_basis_qualified_property", + "sstb_w2_wages_from_qualified_business", + "unadjusted_basis_qualified_property", + "w2_wages_from_qualified_business", + } + ), + 3: frozenset( + { + "estate_income_would_be_qualified", + "farm_operations_income_would_be_qualified", + "farm_rent_income_would_be_qualified", + "partnership_s_corp_income_would_be_qualified", + "rental_income_would_be_qualified", + "self_employment_income_would_be_qualified", + "sstb_self_employment_income_would_be_qualified", + "business_is_sstb", + "qualified_bdc_income", + "qualified_reit_and_ptp_income", + "sstb_self_employment_income_before_lsr", + "sstb_unadjusted_basis_qualified_property", + "sstb_w2_wages_from_qualified_business", + "unadjusted_basis_qualified_property", + "w2_wages_from_qualified_business", + } + ), +} + +_DECLARED_QBI_RNG_SEEDS_BY_VERSION = { + 1: frozenset({41, 42, 43, 64}), + 2: frozenset({2041, 2042, 2043, 2044, 2064}), + 3: frozenset({2041, 2043, 2064, 3041, 3042, 3043, 3044, 3045}), +} +_QBI_RNG_SEED_ORDER_BY_VERSION = { + 1: (41, 42, 64, 43), + 2: (2041, 2042, 2044, 2043, 2064), + 3: (2041, 3041, 3042, 3044, 3043, 3045, 2043, 2064), +} +_ROUTED_QBI_OUTPUTS = frozenset( + {*_COMPLETE_QBI_OUTPUTS_BY_VERSION[1], "self_employment_income_before_lsr"} +) + + +def _fixture_bytes(name: str) -> bytes: + payload = (_HISTORY_FIXTURE_DIRECTORY / name).read_bytes() + assert hashlib.sha256(payload).hexdigest() == _HISTORY_FIXTURE_SHA256[name] + return payload + + +def _compose_historical_module(fixture: str, module_name: str) -> ModuleType: + source = _fixture_bytes(fixture).decode() + source = source.replace("from populace.", "from microcosm.") + historical = ModuleType(module_name) + historical.__file__ = str(_HISTORY_FIXTURE_DIRECTORY / fixture) + historical.__dict__["__history_commit__"] = _HISTORY_COMMIT + sys.modules[module_name] = historical + exec(compile(source, historical.__file__, "exec"), historical.__dict__) + return historical + + +@pytest.fixture(scope="module") +def historical_qbi_modules() -> tuple[ModuleType, ModuleType]: + """Compose the frozen pre-rename pipeline against current shared types.""" + + simulation = _compose_historical_module( + "qbi_simulation.py.fixture", + "_microcosm_historical_qbi_simulation_cfbf6330", + ) + reconciliation = _compose_historical_module( + "qbi_inputs.py.fixture", + "_microcosm_historical_qbi_inputs_cfbf6330", + ) + return simulation, reconciliation + + +def _validate_v3_fixture_root(payload: object) -> None: + """Stand in only for the removed builder's outer JSON schema validator.""" + + if not isinstance(payload, dict): + raise ValueError("Historical QBI v3 fixture must be an object.") + expected = { + "schema_version", + "qbi_simulation_version", + "engine", + "rng", + "source_order", + "qualification_derivations", + "sstb_classification", + "evidence", + "record_form", + "industry_mixture", + "employer_presence", + "profit_margin", + "w2", + "ubia", + "investment", + } + if set(payload) != expected: + raise ValueError("Historical QBI v3 fixture root keys changed.") + if payload["schema_version"] != 3 or payload["qbi_simulation_version"] != 3: + raise ValueError("Historical QBI v3 fixture version changed.") + seeds = payload["rng"]["seeds"] + if set(seeds.values()) != _DECLARED_QBI_RNG_SEEDS_BY_VERSION[3]: + raise ValueError("Historical QBI v3 fixture seed families changed.") + + +@contextmanager +def _v3_builder_validator_shim(): + """Supply the one deleted builder dependency needed by the frozen parser.""" + + name = "microcosm.build.us_runtime.qbi_v3_assumptions" + prior = sys.modules.get(name) + shim = ModuleType(name) + shim.validate_qbi_v3_assumptions_payload = _validate_v3_fixture_root + sys.modules[name] = shim + try: + yield + finally: + if prior is None: + sys.modules.pop(name, None) + else: + sys.modules[name] = prior + + +@contextmanager +def _historical_simulator_import(historical: ModuleType): + """Resolve the post-QRF module's deleted runtime import to the fixture.""" + + name = "microcosm.build.us_runtime.qbi_simulation" + prior = sys.modules.get(name) + sys.modules[name] = historical + try: + yield + finally: + if prior is None: + sys.modules.pop(name, None) + else: + sys.modules[name] = prior + + +def _historical_assumptions(historical: ModuleType, version: int) -> Any: + payload = json.loads(_fixture_bytes(f"qbi_assumptions_v{version}.json.fixture")) + if version == 3: + with _v3_builder_validator_shim(): + return historical.parse_qbi_simulation_assumptions( + payload, + qbi_simulation_version=version, + ) + return historical.parse_qbi_simulation_assumptions( + payload, + qbi_simulation_version=version, + ) + + +def _synthetic_sstb_crosswalk() -> dict[str, object]: + return { + "schema_version": 1, + "crosswalk_version": "passive-isolation-test-v1", + "status": "live", + "meta": { + "industry_vintage": "synthetic Census industry", + "occupation_vintage": "synthetic Census occupation", + "legal_basis": "synthetic Section 199A test basis", + "wiring_notes": ["synthetic test wiring"], + "sstb_category_values": ["law"], + }, + "industry_2017": [ + { + "census_code": "4040", + "census_title": "Synthetic non-SSTB industry", + "naics": "00", + "sstb_category": ["law"], + "classification": "non_sstb", + "probability": 0.0, + "rationale": "Synthetic deterministic non-SSTB entry", + } + ], + "industry_explicit_nonsstb_neighbors": [ + { + "census_code": "0000", + "census_title": "Synthetic documented industry", + "why": "Synthetic documentation row", + "probability": 0.0, + } + ], + "occupation_2018": [ + { + "census_code": "1010", + "census_title": "Synthetic clear occupation", + "soc": "00-0001", + "sstb_category": ["law"], + "classification": "clear_sstb", + "probability": 1.0, + "rationale": "Synthetic deterministic SSTB entry", + }, + { + "census_code": "2020", + "census_title": "Synthetic non-SSTB occupation", + "soc": "00-0002", + "sstb_category": ["law"], + "classification": "non_sstb", + "probability": 0.0, + "rationale": "Synthetic deterministic non-SSTB entry", + }, + { + "census_code": "3030", + "census_title": "Synthetic ambiguous occupation", + "soc": "00-0003", + "sstb_category": ["law"], + "classification": "ambiguous", + "probability": 0.3, + "rationale": "Synthetic ambiguous entry", + "provisional": True, + "basis": "Synthetic provisional basis", + }, + ], + "occupation_explicit_nonsstb_notes": [ + { + "census_code": "0000", + "census_title": "Synthetic documented occupation", + "why": "Synthetic documentation row", + "probability": 0.0, + } + ], + } + + +def _synthetic_qbi_frame() -> Frame: + index = np.arange(64, dtype=np.float64) + partnership_s_corp_income = (index + 6) * 1_500 + columns = { + "self_employment_income": np.where( + index % 3 == 0, + (index + 1) * 1_000, + np.where(index % 7 == 0, -(index + 1) * 400, 0), + ), + "farm_operations_income": np.where( + index % 5 == 0, + (index + 2) * 700, + np.where(index % 11 == 0, -(index + 2) * 250, 0), + ), + "farm_rent_income": np.where(index % 8 == 0, (index + 3) * 350, 0), + "rental_income": np.where( + index % 4 == 0, + (index + 4) * 900, + np.where(index % 13 == 0, -(index + 4) * 300, 0), + ), + "estate_income": np.where(index % 9 == 0, (index + 5) * 1_100, 0), + "partnership_s_corp_income": partnership_s_corp_income, + "partnership_income": partnership_s_corp_income, + "s_corp_income": np.zeros(len(index), dtype=np.float64), + "AGI": (index - 8) * 20_000, + "PEIOOCC": np.resize(np.array([1010, 2020, 3030]), len(index)), + "non_qualified_dividend_income": np.where( + index % 2 == 0, + (index + 1) * 120, + 0, + ), + } + person = pd.DataFrame(columns) + ids = np.arange(1, len(person) + 1, dtype=np.int64) + person.insert(0, "person_id", ids) + for entity in ("household", "tax_unit", "spm_unit", "family", "marital_unit"): + person[f"person_{entity}_id"] = ids + return Frame( + { + "person": person, + "household": pd.DataFrame({"household_id": ids}), + "tax_unit": pd.DataFrame({"tax_unit_id": ids}), + "spm_unit": pd.DataFrame({"spm_unit_id": ids}), + "family": pd.DataFrame({"family_id": ids}), + "marital_unit": pd.DataFrame({"marital_unit_id": ids}), + }, + US_SCHEMA, + {"household": Weights(np.ones(len(person)), WeightKind.DESIGN)}, + ) + + +def _with_person(frame: Frame, person: pd.DataFrame) -> Frame: + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + tables.update({link: frame.link(link).copy() for link in frame.links}) + tables["person"] = person + return Frame( + tables, + frame.schema, + {entity: frame.weights_for(entity) for entity in frame.weighted_entities}, + frame.strata, + mass_log=frame.mass_log, + metadata=frame.metadata, + ) + + +class _RecordingGenerator: + def __init__( + self, + generator: np.random.Generator, + seed: int, + records: list[tuple[object, ...]], + ) -> None: + self._generator = generator + self._seed = seed + self._records = records + + def __getattr__(self, name: str) -> Any: + attribute = getattr(self._generator, name) + if not callable(attribute): + return attribute + + def recorded(*args: object, **kwargs: object) -> Any: + value = attribute(*args, **kwargs) + array = np.asarray(value) + self._records.append( + (self._seed, name, array.dtype.str, array.shape, array.tobytes()) + ) + return value + + return recorded + + +def _run_historical_pipeline( + historical: ModuleType, + reconciliation: ModuleType, + assumptions: Any, + *, + version: int, + include_passive_stage: bool, +) -> tuple[ + dict[str, np.ndarray], + dict[str, np.ndarray], + np.ndarray | None, + list[tuple[object, ...]], +]: + frame = _synthetic_qbi_frame() + person = frame.table("person") + inputs = historical.QbiSimulationInputs.from_puf_arrays( + {column: person[column].to_numpy(copy=True) for column in person} + ) + records: list[tuple[object, ...]] = [] + real_default_rng = np.random.default_rng + + def recording_default_rng(seed: int) -> _RecordingGenerator: + records.append(("generator", seed, "PCG64")) + return _RecordingGenerator(real_default_rng(seed), seed, records) + + np.random.default_rng = recording_default_rng + try: + simulation_outputs = historical.simulate_qbi_inputs( + inputs, + assumptions=assumptions, + qbi_simulation_version=version, + sstb_crosswalk=_synthetic_sstb_crosswalk(), + ) + assert set(simulation_outputs) == _COMPLETE_QBI_OUTPUTS_BY_VERSION[version] + person = person.copy(deep=True) + for column, values in simulation_outputs.items(): + person[column] = values + person["self_employment_income_before_lsr"] = np.where( + simulation_outputs["business_is_sstb"], + 0.0, + inputs.self_employment_income, + ) + frame = _with_person(frame, person) + if include_passive_stage: + frame = with_us_qbi_passive_passthrough_assignment(frame, seed=13) + + if version == 1: + frame = reconciliation.with_us_qbi_input_reconciliation(frame) + else: + with _historical_simulator_import(historical): + frame = reconciliation.with_host_sstb_classification( + frame, + qbi_simulation_version=version, + assumptions=assumptions, + sstb_crosswalk=_synthetic_sstb_crosswalk(), + ) + finally: + np.random.default_rng = real_default_rng + + routed = frame.table("person") + passive = ( + routed[US_QBI_PASSIVE_PASSTHROUGH_OUTPUT_COLUMN].to_numpy(copy=True) + if include_passive_stage + else None + ) + routed_outputs = { + column: routed[column].to_numpy(copy=True) for column in _ROUTED_QBI_OUTPUTS + } + return simulation_outputs, routed_outputs, passive, records + + +def _legacy_rng_state_identity() -> tuple[object, ...]: + name, keys, position, has_gauss, cached_gaussian = np.random.get_state() + return ( + name, + keys.dtype.str, + keys.shape, + keys.tobytes(), + position, + has_gauss, + cached_gaussian, + ) + + +@pytest.mark.parametrize("qbi_simulation_version", (1, 2, 3), ids=("v1", "v2", "v3")) +def test_historical_qbi_versions_are_byte_isolated_from_passive_stage( + historical_qbi_modules: tuple[ModuleType, ModuleType], + qbi_simulation_version: int, +) -> None: + historical, reconciliation = historical_qbi_modules + assert historical.__history_commit__ == _HISTORY_COMMIT + assert reconciliation.__history_commit__ == _HISTORY_COMMIT + assert tuple(historical.QBI_SIMULATION_SUPPORTED_VERSIONS) == (1, 2, 3) + assert set(_COMPLETE_QBI_OUTPUTS_BY_VERSION) == {1, 2, 3} + assert set(US_QBI_OUTPUT_COLUMNS) == _COMPLETE_QBI_OUTPUTS_BY_VERSION[1] + assumptions = _historical_assumptions(historical, qbi_simulation_version) + + declared_seeds = { + value for name, value in vars(assumptions).items() if name.endswith("_seed") + } + assert declared_seeds == _DECLARED_QBI_RNG_SEEDS_BY_VERSION[qbi_simulation_version] + + original_global_state = np.random.get_state() + try: + np.random.seed(722) + untouched_global_state = _legacy_rng_state_identity() + ( + baseline_simulation, + baseline, + baseline_passive, + baseline_draws, + ) = _run_historical_pipeline( + historical, + reconciliation, + assumptions, + version=qbi_simulation_version, + include_passive_stage=False, + ) + assert _legacy_rng_state_identity() == untouched_global_state + staged_simulation, staged, passive, staged_draws = _run_historical_pipeline( + historical, + reconciliation, + assumptions, + version=qbi_simulation_version, + include_passive_stage=True, + ) + assert _legacy_rng_state_identity() == untouched_global_state + finally: + np.random.set_state(original_global_state) + + assert baseline_passive is None + assert passive is not None + assert np.count_nonzero(passive > 0.0) > 0 + weights = np.linspace(1.0, 2.0, len(passive), dtype=np.float64) + assert float(np.dot(weights, passive)) > 0.0 + + complete_simulator_surface = _COMPLETE_QBI_OUTPUTS_BY_VERSION[ + qbi_simulation_version + ] + assert set(baseline_simulation) == complete_simulator_surface + assert set(staged_simulation) == complete_simulator_surface + assert set(baseline) == _ROUTED_QBI_OUTPUTS + assert set(staged) == _ROUTED_QBI_OUTPUTS + for column in sorted(_ROUTED_QBI_OUTPUTS): + baseline_values = np.asarray(baseline[column]) + staged_values = np.asarray(staged[column]) + assert staged_values.dtype.str == baseline_values.dtype.str + assert staged_values.tobytes() == baseline_values.tobytes() + + assert baseline_draws == staged_draws + assert baseline_draws + drawn_seeds = tuple( + record[1] for record in baseline_draws if record[0] == "generator" + ) + assert drawn_seeds == _QBI_RNG_SEED_ORDER_BY_VERSION[qbi_simulation_version] From 92dd3568765d6483d5bf02387d577bd16fd1277b Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 22 Aug 2026 22:58:21 +0200 Subject: [PATCH 22/23] test(us): independently certify passive calibration --- PROGRESS.md | 18 +- .../tests/test_us_qbi_passive_passthrough.py | 316 ++++++++++++++++-- 2 files changed, 295 insertions(+), 39 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index ea8218b2c..35c30ee18 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,7 +2,7 @@ ## State -Re-verdict finding B1 is closed locally and B3 is in progress offline on +Re-verdict findings B1 and B3 are closed locally offline on `passive-pass-through-722` from starting HEAD `bc0ddb0a`. No production code, restricted artifacts, or supervisor-owned tests have been changed. No fetch, push, pull-request mutation, rebase, reset, checkout, or stash is in scope. @@ -36,11 +36,23 @@ push, pull-request mutation, rebase, reset, checkout, or stash is in scope. Touched-file Ruff check and format check are clean. An earlier duplicate was manually interrupted during the installed-engine collection import (exit 130); it produced no test result. No run exited 137. +- Replaced the circular B3 calibration check with test-local evidence parsing, + inverse-CDF integration, odds shifting, row-wise weighted aggregation, and + bisection. Those helpers consume only committed JSON and caller-supplied raw + arrays; they call no production calibration or subordinate helper. +- The two-row synthetic CI node has the hand solution `shift = ln(3)` and + aggregate `(100*1 + 200*2) * 0.5 * 0.75 = 187.5`; the test-local and + production solvers agree within the artifact-derived binary64 floor. Its + final run passed (exit 0). +- The required restricted replay passed (exit 0) with the supplied SHA-pinned + `puf_2024.h5`: test-local solved shift `-1.157105426398319`, committed shift + `-1.157105426398319`, effective shift tolerance + `2.220446049250313e-16`, and independently seeded aggregate + `$55,021,131,518.061035` (`0.7187449327011208%` above the provisional + `$54,628,492,000` midpoint). No test run exited 137. ## Next -- Add a test-local aggregate and bisection plus synthetic and env-gated B3 - cross-checks; run the restricted replay once with the supplied artifact. - Run only targeted tests and touched-file Ruff checks, update the two branch handoff reports with exact CI/certification scope and commit mappings, and write the final certification record to `FINAL_REPORT.md`. diff --git a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py index 1a985d197..aab1ea040 100644 --- a/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py +++ b/packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py @@ -5,6 +5,7 @@ import hashlib import importlib.util import json +import math import os from copy import deepcopy from importlib.resources import files @@ -26,7 +27,6 @@ assign_passive_partnership_s_corp_income, calibrate_qbi_passive_log_odds_shift, load_qbi_passive_passthrough_assumptions, - load_qbi_passive_passthrough_evidence, validate_qbi_passive_passthrough_assumptions, with_us_qbi_passive_passthrough_assignment, ) @@ -44,6 +44,11 @@ EXPECTED_REPLAY_TAX_UNIT_ROWS = 207_692 EXPECTED_REPLAY_PERSON_ROWS = 484_015 PROVISIONAL_TARGET = 54_628_492_000.0 +QBI_PASSIVE_ASSUMPTIONS_RESOURCE = "qbi_passive_passthrough_assumptions_v1.json" +_TEST_LOCAL_QUANTILE_NAMES = ("q05", "q25", "q50", "q75", "q95") +_TEST_LOCAL_SCHEDULE_E_CUTS = np.array( + [0.0, 25_000.0, 100_000.0, 250_000.0, 1_000_000.0] +) def _load_assumptions_builder(): @@ -57,13 +62,219 @@ def _load_assumptions_builder(): return builder +def _test_local_resource_payload(name: str) -> dict[str, object]: + payload = json.loads(files("microcosm.build.us").joinpath(name).read_bytes()) + assert isinstance(payload, dict) + return payload + + +def _test_local_evidence_model( + evidence: dict[str, object], +) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: + methodology = evidence["methodology"] + assert isinstance(methodology, dict) + expected_band_order = [ + "nonpositive", + "0_to_25k", + "25k_to_100k", + "100k_to_250k", + "250k_to_1m", + "over_1m", + ] + assert [band["id"] for band in methodology["income_bands"]] == expected_band_order + probabilities = np.asarray( + methodology["quantile_probabilities"], + dtype=np.float64, + ) + assert probabilities.tolist() == [0.05, 0.25, 0.5, 0.75, 0.95] + cells = evidence["cells"] + assert isinstance(cells, list) + assert [cell["income_band"] for cell in cells] == expected_band_order + prevalence = np.asarray( + [cell["holding_prevalence"]["estimate"] for cell in cells], + dtype=np.float64, + ) + quantiles = np.asarray( + [ + [ + cell["conditional_share"]["selected_quantiles"][name] + for name in _TEST_LOCAL_QUANTILE_NAMES + ] + for cell in cells + ], + dtype=np.float64, + ) + probability_knots = np.concatenate(([0.0], probabilities, [1.0])) + flat_extended_quantiles = np.concatenate( + (quantiles[:, :1], quantiles, quantiles[:, -1:]), + axis=1, + ) + share_means = np.sum( + np.diff(probability_knots) + * (flat_extended_quantiles[:, :-1] + flat_extended_quantiles[:, 1:]) + / 2.0, + axis=1, + ) + return prevalence, probabilities, quantiles, share_means + + +def _test_local_shifted_probability( + prevalence: np.ndarray, + shift: float, +) -> np.ndarray: + odds = prevalence / (1.0 - prevalence) + shifted_odds = odds * math.exp(shift) + return shifted_odds / (1.0 + shifted_odds) + + +def _test_local_expected_aggregate( + partnership_s_corp_income: object, + schedule_e_income: object, + person_weights: object, + *, + evidence: dict[str, object], + log_odds_shift: float, +) -> float: + passthrough = np.maximum( + np.asarray(partnership_s_corp_income, dtype=np.float64), + 0.0, + ) + schedule_e = np.asarray(schedule_e_income, dtype=np.float64) + weights = np.asarray(person_weights, dtype=np.float64) + assert passthrough.ndim == schedule_e.ndim == weights.ndim == 1 + assert len(passthrough) == len(schedule_e) == len(weights) + assert np.isfinite(passthrough).all() + assert np.isfinite(schedule_e).all() + assert np.isfinite(weights).all() and np.all(weights >= 0.0) + + band = np.searchsorted( + _TEST_LOCAL_SCHEDULE_E_CUTS, + schedule_e, + side="left", + ) + prevalence, _probabilities, _quantiles, share_means = _test_local_evidence_model( + evidence + ) + chance = _test_local_shifted_probability(prevalence, log_odds_shift) + return float( + np.sum( + weights * passthrough * share_means[band] * chance[band], + dtype=np.float64, + ) + ) + + +def _test_local_bisect_shift( + partnership_s_corp_income: object, + schedule_e_income: object, + person_weights: object, + *, + evidence: dict[str, object], + target: float, + solver: dict[str, object], +) -> tuple[float, float]: + lower = float(solver["lower_bound"]) + upper = float(solver["upper_bound"]) + iterations = int(solver["iterations"]) + + def expected(shift: float) -> float: + return _test_local_expected_aggregate( + partnership_s_corp_income, + schedule_e_income, + person_weights, + evidence=evidence, + log_odds_shift=shift, + ) + + if not expected(lower) <= target <= expected(upper): + raise ValueError("Test-local passive target is outside the solver bracket.") + for _iteration in range(iterations): + candidate = lower + (upper - lower) / 2.0 + if expected(candidate) >= target: + upper = candidate + else: + lower = candidate + shift = lower + (upper - lower) / 2.0 + return shift, expected(shift) + + +def _test_local_bisection_tolerance( + solver: dict[str, object], + *, + reference_shift: float, +) -> float: + span = float(solver["upper_bound"]) - float(solver["lower_bound"]) + nominal_final_bracket = math.ldexp(span, -int(solver["iterations"])) + # The documented 128 halvings outrun binary64. Around mathematical zero, + # exp(shift) and the shifted odds operate at unit scale, so one ULP of that + # scale is the effective floor; nonzero roots use their own larger scale. + binary64_floor = math.ulp(max(1.0, abs(reference_shift))) + return max(nominal_final_bracket, binary64_floor) + + +def _test_local_seeded_assignment( + partnership_s_corp_income: object, + schedule_e_income: object, + *, + seed: int, + evidence: dict[str, object], + assumptions: dict[str, object], +) -> np.ndarray: + passthrough = np.maximum( + np.asarray(partnership_s_corp_income, dtype=np.float64), + 0.0, + ) + schedule_e = np.asarray(schedule_e_income, dtype=np.float64) + band = np.searchsorted( + _TEST_LOCAL_SCHEDULE_E_CUTS, + schedule_e, + side="left", + ) + prevalence, probabilities, quantiles, _share_means = _test_local_evidence_model( + evidence + ) + calibration = assumptions["calibration"] + streams = assumptions["random_streams"] + assert isinstance(calibration, dict) and isinstance(streams, dict) + chance = _test_local_shifted_probability( + prevalence, + float(calibration["log_odds_shift"]), + ) + presence = np.random.Generator( + np.random.PCG64( + np.random.SeedSequence( + [seed, streams["family_entropy"], streams["presence_family"]] + ) + ) + ).random(len(passthrough)) + share_draw = np.random.Generator( + np.random.PCG64( + np.random.SeedSequence( + [seed, streams["family_entropy"], streams["share_family"]] + ) + ) + ).random(len(passthrough)) + sampled_share = np.asarray( + [ + np.interp(share_draw[row], probabilities, quantiles[band[row]]) + for row in range(len(passthrough)) + ], + dtype=np.float64, + ) + return np.where( + (passthrough > 0.0) & (presence < chance[band]), + passthrough * sampled_share, + 0.0, + ) + + def _constant_evidence( *, prevalence: float, shares: list[float] | None = None, quantiles: tuple[float, float, float, float, float] | None = None, ) -> dict[str, object]: - evidence = deepcopy(load_qbi_passive_passthrough_evidence()) + evidence = deepcopy(_test_local_resource_payload(QBI_PASSIVE_EVIDENCE_RESOURCE)) if shares is None: shares = [0.5] * len(evidence["cells"]) if len(shares) != len(evidence["cells"]): @@ -372,32 +583,59 @@ def test_current_qbi_pipeline_preserves_leaf_bytes_when_passive_realizes() -> No assert passive.between(0.0, passthrough.clip(lower=0.0)).all() -def test_calibration_solver_hits_a_synthetic_target_and_rejects_impossible_one() -> ( - None -): +def test_test_local_calibration_matches_hand_answer_and_production_solver() -> None: evidence = _constant_evidence(prevalence=0.5, shares=[0.5] * 6) + assumptions = _test_local_resource_payload(QBI_PASSIVE_ASSUMPTIONS_RESOURCE) + calibration = assumptions["calibration"] + assert isinstance(calibration, dict) + solver = calibration["solver"] + assert isinstance(solver, dict) passthrough = np.array([100.0, 200.0]) schedule_e = np.array([1.0, 1.0]) weights = np.array([1.0, 2.0]) + hand_computed_shift = math.log(3.0) + hand_computed_target = (100.0 * 1.0 + 200.0 * 2.0) * 0.5 * 0.75 + aggregate_tolerance = math.ulp(hand_computed_target) - shift, achieved = calibrate_qbi_passive_log_odds_shift( + assert hand_computed_target == 187.5 + assert ( + abs( + _test_local_expected_aggregate( + passthrough, + schedule_e, + weights, + evidence=evidence, + log_odds_shift=hand_computed_shift, + ) + - hand_computed_target + ) + <= aggregate_tolerance + ) + local_shift, local_achieved = _test_local_bisect_shift( passthrough, schedule_e, weights, evidence=evidence, - target=125.0, + target=hand_computed_target, + solver=solver, + ) + shift_tolerance = _test_local_bisection_tolerance( + solver, + reference_shift=hand_computed_shift, ) - assert shift == pytest.approx(0.0, abs=1e-12) - assert achieved == pytest.approx(125.0, abs=1e-10) - with pytest.raises(ValueError, match="target is unattainable"): - calibrate_qbi_passive_log_odds_shift( - passthrough, - schedule_e, - weights, - evidence=evidence, - target=300.0, - ) + production_shift, production_achieved = calibrate_qbi_passive_log_odds_shift( + passthrough, + schedule_e, + weights, + evidence=evidence, + target=hand_computed_target, + ) + + assert abs(local_shift - hand_computed_shift) <= shift_tolerance + assert abs(local_achieved - hand_computed_target) <= aggregate_tolerance + assert abs(production_shift - local_shift) <= shift_tolerance + assert abs(production_achieved - hand_computed_target) <= aggregate_tolerance def test_assumptions_builder_is_deterministic_on_a_synthetic_replay( @@ -451,7 +689,7 @@ def test_restricted_replay_independently_resolves_persisted_shift_and_pins_artif passthrough, schedule_e, weights, artifact = builder.read_replay_artifact( replay_path ) - assumptions = load_qbi_passive_passthrough_assumptions() + assumptions = _test_local_resource_payload(QBI_PASSIVE_ASSUMPTIONS_RESOURCE) committed_artifact = assumptions["calibration"]["replay_artifact"] assert artifact == { @@ -465,41 +703,47 @@ def test_restricted_replay_independently_resolves_persisted_shift_and_pins_artif assert committed_artifact["tax_unit_rows"] == EXPECTED_REPLAY_TAX_UNIT_ROWS assert committed_artifact["person_rows"] == EXPECTED_REPLAY_PERSON_ROWS - evidence = load_qbi_passive_passthrough_evidence() + evidence = _test_local_resource_payload(QBI_PASSIVE_EVIDENCE_RESOURCE) bounds = evidence["external_anchor"]["passive_passthrough_bounds"] target = (bounds["lower"]["amount"] + bounds["upper"]["amount"]) / 2.0 - solved_shift, solved_expected = calibrate_qbi_passive_log_odds_shift( + persisted_calibration = assumptions["calibration"] + solver = persisted_calibration["solver"] + solved_shift, solved_expected = _test_local_bisect_shift( passthrough, schedule_e, weights, evidence=evidence, target=target, + solver=solver, + ) + shift_tolerance = _test_local_bisection_tolerance( + solver, + reference_shift=float(persisted_calibration["log_odds_shift"]), ) - persisted_calibration = assumptions["calibration"] assert target == PROVISIONAL_TARGET - assert solved_shift == pytest.approx( - persisted_calibration["log_odds_shift"], - rel=0.0, - abs=1e-12, - ) - assert solved_expected == pytest.approx(target, rel=0.0, abs=1.0) - assert solved_expected == pytest.approx( - persisted_calibration["expected_aggregate"], - rel=0.0, - abs=1.0, + assert ( + abs(solved_shift - persisted_calibration["log_odds_shift"]) <= shift_tolerance ) + assert abs(solved_expected - target) <= 1e-3 + assert abs(solved_expected - persisted_calibration["expected_aggregate"]) <= 1e-3 - assigned = assign_passive_partnership_s_corp_income( + assigned = _test_local_seeded_assignment( passthrough, schedule_e, seed=persisted_calibration["seeded_replay"]["seed"], + evidence=evidence, + assumptions=assumptions, ) achieved = float(np.dot(weights, assigned)) - assert achieved == pytest.approx( - persisted_calibration["seeded_replay"]["aggregate"], + assert abs(achieved - persisted_calibration["seeded_replay"]["aggregate"]) <= 1e-3 + assert ( + np.count_nonzero(assigned > 0.0) + == (persisted_calibration["seeded_replay"]["positive_assigned_rows"]) + ) + assert abs(achieved / target - 1.0) == pytest.approx( + persisted_calibration["seeded_replay"]["relative_error"], rel=0.0, - abs=1e-3, + abs=1e-15, ) - assert abs(achieved / target - 1.0) <= 0.05 From 8d916a62441318b4da97a0639e0fcf1fb250cdbf Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 22 Aug 2026 23:08:19 +0200 Subject: [PATCH 23/23] docs: record B1 B3 reverdict closure --- FINAL_REPORT.md | 72 ++++++++++++++++++++++++++++++----------- PROGRESS.md | 15 +++++++-- PROGRESS_PASSIVE_722.md | 60 ++++++++++++++++++++++------------ 3 files changed, 106 insertions(+), 41 deletions(-) diff --git a/FINAL_REPORT.md b/FINAL_REPORT.md index 59296eb9e..05ffe092d 100644 --- a/FINAL_REPORT.md +++ b/FINAL_REPORT.md @@ -133,13 +133,11 @@ place and becomes a no-op once the engine recognizes it. - TY2023 administrative anchors are applied to the pinned 2024-shaped replay without a population-vintage backcast. Line 12 also differs from the modeled surface in deductions/modifications and estate/trust-return coverage. -- Exact historical v1/v2/v3 seeded simulator goldens could not be executed: - that simulator and its tests are absent from current main, and stacking the - stale branches would violate the rename decision above. The available - replacement test proves the independent passive family does not call or - advance old streams and preserves all 15 current archived QBI leaves - byte-for-byte under multiple passive seeds. This is not a claim that the - absent historical golden suite was run. +- A CI-executable, test-only harness now freezes the exact historical + simulator, reconciler, and v1/v2/v3 assumptions from `cfbf6330`, each with a + literal SHA-256 guard. It composes each historical version with the current + passive stage on a synthetic fixture; it does not restore those retired + implementations to production runtime. - Current main exposes no v3 latent entity form to the frame wrapper. The pure API's latent-form routing is covered synthetically; live assignment therefore uses the SCF Schedule-E-band cells. @@ -151,23 +149,58 @@ place and becomes a no-op once the engine recognizes it. All commands ran offline with the existing synced environment. -- Full workspace, exact final code tree: `6,394 passed, 73 skipped` in - 42m45s; exit code 0. Pytest reported 1,890 non-failing warnings. +The following are historical pre-re-verdict results and were not rerun during +the high-load 2026-08-22 closure: + +- Full workspace: `6,394 passed, 73 skipped` in 42m45s; exit code 0. Pytest + reported 1,890 non-failing warnings. - Restricted replay with the specified `POPULACE_PUF_2024_H5` artifact: `12 passed`. - Evidence, passive assignment, and reform diagnostics focused set: `64 passed, 1 expected gated skip`. - Spec-only country-package, executable-entrypoint, and ordinary incumbent guard set: `51 passed`. -- Repository-wide `uv run ruff check .`: clean. -- All 26 changed Python files: Ruff format check clean. -- `git diff --check origin/main...HEAD`: clean. -- Manual incumbent package-name sweep over every changed Python, TOML, - Markdown, and JSON file: no hits. This was run explicitly because the - ordinary guard skips paths under `.claude/`. -- Deterministic resource regeneration, strict content hashes, checkpoint - identities, release ownership/coverage, replay tolerance, and QBI - byte-preservation contracts pass. +- Repository-wide `uv run ruff check .`: clean; all 26 then-changed Python + files passed Ruff format check. + +### 2026-08-22 B1/B3 re-verdict closure + +- **B1 — `bd537c42`:** the CI nodes + `packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py::test_historical_qbi_versions_are_byte_isolated_from_passive_stage[v1]`, + `packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py::test_historical_qbi_versions_are_byte_isolated_from_passive_stage[v2]`, + and + `packages/microcosm-build/tests/test_us_qbi_passive_passthrough_history.py::test_historical_qbi_versions_are_byte_isolated_from_passive_stage[v3]` + all passed. Each requires a positive passive row count and weighted aggregate, + guards and byte-compares the complete literal 15-leaf simulator surface + between the baseline and passive-staged pipelines, compares the final routed + self-employment leaf, preserves global NumPy RNG state, and compares every + QBI-family draw. The fixture is synthetic and has no H5 dependency. +- **B3 — `92dd3568`:** the CI node + `packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py::test_test_local_calibration_matches_hand_answer_and_production_solver` + passed once. Its test-local JSON parser, inverse-CDF integration, odds + transform, aggregate, and bisection reproduce the hand-computable + `log(3)`/`$187.50` case and independently cross-check the production solver. + The restricted node + `packages/microcosm-build/tests/test_us_qbi_passive_passthrough.py::test_restricted_replay_independently_resolves_persisted_shift_and_pins_artifact` + is collected in ordinary CI but explicitly skips when + `POPULACE_PUF_2024_H5` is unset; that path was exercised once (`1 skipped`). + A supplied but missing path still raises `FileNotFoundError`. +- The B3 restricted node was also run once with the SHA-pinned artifact and + passed. The test-local solved shift is `-1.157105426398319`, exactly the + committed `-1.157105426398319`. The JSON's `[-30, 30]`, 128-iteration + bisection implies a nominal final bracket of + `1.7632415262334313e-37`; the stated effective binary64 shift tolerance is + `2.220446049250313e-16`. The test-local expected aggregate is + `$54,628,491,999.99999`, versus committed `$54,628,491,999.999985`. The + independently reconstructed seeded aggregate is `$55,021,131,518.061035`, + compared with the committed value at absolute tolerance `$0.001`; its error + from the `$54,628,492,000` midpoint is `0.7187449327011208%` and it realizes + 6,207 positive rows. +- Touched-file `uv run ruff check` and `uv run ruff format --check` are clean. + No test run exited 137. A full suite was deliberately not run; clean-runner + CI remains the suite arbiter. +- No new towncrier fragment was added for this test/documentation-only closure; + the existing branch fragment remains `722-passive-pass-through.added.md`. The towncrier fragment is `changelog.d/722-passive-pass-through.added.md`. No network access, push, or pull request was used. @@ -184,3 +217,6 @@ No network access, push, or pull request was used. - `218b6cb9` — clarify provisional contracts. - `0842acef` and `3f6ecc73` — update stage-order/sparse fixtures. - `cc7fe11f` — format branch-owned passive files. +- `1172a595` — start the B1/B3 re-verdict closure journal. +- `bd537c42` — close B1 with durable historical v1/v2/v3 stream isolation. +- `92dd3568` — close B3 with independent calibration certification. diff --git a/PROGRESS.md b/PROGRESS.md index 35c30ee18..f70aaa235 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -50,9 +50,18 @@ push, pull-request mutation, rebase, reset, checkout, or stash is in scope. `2.220446049250313e-16`, and independently seeded aggregate `$55,021,131,518.061035` (`0.7187449327011208%` above the provisional `$54,628,492,000` midpoint). No test run exited 137. +- Committed the B1 closure as `bd537c42` and the B3 closure as `92dd3568`. + Both received independent static review with no defects found. +- Re-ran the committed B3 synthetic node (`1 passed`) and exercised the + env-unset restricted node (`1 skipped`). The earlier artifact-backed replay + passed once. Touched-file Ruff check and format check are clean. +- Updated `FINAL_REPORT.md` and `PROGRESS_PASSIVE_722.md` with a dated + 2026-08-22 record that separates CI coverage from the env-gated replay, + maps each finding to its closing commit, and marks older self-certification + language as superseded. ## Next -- Run only targeted tests and touched-file Ruff checks, update the two branch - handoff reports with exact CI/certification scope and commit mappings, and - write the final certification record to `FINAL_REPORT.md`. +- No local implementation work remains. The supervisor can push the committed + handoff and let clean-runner CI arbitrate the suite; no local push or PR + mutation is in scope. diff --git a/PROGRESS_PASSIVE_722.md b/PROGRESS_PASSIVE_722.md index 92dba7d0f..5bfb09720 100644 --- a/PROGRESS_PASSIVE_722.md +++ b/PROGRESS_PASSIVE_722.md @@ -2,15 +2,11 @@ ## State -Dual-review remediation is in progress on `passive-pass-through-722` as of -2026-08-21. The real merge of already-fetched `origin/main` at `2c7a7218` is -committed as `d9f19c66`, with the supervisor-approved resolutions reproduced -exactly. The post-merge resource closure and first-class typed passive contract -are regenerated and their fail-closed coverage ledger is verified. The -non-vacuous QBI preservation regression, locked-registry release gate, and -non-circular restricted calibration certification are also complete. Work -remains offline: no fetch, push, PR mutation, publication, or promotion is in -scope. +The adjudicated B1 and B3 re-verdict findings are closed locally on +`passive-pass-through-722` as of 2026-08-22. B1 closes in `bd537c42`; B3 closes +in `92dd3568`. The earlier merge and remediation history below remains the +branch record. Work remains offline: no fetch, push, PR mutation, publication, +or promotion is in scope, and clean-runner CI remains the suite arbiter. ## Done @@ -81,14 +77,11 @@ scope. `00b4c73b0ff2e29abf00b9f6f8112c9b87e937d323fb5c973bb5cd0652a95931`) and F0 report. The targeted gate/resource/inventory/adapter suite passes 153 tests in 8m34s; the generator check and targeted Ruff are clean. -- Replaced the circular restricted replay check with an independent solve: the - validator derives the `$54,628,492,000` midpoint from the evidence artifact's - separately pinned bounds, runs the full 128-iteration calibration on the - restricted PUF, and compares the solved `-1.157105426398319` shift to the - persisted value within `1e-12` (expected aggregate within `$1`). The ordinary - assumptions validator also rejects shifts outside the declared solver bounds - instead of discarding the parsed value. All 12 passive tests pass in 53.76s - with the restricted artifact, and targeted Ruff is clean. +- The 2026-08-21 restricted replay check called the production calibration + solver and therefore did not constitute an independent solve. Its former + certification claim is superseded by the 2026-08-22 B3 entry below. The + ordinary assumptions validator change and its historical test results remain + valid branch history. - The implementation and verification bullets below describe the historical pre-review checkpoint at `a4d93f78`; the verdict supersedes its former completion claim. @@ -143,8 +136,35 @@ scope. - Added and committed the towncrier fragment and wrote the completion report to `FINAL_REPORT.md`. +## 2026-08-22 — B1/B3 re-verdict closure + +- **B1 maps to `bd537c42`.** A secrets-free CI test freezes SHA-pinned + historical v1/v2/v3 simulators, reconciler, and assumptions from `cfbf6330`. + Its three parameters each require positive passive realization, guard and + byte-compare the complete literal 15-leaf QBI simulation surface with and + without the passive stage, compare the routed self-employment result, + preserve global NumPy RNG state, and compare all version-family draws. The + targeted node passed all three parameters. +- **B3 maps to `92dd3568`.** The secrets-free CI test uses test-local JSON + parsing, inverse-CDF integration, an odds transform, row-wise weighted + aggregation, and bisection. It reproduces the hand-computable `log(3)` shift + and `$187.50` target, then cross-checks the production solver; the targeted + node passed once. These test-local routines import or call no production + calibration helper. +- The B3 real replay remains env-gated. Ordinary CI collects it but explicitly + skips when `POPULACE_PUF_2024_H5` is unset (`1 skipped` was exercised); a set + but missing path raises `FileNotFoundError`. With the supplied restricted + artifact it passed once: independently solved and committed shifts are both + `-1.157105426398319`; the effective binary64 shift tolerance derived from + the JSON's 128-iteration bracket is `2.220446049250313e-16`; the independently + reconstructed seeded aggregate is `$55,021,131,518.061035` and its midpoint + error is `0.7187449327011208%`. +- Touched-file Ruff check and format check are clean. No test run exited 137. + The earlier full-suite counts above were not rerun during this high-load + closure and must not be read as results for the new B1/B3 commits. + ## Next -- Run targeted and full workspace tests with the prescribed restricted-data - environment, run Ruff, commit regenerated artifacts, and write the final - report to `FINAL_REPORT.md`. +- The supervisor can push the local commits and let clean-runner CI arbitrate + the suite. The PolicyEngine-US #9306 dependency and provisional calibration + follow-ups remain unchanged; this task performs no promotion.