fix(work): show attachment delivery separately from text replies

This commit is contained in:
ex_tianzy
2026-11-12 16:16:44 +08:00
parent 26bb8de927
commit a33ce02fa6
3 changed files with 26 additions and 5 deletions
+7
View File
@@ -117,6 +117,13 @@ def test_card_projection_never_exposes_task_body_or_markdown_controls():
assert data['config']['enable_forward'] is False
def test_text_delivery_never_claims_attachments_delivered():
text=json.dumps(card_content('synthetic','completed','replied',[]),ensure_ascii=False)
assert '文字回复:' in text and '未收到登记的文件' in text
mixed=json.dumps(card_content('synthetic','completed','replied',['sent','ready','unknown']),ensure_ascii=False)
assert '已发送1件,待投递1件,异常或待核对1件' in mixed
async def test_card_uses_task_bound_source_and_skips_foreign_and_expired(env,monkeypatch):
task(env);cards,calls,clock=setup_cards(env,monkeypatch)
with env['store'].db: