Nebraska's school readiness credit raises an error for an eligible child care worker who lives with a child or an adult without a level, where Nebraska bases the credit on the worker's own level

Open Beginner friendly
#10,785 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@MaxGhenis is already working on this.

Since Nov 12, 2026.

  • #10819 by @MaxGhenis — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, databases

Research direction

Start with ne_school_readiness_credit.py, the rating input, and the refundable amount table; the issue identifies the lookup that fails for level 0. Read the existing baseline tests in ne_school_readiness_credit.yaml and add household cases with a worker and a child or spouse. Done when those simulations calculate the credit, ne_income_tax, and household_net_income without the missing parameter error, while existing level amounts still pass.

Written by the indexing model from the issue text.

Description

ne_school_readiness_credit raises ParameterNotFoundError when an eligible child care worker shares a simulation with any person whose ne_school_readiness_credit_child_care_worker_rating equals 0, the input's default. The worker's own child or spouse meets that condition. The model lists the credit among Nebraska's refundable credits from 2024, so ne_income_tax and household_net_income raise for that household too.

For example, for a Nebraska child care worker at level 3 who lives alone, ne_school_readiness_credit returns $2,900 for 2026. Add a 3-year-old child to the household, and the credit, ne_income_tax and household_net_income each raise ParameterNotFoundError for gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0.

The formula raises only when someone in the simulation has ne_school_readiness_credit_eligible_worker set to true. That input defaults to false, and the model computes a household that leaves it there.

What Nebraska's law says

Under Neb. Rev. Stat. 77-3605(1), "The amount of the credit shall be based on the eligible staff member's classification". Nebraska sets the amount by the worker's own level, whoever else lives in the household.

The code

Reproduction

This script runs the worker alone and then with a child, at commit 3f6e604b14798e0971ad2cd510bb5fa1698a8e0b:

from policyengine_us import Simulation

YEAR = 2026
GROUPS = ["households", "tax_units", "spm_units", "families"]
worker = {
    "age": 30,
    "ne_school_readiness_credit_eligible_worker": True,
    "ne_school_readiness_credit_child_care_worker_rating": 3,
}
child = {"age": 3}


def simulate(people):
    names = list(people)
    situation = {
        "people": {
            name: {k: {YEAR: v} for k, v in person.items()}
            for name, person in people.items()
        },
        "marital_units": {f"{name}_unit": {"members": [name]} for name in names},
        **{group: {"unit": {"members": names}} for group in GROUPS},
    }
    situation["households"]["unit"]["state_code"] = {YEAR: "NE"}
    return Simulation(situation=situation)


for label, people in [
    ("worker alone:", {"worker": worker}),
    ("worker and child:", {"worker": worker, "child": child}),
]:
    for variable in [
        "ne_school_readiness_credit",
        "ne_income_tax",
        "household_net_income",
    ]:
        try:
            print(label, variable, simulate(people).calculate(variable, YEAR))
        except Exception as error:
            print(label, variable, type(error).__name__, error)

It prints:

worker alone: ne_school_readiness_credit [2900.]
worker alone: ne_income_tax [-2900.]
worker alone: household_net_income [2900.]
worker and child: ne_school_readiness_credit ParameterNotFoundError The parameter 'gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0' was not found in the 2026-01-01 tax and benefit system.
worker and child: ne_income_tax ParameterNotFoundError The parameter 'gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0' was not found in the 2026-01-01 tax and benefit system.
worker and child: household_net_income ParameterNotFoundError The parameter 'gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0' was not found in the 2026-01-01 tax and benefit system.

We ran it with policyengine-core 3.33.2. Main's lock file pins 3.34.2, the version the two core links point at, and both versions order the mask and the formula the same way.

In further runs, the formula raises the same error for a worker with a spouse, and for a worker with a child in 2024 and 2025. It returns [2900. 3500.] for two workers at levels 3 and 5. It also raises for a worker who lives alone with ne_school_readiness_credit_eligible_worker set and no level.

Fix

Clip the level into the table's range before the lookup and return 0 for a level below 1; defined_for still keeps the credit to eligible workers. With that change applied as a reform, ne_school_readiness_credit returns [2900. 0.] for the worker and child above, and ne_income_tax and household_net_income compute.

Related

  • #4788 requested the credit, and #5820 added it.
Dominant language
Python
Stars
171
Forks
220
Avg merge
4d 15h
Merged PRs (30d)
283

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine-us

All issues in PolicyEngine/policyengine-us

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.