From 212472544fca7a89989f59f61cbb78636e305cd9 Mon Sep 17 00:00:00 2001 From: Natalie Date: Sat, 18 Apr 2026 06:34:56 -0700 Subject: [PATCH] =?UTF-8?q?fix(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=90=9B=20debug=20wasm-pack=20path=20issue=20in=20deploy?= =?UTF-8?q?=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../objectives/p1-17-guide-next-auto-deploy.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.project/objectives/p1-17-guide-next-auto-deploy.md b/.project/objectives/p1-17-guide-next-auto-deploy.md index ca3adb41..ab01edc3 100644 --- a/.project/objectives/p1-17-guide-next-auto-deploy.md +++ b/.project/objectives/p1-17-guide-next-auto-deploy.md @@ -31,6 +31,21 @@ Closing rationale: per CLAUDE.md Objective Integrity, three bullets are unproven - ✗ **Commit-status visibility** — same blocker; Forgejo run page not reachable from this session. - ✗ **Bake side-effect regression** — the same deploy wiped `__sim-cache/base_no_magic/` (all 6 scenarios now 404). Filed against p2-21 since the bake is its responsibility; p1-17 deploy itself is correct (rsync delta behaves as designed). +## Diagnosed root cause — 2026-04-18 05:30 (tourguide, Forgejo API) + +Pulled compressed run logs via `zstdcat /bigdisk/forgejo/data/forgejo/gitea/actions_log/magicciv/magicciv/51/20049.log.zst` (black-host path, reached via apricot SSH chain). Three consecutive failures (runs 195/197/= IDs 20045/20047/20049) all die at the same line: + +``` +build-wasm.sh: line 15: wasm-pack: command not found +⚙️ [runner]: RUN exit status 127 +``` + +**Root cause**: The forgejo-runner systemd unit (`~/.config/systemd/user/forgejo-runner.service`) sets `Environment=PATH=%h/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` — deliberately excluding `~/.cargo/bin` so jobs start from a clean slate. `wasm-pack` lives at `/var/home/lilith/.cargo/bin/wasm-pack`, so the `bash build-wasm.sh` step in `deploy-next.yml` hits a 127. + +**Fix**: added a "Prime PATH for cargo tools" step to `deploy-next.yml` that writes `$HOME/.cargo/bin` to `$GITHUB_PATH` before the build-WASM step — portable, non-invasive, preserves the runner's clean-slate policy. + +Sibling workflow `ci.yml` (regression gate, owned by p2-10) fails for an *unrelated* reason — `missing field can_found_city in initializer of state::TacticalUnit`, a Rust struct literal that some recent game-ai work didn't propagate through all initializers. Not tourguide's scope. + ## Summary With p1-15 landed, `./run deploy:guide:next` can be invoked manually from