Files
hermes-agent/tests/fakes
Teknium ecd13e59c9 fix(discord): a long reply whose file upload fails is sent whole, never cut at 8
Teknium's ruling on PR #153476: Discord must match Telegram. A reply past
MAX_SPLIT_MESSAGES goes out as one .md file; when that upload fails the
gateway falls back to send(), and Discord's send/forum/edit-overflow paths
still ran main's #86581 cap (_cap_split_chunks): 7 chunks plus a
"Response truncated" notice, the rest dropped. Now every chunk goes out.

- plugins/platforms/discord/adapter.py: _cap_split_chunks and its three
  call sites are removed; MAX_SPLIT_MESSAGES stays as the file-handoff cap.
  Pacing is discord.py's own: its per-route buckets wait on
  X-RateLimit-Remaining/Reset-After and a 429 sleeps retry_after and
  retries, so no second pacer is added.
- locales/*.yaml: platform.discord.limits.response_truncated (its only
  user) is deleted from all 17 catalogs.
- tests/fakes/platforms/discord_standin.py: an opt-in per-channel
  create_message bucket that sends discord.py's X-RateLimit headers, and a
  Via header on 429s (without it discord.py treats a 429 as a Cloudflare
  ban and raises instead of retrying).
- Tests that pinned the Discord truncation (test_discord_split_cap.py,
  test_native_warning_coverage.py's Discord case) are rewritten under the
  ruling to assert every chunk is delivered with no notice. New E2E
  test_discord_long_reply_fallback.py: real gateway + adapter, upload
  refused and a 429 mid-fallback, 40k reply arrives whole (red on 52f239ca).

Live (real gateway + Discord adapter vs the stand-in), 52f239ca -> head:
non-streamed 60k, upload refused: 8 msgs, 13,843 chars + notice -> 31 msgs,
the whole reply, no notice; same with a 429 on the 5th message -> retried,
31 msgs, nothing lost; 5-per-5s bucket -> 33 msgs, never more than 5 in
any 5 s. Upload working, 10k/short controls and Telegram unchanged.
2026-11-12 22:36:28 -08:00
..