Skip to content

fix(telegram): never emit a bare 'undefined' to the user (DIVE-1674)#12

Merged
lodar merged 1 commit into
mainfrom
dive-1674-undefined-guard
Jul 22, 2026
Merged

fix(telegram): never emit a bare 'undefined' to the user (DIVE-1674)#12
lodar merged 1 commit into
mainfrom
dive-1674-undefined-guard

Conversation

@lodar

@lodar lodar commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Guards every telegram-* send choke point so an accidental undefined/empty/'undefined' text can never be delivered to a user.

  • Transport middleware (bot.api.config.use) in claude/grok/codex/agy/opencode/pi throws instead of sending when text is null, empty-after-trim, or the literal string 'undefined' (opencode/pi previously had no such middleware, added).
  • claude reply MCP handler returns a clear error to the caller when text is missing (files-only replies still allowed).
  • hooks Bot-API client sendMessage() drops empty/undefined + logs a warning.

Regression test locks the sendMessage guard. Fork versions bumped; generator --check byte-exact; suite 319/0.

Gate: approved by lodar 2026-07-22 05:05:49 (DIVE-1674).

Generated with Claude Code

Guard every send choke point across all telegram-* forks so an accidental
undefined/empty/'undefined' text can never be delivered:
- transport middleware (bot.api.config.use) in claude/grok/codex/agy/opencode/pi
  throws instead of sending when text is null, empty-after-trim, or the literal
  string 'undefined' (opencode/pi previously had no such middleware — added).
- claude reply MCP handler returns a clear error to the caller when text is
  missing (files-only replies still allowed), skipping the empty text message.
- hooks Bot-API client sendMessage() drops empty/undefined + logs a warning.
Regression test locks the sendMessage guard. Fork versions bumped; generator
--check byte-exact; suite 319/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lodar
lodar merged commit dc7fac8 into main Jul 22, 2026
2 checks passed
@lodar
lodar deleted the dive-1674-undefined-guard branch July 22, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant