Relocate 30 non-essential .md files (investigation notes, fix summaries, implementation details, status reports) from the project root into docs/ to reduce clutter. Core operational docs (README, quickstart guides, configuration references) remain in the root. Co-authored-by: Cursor <cursoragent@cursor.com>
7.9 KiB
Jackbox Integration Testing Guide
This document provides a comprehensive testing guide for the Jackbox Game Picker API integration.
Prerequisites
Before testing, ensure:
-
Jackbox Game Picker API is running
- API should be accessible at the configured URL (e.g.,
http://localhost:5000) - You have the admin password for authentication
- API should be accessible at the configured URL (e.g.,
-
Relay is configured
matterbridge.tomlhas the[jackbox]section configuredEnabled=trueAPIURL,AdminPassword, andWebhookSecretare set correctly
-
Webhook is registered
- Follow the setup steps in
JACKBOX_INTEGRATION.mdto register the webhook
- Follow the setup steps in
Test Plan
Test 1: Build and Startup
Objective: Verify the relay builds and starts successfully with Jackbox integration enabled.
Steps:
- Build the relay:
docker-compose build - Start the relay:
docker-compose up -d - Check logs:
docker logs kosmi-irc-relay
Expected Results:
[jackbox] Initializing Jackbox integration...
[jackbox] Successfully authenticated with Jackbox API
[jackbox] Starting Jackbox webhook server on port 3001
[jackbox] Jackbox client injected into Kosmi bridge
[jackbox] Jackbox client injected into IRC bridge
Status: ✅ PASS / ❌ FAIL
Test 2: Vote Detection from Kosmi
Objective: Verify votes from Kosmi chat are detected and sent to the API.
Prerequisites:
- Active session in Jackbox API with at least one game played
Steps:
- Send message in Kosmi chat:
thisgame++ - Check relay logs for vote detection
- Verify vote was recorded in API
Expected Results:
- Relay logs show:
[kosmi] Detected vote from <username>: up - Relay logs show:
[jackbox] Vote recorded for <game>: <username> - X👍 Y👎 - API shows the vote was recorded
Status: ✅ PASS / ❌ FAIL
Test 3: Vote Detection from IRC
Objective: Verify votes from IRC chat are detected and sent to the API.
Prerequisites:
- Active session in Jackbox API with at least one game played
Steps:
- Send message in IRC chat:
thisgame-- - Check relay logs for vote detection
- Verify vote was recorded in API
Expected Results:
- Relay logs show:
[irc] Detected vote from <username>: down - Relay logs show:
[jackbox] Vote recorded for <game>: <username> - X👍 Y👎 - API shows the vote was recorded
Status: ✅ PASS / ❌ FAIL
Test 4: Case-Insensitive Vote Detection
Objective: Verify votes work with different case variations.
Steps:
- Send in Kosmi:
THISGAME++ - Send in IRC:
ThIsGaMe-- - Send in Kosmi:
thisgame++
Expected Results:
- All three votes are detected and sent to API
- Relay logs show vote detection for each message
Status: ✅ PASS / ❌ FAIL
Test 5: Relayed Message Filtering (Kosmi)
Objective: Verify relayed messages from IRC are NOT sent as votes from Kosmi.
Steps:
- Send message in IRC:
thisgame++ - Observe the relayed message in Kosmi chat (should have
[irc]prefix) - Check relay logs
Expected Results:
- Message appears in Kosmi as:
[irc] <username> thisgame++ - Relay logs show vote detected from IRC user
- Relay logs do NOT show a second vote from Kosmi
- Only ONE vote is recorded in the API
Status: ✅ PASS / ❌ FAIL
Test 6: Relayed Message Filtering (IRC)
Objective: Verify relayed messages from Kosmi are NOT sent as votes from IRC.
Steps:
- Send message in Kosmi:
thisgame-- - Observe the relayed message in IRC chat (should have
[kosmi]prefix) - Check relay logs
Expected Results:
- Message appears in IRC as:
[kosmi] <username> thisgame-- - Relay logs show vote detected from Kosmi user
- Relay logs do NOT show a second vote from IRC
- Only ONE vote is recorded in the API
Status: ✅ PASS / ❌ FAIL
Test 7: Game Notification Webhook
Objective: Verify game notifications are received and broadcast to both chats.
Steps:
- Add a game to the active session via the Jackbox API
- Check relay logs for webhook receipt
- Verify notification appears in both Kosmi and IRC chats
Expected Results:
- Relay logs show:
[jackbox] Broadcasting Jackbox message: 🎮 Coming up next: <game>! - Both Kosmi and IRC chats receive the notification
- Message appears as:
🎮 Coming up next: <game>!
Status: ✅ PASS / ❌ FAIL
Test 8: Webhook Signature Verification
Objective: Verify webhooks with invalid signatures are rejected.
Steps:
- Send a manual webhook POST to
http://localhost:3001/webhook/jackboxwith an invalid signature - Check relay logs
Expected Results:
- Relay logs show:
[jackbox] Webhook signature verification failed - HTTP response is 401 Unauthorized
- No game notification is broadcast
Test Command:
curl -X POST "http://localhost:3001/webhook/jackbox" \
-H "Content-Type: application/json" \
-H "X-Webhook-Signature: sha256=invalid" \
-d '{"event":"game.added","data":{"game":{"title":"Test Game"}}}'
Status: ✅ PASS / ❌ FAIL
Test 9: Duplicate Vote Prevention
Objective: Verify the API prevents duplicate votes within 1 second.
Steps:
- Send
thisgame++in Kosmi - Immediately send
thisgame++again (within 1 second) - Check relay logs and API
Expected Results:
- First vote is recorded successfully
- Second vote is rejected by API with 409 Conflict
- Relay logs show:
[jackbox] Duplicate vote from <username> (within 1 second)
Status: ✅ PASS / ❌ FAIL
Test 10: No Active Session Handling
Objective: Verify graceful handling when no active session exists.
Steps:
- End the active session in the Jackbox API
- Send
thisgame++in Kosmi or IRC - Check relay logs
Expected Results:
- Relay logs show:
[jackbox] Vote rejected: no active session or timestamp doesn't match any game - No error is thrown
- Relay continues to function normally
Status: ✅ PASS / ❌ FAIL
Test 11: Disabled Integration
Objective: Verify relay works normally when Jackbox integration is disabled.
Steps:
- Set
Enabled=falsein[jackbox]section - Restart relay:
docker-compose restart - Send messages with
thisgame++in both chats - Check relay logs
Expected Results:
- Relay logs show:
[jackbox] Jackbox integration is disabled - No vote detection occurs
- Messages are relayed normally between Kosmi and IRC
- No Jackbox client injection messages
Status: ✅ PASS / ❌ FAIL
Test 12: Authentication Token Refresh
Objective: Verify the relay re-authenticates when the JWT token expires.
Steps:
- Wait for token to expire (or manually invalidate it in the API)
- Send a vote:
thisgame++ - Check relay logs
Expected Results:
- Relay logs show:
[jackbox] Token expired, re-authenticating... - Relay logs show:
[jackbox] Successfully authenticated with Jackbox API - Vote is sent successfully after re-authentication
Status: ✅ PASS / ❌ FAIL
Manual Testing Checklist
- Test 1: Build and Startup
- Test 2: Vote Detection from Kosmi
- Test 3: Vote Detection from IRC
- Test 4: Case-Insensitive Vote Detection
- Test 5: Relayed Message Filtering (Kosmi)
- Test 6: Relayed Message Filtering (IRC)
- Test 7: Game Notification Webhook
- Test 8: Webhook Signature Verification
- Test 9: Duplicate Vote Prevention
- Test 10: No Active Session Handling
- Test 11: Disabled Integration
- Test 12: Authentication Token Refresh
Test Results Summary
Date: _________________
Tester: _________________
Total Tests: 12
Passed: ___ / 12
Failed: ___ / 12
Notes:
Known Issues
(Document any issues found during testing)
Recommendations
(Document any improvements or changes needed)