fix(report): bind professional report hash to the delivered packet (BUG-693, BUG-694)
Rebind after sanitize, write an explicit binding_scope, and make the quality gate recompute coverage. Wall-clock fields stay in the packet but out of the hash.
This commit is contained in:
@@ -10773,3 +10773,35 @@
|
||||
- 相关记录:BUG-689、BUG-690、BUG-688、BUG-687、BUG-587
|
||||
- 复发自:BUG-689(邀请语复用两候选句)、BUG-690(公开字段未进深比较)
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-693 | 专业报告 result_hash 只绑中间态,交付包一半键不在覆盖里
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-15
|
||||
- 最近更新:2026-09-15
|
||||
- 影响面:`build_professional_report_reference_packet`、`bind_result_to_profile`、`full_report_quality_gate` `provenance:result_binding`
|
||||
- 用户现象:专业参考包回执自称绑定完整,质量门 `provenance:result_binding` 恒 passed。实测第一次哈希 18 个顶层键 / 6.24 MB,交付对象 36 个顶层键 / 10.04 MB;`full_report_pack`、`chart_identity`、`timing_precision_contract`、`birth_provenance`、`rectification_evidence_contract` 等 18 个键未进 `result_hash`。
|
||||
- 触发条件:`pl9-export --pack full`。虚构盘 `1990-05-17 09:26 +08 / 31.23,121.47`。
|
||||
- 根因:`attach_calculation_profile` 在已有 profile 时早退。专业参考链末尾那次调用被当成重绑,实际什么都没做。质量门只比 `result_binding` 与 `input_hash` / `result_hash` 自洽。
|
||||
- 修复:对 `sanitize_professional_report_reference` 之后的交付对象显式 `bind_result_to_profile`。不改通用早退语义。质量门新增 `provenance:result_binding_scope`:按回执排除集重算哈希,缺 scope / 意外排除 / 对不上都 `blocked`。
|
||||
- 验证:`tests/test_calculation_profile_contract.py`、`tests/test_full_report_quality_gate.py`;虚构盘三次 CLI `result_hash` 一致,覆盖 33 个顶层键且含上述五个必覆盖键。
|
||||
- 防复发:专业参考链的绑定必须发生在返回对象上;排除集必须显式落在回执里并被质量门校验。
|
||||
- 相关记录:BUG-694、BUG-576
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-694 | 同一份输入两次专业报告 `result_hash` 不同
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-15
|
||||
- 最近更新:2026-09-15
|
||||
- 影响面:`bind_result_to_profile` 哈希载荷、`result_binding.binding_scope`
|
||||
- 用户现象:`input_hash` 相同,两次 CLI 的 `result_hash` 不同(`f4f65216…` / `d841a4b3…`)。回执只能证明自洽,不能证明同输入同结果。
|
||||
- 触发条件:同一虚构盘连续跑两次 `pl9-export --pack full --format json`。
|
||||
- 根因:被哈希的载荷含墙钟字段(`elapsed_seconds`、分阶段耗时、VedAstro `called_at` / cache 时间)。`kendra_lords` 由 `list(set(...))` 生成,跨进程顺序不稳定。
|
||||
- 修复:`binding_scope` 显式排除自引用(`report_quality_gate`、`shared_full_report_authority`)、生成时刻(`generated_at` 以及 `**.called_at` / `**.cache_created_at` / `**.cache_expires_at`)、墙钟耗时(`**.elapsed_seconds`)。业务字段仍输出。Kendra / trikona lords 改为排序后的稳定列表。
|
||||
- 验证:同输入两次构造 `result_hash` 相同;只改 `elapsed_seconds` 不变;改 `coverage` 必变。虚构盘三次 CLI 哈希 `2f4739a4…` 全同,内部 `elapsed_seconds` 仍为 2.74 / 2.86 / 2.83。
|
||||
- 防复发:排除集只能是自引用 / 生成时刻 / 墙钟三类,必须写进回执并由质量门重算。加第四类要改任务书。
|
||||
- 相关记录:BUG-693、BUG-576
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
Reference in New Issue
Block a user