Whole file

Cheerwhy/hermes-lark-streaming

The author described this change as fix: align card session ID with streaming callbacks for Feishu quote (#25). It counts as a record because the check below fails on the code as it stood at 502c80de1 and passes on 667943fdd, with nothing else changed between the two runs.

Fix saved2026-05-22
Sharing licenceMIT · LICENSE
Change size+4 2

What the code was meant to do, written into the code itself as a save note

fix: align card session ID with streaming callbacks for Feishu quote (#25)

The change

5252 [
5353 "try:",
5454 " from hermes_lark_streaming.patch import on_message_started",
55- " on_message_started(message_id=event.message_id, chat_id=source.chat_id)",
55+ " _lark_message_id = self._reply_anchor_for_event(event) or event.message_id",
56+ " on_message_started(message_id=_lark_message_id, chat_id=source.chat_id)",
5657 "except Exception:",
5758 " pass",
5859 ],
6768 [
6869 "try:",
6970 " from hermes_lark_streaming.patch import on_message_completed",
71+ " _lark_message_id = self._reply_anchor_for_event(event) or event.message_id",
7072 " _lark_card_sent = on_message_completed(",
71- " message_id=event.message_id,",
73+ " message_id=_lark_message_id,",
7274 " answer=response,",
7375 " duration=_response_time,",
7476 " model=agent_result.get('model', ''),",

The check that tells the two apart

failpass·tests/test_patcher.py::TestApplyRemove::test_apply_uses_current_turn_message_id_for_card_session

Check file tests/test_patcher.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it502c80de150d0787233995bcfeeae86438f17bbb
Broken version dated2026-05-22
Modulehermes_lark_streaming.patcher
Units changed_complete_hook, _start_hook
Fingerprint21cf7c69fc96cd15
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.