Skip to content

refactor: V7 — new stack, monorepo structure, and tooling modernization - #208

Merged
RedStar071 merged 493 commits into
mainfrom
V7
Nov 13, 2026
Merged

RedStar071 merged 493 commits into
mainfrom
V7

Conversation

@RedStar071

@RedStar071 RedStar071 commented Jun 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Migrates wolfstar-bot off Sapphire Framework onto @wolfstar/http-framework and the Stars CLI, and cuts the database over to Prisma ORM 8. The monorepo now has two workspaces, projects/bot and projects/database; the two extra workspaces this PR briefly introduced, projects/gateway and projects/shared, were folded back into the bot and removed (see below).

  • Framework & tooling: Sapphire → @wolfstar/http-framework, @wolfstar/cli (stars) as the build tool (tsdown-based), Yarn → pnpm, tsc/eslint → oxlint + oxfmt, lint-staged → nano-staged. Plugins (plugin-api, plugin-i18next, plugin-subcommands-advanced, plugin-logger, plugin-gateway, plugin-cache, plugin-sharder) are declared as dependencies and auto-registered by the Stars CLI (<name>/register injected at build time) — no manual /register imports. projects/bot now mirrors staryl's layout: src/lib/utilities, #common/#types aliases in one map (scripts/aliases.ts), tests/setup.ts, filename-routed src/routes/*.get.ts. i18next types are generated with stars codegen from src/locales/en-US instead of hand-maintained.
  • Database: projects/database is Prisma ORM 8 only (@prisma/orm-postgres), with a normalized contract (Guild, Modules, GuildRoles, GuildLogs, GuildAutoModeration*, …) replacing the old flat guilds table; Prisma 7 and the dual-generation setup are gone. projects/bot/src/lib/database — never ported when the monorepo was restructured — is rebuilt on top of it: GuildData stays a flat settings object for the rest of the bot, src/lib/database/settings/storage.ts maps every key to its table/column and reads/writes the normalized tables in one transaction, and AuditLogManager, PermissionNodeManager, AdderManager, SchemaKey/SchemaGroup, and the serializer store are ported onto the v8 client and @wolfstar/http-framework's container.
  • Gateway: the dedicated projects/gateway process and its wolfstar-shared cache/broker package are removed. The bot now runs the Discord gateway in-process with @wolfstar/plugin-gateway, backed by a @wolfstar/plugin-cache Redis entity cache and a Redis session store (shards resume across restarts instead of re-identifying). container.client stays the base Client type, so gateway-aware code reaches the managers through container.gatewayClient instead (56 call sites renamed).
  • Dependencies: every @wolfstar/* package bumped to latest (plugin-gateway 0.6.0 → 0.8.0 brings GuildResolvable and the rest of discord.js's *Resolvable types, used to rewrite resolveGuild); a pnpm-workspace.yaml override dedupes plugin-i18next onto one version, since shared-http-pieces pinned an older one with an incompatible peer range.
  • Docker/CI: both Dockerfiles updated for pnpm + Node 24 Alpine and for the current workspace list (no more projects/gateway/projects/shared stages).

Upstream follow-ups filed

Gaps found while integrating @wolfstar/plugin-gateway/plugin-cache and retiring wolfstar-shared were filed against wolfstar-project/plugins rather than worked around locally where upstream was the better fix: #121 (register entrypoint crash, member requests, session resume — resolved on main), #136 (@wolfstar/plugin-broker, replacing wolfstar-shared's Redis-stream broker), #137 (pluggable codec / opt-in projection for plugin-cache's Redis store, replacing wolfstar-shared's hand-rolled binary cache format).

Test plan

  • pnpm install completes without errors
  • pnpm --filter wolfstar-database prisma:generate && pnpm --filter wolfstar-database build
  • pnpm --filter wolfstar-bot build
  • pnpm test
  • pnpm lint (oxlint + oxfmt)
  • Docker image builds (docker build .)
  • Bot connects to the gateway, resumes shards across a restart, and settings read/write against a live Postgres

🤖 AI disclosure: Wolfstar Agent Kit modified this description. AI open source policy.

RetriggerView in GreptileConfidence Score: 4/5

Fix /mute remove before merging so moderators can undo the mutes that /mute add creates.

Reviews (171) · Last reviewed commit: "fix(moderation): make /mute add a timeou..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 299 files, which is 149 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: c1bffec7-f850-4885-b798-8f79b6fb3a65

📥 Commits

Reviewing files that changed from the base of the PR and between b16bcc7 and f6bebbe.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (299)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/continuous-delivery.yml
  • .github/workflows/continuous-integration.yml
  • .github/workflows/update-tlds.yml
  • .gitignore
  • .husky/commit-msg
  • .husky/pre-commit
  • .oxfmtrc.json
  • .oxlintrc.json
  • crowdin.yml
  • mise.toml
  • package.json
  • pnpm-workspace.yaml
  • prisma.config.ts
  • prisma/schema.prisma
  • projects/bot/Dockerfile
  • projects/bot/package.json
  • projects/bot/scripts/clean.mjs
  • projects/bot/src/.env
  • projects/bot/src/.env.development
  • projects/bot/src/.env.test
  • projects/bot/src/commands/Admin/eval.ts
  • projects/bot/src/commands/Management/Helpers/guild-info.ts
  • projects/bot/src/commands/Management/Helpers/role-info.ts
  • projects/bot/src/commands/Management/Members/stickyRoles.ts
  • projects/bot/src/commands/Management/Message Filters/attachmentMode.ts
  • projects/bot/src/commands/Management/Message Filters/capitalsMode.ts
  • projects/bot/src/commands/Management/Message Filters/filter.ts
  • projects/bot/src/commands/Management/Message Filters/filterMode.ts
  • projects/bot/src/commands/Management/Message Filters/inviteMode.ts
  • projects/bot/src/commands/Management/Message Filters/linkMode.ts
  • projects/bot/src/commands/Management/Message Filters/messageMode.ts
  • projects/bot/src/commands/Management/Message Filters/newlineMode.ts
  • projects/bot/src/commands/Management/Reaction Filters/reactionMode.ts
  • projects/bot/src/commands/Moderation/Management/history.ts
  • projects/bot/src/commands/Moderation/Management/moderations.ts
  • projects/bot/src/commands/Moderation/Utilities/case.ts
  • projects/bot/src/commands/Moderation/Utilities/permissions.ts
  • projects/bot/src/commands/Moderation/Utilities/reason.ts
  • projects/bot/src/commands/Moderation/Utilities/slowmode.ts
  • projects/bot/src/commands/Moderation/Utilities/time.ts
  • projects/bot/src/commands/Moderation/addrole.ts
  • projects/bot/src/commands/Moderation/ban.ts
  • projects/bot/src/commands/Moderation/dehoist.ts
  • projects/bot/src/commands/Moderation/kick.ts
  • projects/bot/src/commands/Moderation/lockdown.ts
  • projects/bot/src/commands/Moderation/mute.ts
  • projects/bot/src/commands/Moderation/prune.ts
  • projects/bot/src/commands/Moderation/removerole.ts
  • projects/bot/src/commands/Moderation/setnickname.ts
  • projects/bot/src/commands/Moderation/softban.ts
  • projects/bot/src/commands/Moderation/togglemoderationdm.ts
  • projects/bot/src/commands/Moderation/unban.ts
  • projects/bot/src/commands/Moderation/unmute.ts
  • projects/bot/src/commands/Moderation/unwarn.ts
  • projects/bot/src/commands/Moderation/voicekick.ts
  • projects/bot/src/commands/Moderation/warn.ts
  • projects/bot/src/commands/Tools/whois.ts
  • projects/bot/src/config.ts
  • projects/bot/src/lib/Client.ts
  • projects/bot/src/lib/augments.d.ts
  • projects/bot/src/lib/discord/GuildMemberFetchQueue.ts
  • projects/bot/src/lib/i18n/languageKeys/index.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Arguments.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Assertions.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Colors.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Commands.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/FuzzySearch.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Globals.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Guilds.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Misc.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Preconditions.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/PromptList.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Serializers.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/Settings.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/System.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/commands/Admin.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/commands/Management.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/commands/Moderation.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/commands/Whois.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/NoMentionSpam.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/errors/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/guilds/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/guilds/Logs.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/guilds/Members.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/messages/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/moderation/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/moderation/Messages.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/events/reactions/All.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/settings/Channels.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/settings/Gateway.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/settings/channels/Ignore.ts
  • projects/bot/src/lib/i18n/languageKeys/keys/settings/channels/Logs.ts
  • projects/bot/src/lib/moderation/index.ts
  • projects/bot/src/lib/moderation/managers/ModerationManager.ts
  • projects/bot/src/lib/moderation/managers/StickyRoleManager.ts
  • projects/bot/src/lib/moderation/managers/index.ts
  • projects/bot/src/lib/moderation/structures/ModerationCommand.ts
  • projects/bot/src/lib/moderation/structures/ModerationListener.ts
  • projects/bot/src/lib/moderation/structures/ModerationMessageListener.ts
  • projects/bot/src/lib/moderation/structures/ModerationTask.ts
  • projects/bot/src/lib/moderation/structures/SelfModerationCommand.ts
  • projects/bot/src/lib/moderation/structures/SelfModeratorBitField.ts
  • projects/bot/src/lib/moderation/structures/SetUpModerationCommand.ts
  • projects/bot/src/lib/moderation/structures/index.ts
  • projects/bot/src/lib/moderation/workers/WorkerHandler.ts
  • projects/bot/src/lib/moderation/workers/WorkerManager.ts
  • projects/bot/src/lib/moderation/workers/WorkerResponseHandler.ts
  • projects/bot/src/lib/moderation/workers/errors/TimeoutError.ts
  • projects/bot/src/lib/moderation/workers/errors/index.ts
  • projects/bot/src/lib/moderation/workers/index.ts
  • projects/bot/src/lib/moderation/workers/types.ts
  • projects/bot/src/lib/moderation/workers/worker.ts
  • projects/bot/src/lib/setup.ts
  • projects/bot/src/lib/structures/InviteStore.ts
  • projects/bot/src/lib/structures/commands/SkyraCommand.ts
  • projects/bot/src/lib/structures/index.ts
  • projects/bot/src/lib/structures/managers/LockdownManager.ts
  • projects/bot/src/lib/structures/managers/ScheduleManager.ts
  • projects/bot/src/lib/structures/managers/index.ts
  • projects/bot/src/lib/util/Links/TLDs.ts
  • projects/bot/src/lib/util/Links/UrlRegex.ts
  • projects/bot/src/lib/util/Parsers/ExceededLength.ts
  • projects/bot/src/lib/util/Parsers/FuzzySearch.ts
  • projects/bot/src/lib/util/Sanitizer/clean.ts
  • projects/bot/src/lib/util/Sanitizer/initClean.ts
  • projects/bot/src/lib/util/Security/GuildSecurity.ts
  • projects/bot/src/lib/util/Security/ModerationActions.ts
  • projects/bot/src/lib/util/Security/RegexCreator.ts
  • projects/bot/src/lib/util/bits.ts
  • projects/bot/src/lib/util/common/comparators.ts
  • projects/bot/src/lib/util/common/guards.ts
  • projects/bot/src/lib/util/common/index.ts
  • projects/bot/src/lib/util/common/iterators.ts
  • projects/bot/src/lib/util/common/promises.ts
  • projects/bot/src/lib/util/common/times.ts
  • projects/bot/src/lib/util/constants.ts
  • projects/bot/src/lib/util/formatters.ts
  • projects/bot/src/lib/util/functions/booleans.ts
  • projects/bot/src/lib/util/functions/emojis.ts
  • projects/bot/src/lib/util/functions/guild.ts
  • projects/bot/src/lib/util/functions/index.ts
  • projects/bot/src/lib/util/functions/numbers.ts
  • projects/bot/src/lib/util/functions/permissions.ts
  • projects/bot/src/lib/util/moderationConstants.ts
  • projects/bot/src/lib/util/util.ts
  • projects/bot/src/listeners/commands/commandDenied.ts
  • projects/bot/src/listeners/commands/commandError.ts
  • projects/bot/src/listeners/commands/commandRunAttach.ts
  • projects/bot/src/listeners/commands/commandSuccessAnalytics.ts
  • projects/bot/src/listeners/commands/commandSuccessAutoDelete.ts
  • projects/bot/src/listeners/commands/commandSuccessLogger.ts
  • projects/bot/src/listeners/commands/unknownCommand.ts
  • projects/bot/src/listeners/errors/error.ts
  • projects/bot/src/listeners/errors/listenerError.ts
  • projects/bot/src/listeners/errors/listenerErrorSentry.ts
  • projects/bot/src/listeners/errors/taskError.ts
  • projects/bot/src/listeners/errors/taskErrorSentry.ts
  • projects/bot/src/listeners/guildMessageLog.ts
  • projects/bot/src/listeners/guilds/bans/guildBanAdd.ts
  • projects/bot/src/listeners/guilds/bans/guildBanRemove.ts
  • projects/bot/src/listeners/guilds/channels/channelCreateNotify.ts
  • projects/bot/src/listeners/guilds/channels/channelDeleteNotify.ts
  • projects/bot/src/listeners/guilds/channels/channelUpdateNotify.ts
  • projects/bot/src/listeners/guilds/emojis/emojiCreateNotify.ts
  • projects/bot/src/listeners/guilds/emojis/emojiDeleteNotify.ts
  • projects/bot/src/listeners/guilds/emojis/emojiUpdateNotify.ts
  • projects/bot/src/listeners/guilds/guildUpdateNotify.ts
  • projects/bot/src/listeners/guilds/members/guildMemberAdd.ts
  • projects/bot/src/listeners/guilds/members/guildMemberUpdateNicknameNotify.ts
  • projects/bot/src/listeners/guilds/members/guildMemberUpdateRolesNotify.ts
  • projects/bot/src/listeners/guilds/members/notMutedMemberAddInitialRole.ts
  • projects/bot/src/listeners/guilds/members/notMutedMemberAddNotify.ts
  • projects/bot/src/listeners/guilds/members/rawGuildMemberRemove.ts
  • projects/bot/src/listeners/guilds/members/rawGuildMemberUpdate.ts
  • projects/bot/src/listeners/guilds/members/rawMemberRemoveNotify.ts
  • projects/bot/src/listeners/guilds/messages/guildUserMessageImageNotify.ts
  • projects/bot/src/listeners/guilds/messages/guildUserMessagePointsHandler.ts
  • projects/bot/src/listeners/guilds/messages/guildUserMessageSocialPointsAddMember.ts
  • projects/bot/src/listeners/guilds/messages/guildUserMessageSocialPointsAddMemberRewardLevel.ts
  • projects/bot/src/listeners/guilds/messages/guildUserMessageSocialPointsAddMemberRewardRole.ts
  • projects/bot/src/listeners/guilds/messages/guildUserMessageSocialPointsAddUser.ts
  • projects/bot/src/listeners/guilds/rawGuildCreateMemberFetch.ts
  • projects/bot/src/listeners/guilds/rawGuildDelete.ts
  • projects/bot/src/listeners/guilds/rawGuildDeleteMemberFetch.ts
  • projects/bot/src/listeners/guilds/roles/roleCreateNotify.ts
  • projects/bot/src/listeners/guilds/roles/roleDelete.ts
  • projects/bot/src/listeners/guilds/roles/roleDeleteNotify.ts
  • projects/bot/src/listeners/guilds/roles/roleUpdate.ts
  • projects/bot/src/listeners/guilds/roles/roleUpdateNotify.ts
  • projects/bot/src/listeners/messages/guildMessageDeleteNotify.ts
  • projects/bot/src/listeners/messages/guildMessageDeleteRichDisplay.ts
  • projects/bot/src/listeners/messages/guildMessageDeleteSnipe.ts
  • projects/bot/src/listeners/messages/guildUserMessageMediaOnly.ts
  • projects/bot/src/listeners/messages/messageCreate.ts
  • projects/bot/src/listeners/messages/messageDelete.ts
  • projects/bot/src/listeners/messages/messageDeleteBulkRemoveResponses.ts
  • projects/bot/src/listeners/messages/messageDeleteRemoveResponses.ts
  • projects/bot/src/listeners/messages/messageUpdateNotify.ts
  • projects/bot/src/listeners/messages/rawMessageDelete.ts
  • projects/bot/src/listeners/messages/rawMessageDeleteBulk.ts
  • projects/bot/src/listeners/messages/userMessageGuildHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageAttachmentsHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageCapitalsHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageInvitesHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageLinksHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageMentionsHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageMessagesHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageNewLinesHandler.ts
  • projects/bot/src/listeners/moderation/messages/guildUserMessageWordsHandler.ts
  • projects/bot/src/listeners/moderation/moderationEntryAdd.ts
  • projects/bot/src/listeners/moderation/moderationEntryEdit.ts
  • projects/bot/src/listeners/reactions/rawMessageReactionAdd.ts
  • projects/bot/src/listeners/reactions/rawMessageReactionRemove.ts
  • projects/bot/src/listeners/reactions/rawReactionAddBlockList.ts
  • projects/bot/src/listeners/reactions/rawReactionAddNotify.ts
  • projects/bot/src/listeners/reactions/rawReactionAddRole.ts
  • projects/bot/src/listeners/reactions/rawReactionRemoveRole.ts
  • projects/bot/src/listeners/userUpdate.ts
  • projects/bot/src/locales/en-US/commands/management.json
  • projects/bot/src/locales/en-US/commands/moderation.json
  • projects/bot/src/locales/en-US/commands/system.json
  • projects/bot/src/locales/en-US/commands/tools.json
  • projects/bot/src/locales/en-US/errors.json
  • projects/bot/src/locales/en-US/events/errors.json
  • projects/bot/src/locales/en-US/events/guilds-logs.json
  • projects/bot/src/locales/en-US/events/guilds-members.json
  • projects/bot/src/locales/en-US/events/messages.json
  • projects/bot/src/locales/en-US/events/moderation.json
  • projects/bot/src/locales/en-US/events/noMentionSpam.json
  • projects/bot/src/locales/en-US/events/reactions.json
  • projects/bot/src/locales/en-US/events/twitch.json
  • projects/bot/src/locales/en-US/fuzzySearch.json
  • projects/bot/src/locales/en-US/globals.json
  • projects/bot/src/locales/en-US/guilds.json
  • projects/bot/src/locales/en-US/humanLevels.json
  • projects/bot/src/locales/en-US/moderation.json
  • projects/bot/src/locales/en-US/moderationActions.json
  • projects/bot/src/locales/en-US/permissions.json
  • projects/bot/src/locales/en-US/preconditions.json
  • projects/bot/src/locales/en-US/promptList.json
  • projects/bot/src/locales/en-US/selfModeration.json
  • projects/bot/src/locales/en-US/settings.json
  • projects/bot/src/locales/en-US/system.json
  • projects/bot/src/main.ts
  • projects/bot/src/routes/commands.ts
  • projects/bot/src/routes/guilds/guild.ts
  • projects/bot/src/routes/guilds/guild/channels.ts
  • projects/bot/src/routes/guilds/guild/channels/channel.ts
  • projects/bot/src/routes/guilds/guild/members/member.ts
  • projects/bot/src/routes/guilds/guild/roles.ts
  • projects/bot/src/routes/guilds/guild/roles/role.ts
  • projects/bot/src/routes/guilds/guild/settings.ts
  • projects/bot/src/routes/languages.ts
  • projects/bot/src/routes/main.ts
  • projects/bot/src/routes/oauth/oauthUser.ts
  • projects/bot/src/routes/users/user.ts
  • projects/bot/src/routes/users/user/settings.ts
  • projects/bot/src/tasks/moderation/moderationEndAddRole.ts
  • projects/bot/src/tasks/moderation/moderationEndBan.ts
  • projects/bot/src/tasks/moderation/moderationEndMute.ts
  • projects/bot/src/tasks/moderation/moderationEndRemoveRole.ts
  • projects/bot/src/tasks/moderation/moderationEndSetNickname.ts
  • projects/bot/src/tasks/moderation/moderationEndVoiceMute.ts
  • projects/bot/src/tasks/moderation/moderationEndWarning.ts
  • projects/bot/src/tasks/poststats.ts
  • projects/bot/src/tasks/reminder.ts
  • projects/bot/src/tsconfig.json
  • projects/bot/tests/lib/CommandMatcher.test.ts
  • projects/bot/tests/lib/RegexCreator.test.ts
  • projects/bot/tests/lib/bits.test.ts
  • projects/bot/tests/lib/database/settings/functions.test.ts
  • projects/bot/tests/lib/database/settings/structures/AuditLogEnvelope.test.ts
  • projects/bot/tests/lib/database/settings/structures/AuditLogManager.test.ts
  • projects/bot/tests/lib/database/settings/structures/PermissionNodeManager.test.ts
  • projects/bot/tests/lib/formatters.test.ts
  • projects/bot/tests/lib/i18n/LanguageHelp.test.ts
  • projects/bot/tests/lib/i18n/translate.test.ts
  • projects/bot/tests/lib/listeners/commands/commandLogShared.test.ts
  • projects/bot/tests/lib/moderation/workers/WorkerHandler.test.ts
  • projects/bot/tests/lib/moderation/workers/WorkerManager.test.ts
  • projects/bot/tests/lib/moderation/workers/WorkerResponseHandler.test.ts
  • projects/bot/tests/lib/util.test.ts
  • projects/bot/tests/lib/util/common/comparators.test.ts
  • projects/bot/tests/lib/util/common/times.test.ts
  • projects/bot/tests/lib/util/constants.test.ts
  • projects/bot/tests/lib/util/formatters.test.ts
  • projects/bot/tests/lib/util/functions/auditLogEmbeds.test.ts
  • projects/bot/tests/lib/util/functions/emojis/areEmojisEqual.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getEmojiId.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getEmojiObject.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getEmojiReactionFormat.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getEmojiString.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getEmojiTextFormat.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getEncodedTwemoji.test.ts
  • projects/bot/tests/lib/util/functions/emojis/getTwemojiUrl.test.ts
  • projects/bot/tests/lib/util/functions/emojis/isSerializedTwemoji.test.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch V7

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-project-automation github-project-automation Bot moved this to Todo in Wolfstar Jun 14, 2026
@RedStar071 RedStar071 moved this from Todo to In Progress in Wolfstar Jun 14, 2026
@RedStar071 RedStar071 moved this from In Progress to Todo in Wolfstar Jun 14, 2026
@RedStar071 RedStar071 added this to the v7 milestone Jun 14, 2026
@RedStar071 RedStar071 changed the title refactor: V7 — new stack, monorepo structure, and tooling modernisation refactor: V7 — new stack, monorepo structure, and tooling modernization Jun 27, 2026
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

◈ PR Lens

Note

This drawing shows ed2d041, and the branch has new commits since. Tick Redraw to draw the latest one

  • Redraw

🟢 +9 new · 🟠 ~19 changed · 🔴 -4 removed · 1 flow · 50 files · commit ed2d041


Architecture

Architecture diagram for wolfstar-project/wolfstar at ed2d041

32 components touched across 6 lanes.

Play the interactive walkthrough


Inside the changed components — 3 views

Component view — Gateway service

Internal WebSocket dispatch routing, entity managers, and Redis integration in wolfstar-gateway

Architecture view of Component view — Gateway service in wolfstar-project/wolfstar

Component view — Shared cache & serialization

Binary encoding and HashScopedCache models in the wolfstar-shared library

Architecture view of Component view — Shared cache & serialization in wolfstar-project/wolfstar

Component view — Database package

Prisma 8 contracts and PostgreSQL runtime client in wolfstar-database

Architecture view of Component view — Database package in wolfstar-project/wolfstar

Data flow

Data flow diagram for wolfstar-project/wolfstar at ed2d041

Gateway event ingestion and Redis streaming

Follow each request, response and payload


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

Push a commit and the comment redraws for the new head. A slow older run never overwrites a newer one

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs on every push
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing every push. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion

Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

@macroscopeapp
macroscopeapp Bot requested a review from lorypelli September 10, 2026 19:44
@macroscopeapp

macroscopeapp Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This is a 2,155-file V7 migration that replaces the runtime layout with new bot, gateway, shared-cache/broker, and database components while also changing persistence, Docker images, and production CI/CD. The resulting runtime and deployment blast radius is substantially broader than a mechanical refactor or minor tooling change.

Notes:

  • Macroscope's correctness review did not run, so approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@lorypelli lorypelli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation Bot moved this from Todo to Review Approved in Wolfstar Sep 10, 2026
lorypelli
lorypelli previously approved these changes Sep 11, 2026

@lorypelli lorypelli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lorypelli

Copy link
Copy Markdown
Member

@copilot please fix the merge conflicts in this pull request.

@socket-security

socket-security Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​aero/​sanitizer@​1.3.2591005378100
Added@​wolfstar/​start-banner@​2.1.3721008496100
Added@​wolfstar/​plugin-gateway@​0.16.2-next-202611021314147210010096100
Updated@​commitlint/​cli@​21.2.2 ⏵ 21.2.31001007396 +2100
Added@​wolfstar/​i18next-type-generator@​3.1.6731009696100
Added@​wolfstar/​shared-influx-pieces@​1.2.0731008894100
Updated@​types/​pg@​8.23.1 ⏵ 8.20.41001007385 +1100
Added@​wolfstar/​plugin-opentelemetry@​0.1.07310010088100
Added@​wolfstar/​env-utilities@​2.3.17410010096100
Added@​wolfstar/​shared-http-pieces@​2.1.1741009296100
Addedgolar@​0.1.10791007495100
Addedprisma-orm-extension-typed-json@​8.0.0-rc.57510010088100
Added@​wolfstar/​decorators@​0.1.3761009993100
Added@​wolfstar/​plugin-scheduled-tasks@​0.3.07610010091100
Added@​wolfstar/​kit@​0.3.1761009994100
Added@​wolfstar/​plugin-api@​2.2.07610010096100
Added@​wolfstar/​plugin-subcommands-advanced@​2.3.07610010096100
Added@​wolfstar/​plugin-i18next@​2.3.07710010096100
Added@​wolfstar/​plugin-logger@​0.5.0771009995100
Added@​wolfstar/​plugin-sharder@​0.3.07810010095100
Added@​wolfstar/​plugin-cache@​0.8.17810010096100
Added@​wolfstar/​http-framework-utilities@​0.1.27810010092100
Updated@​vitest/​coverage-v8@​5.0.0 ⏵ 5.0.599 +110079 +198100
Updatedvitest@​5.0.0 ⏵ 5.0.59810079 +198100
Added@​wolfstar/​plugin-broker@​0.7.07910010096100
Added@​wolfstar/​http-framework@​6.5.18010010096100
Addedgradient-string@​3.0.010010010080100
Updated@​types/​node@​22.19.1 ⏵ 24.19.2100 +110081 +194100
Updatedvite@​7.2.4 ⏵ 8.3.499 +1100 +3282 +198 +2100
Addednano-staged@​1.0.210010010083100
Updatedpg@​8.23.0 ⏵ 8.23.199 +1100100 +187 -1100
Added@​prisma/​orm-postgres@​8.0.0-rc.13991008799100
See 16 more rows in the dashboard

View full report

lorypelli
lorypelli previously approved these changes Sep 11, 2026

@lorypelli lorypelli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@socket-security

socket-security Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
License policy violation: npm sentry under LicenseRef-FSL-1.1-ALv2

License: LicenseRef-FSL-1.1-ALv2 - The applicable license policy does not permit this license (5) (package/LICENSE.md)

From: pnpm-lock.yaml → npm/@wolfstar/[email protected] → npm/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

Copilot stopped reviewing on behalf of lorypelli due to an error September 11, 2026 06:13
# Conflicts:
#	.github/workflows/tolgee-sync.yml
… work

The join guard switches, the auto-moderation menu and /automod edit, and the import
confirmation now defer before the lock, the Discord reads or the access check.
…gacy removal

A form opened before the member select menus would clear the saved roles and users.
A failed alert no longer deletes the newer claim of the next alert.
GatewayClient.user is only set on a shard's READY, so a broker worker has none and every
listener that wrote settings as the bot threw. The avatar reads use optional chaining.
@RedStar071

Copy link
Copy Markdown
Member Author

@lorypelli The conflicts with main are resolved: 0d648cd1 merges main up to #394 into V7, and the only conflict was .github/workflows/tolgee-sync.yml. It now uses the reusable Tolgee workflow from main with the monorepo paths. GitHub reports the PR as mergeable again.

@RedStar071

Copy link
Copy Markdown
Member Author

I see some ! in the latest commit, you should make it really typesafe

@lorypelli You're right, and it was worse than a typing issue: container.gatewayClient.user is only set on a shard's READY, so it stays null on a broker worker (BOT_MODE=worker). The 20 gatewayClient.user!.id reads now use process.env.CLIENT_ID, and the 2 avatar reads use optional chaining, so the listeners a worker runs no longer throw. Turning on typescript/no-non-null-assertion would flag about 145 other !; that's a separate PR. Fixed in c7b1a11.

A broker worker has no gateway user, so the footer of a case log lost its icon and
moderationEntryEdit no longer recognized the log, posting a second one on edit.
…sses

With the broker, a command runs on the gateway and the events it causes run on a
worker. The lock and the case cache lived in the memory of each process, so a
worker labelled a kick or a softban as a plain leave, kept the roles of a ban and
made a second case for a ban the gateway had made.

The lock of a moderation action is now also kept in Redis, which waitLock waits
on, and the latest case of a user, and the check for a similar case, fall back to
the database when this process has not cached the case.
The test of the help texts reads the commands from the generated types, which have
had /info since they were regenerated, and found it the only command without a
commands/help entry. Its i18n types are regenerated with the new key.
A punishment menu sent before the merge still submits Timeout, and the handler dropped it.
All three readers now share parseAutoModerationHardAction.
The mute-timeout setting text now says that /mute and /timeout do not follow it.
With moderation.mute-timeout on, a mute that Discord can take as a timeout is one.
It then needs no muted role, and its case is a Timeout, as for the automod.
Comment on lines +43 to +47
const action = ModerationActions.timeout;
if (await action.isActive(context.guild, context.target.id)) throw context.t('moderation:actionIsActive');

const data = await this.getActionData(interaction, context);
const entry = await action.apply(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mute removal misses timeouts

/mute add now creates a Discord timeout for eligible durations, but /mute remove still checks for and removes only the muted role. After a one-hour mute, removal reports no active role mute—or asks to set up a role when none exists—and leaves the member timed out. Moderators must use /timeout remove instead.

Update /mute remove to recognize and undo timeout-backed mutes without requiring a muted role.

Prompt To Fix With AI
This is a comment left during a code review.
Path: projects/bot/src/commands/Moderation/mute/add.ts
Line: 43-47

Comment:
**Mute removal misses timeouts**

`/mute add` now creates a Discord timeout for eligible durations, but `/mute remove` still checks for and removes only the muted role. After a one-hour mute, removal reports no active role mute—or asks to set up a role when none exists—and leaves the member timed out. Moderators must use `/timeout remove` instead.

Update `/mute remove` to recognize and undo timeout-backed mutes without requiring a muted role.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

RFC: plugin-gateway follow-ups from replacing a dedicated gateway process (register entrypoint, member requests, session resume, …)

4 participants