fix(rectification): name education quality events by kind, no month for year precision (BUG-1088)
Wording only: _quality_user_meaning names start/change/interruption as 升学/学业变动/学业中断; _display_date_label drops the stored month for year-precision events. Split hash and month field unchanged; same-machine A/B (PYTHONHASHSEED=0) differs only in user_meaning/display_date_label. Re-frozen per ERR-110 under new quality_wording_2026_09_29 records; sealed rerun (20) and reported-offset sweep (900) identical to 09-21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9686dfb945
commit
56b51e2170
@@ -954,7 +954,8 @@ def _event_month(event: dict[str, Any]) -> int | None:
|
||||
|
||||
def _display_date_label(event: dict[str, Any]) -> str:
|
||||
year = _event_year(event)
|
||||
month = _event_month(event)
|
||||
# A year-precision event is stored as YYYY-01-01; its month is not known (BUG-1088).
|
||||
month = None if str(event.get("precision") or "") == "year" else _event_month(event)
|
||||
if year is None:
|
||||
return "那次"
|
||||
if month:
|
||||
@@ -1072,11 +1073,21 @@ def _select_quality_distinguish_rows(candidates: Sequence[dict[str, Any]]) -> li
|
||||
return selected[:MAX_QUALITY_DISTINGUISH_PROBES]
|
||||
|
||||
|
||||
#: What the education quality question calls the event, by kind (BUG-1088). Only the
|
||||
#: kinds in `QUALITY_DISTINGUISH_EVENT_KINDS` reach the quality probe.
|
||||
EDUCATION_QUALITY_EVENT_NAME = {
|
||||
"education_start": "升学",
|
||||
"education_change": "学业变动",
|
||||
"education_interruption": "学业中断",
|
||||
}
|
||||
|
||||
|
||||
def _quality_user_meaning(event: dict[str, Any], domain: str) -> str:
|
||||
label = _display_date_label(event)
|
||||
if domain == "education":
|
||||
name = EDUCATION_QUALITY_EVENT_NAME.get(_event_kind_name(event), "学业经历")
|
||||
return (
|
||||
f"{label}那次上大学,更接近如愿、将就调剂、发挥失常还是说不清。"
|
||||
f"{label}那次{name},结果更接近如愿、将就调剂、发挥失常还是说不清。"
|
||||
"只问那次经历的实际体验,不得改时间范围。"
|
||||
)
|
||||
family = str(DOMAIN_CATALOG[domain]["event_family"])
|
||||
|
||||
Reference in New Issue
Block a user