fix(docker): use WindMagi offline operator UUID
Release / release (push) Successful in 2m18s
CI / build (push) Successful in 1m21s

This commit is contained in:
dmg
2026-08-11 18:25:23 -04:00
parent 2e6fdb4e5b
commit 904faf1832
6 changed files with 29 additions and 5 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ Build the current plugin and start it on an isolated Spigot 26.2 server:
./scripts/start-test-server.sh ./scripts/start-test-server.sh
``` ```
Connect to `localhost:25565` as `WindMagi`, which the harness configures as an operator. The server uses offline mode for local convenience and binds only to the loopback interface. Connect to `localhost:25565` as `WindMagi`, which the harness configures as a level-4 operator using its deterministic offline-mode UUID. The committed `docker/test-ops.json` fixture replaces local operator state on every startup so the offline UUID remains deterministic. The server uses offline mode for local convenience and binds only to the loopback interface.
The first startup may take several minutes while the image downloads and Spigot is prepared. Override the 15-minute wait or local RCON password when needed: The first startup may take several minutes while the image downloads and Spigot is prepared. Override the 15-minute wait or local RCON password when needed:
+3 -1
View File
@@ -11,8 +11,9 @@ services:
TYPE: SPIGOT TYPE: SPIGOT
VERSION: "26.2" VERSION: "26.2"
MEMORY: 2G MEMORY: 2G
OPS: WindMagi
ONLINE_MODE: "false" ONLINE_MODE: "false"
OPS_FILE: /config/tree-feller-ops.json
OVERRIDE_OPS: "true"
ENABLE_RCON: "true" ENABLE_RCON: "true"
RCON_PASSWORD: "${TREE_FELLER_RCON_PASSWORD:-tree-feller-local-test}" RCON_PASSWORD: "${TREE_FELLER_RCON_PASSWORD:-tree-feller-local-test}"
VIEW_DISTANCE: "6" VIEW_DISTANCE: "6"
@@ -21,6 +22,7 @@ services:
volumes: volumes:
- ./.docker/minecraft:/data - ./.docker/minecraft:/data
- ./build/libs/tree-feller-0.1.0-SNAPSHOT.jar:/plugins/TreeFeller.jar:ro - ./build/libs/tree-feller-0.1.0-SNAPSHOT.jar:/plugins/TreeFeller.jar:ro
- ./docker/test-ops.json:/config/tree-feller-ops.json:ro
healthcheck: healthcheck:
test: ["CMD", "mc-health"] test: ["CMD", "mc-health"]
start_period: 15m start_period: 15m
+7
View File
@@ -2,6 +2,13 @@
## 2026-08-11 ## 2026-08-11
### US-010 offline operator identity corrected
- Reproduced WindMagi's missing operator privileges and found that name-based image setup stored the online account UUID while offline-mode login assigned deterministic UUID `6a3b6e9f-1a2f-380c-8a75-7a7ca6392c0e`.
- Replaced name-based setup with a synchronized, committed operator fixture containing the exact offline UUID; synchronization intentionally makes WindMagi the sole operator in this isolated test harness.
- Removed the misleading post-start `op WindMagi` check and made startup verify the exact name and UUID in the generated `ops.json`.
- Live restart verification passed: Spigot was healthy, RCON reported TreeFeller, `ops.json` contained only WindMagi at level 4 with the offline UUID, and the server remains available at `localhost:25565`.
### US-010 local Docker test server completed ### US-010 local Docker test server completed
- Added a repository-local Docker Compose harness using `itzg/minecraft-server:java25` with Spigot 26.2, persistent ignored state, offline local testing, and loopback-only port binding. - Added a repository-local Docker Compose harness using `itzg/minecraft-server:java25` with Spigot 26.2, persistent ignored state, offline local testing, and loopback-only port binding.
@@ -13,7 +13,7 @@ As a **plugin developer**, I want one command to run the current Tree Feller bui
- [x] One repository script builds and verifies the plugin before starting an isolated Spigot 26.2 server through Docker Compose. - [x] One repository script builds and verifies the plugin before starting an isolated Spigot 26.2 server through Docker Compose.
- [x] The current Tree Feller JAR is mounted into the server automatically whenever the container is recreated. - [x] The current Tree Feller JAR is mounted into the server automatically whenever the container is recreated.
- [x] `WindMagi` is configured and verified as a server operator. - [x] `WindMagi` is configured and verified at operator level 4 using the deterministic offline-mode UUID `6a3b6e9f-1a2f-380c-8a75-7a7ca6392c0e`.
- [x] The Minecraft port binds only to `127.0.0.1:25565` by default. - [x] The Minecraft port binds only to `127.0.0.1:25565` by default.
- [x] Startup waits for server health and verifies Tree Feller through RCON. - [x] Startup waits for server health and verifies Tree Feller through RCON.
- [x] Generated worlds, logs, configuration, and downloaded server artifacts are stored under `.docker/minecraft/` and excluded from Git. - [x] Generated worlds, logs, configuration, and downloaded server artifacts are stored under `.docker/minecraft/` and excluded from Git.
+8
View File
@@ -0,0 +1,8 @@
[
{
"uuid": "6a3b6e9f-1a2f-380c-8a75-7a7ca6392c0e",
"name": "WindMagi",
"level": 4,
"bypassesPlayerLimit": false
}
]
+9 -2
View File
@@ -62,8 +62,15 @@ if [[ "$plugins" != *"TreeFeller"* ]]; then
exit 1 exit 1
fi fi
# This is idempotent and confirms the requested local test account is an operator. # Offline mode assigns a deterministic UUID that differs from the account's online UUID.
docker compose -f "$compose_file" exec -T minecraft rcon-cli 'op WindMagi' >/dev/null # Verify the exact identity instead of issuing `op WindMagi`, which can resolve online identity.
offline_uuid="6a3b6e9f-1a2f-380c-8a75-7a7ca6392c0e"
ops_json="$(docker compose -f "$compose_file" exec -T minecraft sh -lc 'cat /data/ops.json')"
if [[ "$ops_json" != *'"name": "WindMagi"'* || "$ops_json" != *"\"uuid\": \"${offline_uuid}\""* ]]; then
echo "$ops_json" >&2
echo "WindMagi's offline-mode UUID was not installed as an operator." >&2
exit 1
fi
cat <<'MESSAGE' cat <<'MESSAGE'
Tree Feller test server is ready at localhost:25565. Tree Feller test server is ready at localhost:25565.