v1 household copies to v2 fail when the household leaves out group collections
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
- #4165 von @anth-volk — ohne Merge geschlossen
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start with translate_legacy_household and its normalization step, which rejects people records that do not list every country-supported collection, and with _failure_category, which reports those rejections as translation. Compare them with policyengine-core's SimulationBuilder.build_from_entities, specifically add_default_group_entity and the last step of add_group_entity, to see which default groups it creates. Done when the two affected US households translate with those groups added, the UK and extra-key households still fail as unsupported, and the two events can be copied with process-v1-household-mirror-event.yml.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
From 2026-10-29 to 2026-11-02, four production v1 household creates in the Public API (three US, one UK) logged V1 household immediate copy completed with outcome error and failure_category translation. Their household_mirror_events records stay pending, so those households have no v2 copy.
Cause
translate_legacy_household requires every person to be listed in a group of every collection the country supports. policyengine-core, which the Public API's v1 calculations use, does not. When it builds a simulation from a v1 household (SimulationBuilder.build_from_entities):
- a group collection that is omitted, or null, gets one group that holds every person (
add_default_group_entity); - a person that a present collection's groups leave out gets a group of their own (the last step of
add_group_entity).
Two of the US households list people and households, and leave out some or all of families, tax_units, spm_units and marital_units. v1 calculates them, but the translation's normalization rejects them with people record memberships must identify every country-supported entity collection, which _failure_category reports as translation.
The other two households are not valid v1 households, and v1 cannot calculate them either:
- one US household has an extra top-level key that is not an entity collection;
- the UK household has no
peoplecollection, and a person record at the top level.
policyengine-core raises SituationParsingError for both. The translation rejects them as legacy household contains unsupported collections, which is correct, so this issue leaves them pending.
Fix
Make the translation create, for each collection, the groups that policyengine-core creates: one group of everyone for an omitted or null collection, and a group of their own for each person a present collection leaves out. These groups have stable IDs after the named groups, no source_name (the v1 household has no name for them) and no values.
After the fix deploys, copy the two affected events with process-v1-household-mirror-event.yml, one event at a time.
- Vorherrschende Sprache
- Python
- Sterne
- 18
- Forks
- 33
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 105
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PolicyEngine/policyengine-api
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
PolicyEngine/policyengine-api#4037 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Update PolicyEngine bundle to 6.15.0Evtl. vergeben @policyengine hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 1/100
PolicyEngine/policyengine-api#4214 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 54/100
PolicyEngine/policyengine-api#4211 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in PolicyEngine/policyengine-api
Ähnliche Issues
-
follow-up needs-triage S3: minor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
manaflow-ai/cmux#36856 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue help wanted
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.imgEvtl. vergeben @xiaofeng-han hat das heute übernommen. Offenbuild ios
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag