magicciv/scripts/run
Natalie 88bdc4210a feat(dist): build-artifact Space — publish/fetch/sync fetch-or-build + RL model sharing
Build the linux .so/wasm once on a worker and let sim/test/AI runners fetch the
prebuilt artifact (keyed by git sha) instead of recompiling — N workers share
one build. Adds the magicciv-artifacts DO Space, rclone in the golden image, and:
  - dist:publish  build + upload builds/<sha>/{.so,wasm}
  - dist:fetch    download the prebuilt .so for HEAD's sha
  - dist:sync     git pull -> fetch prebuilt if published, else build
  - dist:models   share RL .onnx via the Space (push/pull/ls)
Complements sccache (compile cache) by caching final outputs. Creds via
RCLONE_S3_* env over ssh, never on worker disk/argv; degrades to build-on-worker
when creds/cache absent.

Also hardens the dispatch layer (pre-existing, affected test/build/render too):
  - pass -i ~/.ssh/id_mc_fleet on dispatch ssh (don't rely on agent-loaded key)
  - guard _dist_first_host against an empty / "fleet down" inventory
  - drop ssh -n on heredoc-stdin verbs (it redirected stdin from /dev/null)

Proven end-to-end on DO: publish built a 43.9MB .so + wasm; dist:sync fetched it
in 2.8s (no rebuild).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 06:02:33 -04:00
..
audio.sh
autoplay.sh
build-info.sh
build.sh
common.sh
deploy.sh fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
dev.sh
dist.sh feat(dist): build-artifact Space — publish/fetch/sync fetch-or-build + RL model sharing 2026-06-28 06:02:33 -04:00
export.sh
forge.sh fix(infra): make the DO fleet actually work on real hardware + render host 2026-06-27 12:45:29 -04:00
format.sh
heavy-prefix.sh
lint.sh
remote.sh fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
run
test.sh
tools.sh fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
verify.sh fix(infra): make the DO fleet actually work on real hardware + render host 2026-06-27 12:45:29 -04:00