diff --git a/.skills/mcc-integration-testing/SKILL.md b/.skills/mcc-integration-testing/SKILL.md index f6fe207f..0f7e89b9 100644 --- a/.skills/mcc-integration-testing/SKILL.md +++ b/.skills/mcc-integration-testing/SKILL.md @@ -5,24 +5,23 @@ description: Repeatable local offline integration testing for Minecraft Console # MCC Integration Testing -Use this skill for local MCC validation against the user's `mc-*` and `mcc-*` shell helpers. +Use this skill for local MCC validation. Helper functions (`mc-*`, `mcc-*`) come from `tools/mcc-env.sh`; standalone tools (`tools/start-server.sh`, `tools/mc-rcon.sh`) can also be called directly without sourcing. ## Workflow -1. Source `~/.zshrc` in command invocations. -2. Do not read `~/.zshrc` directly. -3. Ensure the target server is configured for persistent offline testing: +1. Source `tools/mcc-env.sh` to load `mc-*` and `mcc-*` helpers, or call `tools/start-server.sh` and `tools/mc-rcon.sh` directly for non-interactive shells. +2. Ensure the target server is configured for persistent offline testing: - `online-mode=false` - `enforce-secure-profile=false` - `enable-rcon=true` - `rcon.password=test123` -4. Build with `mcc-build`. -5. Run the scripted scenario with `scripts/run_full_spectrum_test.sh`. -6. Summarize the evidence with `scripts/summarize_test_run.sh`. +3. Build with `dotnet build MinecraftClient.sln -c Release`. +4. Run the scripted scenario with `scripts/run_full_spectrum_test.sh`. +5. Summarize the evidence with `scripts/summarize_test_run.sh`. ## Required Preconditions -- Server jar exists under `~/Minecraft/Servers//server.jar` +- Server jar exists under `MinecraftOfficial/downloads//server.jar` - `eula.txt` contains `eula=true` - Repo root `MinecraftClient.ini` is the offline MCC test profile - The MCC config round-trip issue must be fixed before relying on repeated launches diff --git a/.skills/mcc-integration-testing/evals/evals.json b/.skills/mcc-integration-testing/evals/evals.json index 1eb5a870..690bc128 100644 --- a/.skills/mcc-integration-testing/evals/evals.json +++ b/.skills/mcc-integration-testing/evals/evals.json @@ -7,7 +7,7 @@ "expected_output": "The server is left in offline mode with RCON enabled, MCC joins successfully, and the run reports clear pass or fail evidence from both MCC and server logs.", "files": [], "expectations": [ - "The workflow sources ~/.zshrc without reading it directly.", + "The workflow sources tools/mcc-env.sh or calls tools/start-server.sh and tools/mc-rcon.sh directly.", "The server is configured with online-mode=false and enable-rcon=true.", "The run uses both mc-rcon and mcc-cmd.", "The result includes evidence from MCC output and server logs." diff --git a/.skills/mcc-integration-testing/scripts/ensure_offline_server.sh b/.skills/mcc-integration-testing/scripts/ensure_offline_server.sh index 2aab4267..5e67687d 100755 --- a/.skills/mcc-integration-testing/scripts/ensure_offline_server.sh +++ b/.skills/mcc-integration-testing/scripts/ensure_offline_server.sh @@ -1,9 +1,10 @@ -#!/usr/bin/env zsh +#!/usr/bin/env bash set -euo pipefail -set +eu -source ~/.zshrc -set -eu +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" +# shellcheck source=tools/mcc-env.sh +source "$REPO_ROOT/tools/mcc-env.sh" VERSION="${1:-1.21.11-Vanilla}" SERVER_DIR="${MCC_SERVERS:?}/$VERSION" diff --git a/.skills/mcc-integration-testing/scripts/run_full_spectrum_test.sh b/.skills/mcc-integration-testing/scripts/run_full_spectrum_test.sh index 6648771a..1ae6e983 100755 --- a/.skills/mcc-integration-testing/scripts/run_full_spectrum_test.sh +++ b/.skills/mcc-integration-testing/scripts/run_full_spectrum_test.sh @@ -1,12 +1,11 @@ -#!/usr/bin/env zsh +#!/usr/bin/env bash set -euo pipefail -set +eu -source ~/.zshrc -set -eu - -SCRIPT_DIR="${0:A:h}" +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" +# shellcheck source=tools/mcc-env.sh +source "$REPO_ROOT/tools/mcc-env.sh" + VERSION="${1:-1.21.11-Vanilla}" RUN_ROOT="${TMPDIR:-/tmp}/mcc-integration-testing" RUN_ID="$(date +%Y%m%d-%H%M%S)"