diff --git a/.gitignore b/.gitignore index 89b185eb..f56044eb 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,11 @@ build/ # Rust build artifacts src/simulator/target/ .local/ + +# Compiled GDExtension binaries — built per-host, never rsync from one arch to another. +# macOS has no cargo (or a stale one); apricot compiles. Including these in rsync +# clobbers the apricot-side fresh binary with our stale mac-side one. +src/game/engine/addons/magic_civ_physics/*.so +src/game/engine/addons/magic_civ_physics/*.dll +src/game/engine/addons/magic_civ_physics/*.dylib +src/game/engine/addons/magic_civ_physics/*.framework/ diff --git a/CLAUDE.md b/CLAUDE.md index 45bc5f64..0cc41930 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -350,6 +350,7 @@ Hooks enforce these standards automatically on Write/Edit — they are not optio - Building/unit effects are data-driven from JSON — don't hardcode behavior - Always call `DataLoader.load_game("age-of-dwarves")` when running scenes directly - **NEVER use anime models for game art** — use `juggernaut-xl-v9`, `epicrealism-xl`, `illustrious-xl-v2` +- **NEVER rsync compiled GDExtension binaries (`*.so`, `*.dll`, `*.dylib`) from macOS to apricot.** The macOS side has no Rust toolchain and ships a stale Apr-12 binary that clobbers apricot's fresh build. Use `rsync --exclude='addons/magic_civ_physics/*.so'` OR rely on the `.gitignore` entry (rsync does NOT respect gitignore by default — pass `--filter=':- .gitignore'`). Always rebuild via `ssh lilith@apricot.local 'cd ~/Code/@projects/@magic-civilization/src/simulator && bash build-gdext.sh'` after rsyncing Rust source changes. Symptom of this bug: `src/simulator/crates/*.rs` has new code but batch runs show old behavior (e.g. FOOD_PER_POP=2.0 in a binary whose source says 1.5). - **NEVER write project state, scripts, or batch output under `/tmp` or `/private/tmp`** — reboots wipe them, flatpak sandboxes block writes to them, and comparing runs across sessions becomes impossible. Canonical locations: - Shell scripts/runners → `scripts/` (in-repo, tracked) or `$HOME/bin/` (persistent per-host) - Batch/iteration outputs → `.local/batches/` (in-repo, gitignored) or `$HOME/tmp/` (persistent per-host)