Child slot labels should be youngest-first, not oldest-first
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start in scenarios.py:1160-1163 for the US path and scenarios.py:1337-1357 for the UK path, then inspect the generated scenarios and frozen paper snapshot for child-slot references. Change the ordering so child1 is youngest, regenerate affected artifacts, and update model outputs, audit notes, and case annotations; done means both paths and downstream references consistently use the new convention.
Written by the indexing model from the issue text.
Description
Problem
scenarios.py:1160-1163 (US) and the analogous UK code at scenarios.py:1337-1357 sort household members by descending age before assigning child1, child2, ... labels:
household.sort_values(
by=["is_tax_unit_head", "is_tax_unit_spouse", "age", "person_id"],
ascending=[False, False, False, True], # age=False → DESCENDING
)
So child1 is the oldest child in the household, child2 the next oldest, etc. This inverts the natural reading for benefit programs that target young children — WIC (age < 5), Head Start (3–4), Early Head Start (under 3), Medicaid/CHIP eligibility (varies by age/income), school-meal eligibility.
Concrete evidence
Across the 10 US multi-child benchmark scenarios:
| Scenario | child1 age | child2 age | child3 age | ... |
|---|---|---|---|---|
| 008 | 4 | 0 | – | – |
| 030 | 16 | 14 | 11 | – |
| 053 | 7 | 5 | 0 | – |
| 055 | 17 | 14 | 12 | 10, 5, 1 |
| 061 | 7 | 3 | – | – |
| 089 | 7 | 3 | – | – |
WIC eligibility (age < 5) by child slot in the sample:
child1_wic_eligible: 1 case (only scenario 008)child2_wic_eligible: 3 cases (008, 061, 089)child3_wic_eligible: 1 case (053)child6_wic_eligible: 1 case (055)
The household-impact weight share follows the same shape — child2_wic_eligible weight (0.0017) is ~2× child1_wic_eligible (0.0009). That's the inverse of what users will expect when reading "Child 1 WIC eligibility" in the prompt or the program breakdown table.
Why this matters
- Prompt readability: a reader expects "Child 1" to be the household's most prominent young-child case for these programs, not the oldest sibling who's usually outside the eligibility age band.
- Person-level slot weights: programs that key on young children (WIC, EHS) get most of their weight on
child2/child3rather thanchild1, distorting the program breakdown table. - Failure-mode attribution: when a model misses WIC eligibility on the youngest child, the failure currently surfaces under
child2_wic_eligibleetc., not under the "primary" label.
Proposed fix
Switch the age sort to ascending — youngest child first. After the head/spouse rows, append children oldest-last so child1 is the youngest. Same in the UK path.
- ascending=[False, False, False, True],
+ ascending=[False, False, True, True],
This is a content change that renames many prompt-visible labels (child1_* → was-childN_*), so it will:
- Invalidate the frozen paper snapshot's reproducibility against re-generated scenarios
- Shift household-impact weights between
childNslots - Require updating model outputs that referenced specific child slots by index (audit notes, case annotations)
If the frozen paper snapshot needs to stay byte-identical, this should land alongside a new snapshot date and a paper note that the convention changed.
Out of scope
- Headline metric / weighting from the population — separate issue (#49).
- Adult slot ordering (
adult1,adult2) — currently spouse comes second byis_tax_unit_spouseflag; that's a different sort and isn't affected by this change.
- Dominant language
- Python
- Stars
- 2
- Forks
- 3
- Avg merge
- 11h 11m
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/policybench
-
v2 prompt and data: program-specific disability facts, integer inputs, and the take-up boundaryOpen
Difficulty 5/5 Over a week Newbie friendliness 38/100
PolicyEngine/policybench#165 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
PolicyEngine/policybench#145 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
PolicyEngine/policybench#140 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
PolicyEngine/policybench#139 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
PolicyEngine/policybench#129 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/policybench
Similar issues
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkPossibly taken @rodricksz4h5 claimed this today. Openarea/streaming comp/gateway P2 type/security
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#138245 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
correction metadata
Difficulty 2/5 Under an hour Newbie friendliness 68/100
acl-org/acl-anthology#10378 · 1 comment ·
Maintainers usually reply within 1 day
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom namePossibly taken @12YYCCYY16 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
prowler-cloud/prowler#13033 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
graygarbage/HermesKey#23 ·