docs(website): add Discord bot test plan #29
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/bot-test-plan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Adds
website/test-plan.md— the test plan for thebot/workspace, the last of the threewebsitenpm workspaces without a suite. The server and client suites landed in website PR #86; this documents how the bot follows the same path.It's a plan, not code: it records the shared conventions and maps out the meaningful bot behavior to lock, so the eventual bot suite is a straightforward build rather than a design exercise.
Contents
node --test, zero external test deps, DB pool at a dead port, DiscordClient/Message/Memberhand-faked (the bot is CommonJS, so it mirrors the server suite verbatim).normalize(leetspeak/repeat folding + word-boundary matching, including the documented gaps),duration,spamFilter(rate-limit side effect, mass-mention/emoji thresholds);inviteFilter(fail-closed on unresolvable),siteApiClient(never-throws{ok}contract + maintenance branch),requireInternalKey(401 / fail-closed-empty / timing-safe);messageFilterpipeline — bypass-first decision order, fixed-duration mute, best-effort recording never breaking moderation;How it was tested
Docs-only. Prose verified against
bot/src(filter/,utils/duration.js,discord/messageFilter.js,site/siteApiClient.js,internal/requireInternalKey.js); companion links (website-README.md,BACKEND_DESIGN.md) resolve.Checklist
AI-assisted contributions (required)
Claude Code (Opus 4.8). I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with aCo-Authored-Bytrailer.License
🤖 Generated with Claude Code