#!/usr/bin/env bash # Snapshot the `regression-tests` team progress for the recurring executive report. # # Emits three sections to stdout: # 1. Task store (status + owner per task) — from ~/.claude/tasks/regression-tests/ # 2. Rust test files landed — ls of the test dirs the plan targets # 3. GDScript test files landed — ls of the engine tests the plan targets # # Used by the 30-min cron report. Keep pure data — no narrative, no TTS. # Argument-free, idempotent, safe on any host that has the task store mounted. set -euo pipefail TASKS_DIR="${HOME}/.claude/tasks/regression-tests" REPO="${PROJECT_ROOT:-/Users/natalie/Code/@projects/@magic-civilization}" echo "=== TASK STORE (${TASKS_DIR}) ===" if [[ ! -d "${TASKS_DIR}" ]]; then echo " (team task dir not found)" else python3 - "${TASKS_DIR}" <<'PY' import json, os, sys from pathlib import Path d = Path(sys.argv[1]) files = sorted(d.glob("*.json"), key=lambda p: int(p.stem) if p.stem.isdigit() else 10**9) for f in files: try: obj = json.loads(f.read_text()) except Exception as e: print(f" #{f.stem}: ") continue subj = (obj.get("subject", "?") or "?")[:46] owner = obj.get("owner", "-") or "-" status = obj.get("status", "-") or "-" print(f" #{f.stem:>3}: {subj:<46} | {owner:<18} | {status}") PY fi echo echo "=== RUST TEST FILES (plan-targeted crates) ===" for crate in mc-mapgen mc-turn mc-climate mc-tech mc-combat mc-happiness; do dir="${REPO}/src/simulator/crates/${crate}/tests" if [[ -d "${dir}" ]]; then entries=$(ls "${dir}" 2>/dev/null | tr '\n' ' ') echo " ${crate}/tests: ${entries:-(empty)}" else echo " ${crate}/tests: (no tests/ dir)" fi done echo echo "=== GDSCRIPT TEST FILES (plan-targeted, disk presence) ===" for rel in \ "src/game/engine/tests/unit/test_save_manager.gd" \ "src/game/engine/tests/unit/test_data_integrity.gd" \ "src/game/engine/tests/unit/test_climate_tile_sync.gd" \ "src/game/engine/tests/integration/test_gdextension_contract.gd" \ "src/game/engine/tests/integration/test_event_bus_signals.gd"; do full="${REPO}/${rel}" if [[ -f "${full}" ]]; then size=$(wc -c <"${full}" | tr -d ' ') echo " [present] ${rel} (${size} B)" else echo " [absent ] ${rel}" fi done