Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
44a11af
Add a donor-patch tool for the County Files PoC ACS staging
juaristi22 Nov 17, 2026
601cf86
Let R1 accept named all-default donor columns by explicit allowance
juaristi22 Nov 17, 2026
77f5fa1
Register the strike_benefits reviewed fill on ACS rows
juaristi22 Nov 17, 2026
b9e7f40
Let the donor-patch tool write a release manifest for the copy
juaristi22 Nov 17, 2026
06b53f6
Add a pre-R2 check for counties with an empty SOI AGI row
juaristi22 Nov 17, 2026
78acba5
Let R2 drop an empty county SOI row with a receipt, by explicit flag
juaristi22 Nov 17, 2026
46674e0
Add a post-staging check of R2's reviewed-fill rules
juaristi22 Nov 17, 2026
3bffc4a
Give the ACS staging telemetry test the new flag's parser default
juaristi22 Nov 17, 2026
2737c32
Merge remote-tracking branch 'origin/main' into claude/us-acs-poc-don…
juaristi22 Nov 17, 2026
36bd0da
Restore the ASEC work columns in the donor-patch tool (#1647)
MaxGhenis Nov 17, 2026
0005321
Merge #1660's head 2737c32fb into the work-column commit's branch
MaxGhenis Nov 17, 2026
3b28e31
Compute the county AGI pre-check with the engine, as R2 stores it
juaristi22 Nov 17, 2026
72b7072
Merge remote-tracking branch 'origin/claude/us-acs-poc-donor-patch-dd…
juaristi22 Nov 17, 2026
f96ff8e
Mark the drop flag and the donor allowance as proof-of-concept only
juaristi22 Nov 17, 2026
65b2155
Point the proof-of-concept notes at the removal issue, #1661
juaristi22 Nov 17, 2026
a5ca4df
Give the counties R2 always refuses their own exit status in the AGI …
juaristi22 Nov 17, 2026
e49d539
Name each dropped SOI row in its county's reliability cell and CSV row
juaristi22 Nov 17, 2026
28e7b7c
Accept an ACS-only never-default null only where an R2 stage fills it
juaristi22 Nov 17, 2026
2e9bf30
Refuse to replace an existing patched copy unless --overwrite is passed
juaristi22 Nov 17, 2026
f8b1039
Hold back a null never-default column only where an R2 stage fills it
juaristi22 Nov 17, 2026
c990afa
Add the first draft of the County Files PoC report for LWI
juaristi22 Nov 18, 2026
0ca8f6d
Revise the County Files PoC report for LWI (v0.2)
juaristi22 Nov 19, 2026
35e3863
Add the schema manifest and methods document for the County Files PoC
MaxGhenis Nov 19, 2026
c82fa5c
Edit the County Files PoC methods document for LWI (draft v0.1)
juaristi22 Nov 19, 2026
e959922
Say which columns the model ignores in the LWI PoC report
juaristi22 Nov 19, 2026
827058d
Correct three lines of the schema manifest notes
MaxGhenis Nov 19, 2026
826838f
Correct the donor households in the LWI methods document (draft v0.2)
juaristi22 Nov 22, 2026
d28b206
Edit the LWI PoC report for its readers (draft v0.3)
juaristi22 Nov 22, 2026
bfcb573
Set the pe-doc layout of the LWI methods document
juaristi22 Nov 24, 2026
0e00ab5
Correct five donor passages in the LWI methods document (draft v0.3)
juaristi22 Nov 24, 2026
7306a43
Count the donor households as 47,277 in the LWI PoC report (draft v0.4)
juaristi22 Nov 24, 2026
5f3020b
Follow the agreement's MVP wording in the LWI PoC report (draft v0.5)
MaxGhenis Nov 24, 2026
ef1f8ba
Record that the LWI PoC documents were sent
juaristi22 Nov 25, 2026
2488f3a
Say that only the LWI PoC report reached LWI, by email
juaristi22 Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/us-acs-county-agi-support-check-922.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`tools/check_us_acs_county_agi_support.py` lists, before the ACS local release (R2) runs, the counties whose county IRS SOI AGI row R2 would build empty: counties with households but none with a nonzero AGI (microcosm#922; microcosm#1630 review, finding 1). The state AGI row stores no zero, so such a county makes `attach_surface` refuse the run after the materialize engine pass. The check computes the value R2 stores: it loads the staging frame and its summary as R2 does, holds back the formula-owned columns, fills the reviewed nulls with R2's own functions, and runs policyengine-us for the household sum of `adjusted_gross_income` in household chunks. That sum is the production SOI materializer's AGI measure (an engine-tier test compares them), so income held by a dependent, or by a tax unit without an adult, counts as the engine counts it: not at all. A null in a never-default column that one of R2's own stages fills (the set the reviewed-fill pre-check uses) is held back only while its nulls are on ACS rows and the AGI does not read it; every other never-default null is refused, as R2's fill step refuses it: a null on a donor row, in a column no R2 stage fills, or in one the AGI reads. An engine-tier test checks that no stage-filled column is an AGI input. With `--puma-ladder` it applies R2's own minimum-support moves first, and lists the counties that R2's `check_support` refuses with or without `--county-drop-empty-soi-rows`: a county outside the ladder, and a ladder county without a household-universe record after the moves (as R2 does, it moves no household when a county is outside the ladder). It exits 2 when a county is at risk, and 3 when R2 would refuse the run (3 takes precedence).
1 change: 1 addition & 0 deletions changelog.d/us-acs-county-drop-empty-soi-rows-922.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ACS local release takes `--county-drop-empty-soi-rows` (microcosm#922). With it, a county IRS SOI row that is empty although the county has households (every household's measure, for example AGI, is 0, and the state row stores no zero) is dropped with a receipt in `county_surface.json` (`zero_measure_soi_rows_dropped`), the run identity and the reliability report, instead of refusing the run after the engine pass. Calibration grades such a county without the row, so the reliability report names each dropped row in its county cells (every member of a combined cell) and in a `zero_measure_soi_rows_dropped` column of `county_reliability.csv`; only a run with the flag has that key and column. A county without households is refused as before. The flag is off by default, and passing it is a reviewed decision; the refresh recipe repeats it. It is temporary for the County Files proof of concept (microcosm#1647; removal tracked in microcosm#1661): do not use it for the final County Files build, where a county whose row would be empty needs a real fix (more household support, or a declared cell with its own ruling), not a dropped target.
1 change: 1 addition & 0 deletions changelog.d/us-acs-poc-donor-patch-922.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`tools/patch_us_acs_donor_columns.py` writes a patched copy of a published US national donor H5 for the County Files proof of concept's ACS staging (microcosm#922, plan microcosm#1647). It adds reviewed all-zero columns on the entity the US engine gives them (`strike_benefits`: no donor or ASEC pppub23–26 row has `OI_OFF` 12; `passive_partnership_s_corp_income`: the donor holds partnership and S-corp income as one combined `partnership_income`), refuses a column that is already present with any other value, keeps every other table, column, dtype and root attribute, and writes a receipt with both SHA-256 digests, the row counts, each added column with its reason, and the tool's commit. It first restores the three ASEC work columns (`detailed_industry_recode`, `major_industry_recode`, `worked_last_year`) on `person`, valued as the #720 restoration and the `org_wages` carry value them: it reads each donor income year's pinned ASEC person member (refusing a file whose SHA-256 is not pinned), joins `WEIND` and `WEMIND` on source year and exact `PERIDNUM`, refuses a donor person with no member row or more than one, checks eight Census identity columns on every row, and records the files, their digests and the match counts in the receipt. It reads the members from `--asec-source-cache` (default `~/.cache/microcosm/cps/asec_education`) and downloads a missing pinned archive only with `--asec-fetch`. The published donor is read only, and no default changes. It refuses an existing output copy, receipt or copy release manifest unless `--overwrite` is passed: a re-run writes a copy with another SHA-256 (the HDF5 object headers record write times), so a staging summary built on the first copy would no longer match it. With `--input-release-manifest` it checks the input against the published donor's release manifest and records that build in the receipt. With `--release-manifest`, `--manifest-release` and `--manifest-build` it also writes a build-folder release manifest for the copy (in `policyengine/populace-us-staging` by default), so the ACS staging can take it as `--donor-release-manifest` and record the copy's build as `donor_release`, which the local-area release contract requires before publication.
1 change: 1 addition & 0 deletions changelog.d/us-acs-reviewed-fills-precheck-922.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`tools/check_us_acs_local_reviewed_fills.py` grades a staging summary's reviewed engine-input nulls against the ACS local release's fill rules in seconds, before the release runs (microcosm#922). It refuses what materialize would refuse (a null in a never-default-filled column, unless the null is on the ACS spine alone and in a column that one of the release's own stages fills there first: the take-up stage's SPM-unit take-up flags and engine-free fills, or the SSI and Medicaid take-up flags; a null ESI premium), builds the fill records the release would write with the engine defaults the release resolves, and runs the release's own finalize gate (`acs_local_reviewed_fill_consumer_gate`) on them, which otherwise refuses an unregistered fill hours into the run. It exits 2 when the release would refuse.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The legacy ACS staging builder (`tools/_legacy/build_us_acs_multispine_base.py`) takes `--allow-default-donor-column COLUMN=REASON` (repeatable) for the County Files proof of concept's patched donor (microcosm#922). The dense-donor coverage gate then accepts that transfer-consumed column although every donor value equals the engine default; it still refuses an absent, unknown or not transfer-consumed column, and an allowance for a column with donor signal. The staging summary records each allowance and its reason (`allowed_default_donor_columns`, `orchestration.allow_default_donor_columns`) and adds the reviewed limitation `allowed_default_valued_donor_columns`, which the release carries forward. Modal staging plans never pass the flag. Without the flag, the gate, the outputs and the summary are unchanged. The flag is temporary for the County Files proof of concept (microcosm#1647; removal tracked in microcosm#1661): do not use it for the final County Files build, whose donor is a new national build.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ACS local lane's reviewed-fill register (`acs_local_reviewed_fill_consumers.yaml`) lists `person.strike_benefits` (microcosm#922). Since the local income pass's OIP predictor took strike benefits as a component, every ACS staging donor carries the column, but nothing transfers it, so the release fills 0 on every ACS person, and finalize's reviewed-fill gate refused that fill as unregistered. The entry names its 13 means-tested consumers with the verdict harmless: no pinned ASEC respondent reports strike benefits, so every donor value is 0 as well.
11 changes: 11 additions & 0 deletions docs/agent-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,17 @@ worked-last-year inputs on every final person row and binds that verdict to
the H5 hash. ACS staging checks its preserved ASEC donor before acquisition;
historical donors and staging files missing these inputs must be rebuilt
through the exact ASEC restoration/fiscal carry and native ACS mapping.
The one reviewed exception is the County Files proof of concept
(microcosm#922): `tools/patch_us_acs_donor_columns.py` writes a patched copy of
766b7c7's donor, with the three work columns restored from the pinned ASEC
person files by source year and `PERIDNUM`, and a receipt (and, when asked, a
build-folder release manifest for the copy, for `--donor-release-manifest`),
and the staging builder's
`--allow-default-donor-column COLUMN=REASON` accepts named all-default donor
columns and records each one in the staging summary. Neither changes a
default. Both are temporary for the County Files proof of concept
(microcosm#1647; removal tracked in microcosm#1661): do not use them for the
final County Files build, whose donor is a new national build.
US household ladders carry both `county_fips` (2020 counties for the locked
policyengine-us rules) and `county_fips_2023` (3,144 county-equivalents for
calibration, including Connecticut's nine planning regions). The latter is
Expand Down
23 changes: 23 additions & 0 deletions docs/us-acs-local-county-rung.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,29 @@ are also reported and refused outside that smoke exception. The exception
does not excuse missing source facts or mismatched county boundaries, and
development samples cannot be packaged as releases.

`--county-drop-empty-soi-rows` (off by default) drops, instead of refusing, a
county IRS SOI row that is empty although the county has households: every
household's measure is 0 (for example AGI), and the state row stores no zero.
Each dropped row is recorded in `county_surface.json`
(`zero_measure_soi_rows_dropped`), the run identity and the reliability report,
and the refresh recipe repeats the flag. Calibration grades such a county
without the row, so the reliability report also names each dropped row in its
county cells (`zero_measure_soi_rows_dropped`; a combined cell's row marks
every member county) and in a `zero_measure_soi_rows_dropped` column of
`county_reliability.csv`. Only a run with the flag has that key and column. A
county with no household is refused either way.
`tools/check_us_acs_county_agi_support.py` lists, before R2, the counties whose
AGI row would be empty (exit status 2), and exits 3 when R2 would refuse the run
whatever the flag: a county outside the ladder, or a ladder county without a
household-universe record after minimum support.

**Temporary for the County Files proof of concept (microcosm#1647); removal
tracked in microcosm#1661. Do not use for the final County Files build.** There
every county must be supported well:
a county whose AGI row would be empty needs a real fix, for example more
household support (minimum support that also covers counties whose SOI rows
would be empty) or a declared cell with its own ruling, not a dropped target.

Calibration writes schema-3 `county_reliability.json` and a flat
`county_reliability.csv` next to its calibration outputs, and packaging
publishes both (the CSV is refused unless it is the flattening of the bound
Expand Down
8 changes: 5 additions & 3 deletions docs/us-modal-stage-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -1457,10 +1457,12 @@ existing network use; the tool runs with `HF_HUB_OFFLINE=1`, without
credential-name environment values, and consumes the staged files.

The runner owns `--base-h5`, `--donor-release-manifest`, `--source-manifest`,
`--inputs-dir`, `--puma-ladder`, `--out-h5`, `--summary`, `--sipp-donor` and
`--inputs-dir`, `--puma-ladder`, `--out-h5`, `--summary`, `--sipp-donor`,
the household-location flags (`--location-rule`, `--location-seed`,
`--location-clones`, `--block-ladder`). It never passes the last five, so a
staging run keeps the `legacy` location rule. Plans may set
`--location-clones`, `--block-ladder`) and `--allow-default-donor-column`.
It never passes the last six, so a staging run keeps the `legacy` location
rule and the whole dense-donor coverage gate (an allowance is a reviewed local
decision for one patched donor, microcosm#922). Plans may set
only the builder's tuning flags: `--acs-share`, `--n-estimators`,
`--max-targets-per-fit`, `--seed`, `--geography-seed`, `--chunksize`,
`--donor-channel`, `--hours-under15-policy`, `--max-households` and
Expand Down
14 changes: 14 additions & 0 deletions docs/us-work-experience-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ rows and binds the result to its hash, so an older green staging summary
cannot bypass this requirement. The assembly-first nullable pool remains
an intermediate input; its fiscal release applies that carry to every row.

The one reviewed exception is the County Files proof of concept (#922,
plan #1647). Its donor-patch tool, `tools/patch_us_acs_donor_columns.py`,
restores the three columns on a copy of 766b7c7's donor, valued as the
restoration and carry value them. Each donor person's `source_year` is its
ASEC income year, so its member is the survey-year `source_year + 1` file,
read through the pinned reader. `WEIND` and `WEMIND` join by exact
`(source_year, PERIDNUM)`, many donor rows (an ASEC row and its PUF-support
clones) to one member row. The tool refuses a donor person with no member row
or more than one, and any row whose `source_household_id` (the Census
`PH_SEQ`), `P_SEQ`, `A_LINENO`, `A_AGE`, `WKSWORK`, `POCCU2`, `PRDTRACE` or
`PRDTHSP` differs from the member's. The columns are the output of
`derive_us_org_occupation_inputs`, whose other outputs must equal the donor's
own. Raw `WEIND`/`WEMIND` are not written.

The 2026-10-23 branch refresh preserves main's current stage and graph
structure, including its six ESI source fields alongside the industry
restoration. Main's independent refusal of mixed ACS inputs with null ESI
Expand Down
14 changes: 14 additions & 0 deletions experiments/us-county-poc-20261117/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# US County Files proof of concept: the documents for LWI (2026-11-17 run)

Tracking issue: microcosm#922, the LWI County Files. Plan: microcosm#1647.

`lwi-poc-report.md` is v0.5 (24 November 2026) of the proof-of-concept report for the Living Wage Institute, the version sent to LWI. It states the fit and the limits of the 2024 county file that the 17–18 November run built: build `populace-us-2024-buildo-acs-local-f8b1039f00-20261118T011728Z`, SHA-256 `82314a3b5a6a95762faf6eb4f5b499ce56608ad6a39a27b75e11c75b4945bd3c`. v0.2 took the corrections that part 2 of the methods draft lists (microcosm#1647 comment 7005741386) and described the 23 release checks as `gate_summary.json` records them. v0.3 edits it for its readers: the delivery table gives each item's status in this delivery, the method summary describes PolicyEngine's national file as it is, and the comparison with PolicyEngine's earlier state-and-district file is out. v0.4 gives the number of donor households as 47,277, the distinct households behind the 57,240 donor household records (microcosm#1647 comment 7128462564, item 6). v0.5 says that the agreement lists the 2026 and 2027 files and the household measures in the MVP, where v0.4 called them a stretch goal, and says where the records come from instead of calling them synthetic (microcosm#1647 comment 7137552522).

`lwi-poc-methods.md` is v0.3 (24 November 2026) of the methods documentation, the final version, in the private dataset for LWI. It is part 1 of the methods draft that Max's agents posted on microcosm#1647 (comment 7005740491), edited for LWI: an appendix of build identifiers, settings and input digests replaces the links to GitHub comments, and flags, run-file names and imputation family names are out of the text. v0.2 took the corrections from Max's agents' check of v0.1's account of the donor households (their geography, their tax-detail records and the targets their weights fit) against the 28 July national build's code, run logs and published files (microcosm#1647 comments 7025093817 and 7025096163), and described the donor file as it is, the last published release with five more person columns, where v0.1 called it a patched copy. v0.3 takes the five corrections from their second check of the donor passages (microcosm#1647 comment 7128462564).

`schema_manifest.md` and `schema_manifest.json` are the schema documentation: `tools/us_release_schema_manifest.py`'s output for the file, with a notes section at the top of the Markdown (microcosm#1647 comment 7022836029).

- **Format.** The report and the methods documentation are `pe-doc` Markdown (PolicyEngine/document-templates). Each has the front matter, the three-line title block and source notes after the last rule. `pe-doc` has no report kind, so both use `kind: proposal` with `psl_foundation: false`.
- **Sources.** The numbers come from the run report on microcosm#1647 (comments 6982547034 and 6982549060) and from the release's own reports: `county_reliability.json` and `.csv`, `calibration_diagnostics.json` and `gate_summary.json`. The loader result comes from a test on 18 November with policyengine-us 2.2.1.
- **Delivery.** The file, this report, the methods documentation and the schema documentation are in the private Hugging Face dataset `policyengine/lwi-county-files`. The report refers to the other two documents by name, because a link into a private repository does not open for a reader who has only a download token.
- **Sent.** On 24 November Max emailed LWI the report (v0.5) as a PDF. The file, the methods documentation (v0.3) and the schema documentation (Markdown and JSON) are in the private Hugging Face dataset at commit `b92e7096`. LWI gets access once it names who should have it.
Loading
Loading