[PR #7350] [MERGED] Port map: rest-020's four user-list clears are UserList::clear #7541

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7350
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/vol-e-rest-020


📝 Commits (2)

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 tools/port_map/rest-020.tsv (+4 -4)

📄 Description

Rows of tools/port_map/rest-020.tsv (149 rows, map-check clean against 26.3). Four clear rows said the method needs no port because Horizon has no JSON-RPC management API. The port does exist — UserList::clear — and the API is the reason nothing calls it, not the reason it is unported.

Verdicts

row was now where
StoredUserList.clear skip:server port crates/horizon-server-files/src/user_lists.rs::UserList::clear
ServerOpList.clear skip:server port crates/horizon-server-files/src/user_lists.rs::UserList::clear
UserBanList.clear skip:server port crates/horizon-server-files/src/user_lists.rs::UserList::clear
UserWhiteList.clear skip:server port crates/horizon-server-files/src/user_lists.rs::UserList::clear

UserList::clear (user_lists.rs:398) empties the map, tells a Change::Removed for each entry that was there before it goes, and saves — which is StoredUserList.clear in vanilla: map.clear(), one onEntryRemoved per entry, then save().

The note's other half is right and is now the gap rather than the verdict: vanilla's only callers are the JSON-RPC management services (MinecraftAllowListServiceImpl.clear, MinecraftBanListServiceImpl.clearUserBans and clearIpBans), and Horizon's management methods (crates/horizon-server/src/management_methods.rs) add and remove single entries but have no clear-all. So UserList::clear is exercised by its own tests (a_cleared_list_saves_empty, user_lists.rs:524) and by nothing else — the four rows say that instead of claiming the method is absent.

Map-check:

PORT_LEDGER_OUT=/tmp/led-volE python3 tools/port_ledger.py map-check tools/port_map/rest-020.tsv
149 rows, no problems.

Proven: the vanilla callers, read from the 26.3 classes (MinecraftAllowListServiceImpl.clear → getWhiteList().clear(), MinecraftBanListServiceImpl.clearUserBans → getBans().clear(), clearIpBans → getIpBans().clear()), and the Horizon side at the cite: UserList::clear's map clear, its per-entry told(Change::Removed(..)) loop before the clear, and the save(). The management methods file has no clear-all entry. Every where cell resolves under map-check.

Not proven: that the four rows should not instead be skip:server on the grounds that nothing reaches them — I took "the port exists" as what the verdict means, and put the missing caller in the note. I also did not run a live management client against Horizon to confirm no clear-all is reachable by another route.


🔄 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/7350 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/vol-e-rest-020` --- ### 📝 Commits (2) - [`fe3d96d`](https://github.com/horizon-rust/horizon/commit/fe3d96dc614a95c17845d1a207046a6ceeee99fb) Port map: the user-list clears are UserList::clear - [`ed08c0d`](https://github.com/horizon-rust/horizon/commit/ed08c0d9c63c767bcc26fc8175dfd52d4046db2f) Merge main into #7350 ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-020.tsv` (+4 -4) </details> ### 📄 Description Rows of `tools/port_map/rest-020.tsv` (149 rows, map-check clean against 26.3). Four `clear` rows said the method needs no port because Horizon has no JSON-RPC management API. The port does exist — `UserList::clear` — and the API is the reason nothing calls it, not the reason it is unported. **Verdicts** | row | was | now | where | | --- | --- | --- | --- | | `StoredUserList.clear` | skip:server | port | `crates/horizon-server-files/src/user_lists.rs::UserList::clear` | | `ServerOpList.clear` | skip:server | port | `crates/horizon-server-files/src/user_lists.rs::UserList::clear` | | `UserBanList.clear` | skip:server | port | `crates/horizon-server-files/src/user_lists.rs::UserList::clear` | | `UserWhiteList.clear` | skip:server | port | `crates/horizon-server-files/src/user_lists.rs::UserList::clear` | `UserList::clear` (user_lists.rs:398) empties the map, tells a `Change::Removed` for each entry that was there before it goes, and saves — which is `StoredUserList.clear` in vanilla: `map.clear()`, one `onEntryRemoved` per entry, then `save()`. The note's other half is right and is now the gap rather than the verdict: vanilla's only callers are the JSON-RPC management services (`MinecraftAllowListServiceImpl.clear`, `MinecraftBanListServiceImpl.clearUserBans` and `clearIpBans`), and Horizon's management methods (`crates/horizon-server/src/management_methods.rs`) add and remove single entries but have no clear-all. So `UserList::clear` is exercised by its own tests (`a_cleared_list_saves_empty`, user_lists.rs:524) and by nothing else — the four rows say that instead of claiming the method is absent. Map-check: ``` PORT_LEDGER_OUT=/tmp/led-volE python3 tools/port_ledger.py map-check tools/port_map/rest-020.tsv 149 rows, no problems. ``` **Proven:** the vanilla callers, read from the 26.3 classes (`MinecraftAllowListServiceImpl.clear` → `getWhiteList().clear()`, `MinecraftBanListServiceImpl.clearUserBans` → `getBans().clear()`, `clearIpBans` → `getIpBans().clear()`), and the Horizon side at the cite: `UserList::clear`'s map clear, its per-entry `told(Change::Removed(..))` loop before the clear, and the `save()`. The management methods file has no clear-all entry. Every `where` cell resolves under map-check. **Not proven:** that the four rows should not instead be `skip:server` on the grounds that nothing reaches them — I took "the port exists" as what the verdict means, and put the missing caller in the note. I also did not run a live management client against Horizon to confirm no clear-all is reachable by another route. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:20 +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#7541
No description provided.