fix(review): 批注去重 + 删除残留调试截图

- annotator.annotate:同一 handle 只批注一次(修复 created 无去重的既有 gap,
  同 handle 出现两次不再产生重复引线)
- 删除 test_screenshot.png(已删除脚本 test_autoagent.py 的残留产物)
This commit is contained in:
gjm committed 2026-10-14 19:53:41 +08:00
1 parent f7fa8f14d9
commit 81d8c3d2ca
3 files changed
+8 -7

No files matched your search

+5 -4
View File
@@ -120,8 +120,8 @@ def test_annotate_handles_multiple_created_entities():
assert created == ["N1", "N2"]
def test_annotate_created_not_deduped_known_gap():
"""已知瑕疵:同一 handle 出现两次会创建两条批注(created 无去重,仅 highlighted 去重)。"""
def test_annotate_dedupes_repeated_handle():
"""同一 handle 出现两次只批注一次(created 与 highlighted 均去重)。"""
ctx = make_ctx(client=build_client())
created, highlighted = annotate(
ctx,
@@ -131,8 +131,9 @@ def test_annotate_created_not_deduped_known_gap():
],
log=lambda *a: None,
)
assert created == ["NEW1", "NEW1"] # 重复批注(期望去重)
assert highlighted == ["A"] # 高亮已去重
assert created == ["NEW1"]
assert highlighted == ["A"]
assert len(ctx.client.called("add_leader_annotation")) == 1
def test_annotate_propagates_protocol_error_on_detail():