Skip to content

fix: validate reaction message IDs - #111

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/validate-reaction-message-id
Open

fix: validate reaction message IDs#111
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/validate-reaction-message-id

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject non-numeric messageId values for the MCP react-to-message tool before Discord lookup
  • advertise the numeric constraint in the MCP tool input schema
  • add focused request-validation coverage and document the fix

TDD evidence

  • Untouched-base RED: node --test tests/mcpMessageValidation.test.mjs failed because the advertised messageId pattern was absent.
  • GREEN: the focused test passed after adding matching Zod and JSON-schema constraints.

Verification

  • npm run build — passed
  • node --test tests/mcpMessageValidation.test.mjs — passed, 2 tests
  • npm test — passed, 66 tests
  • direct node-pty import probe — passed
  • git diff --check upstream/main...HEAD — passed

Risk

Low. Valid numeric Discord message IDs are unchanged; malformed values now fail locally instead of reaching Discord.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

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