AntFleet

Disagreement · eb14fff2-anthropic-1

Slack bot-message filter is inverted: BOT_ID = "null" string check rejects real users

mismatch
repo 6f7fc663·PR #2·reviewed 1 week ago

Primary finding

Slack bot-message filter is inverted: BOT_ID = "null" string check rejects real users

highbughigh
  • .github/workflows/messages.yml:105-117
`jq -r '.bot_id // empty'` outputs the empty string when `bot_id` is absent (i.e., the message is from a real user), and outputs the actual bot id string when it is a bot. The code then checks `[ "$BOT_ID" = "null" ]` to admit the message. This condition is never true for user messages (where BOT_ID is empty) and never true for bot messages (where BOT_ID is a non-null id), so the Slack branch effectively never dispatches anything. The intent (per comments) is to skip bot messages, so the check should be `[ -z "$BOT_ID" ]`. The Telegram and Discord branches are correctly written, so this is an inconsistency that silently disables Slack ingestion.

Recommendation

Change the guard to `[ -z "$BOT_ID" ]` (consistent with the Telegram chat-id check pattern). Also use `jq -r '.bot_id // ""'` consistently and verify with a unit-style shell test.

Counterpart finding

Slack messages never processed due to incorrect bot_id null check

mediumbughigh
  • .github/workflows/messages.yml:106-113
jq -r with // empty yields an empty string for missing bot_id on user messages, never the literal string "null". The condition [ "$BOT_ID" = "null" ] is always false for normal user messages, so no Slack messages are ever processed or marked.

Recommendation

Treat user messages as those without a bot_id by checking for empty BOT_ID, e.g.: - Change condition to: if [ -n "$TEXT" ] && [ -z "$BOT_ID" ] && [ -z "$HAS_CHECK" ]; then Or set BOT_ID with jq -r '.messages[$i].bot_id? // empty' and use the same empty check.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →