Record why a v1 household failed to copy to v2
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 57/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- backend, observability
调研方向
Start with _log_copy_operation in policyengine_api/services/household_mirroring.py and compare the household copy records with the policy copy records that use LegacyPolicyTranslationReason. Trace how translation failures and v2 household document rule failures are categorized, keeping personal data out of logged reasons. Done means failed records use the requested message and include the exception type and a fixed reason code for translation failures.
由索引模型根据 Issue 内容生成。
描述
The record logged when a v1 household fails to copy to v2 does not say why the copy failed, so the cause of the failures in #4194 can't be read from the logs.
What happens
_log_copy_operation in policyengine_api/services/household_mirroring.py writes one v1_household_mirror_operations record per copy:
- The message is
V1 household immediate copy completedfor every outcome, includingoutcomeerrorat severity ERROR. - A failure records only its broad
failure_category(translation,integrity,database,configurationorunexpected). A translation failure records nothing about which part of the v1 household could not be translated. The exception's message can't be logged as it is: several messages hold the household's names, such aslegacy person '<name>' belongs to multiple benunits records.
#4194 is an error group of these records on POST /<country_id>/household (3 of 6 production requests on 2026-11-05). Each record says only that a copy failed in some category.
Expected
- A failed copy's record says
V1 household immediate copy failed. - It records the exception's type (
error_type) and, for a translation failure, a fixed reason code without personal data (failure_reason), as the policy copy records already do (LegacyPolicyTranslationReason). A translation whose result breaks a v2 household document rule, such as a person who belongs to no record of one entity collection, records that rule's reason.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 110
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
维护者通常 2 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 2 天内回复
-
Stop logging refused economy requests at ERROR可能已有人在做 @anth-volk 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
PolicyEngine/policyengine-api#4219 ·
维护者通常 2 天内回复
-
service: policyengine-simulation-gateway telemetry-error
难度 4/5 3-5 天 新手友好度 30/100
PolicyEngine/policyengine-api#4218 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
binding:python bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
The Browser tab fails with a Wayland error when Open Terminal runs from a Wayland desktop session未关闭
难度 2/5 1-3 小时 新手友好度 78/100
open-webui/open-terminal#210 ·
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 78/100
agentscope-ai/agentscope#3807 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#150542 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 91/100
triton-inference-server/server#9069 ·
维护者通常 1 天内回复