Skip to content

Various Update - #1

Merged
kernelcoffee merged 4 commits into
mainfrom
dev/various_updates
Jul 29, 2026
Merged

kernelcoffee merged 4 commits into
mainfrom
dev/various_updates

Conversation

@kernelcoffee

Copy link
Copy Markdown
Owner
  • Whitelisting at runtime
  • Online roster
  • Event Timeline

…mands

Whitelist/ops/ban edits used to only rewrite the JSON files, so they took
effect at the next restart. On a running server the API now sends the matching
console command (whitelist add/remove, op/deop, ban/pardon) — Minecraft applies
it immediately and rewrites its own files, keeping them the source of truth —
then confirms the rewrite landed (by UUID or name, for offline-mode servers)
before returning. Stopped/starting servers, or a command that never lands,
fall back to the direct file edit as before.
Each server process now parses its own console output into a live roster
(join/leave/login lines), exposed as GET /servers/{id}/players/online and
shown as an "Online now" card grid in the Players tab. Artificial players
(Carpet /player bots) are first-class: detected by their [local] non-network
login, badged as bots, and allowed to lack a Mojang UUID/avatar or registry
entry. Removal picks the right command per entry — kick (optional reason) for
real players, Carpet's `player <name> kill` for bots, which have no connection
to kick. Names must match a roster entry, keeping arbitrary text out of the
console, and chat can't spoof membership (anchored patterns).
The live console shows what's happening; nothing remembered what *happened* —
a 3am crash or failed nightly backup left no trace to review. A new
ServerEvent table records lifecycle transitions (started/stopped/crashed),
crash-restart attempts and give-ups, backup created/restored/failed, and
failed schedule runs. Recording is fail-silent (telemetry must never break
the action it records) and prunes each server's timeline to the newest 300
rows inline. Read via GET /servers/{id}/events and a cross-server GET /events
feed; a shared self-polling "Recent events" panel appears on the Dashboard
(with server names) and in each server's Metrics tab.
An unpinned ruff>=0.6 now resolves to 0.16, whose expanded default rule set
failed CI with 100 errors. Ignore B008 (FastAPI's Depends-in-defaults idiom),
apply the mechanical fixes (import sorting, datetime.UTC, TimeoutError alias,
stale noqas), and resolve the rest by hand. One real find: the world-import
upload wrote chunks with blocking I/O on the event loop, stalling all requests
during large uploads — now async via anyio. The settings type check keeps
ValueError (the API maps it to 400) with a justified noqa.
@kernelcoffee
kernelcoffee merged commit 10fcc93 into main Jul 29, 2026
4 checks passed
@kernelcoffee
kernelcoffee deleted the dev/various_updates branch July 29, 2026 13:21
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.

1 participant