Skip to content

fix(attribution): 让 case-tools 通道适配显式结论 writer (#608) - #611

Closed
Shadow-Azure wants to merge 1 commit into
mainfrom
fix/case-tools-explicit-conclusion
Closed

Shadow-Azure wants to merge 1 commit into
mainfrom
fix/case-tools-explicit-conclusion

Conversation

@Shadow-Azure

Copy link
Copy Markdown
Owner

问题

main 在 744f4f57 之后 unit-tests-api 持续红(4 个用例),ci-ok 红,所有 PR 被阻断:

  • tests/attribution/test_case_tools.py::test_only_platform_writer_chooses_paths_and_case_identity
  • tests/m5-05-launch-wizard/test_launch_api.py::test_startup_claims_existing_binding_with_shared_provider
  • test_local_attribution_from_wizard_to_cluster[bubblewrap-bound-bubblewrap] / [case-tools-other-case-tools]

根因是并行 PR 的语义冲突:

  1. PR fix(attribution): Linux 默认使用 bubblewrap,显式关闭时使用单条证据工具 (#595) #562(f9ad7434,03:09Z 合入)新增 CaseTools,按旧 writer CLI 调用 make_probe_report.py。
  2. PR fix(attribution): 按 Skill 显式结论判定对象归因 (#588) #589(744f4f57,06:21Z 合入)把 writer 改为显式结论契约(--conclusion/--root-cause 必填、--evidence-ref 可重复),但没有更新 CaseTools 与 fixture。
  3. fix(attribution): 按 Skill 显式结论判定对象归因 (#588) #589 的 CI 跑在 02:03Z(base 尚无 CaseTools)并全绿,4 小时后合入;当时 main 没有 required status checks,旧绿检查被采信。

修复

  • CaseTools.ReportFields 增加必填 conclusion / root_cause、可选 evidence_references;probe_object / probe_type 改为可选(仅在指认因果对象时提供)。
  • write_probe_report 显式传 --conclusion / --root-cause / 重复 --evidence-ref,保留 --probe_object / --probe_type / --object-version / proposal 语义;writer 契约与 bubblewrap 主路径不变。
  • tests/attribution/case_cli_fixture.py 两个分支、tests/attribution/test_case_tools.py 同步新字段与断言。
  • 同 PR 修正 main 的流程树漂移(bugfix-56 重复 → bugfix-58;修复归因 Skill 将外部根因标记为当前对象缺陷 #588 in-progress → done),否则 docs-flow / flow-online 无法转绿;docs(flow): 新增 AI Agent 后端可替换 issue (#604) #605 会在本 PR 合入后 rebase 去掉重复 hunk。
  • 新增 Agent Note 记录决策与排他方案。

验证

本地已完成:

  • writer CLI 契约冒烟(新参数下 conclusion / root_cause / evidence_references 正确落盘,退出码 0)
  • 修改文件 py_compile 通过
  • pnpm verify:flow / verify-flow --diff origin/main 通过
  • 配对记录已重录

CI 将跑完整 unit-tests-api(含此前失败的 4 个用例)、docs-flow、flow-online 与其余 lane。

非目标

  • 不改 make_probe_report.py 的 CLI/报告结构;不改 bubblewrap 主路径与结论判定语义;不新增依赖。

Closes #608

@Shadow-Azure Shadow-Azure added this to the Bugfix 问题修复 milestone Nov 25, 2026
@Shadow-Azure
Shadow-Azure force-pushed the fix/case-tools-explicit-conclusion branch from be2e4c5 to 014b629 Compare November 25, 2026 07:50
@Shadow-Azure
Shadow-Azure force-pushed the fix/case-tools-explicit-conclusion branch from 014b629 to 82d978a Compare November 25, 2026 08:04
@Shadow-Azure

Copy link
Copy Markdown
Owner Author

main 已通过 PR #610(提交 \c7a626a3\)修复同一批 case-tools/writer 合并缺口,本 PR 与其冲突且范围重复,关闭。回归分析已写入 #608 并同步到 #609 的治理建议。

@Shadow-Azure
Shadow-Azure deleted the fix/case-tools-explicit-conclusion branch November 25, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

修复 case-tools 归因通道与显式结论 writer 的契约错位

2 participants