Skip to content

Country metadata describes the new UK firm entity as a person #4338

Open

Description

@vahid-ahmadi

policyengine-core flags any root population with no members as is_person. policyengine-uk's new firm entity (PolicyEngine/policyengine-uk#2940) is one, so build_entities in policyengine_api/country.py would describe firm with is_person: true in /uk/metadata.

app-v2 would then offer firm inputs as person variables, and calculating would fail with household_variable_wrong_entity.

Proposed fix: describe only the system's person entity (the first core entity flagged is_person, matching core's person_entity rule) as a person, compared by key so cloned systems still work. The v2 catalog's "exactly one person entity" check in data/v2/catalog/extraction.py is correct as is; it is fixed upstream by PolicyEngine/policyengine.py#764.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions