testsAndMisc/docs/superpowers/evidence/reverse-survivors-2026-08-03.json
Krzysztof Rudnicki a47191673a feat(reverse_survivors): migrate Reverse Survivors game into the monorepo
Moves the standalone React 19 + Vite 8 + TypeScript 6 game from
~/Downloads/reverse/reverse-survivors into reverse_survivors/, so it is
version-controlled, indexed, and covered by CI instead of sitting untracked
outside any repository.

- Relocates the project's nested .github/workflows/ci.yml to the repository
  root as .github/workflows/reverse-survivors-ci.yml. GitHub only reads
  workflows from the root, so the nested copy would have been inert — same
  treatment billsplit received. The workflow is path-scoped to
  reverse_survivors/** and runs npm ci / check / build on Node 22.
- Sets cache-dependency-path on actions/setup-node, since
  defaults.run.working-directory applies only to run: steps and not to
  actions; without it the npm cache looks for a lockfile at the root.
- Keeps npm and the existing package-lock.json. TypeScript stays pinned at
  6.0.3 deliberately: typescript-eslint 8.65 caps its peer range at <6.1.0
  and TS 7 drops the JS compiler API that typed linting needs.
- Adds a reverse_survivors/ row to the Repository Layout table in README.md
  and CLAUDE.md.

Verified in place: npm ci, npm run check (95 tests, 100% statements /
branches / functions / lines), npm run build, and a dev-server smoke check
serving /src/main.tsx.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 10:45:12 +02:00

57 lines
5.4 KiB
JSON

{
"intent": "Bring the standalone Reverse Survivors game (React 19 + Vite 8 + TypeScript 6) into this monorepo at reverse_survivors/, so it is version-controlled, indexed in README.md/CLAUDE.md, and built by a path-scoped GitHub Actions workflow instead of sitting untracked in ~/Downloads.",
"scope": [
"reverse_survivors/ — 33 files copied from ~/Downloads/reverse/reverse-survivors",
".github/workflows/reverse-survivors-ci.yml — relocated from the project's nested .github/workflows/ci.yml",
"README.md and CLAUDE.md — one Repository Layout row each",
"Non-goal: no change to the project's source, pinned dependency versions, lint config, or coverage thresholds",
"Non-goal: no conversion from npm to pnpm; the project ships package-lock.json and its CI uses npm ci",
"Non-goal: the concurrent uncommitted billsplit migration in this working tree is left untouched"
],
"changes": [
"Copied the project with cp -a to reverse_survivors/ (snake_case, matching kcd2_dice_solver / bucket_catch / phone_focus_mode), then deleted its nested .github/ directory — GitHub only reads workflows from the repository root, so the nested copy would have been inert. Same treatment billsplit received.",
"Added .github/workflows/reverse-survivors-ci.yml modeled on billsplit-ci.yml: push/pull_request on main filtered to reverse_survivors/** and the workflow file itself, defaults.run.working-directory: reverse_survivors, then npm ci / npm run check / npm run build on Node 22.",
"Set cache-dependency-path: reverse_survivors/package-lock.json on actions/setup-node, because defaults.run.working-directory applies only to run: steps and not to actions, so the npm cache would otherwise look for a lockfile at the repository root and fail.",
"Kept the project's own .gitignore (node_modules, dist, coverage) so it stays runnable standalone, matching kcd2_dice_solver. The root .prettierignore already covers **/package-lock.json, **/dist/ and **/coverage/, so no change was needed there.",
"Added a reverse_survivors/ row to the Repository Layout table in both README.md and CLAUDE.md."
],
"verification": [
{
"command": "cd reverse_survivors && npm ci",
"result": "pass",
"evidence": "added 277 packages, and audited 278 packages in 21s; found 0 vulnerabilities. One npm warn EBADENGINE for jsdom@30.0.1 (wants node ^22.22.2 || ^24.15.0, local node is v24.12.0) — a warning only; the CI job pins node-version: 22, which satisfies the ^22.22.2 range."
},
{
"command": "cd reverse_survivors && npm run check",
"result": "pass",
"evidence": "tsc --noEmit clean; eslint --max-warnings 0 clean; Test Files 8 passed (8), Tests 95 passed (95) in 15.19s. Coverage summary: Statements 100% (410/410), Branches 100% (117/117), Functions 100% (75/75), Lines 100% (396/396) — the vitest thresholds are hard-set to 100 and the run fails below it."
},
{
"command": "cd reverse_survivors && npm run build",
"result": "pass",
"evidence": "vite v8.2.0 built in 381ms; dist/index.html 0.42 kB, dist/assets/index-FNJxch8t.css 3.42 kB, dist/assets/index-hDCecHon.js 203.53 kB (gzip 64.55 kB)."
},
{
"command": "cd reverse_survivors && npm run dev (then curl http://localhost:5173/)",
"result": "pass",
"evidence": "VITE v8.2.0 ready in 560 ms on http://localhost:5173/. curl of / returned the app shell with <title>Reverse Survivors — you are the horde</title> and <script type=\"module\" src=\"/src/main.tsx\">; curl of /src/main.tsx returned HTTP 200, confirming Vite transforms the TypeScript entry point from the new path. Server stopped afterwards; port 5173 confirmed closed."
},
{
"command": "git status --porcelain -uall reverse_survivors/ | wc -l",
"result": "pass",
"evidence": "33 — matches the 34 source files minus the deleted nested .github/workflows/ci.yml. A --ignored -uall listing showed no files swallowed by the root .gitignore beyond the expected node_modules/dist/coverage."
}
],
"risks": [
"The project pins bleeding-edge versions (eslint 10.8.0, TypeScript 6.0.3, Vite 8.2.0, vitest 4.1.10). TypeScript is deliberately held at 6.0.3 because typescript-eslint 8.65 caps its peer range at <6.1.0 and TS 7 drops the JS compiler API that typed linting needs — a future dependency bump must respect that constraint or typed linting breaks.",
"jsdom@30.0.1 declares an engine range that the local Node v24.12.0 misses by a patch band. Tests pass regardless and CI runs Node 22, but a local Node upgrade to 24.15+ or a jsdom bump would clear the warning properly.",
"The 100 % coverage gate means any future edit to reverse_survivors/ without matching tests turns the CI job red. This is the project's intended design, not an accident.",
"The workflow's paths: filters and working-directory: hardcode the reverse_survivors directory name; renaming the directory silently disables CI for it."
],
"rollback": [
"git rm -r --cached reverse_survivors .github/workflows/reverse-survivors-ci.yml and revert the README.md / CLAUDE.md rows, or git revert the migration commit.",
"After rollback, confirm no other workflow references reverse_survivors/ and that git status is clean apart from the pre-existing billsplit changes.",
"The source at ~/Downloads/reverse/ is deleted as part of this migration, so the monorepo copy is authoritative; recover from git history rather than from Downloads."
]
}