Skip to content

Model version publishes the new UK firm entity as a person #764

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 _populate_entities in src/policyengine/tax_benefit_models/common/model_version.py would publish two person entities for UK: person and firm.

Effects once a policyengine-uk release with firm is certified against this package:

  • tests/test_model_entities.py fails, which blocks UK release certification.
  • The policyengine-api v2 catalog check for "exactly one person entity" (data/v2/catalog/extraction.py) fails.
  • app-v2 would offer firm inputs as person variables.

Proposed fix: publish is_person only for the system's person entity (the first core entity flagged is_person, matching core's person_entity rule), compared by key so cloned systems still work.

🤖 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