[PR #5345] [MERGED] horizon-server: the management protocol's players, server and list methods #6227

Closed
opened 2026-11-03 06:16:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5345
Author: @ludovic111
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: server-admin/management


📝 Commits (2)

  • b418619 horizon-server: the management protocol's players, server and list methods
  • 837a0e7 Merge origin/main into server-admin/management

📊 Changes

6 files changed (+400 additions, -26 deletions)

View changed files

📝 crates/horizon-server/src/main.rs (+1 -0)
📝 crates/horizon-server/src/management.rs (+9 -9)
➕ crates/horizon-server/src/management_methods.rs (+341 -0)
📝 docs/api/server.md (+5 -3)
📝 docs/server.md (+4 -4)
📝 tools/test_management_protocol_parity.py (+40 -10)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Roadmap server-admin, part 6b: the first methods of vanilla's management protocol. Stacked on #5329 (the transport); GitHub retargets this PR to main when #5329 merges.

New in management_methods.rs (each one answers as vanilla's methods/*Service does):

  • players, and players/kick (through the game's console kick). It returns the players it was asked to kick, as vanilla does.
  • server/status. It answers while the game restarts, with started: false; vanilla's ServerState omits an empty player list.
  • server/save (save-all, or save-all flush), server/stop.
  • server/system_message: tellraw, or title … actionbar for an overlay. An empty receivingPlayers list answers false.
  • The lists' getters: allowlist, bans, ip_bans, operators. They are read from the server's files and returned as vanilla's DTOs, with ban expiry as an ISO-8601 instant.

Everything else (changing the lists, serversettings/*, gamerules, the notifications and the heartbeat, TLS) still answers an internal error saying it isn't in Horizon yet. A later PR changes the lists through the game, so the source, expiry and kick are vanilla's.

Parity harness. tools/test_management_protocol_parity.py now:

  • writes the same lists on both sides: ops, whitelist, two bans (one with an expiry) and an IP ban;
  • sends 27 messages and 5 handshakes and compares the 32 exchanges, ending with server/stop.

It passed against vanilla 26.3 on the Mac mini before the last rebase. The rebase only touched the module list and a docs line.

This PR alone: 6 files, +400 −26.

Checks (on ludovics-mac-mini, at b41861991, own target dir). These are the same steps as pr_ready for a horizon-server-only change. The full pr_ready on #5329 covers the shared Cargo.lock.

Check Result
Scope ✅ 6 files, +400 −26
Cargo.lock ✅ unchanged from #5329
Public tree ✅
rustfmt ✅
clippy (-p horizon-server --all-targets -D warnings) ✅
tests: horizon-server ✅ 79 passed
Parity ✅ test_management_protocol_parity.py, 32 exchanges against vanilla 26.3

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5345 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `server-admin/management` --- ### 📝 Commits (2) - [`b418619`](https://github.com/horizon-rust/horizon/commit/b41861991ed70c102e661adb4f14025f886fe5d2) horizon-server: the management protocol's players, server and list methods - [`837a0e7`](https://github.com/horizon-rust/horizon/commit/837a0e774adb2e4da1ef457fb0b4d99029c0d12d) Merge origin/main into server-admin/management ### 📊 Changes **6 files changed** (+400 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-server/src/main.rs` (+1 -0) 📝 `crates/horizon-server/src/management.rs` (+9 -9) ➕ `crates/horizon-server/src/management_methods.rs` (+341 -0) 📝 `docs/api/server.md` (+5 -3) 📝 `docs/server.md` (+4 -4) 📝 `tools/test_management_protocol_parity.py` (+40 -10) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Roadmap `server-admin`, part 6b: the first methods of vanilla's management protocol. **Stacked on #5329** (the transport); GitHub retargets this PR to main when #5329 merges. New in `management_methods.rs` (each one answers as vanilla's `methods/*Service` does): - `players`, and `players/kick` (through the game's console `kick`). It returns the players it was asked to kick, as vanilla does. - `server/status`. It answers while the game restarts, with `started: false`; vanilla's `ServerState` omits an empty player list. - `server/save` (`save-all`, or `save-all flush`), `server/stop`. - `server/system_message`: `tellraw`, or `title … actionbar` for an overlay. An empty `receivingPlayers` list answers `false`. - The lists' getters: `allowlist`, `bans`, `ip_bans`, `operators`. They are read from the server's files and returned as vanilla's DTOs, with ban expiry as an ISO-8601 instant. Everything else (changing the lists, `serversettings/*`, `gamerules`, the notifications and the heartbeat, TLS) still answers an internal error saying it isn't in Horizon yet. A later PR changes the lists through the game, so the source, expiry and kick are vanilla's. **Parity harness.** `tools/test_management_protocol_parity.py` now: - writes the same lists on both sides: ops, whitelist, two bans (one with an expiry) and an IP ban; - sends 27 messages and 5 handshakes and compares the 32 exchanges, ending with `server/stop`. It passed against vanilla 26.3 on the Mac mini before the last rebase. The rebase only touched the module list and a docs line. This PR alone: 6 files, +400 −26. **Checks** (on ludovics-mac-mini, at b41861991, own target dir). These are the same steps as pr_ready for a horizon-server-only change. The full pr_ready on #5329 covers the shared Cargo.lock. | Check | Result | | --- | --- | | Scope | ✅ 6 files, +400 −26 | | Cargo.lock | ✅ unchanged from #5329 | | Public tree | ✅ | | rustfmt | ✅ | | clippy (`-p horizon-server --all-targets -D warnings`) | ✅ | | tests: horizon-server | ✅ 79 passed | | Parity | ✅ `test_management_protocol_parity.py`, 32 exchanges against vanilla 26.3 | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:16:06 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6227
No description provided.