Files
Greyson Parrelli 8ccde03023 Add replayable debug reports.
A report dumps everything needed to understand a game that went wrong:
the full state (decks card by card, shop row and tier deck order,
discards, pending choices, banked Mana/Trumpets/apples), the round's
battles, and the whole event log. Available as JSON, which replays, or
text, which reads — and the text ends with a paste-ready repro test.

Battles now record the randomness they consume alongside what they
started from, so a result can be replayed long after the round cleared
those banks: same lineups, same dice, same events, down to the log text.
Results predating the recording say so rather than quietly re-rolling.

Three ways in: the 🐛 panel's download/copy buttons, GET
/api/debug/report (DEBUG-only, since a report holds both players' hands
and the shop deck order), and `mise run report`, which reads the
database directly so a live game can be dumped without DEBUG.
2026-08-10 10:06:06 -04:00

49 lines
1.1 KiB
TOML

[tools]
go = "latest"
node = "latest"
[tasks.dev-server]
description = "Run the Go server (serves API + built frontend on :8080)"
run = "go run ./cmd/server"
[tasks.dev-web]
description = "Run the Vite dev server with hot reload (proxies /api to :8080)"
dir = "web"
run = "npm run dev"
[tasks.dev]
description = "Run backend and frontend dev servers together"
depends = ["dev-server", "dev-web"]
[tasks.install-web]
description = "Install frontend dependencies"
dir = "web"
run = "npm install"
[tasks.build-web]
description = "Build the frontend into web/dist"
dir = "web"
run = "npm run build"
[tasks.build]
description = "Build everything: frontend + server binary (bin/server)"
depends = ["build-web"]
run = "go build -o bin/server ./cmd/server"
[tasks.report]
description = "Dump a game's debug report (no args: list recent games)"
run = "go run ./cmd/report"
[tasks.test]
description = "Run all Go tests"
run = "go test ./..."
[tasks.check]
description = "Vet Go code and type-check the frontend"
run = ["go vet ./...", "cd web && npx tsc -b"]
[tasks.serve]
description = "Build everything and run the production server"
depends = ["build"]
run = "./bin/server"