mods sweep doesn't clean orphaned overrides under Mods/UserCode/AutoGen/ #2

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

Originally filed by @coilysiren on 2026-04-28T07:26:43Z - https://github.com/coilysiren/eco-cycle-prep/issues/5

🤖 Filed by Claude Code on Kai's behalf.

When a mod is removed from the install (via coily mods-disable, or by manually rming its UserCode folder), AutoGen overrides that the mod owned are left behind under Mods/UserCode/AutoGen/{Food,Tool,Vehicle,WorldObject}/*.override.cs. unzip -o on the next mod sync doesn't touch them, and mods.disable_on_server only deletes the named UserCode folder.

Concrete leftovers found on kai-server (/home/kai/Steam/steamapps/common/EcoServer/):

  • Mods/UserCode/AutoGen/WorldObject/Arrastra.override.cs - references WoodenGearItem, no source equivalent in eco-mods locally.
  • Mods/UserCode/AutoGen/WorldObject/MechanicalWaterPump.override.cs - same.

Local eco-mods has Mods/UserCode/AutoGen/{Food,Tool,Vehicle}/ only, no WorldObject/ subdir, so the entire server-side WorldObject/ dir is orphan.

Update 2026-05-01: the original report also flagged Mods/UserCode/DFEasierShopCart/ as source-removed-but-server-resident. That was a misobservation - the mod is and was tracked in eco-mods at Mods/UserCode/DFEasierShopCart/ (commit 0e1d9b1). Not an orphan. The AutoGen WorldObject/ orphans are still real.

Proper fix probably belongs in eco_cycle_prep/mods.py: extend disable_on_server (or add a sibling sweep) that walks the server Mods/UserCode/AutoGen/ tree and removes any *.override.cs whose owning mod is no longer present, plus prunes the source mod folder. Or rsync-with-delete from a known-good source manifest.

Tonight's workaround (one-off cleanup folded into infrastructure/scripts/install-eco-mod.sh) needs to come back out once a real sweep is in place.

🤖 Filed by Claude Code on Kai's behalf.

_Originally filed by @coilysiren on 2026-04-28T07:26:43Z - [https://github.com/coilysiren/eco-cycle-prep/issues/5](https://github.com/coilysiren/eco-cycle-prep/issues/5)_ > 🤖 Filed by Claude Code on Kai's behalf. When a mod is removed from the install (via `coily mods-disable`, or by manually rming its UserCode folder), AutoGen overrides that the mod owned are left behind under `Mods/UserCode/AutoGen/{Food,Tool,Vehicle,WorldObject}/*.override.cs`. `unzip -o` on the next mod sync doesn't touch them, and `mods.disable_on_server` only deletes the named UserCode folder. Concrete leftovers found on kai-server (`/home/kai/Steam/steamapps/common/EcoServer/`): - `Mods/UserCode/AutoGen/WorldObject/Arrastra.override.cs` - references `WoodenGearItem`, no source equivalent in eco-mods locally. - `Mods/UserCode/AutoGen/WorldObject/MechanicalWaterPump.override.cs` - same. Local eco-mods has `Mods/UserCode/AutoGen/{Food,Tool,Vehicle}/` only, no `WorldObject/` subdir, so the entire server-side `WorldObject/` dir is orphan. Update 2026-05-01: the original report also flagged `Mods/UserCode/DFEasierShopCart/` as source-removed-but-server-resident. That was a misobservation - the mod is and was tracked in eco-mods at `Mods/UserCode/DFEasierShopCart/` (commit 0e1d9b1). Not an orphan. The AutoGen `WorldObject/` orphans are still real. Proper fix probably belongs in `eco_cycle_prep/mods.py`: extend `disable_on_server` (or add a sibling sweep) that walks the server `Mods/UserCode/AutoGen/` tree and removes any `*.override.cs` whose owning mod is no longer present, plus prunes the source mod folder. Or rsync-with-delete from a known-good source manifest. Tonight's workaround (one-off cleanup folded into `infrastructure/scripts/install-eco-mod.sh`) needs to come back out once a real sweep is in place. > 🤖 Filed by Claude Code on Kai's behalf.
coilysiren added
P3
and removed
P2
labels 2026-05-31 06:59:58 +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-bridge/eco-cycle-prep#2
No description provided.