skill: update mcc-integration-testing to use tools/mcc-env.sh instead of ~/.zshrc

- Replace `source ~/.zshrc` with `source "$REPO_ROOT/tools/mcc-env.sh"` in
  ensure_offline_server.sh and run_full_spectrum_test.sh
- Convert both scripts from zsh to bash (#!/usr/bin/env bash) so mcc-env.sh
  can be sourced natively; replace ${0:A:h} with portable SCRIPT_DIR expansion
- Update SKILL.md: drop ~/.zshrc references, point to tools/mcc-env.sh and
  standalone tools/start-server.sh + tools/mc-rcon.sh; update server path
  from ~/Minecraft/Servers/ to MinecraftOfficial/downloads/; replace
  `mcc-build` with `dotnet build MinecraftClient.sln -c Release`
- Update evals.json expectation to match new workflow

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/1ff08b70-7be3-4211-9b77-a9e10ff1d157
This commit is contained in:
copilot-swe-agent[bot] 2026-03-22 21:19:55 +00:00
parent 07189509b0
commit 02873957a8
4 changed files with 18 additions and 19 deletions

View file

@ -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/<version>/server.jar`
- Server jar exists under `MinecraftOfficial/downloads/<version>/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

View file

@ -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."

View file

@ -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"

View file

@ -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)"