Skip to content

Thread student enrollment (A_HSCOL) into microunit adapter for qualifying-child-to-24 rule #122

@MaxGhenis

Description

@MaxGhenis

Follow-up to #116.

microplex's high-fidelity microunit adapter (_microunit_cps_frame_from_cps_fields in src/microplex_us/pipelines/us.py) does not thread student enrollment into microunit's CPS contract. So microunit's qualifying-child age test only applies the <19 cutoff, never the <24-for-students extension. Result: a 19–23-yo student own-child — whom eCPS does claim as a dependent — gets their own tax unit in MP, under-splitting dependents vs eCPS.

Verified

Own-child age sweep through build_policyengine_entity_tables: folded as a dependent (1 unit) at age ≤18, own unit (2 units, 0 dependents) at age ≥19 — i.e. no student extension.

The fix

MP already carries the signal: data_sources/cps.py reads A_HSCOLstudent_status (eq(2) = enrolled). Thread A_HSCOL (or A_ENRLW/A_FTPT) — or a derived student flag — through to the materialization frame and into the adapter's microunit input (microunit's optional enrollment columns are A_ENRLW/A_FTPT/A_HSCOL), so the student qualifying-child extension fires.

Acceptance

  • Own-child age 19–23 with enrolled student status → claimed as dependent (matches eCPS); non-students unchanged.
  • Add a regression test in tests/pipelines/.

Convergence note (#113): this brings MP's dependent claiming toward eCPS's engine output, so any loss effect is entity-convergence, not independent improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions