Skip to content

Release/v26.9 sirius - #64

Draft
Paldiu wants to merge 62 commits into
prodfrom
release/v26.9-sirius
Draft

Release/v26.9 sirius#64
Paldiu wants to merge 62 commits into
prodfrom
release/v26.9-sirius

Conversation

@Paldiu

@Paldiu Paldiu commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

v26.9 "Sirius"

Ranks & permissions

  • The hardcoded Rank enum is gone. Ranks are now defined entirely in ranks.json (SQL-backed, with the JSON file as snapshot and fallback) and are editable at runtime through /rankconfig.
  • @Permission no longer takes a level. A command declares only its permission node, and the rank required to reach it is derived by resolving the least privileged rank that grants that node. Re-tiering a command is now a config edit. A node that no rank grants is unreachable rather than open.
  • Node lookups are served by a segment-indexed PermissionTrie, which handles exact grants and trailing wildcards in a single walk.
  • RankRole binds the few code paths that need to name a rank (default, default_op, impostor, admin_default, console_floor) to whichever rank declares that role in ranks.json, each with a structural fallback.
  • The console-only rank flag is removed. Console channels sit at console_floor and are raised by host_senders: bindings.

Titles

New system alongside ranks, defined in titles.json and stored in the titles / title_permissions tables.

  • A title has no level and no inheritance. It grants exactly the nodes listed on it, matched exactly.
  • A player may hold several titles; their capabilities are the union. weight orders titles for display only.
  • Managed with /title [list | info | of | grant | revoke]. Granting is gated on tfm.manage.titles.

Database

  • The 15 per-engine repositories collapsed into generic repositories running over a dialect-aware adapter. H2 support is removed; SQLite, MySQL and PostgreSQL remain.
  • New persisted domains: players, ranks, titles, protected areas, saved flags, Discord links, plus a migrations ledger.
  • Startup no longer blocks on the database. Every domain starts on its JSON snapshot and swaps to SQL once the background bootstrap finishes, so an unreachable host delays only the swap.
  • AccessController caps in-flight queries with a fair, re-entrant FIFO semaphore sized to the HikariCP pool.
  • PersistenceQueue serialises each domain's writes onto one ordered chain and is awaited before the shutdown flush.
  • /sqlstatus reports pool health: active/idle/total connections, threads waiting, and fairness-queue state.
  • YAML data files migrate once per domain into SQL, tracked by the ledger. admins, bans, permbans, ranks, protectedareas, savedflags, per-player data, backup and version are now JSON.

Discord

  • JDA replaced with Discord4J and Reactor throughout the bridge, relays and slash commands.
  • DiscordConnection owns the gateway and its reconnect budget. Attempts are spaced by discord.reconnect.interval_seconds and capped at max_attempts consecutive failures; any successful connection resets the count.
  • Repository work runs on boundedElastic, server-state reads hop to the main thread, and each interaction has its own error boundary.
  • discord_links.json is written through on every link change and reconciled back into SQL at startup if it is newer.

Spy modes

  • SpyMode (off, ops, admins, all) is shared by /cmdspy, /potionspy, /signspy and the new /bookspy. Each mode is stored per player.
  • /bookspy relays book edits to admins with a per-page diff, click-to-view pages, and unsafe pages withheld.
  • SignSpy suppresses no-op edits and blank placements, marks truncated lines, and shows a [View] button for the full sign.

World System

  • To Be Implemented

Other

  • Complete reorganization of imports, and purged unused imports entirely using gradle OpenRewrite plugin
  • /saconfig list groups admins by the rank they actually hold; /saconfig setrank accepts any rank marked admin.
  • Whitelist toggling split onto tfm.server.whitelist.manage, separate from tfm.server.whitelist.
  • The HTTP help module groups commands under the rank derived from each node, and lists ungrantable commands without a heading.
  • Admins can no longer execute destructive / disciplinary commands against other admins. The only exception to this is /doom, which has been elevated to console_only.
  • Displayable moved from rank to a new display package.
  • Version bumped to 26.9; build dependencies regrouped, Discord4J, Reactor, HikariCP and the JDBC drivers added.

Paldiu and others added 30 commits July 20, 2026 12:30
Removed support for majority of languages, only vetting MySQL, SQLite, and PostgresSQL (encouraged) as supported types. Added imports for the actual jdbc impls and also the hikari and reactor imports. added these to library loader.

This is tons of extra code that realistically will never be used by us, but we still want to support mysql / sqlite in case other users want to use this without setting up a pgsql server as that can be more complex than a sqlite instance.
SQL groundwork is now mostly completed. we can now start working on migrating to json, converting all the config files into database schemas / tables, etc

I'll craft up a doc on how to use this from a dev standpoint later on.
Compacted all the individual hand rolled implementations per language and just ran everything through the appropriate adapter.

Created new repositories to cover a total of 9 repositories,
admins, bans, permbans, strikes, discord links, ranks, protected areas, saved flags, playerdata

Removed lombok in some classes (PlayerData, ProtectArea)
Add bookspy and unify spy modes
Fix SQLite login deadlock and updated_at migration
Based. See PR for full changelog
Paldiu and others added 30 commits August 5, 2026 12:39
Merge scope/discord-rewrite into release/v26.9-sirius
adds sign + book to text filter
Persist /jlm toggle and restore its non-op permission. Needed to merge this so I can rebase the branch for a large PR I'm about to submit.
Fix JSON/SQL persistence: reconcile, ranks, bans, players
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.

3 participants