zeroclaw/src/channels
Alex Gorevski 7f03ab77a9 test: add systematic test coverage for 7 bug pattern groups (#852)
Add ~105 test cases across 7 test groups identified in issue #852:

TG1 - Provider resolution (27 tests): Factory resolution, alias mapping,
      custom URLs, auth styles, credential wiring
TG2 - Config persistence (18 tests): Config defaults, TOML roundtrip,
      agent/memory config, workspace dirs
TG3 - Channel routing (14 tests): ChannelMessage identity contracts,
      SendMessage construction, Channel trait send/listen roundtrip
TG4 - Agent loop robustness (12 integration + 14 inline tests): Malformed
      tool calls, failing tools, iteration limits, empty responses, unicode
TG5 - Memory restart (14 tests): Dedup on same key, restart persistence,
      session scoping, recall, concurrent stores, categories
TG6 - Channel message splitting (8+8 inline tests): Code blocks at boundary,
      long words, emoji, CJK chars, whitespace edge cases
TG7 - Provider schema (21 tests): ChatMessage/ToolCall/ChatResponse
      serialization, tool_call_id preservation, auth style variants

Also fixes a bug in split_message_for_telegram() where byte-based indexing
could panic on multi-byte characters (emoji, CJK). Now uses char_indices()
consistent with the Discord split implementation.

Closes #852

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 15:28:34 -08:00
..
cli.rs refactor(channel): accept SendMessage struct in Channel::send() 2026-02-17 23:28:08 +08:00
dingtalk.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
discord.rs test: add systematic test coverage for 7 bug pattern groups (#852) 2026-02-18 15:28:34 -08:00
email_channel.rs fix(email): preserve legacy poll_interval alias and avoid lock across await 2026-02-18 20:18:39 +08:00
imessage.rs fix(imessage): preserve sqlite conn across polling safely 2026-02-18 14:45:05 +08:00
irc.rs fix(channels): enforce reply_target naming consistency 2026-02-18 19:56:31 +08:00
lark.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
matrix.rs feat(matrix): enable e2ee flow and add channel operations docs 2026-02-18 22:45:11 +08:00
mattermost.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
mod.rs feat(matrix): enable e2ee flow and add channel operations docs 2026-02-18 22:45:11 +08:00
qq.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
signal.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
slack.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
telegram.rs test: add systematic test coverage for 7 bug pattern groups (#852) 2026-02-18 15:28:34 -08:00
traits.rs feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
whatsapp.rs feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00