Repository navigation
Describe only the person entity as a person in country metadata - #4339
Draft
vahid-ahmadi wants to merge 1 commit into
Draft
vahid-ahmadi wants to merge 1 commit into
vahid-ahmadi wants to merge 1 commit into
Conversation
policyengine-core flags any root population with no members as is_person. policyengine-uk's new firm entity is one, so /uk/metadata would describe firm with is_person true and the app would offer firm inputs as person variables. build_entities now sets is_person only for the entity whose key matches the first is_person entity (core's person_entity rule); keys rather than identity because a cloned system copies its person entity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (66.66%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #4339 +/- ##
==========================================
- Coverage 93.63% 93.59% -0.04%
==========================================
Files 408 408
Lines 23282 23284 +2
Branches 3648 3649 +1
==========================================
- Hits 21799 21793 -6
- Misses 868 875 +7
- Partials 615 616 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 23, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4338
policyengine-core flags any root population with no members as
is_person. policyengine-uk's newfirmentity (PolicyEngine/policyengine-uk#2940) is one, so/uk/metadatawould describefirmwithis_person: true. app-v2 would then offer the firm inputs as person variables, and calculating would fail withhousehold_variable_wrong_entity.build_entitiesnow setsis_persononly for the entity whose key matches the firstis_personentity, which is core'sperson_entityrule. It compares keys rather than identity because cloned systems copy the person entity. This matches the policyengine.py fix (PolicyEngine/policyengine.py#765), which the v2 catalog's "exactly one person entity" check relies on.🤖 Generated with Claude Code