From 9f2e15a6226ecb3c65e991459ce8fa68e312a647 Mon Sep 17 00:00:00 2001 From: anthorob Date: Fri, 25 Sep 2026 07:00:24 -0400 Subject: [PATCH] Remove `NetNeutralityBot` placeholder. --- .junie/plans/revert-package-structure.md | 2 - docs/architecture.md | 42 +++++++------- docs/utilities-and-bootstrap.md | 57 +++++++++---------- .../netneutrality/core/NetNeutralityBot.java | 20 ------- 4 files changed, 49 insertions(+), 72 deletions(-) delete mode 100644 src/main/java/me/bobert/netneutrality/core/NetNeutralityBot.java diff --git a/.junie/plans/revert-package-structure.md b/.junie/plans/revert-package-structure.md index a39ac20..3bcb076 100644 --- a/.junie/plans/revert-package-structure.md +++ b/.junie/plans/revert-package-structure.md @@ -106,7 +106,6 @@ me.bobert.netneutrality | `framework/command/` | `core/command/` | | `framework/context/` | `core/context/` | | `framework/task/` | `core/tasks/` | -| `framework/NetNeutralityBot.java` | remove or merge into App | | `platform/config/Settings.java` | `utils/Settings.java` | | `platform/persistence/*` | `db/` (SessionManager, DatabaseMigration, JpaUtils, Repository) | | `platform/concurrency/*` | `core/thread/` | @@ -171,7 +170,6 @@ The `framework/` package is renamed back to `core/` with its original subpackage - Move `framework/command/` → `core/command/` (all engine classes: Command, CommandProcessor, CommandRegistry, CommandManager, CommandCategory, CommandContainer, CommandExecutionResult, CommandOptionsBuilder, impl/, options/) - Move `framework/context/` → `core/context/` (Context, AbstractContext, CommandContext, TaskContext, InteractionContext, MessageContext, NoMessageContext, AsyncContext) - Move `framework/task/` → `core/tasks/` (Task, TaskManager interface + impl, StepTask, PersistableTask, BuiltInTask, ScheduledTask, TaskCleanup, persistence/, trait/, impl/, generic/) -- Move `framework/NetNeutralityBot.java` into `core/` or merge into App if it's just a shell - Move `platform/logging/LogHandler.java` → `core/LogHandler.java` - Move `platform/concurrency/*` → `core/thread/` (ThreadManager/ExecutorProvider, ScheduledTaskManager, BaseThreadFactory) - Update all imports; verify build with `./mvnw compile` diff --git a/docs/architecture.md b/docs/architecture.md index 9f20731..5b2ba5a 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -139,24 +139,24 @@ block the others. Effectively this means: ## Package map -| Package | Contents | -|---|---| -| `me.bobert.netneutrality` | Entry point (`App`) | -| `…bootstrap` | `ApplicationContext`, `Lifecycle`, `BotState`, `ReflectionHelper` | -| `…core.command` | Command engine (registry, processor, manager, options, impl bases) | -| `…core.context` | Context interfaces, abstract bases (`CommandContext`, `TaskContext`, etc.) | -| `…core.tasks` | Task engine (manager, subtypes, traits, persistence, generic buttons) | -| `…core.thread` | Executors & scheduling (`ThreadManager`, `ScheduledTaskManager`, `BaseThreadFactory`) | -| `…core` | `LogHandler`, `NetNeutralityBot` | -| `…command.*` | Concrete command implementations (`admin`, `basic`, `bot`, `crypto`, `custom`, `git`, `music`, `react`) | -| `…context.command` / `…context.tasks` | Concrete context implementations (slash, message, button, modal, emoji, etc.) | -| `…context` | `MusicChannelContext` | -| `…tasks.*` | Concrete task implementations (`git`, `help`, `music`, `reaction`) | -| `…db` | Session/migration, `Repository`, `JpaUtils`, `GSettings` | -| `…db.entities` / `…db.repository` / `…db.service` | Persistence model, repositories, services | -| `…hooks` | `EventsHandler` | -| `…http` | Internal web API and HTTP client module | -| `…music` | Music domain (service, manager, queue, scheduler, track loading) | -| `…utils` | `Settings` / `SettingsProvider`, `ChannelMessagePurger`, `MusicUtils` | -| `…shared.util` | Cross-cutting helpers | -| `…exceptions` | Custom exception hierarchy | +| Package | Contents | +|---------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| `me.bobert.netneutrality` | Entry point (`App`) | +| `…bootstrap` | `ApplicationContext`, `Lifecycle`, `BotState`, `ReflectionHelper` | +| `…core.command` | Command engine (registry, processor, manager, options, impl bases) | +| `…core.context` | Context interfaces, abstract bases (`CommandContext`, `TaskContext`, etc.) | +| `…core.tasks` | Task engine (manager, subtypes, traits, persistence, generic buttons) | +| `…core.thread` | Executors & scheduling (`ThreadManager`, `ScheduledTaskManager`, `BaseThreadFactory`) | +| `…core` | `LogHandler` | +| `…command.*` | Concrete command implementations (`admin`, `basic`, `bot`, `crypto`, `custom`, `git`, `music`, `react`) | +| `…context.command` / `…context.tasks` | Concrete context implementations (slash, message, button, modal, emoji, etc.) | +| `…context` | `MusicChannelContext` | +| `…tasks.*` | Concrete task implementations (`git`, `help`, `music`, `reaction`) | +| `…db` | Session/migration, `Repository`, `JpaUtils`, `GSettings` | +| `…db.entities` / `…db.repository` / `…db.service` | Persistence model, repositories, services | +| `…hooks` | `EventsHandler` | +| `…http` | Internal web API and HTTP client module | +| `…music` | Music domain (service, manager, queue, scheduler, track loading) | +| `…utils` | `Settings` / `SettingsProvider`, `ChannelMessagePurger`, `MusicUtils` | +| `…shared.util` | Cross-cutting helpers | +| `…exceptions` | Custom exception hierarchy | diff --git a/docs/utilities-and-bootstrap.md b/docs/utilities-and-bootstrap.md index 67170a0..698eda2 100644 --- a/docs/utilities-and-bootstrap.md +++ b/docs/utilities-and-bootstrap.md @@ -7,13 +7,12 @@ error tracking, the shared utility helpers, and the custom exception hierarchy. **Package:** `me.bobert.netneutrality` / `me.bobert.netneutrality.bootstrap` -| Class | Role | -|---|---| -| `App` | The application: holds the process instance and the `JDA` handle, builds the `ApplicationContext`, runs `context.start()` / `context.stop()`, and is the JAR main class (`main()`). See [architecture.md](architecture.md). | -| `bootstrap.ApplicationContext` | Hand-rolled container: `register(T)`, `get(Class)`, ordered `start()` / `stop()` for `Lifecycle` components. | -| `bootstrap.Lifecycle` | Optional component contract: `start() throws Exception`, default `stop()`, default `priority()`. | -| `NetNeutralityBot` | Currently an **empty placeholder** class under `framework` (reserved name; no logic yet). | -| `core.BotState` | Work-in-progress global state helper: exposes a `SAFE` flag and `dump()`, which serializes per-guild/music state to `state.json`. Bound to `GuildServiceProvider` / `MusicService` during bootstrap. | +| Class | Role | +|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `App` | The application: holds the process instance and the `JDA` handle, builds the `ApplicationContext`, runs `context.start()` / `context.stop()`, and is the JAR main class (`main()`). See [architecture.md](architecture.md). | +| `bootstrap.ApplicationContext` | Hand-rolled container: `register(T)`, `get(Class)`, ordered `start()` / `stop()` for `Lifecycle` components. | +| `bootstrap.Lifecycle` | Optional component contract: `start() throws Exception`, default `stop()`, default `priority()`. | +| `core.BotState` | Work-in-progress global state helper: exposes a `SAFE` flag and `dump()`, which serializes per-guild/music state to `state.json`. Bound to `GuildServiceProvider` / `MusicService` during bootstrap. | The full startup and shutdown sequences are documented in [architecture.md](architecture.md#startup-lifecycle). @@ -36,15 +35,15 @@ resolve via `context.get(type)` is preferred; otherwise the no-arg constructor i **Interfaces used for injection** (implemented by the concrete managers registered above): -| Interface | Typical implementor | -|---|---| -| `platform.config.SettingsProvider` | `utils.Settings` | -| `platform.persistence.SessionProvider` | `core.db.SessionManager` | -| `platform.concurrency.ExecutorProvider` | `core.thread.ThreadManager` | -| `framework.command.CommandRegistry` | `core.command.CommandManager` | -| `framework.task.TaskManager` | `core.tasks.TaskManagerImpl` | -| `feature.music.MusicService` | `music.MusicServiceImpl` | -| `data.service.GuildServiceProvider` | `db.service.GuildServiceProviderImpl` | +| Interface | Typical implementor | +|-----------------------------------------|---------------------------------------| +| `platform.config.SettingsProvider` | `utils.Settings` | +| `platform.persistence.SessionProvider` | `core.db.SessionManager` | +| `platform.concurrency.ExecutorProvider` | `core.thread.ThreadManager` | +| `framework.command.CommandRegistry` | `core.command.CommandManager` | +| `framework.task.TaskManager` | `core.tasks.TaskManagerImpl` | +| `feature.music.MusicService` | `music.MusicServiceImpl` | +| `data.service.GuildServiceProvider` | `db.service.GuildServiceProviderImpl` | There are **no** `getInstance()` / `instance()` shims on the managers above. The only intentional static access points left are: @@ -75,19 +74,19 @@ file and overlays **environment variables** on top (environment variables win). An example configuration file is `bot.properties.example`. Key configuration values: -| Key | Purpose | -|---|---| -| `NETNEUTRALITY_BOT_ENV` | `dev` / `prod`; controls debug logging and the Sentry environment. | -| `NETNEUTRALITY_BOT_TOKEN` | Discord bot token (**required**). | -| `NETNEUTRALITY_BOT_PREFIX` | Message-command prefix (default `$`). | -| `NETNEUTRALITY_BOT_OWNER` | Bot owner user id (used for owner-only commands / permissions). | -| `NETNEUTRALITY_BOT_INVITE` | Invite link surfaced by help/info. | -| `NETNEUTRALITY_API_PORT` | Port for the [Web API](web-api.md) (default `9000`). | -| `MYSQL_*` | Database connection settings (see [persistence.md](persistence.md)). | -| `NETNEUTRALITY_SENTRY_DSN` | Enables Sentry when present. | -| `GITLAB_HOST` / `GITLAB_TOKEN` / `GITLAB_PROJECT_ID` | GitLab issue reporting ([`ReportIssueTask`](tasks.md#worked-example--gitlab-bug-report-modal)). | -| `NETNEUTRALITY_LAVALINK_URI` / `_PASSWORD` / `_NAME` | Connection settings for the [Lavalink node](music.md#settings). | -| `NETNEUTRALITY_PO_TOKEN` / `NETNEUTRALITY_VISITOR_DATA` / `NETNEUTRALITY_CIPHER_*` | YouTube auth/cipher settings, consumed by the node via `lavalink/application.yml`. | +| Key | Purpose | +|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------| +| `NETNEUTRALITY_BOT_ENV` | `dev` / `prod`; controls debug logging and the Sentry environment. | +| `NETNEUTRALITY_BOT_TOKEN` | Discord bot token (**required**). | +| `NETNEUTRALITY_BOT_PREFIX` | Message-command prefix (default `$`). | +| `NETNEUTRALITY_BOT_OWNER` | Bot owner user id (used for owner-only commands / permissions). | +| `NETNEUTRALITY_BOT_INVITE` | Invite link surfaced by help/info. | +| `NETNEUTRALITY_API_PORT` | Port for the [Web API](web-api.md) (default `9000`). | +| `MYSQL_*` | Database connection settings (see [persistence.md](persistence.md)). | +| `NETNEUTRALITY_SENTRY_DSN` | Enables Sentry when present. | +| `GITLAB_HOST` / `GITLAB_TOKEN` / `GITLAB_PROJECT_ID` | GitLab issue reporting ([`ReportIssueTask`](tasks.md#worked-example--gitlab-bug-report-modal)). | +| `NETNEUTRALITY_LAVALINK_URI` / `_PASSWORD` / `_NAME` | Connection settings for the [Lavalink node](music.md#settings). | +| `NETNEUTRALITY_PO_TOKEN` / `NETNEUTRALITY_VISITOR_DATA` / `NETNEUTRALITY_CIPHER_*` | YouTube auth/cipher settings, consumed by the node via `lavalink/application.yml`. | ## Utility helpers diff --git a/src/main/java/me/bobert/netneutrality/core/NetNeutralityBot.java b/src/main/java/me/bobert/netneutrality/core/NetNeutralityBot.java deleted file mode 100644 index 9babc94..0000000 --- a/src/main/java/me/bobert/netneutrality/core/NetNeutralityBot.java +++ /dev/null @@ -1,20 +0,0 @@ -package me.bobert.netneutrality.core; - -/* - * Copyright (c) anthorob - * - * https://discord.gg/qUa6zNFZsd - */ - -import me.bobert.netneutrality.bootstrap.Lifecycle; - -public class NetNeutralityBot implements Lifecycle { - @Override - public void start() throws Exception { - } - - @Override - public int priority() { - return 0; - } -}