install-eco-mod-source.sh: refuse to rsync pointer-sized .unity3d files #1

Open
opened 2026-05-23 20:54:25 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-23T19:19:21Z - https://github.com/coilysiren/infrastructure/issues/298

Problem - scripts/install-eco-mod-source.sh rsyncs Mods/UserCode/$NAME/ from the local eco-mods / eco-mods-public checkout into the live EcoServer tree. If LFS smudge is not configured (or LFS objects are not hydrated), the working tree contains 130-byte LFS pointer files where .unity3d assetbundles should be, and the rsync silently breaks the live server.

Surfaced - 2026-05-23 incident: 15 .unity3d files on the live eco-server unit were 131-133 byte pointer files after a 2026-05-22 21:21 deploy. Root cause: git lfs install was never run at user level, so the post-git lfs migrate eco-mods clone produced pointer files instead of binaries. Repair: surgical rsync from a freshly re-cloned eco-mods (with global LFS hooks now installed) into the live tree.

Fix shape - Before rsync, scan the source tree for .unity3d (or any path matching filter=lfs in .gitattributes) under 1 KB. If any are pointer-sized, abort with the offending paths listed and a hint to run git lfs install && git lfs pull. Same idea applies to .dll and other LFS-tracked extensions if the migration ever widens.

Bonus belt - Mirror the same check in install-eco-mod.sh against the unzipped release contents, defensive against an upstream release pipeline that ever ships pointers by mistake.

Out of scope - The underlying LFS-vs-rollback question for coilysiren/eco-mods itself. Local repo was re-cloned with global LFS hooks installed, so the immediate footgun is closed; this issue is the belt-and-suspenders.

_Originally filed by @coilysiren on 2026-05-23T19:19:21Z - [https://github.com/coilysiren/infrastructure/issues/298](https://github.com/coilysiren/infrastructure/issues/298)_ **Problem** - `scripts/install-eco-mod-source.sh` rsyncs `Mods/UserCode/$NAME/` from the local `eco-mods` / `eco-mods-public` checkout into the live EcoServer tree. If LFS smudge is not configured (or LFS objects are not hydrated), the working tree contains 130-byte LFS pointer files where `.unity3d` assetbundles should be, and the rsync silently breaks the live server. **Surfaced** - 2026-05-23 incident: 15 `.unity3d` files on the live `eco-server` unit were 131-133 byte pointer files after a 2026-05-22 21:21 deploy. Root cause: `git lfs install` was never run at user level, so the post-`git lfs migrate` `eco-mods` clone produced pointer files instead of binaries. Repair: surgical rsync from a freshly re-cloned `eco-mods` (with global LFS hooks now installed) into the live tree. **Fix shape** - Before rsync, scan the source tree for `.unity3d` (or any path matching `filter=lfs` in `.gitattributes`) under 1 KB. If any are pointer-sized, abort with the offending paths listed and a hint to run `git lfs install && git lfs pull`. Same idea applies to `.dll` and other LFS-tracked extensions if the migration ever widens. **Bonus belt** - Mirror the same check in `install-eco-mod.sh` against the unzipped release contents, defensive against an upstream release pipeline that ever ships pointers by mistake. **Out of scope** - The underlying LFS-vs-rollback question for `coilysiren/eco-mods` itself. Local repo was re-cloned with global LFS hooks installed, so the immediate footgun is closed; this issue is the belt-and-suspenders.
coilysiren added
P2
and removed
P1
labels 2026-05-31 07:00:57 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/infrastructure#1
No description provided.