Clear dangling boss hull links, and stop the tool writing on read

Eight factions pointed at one boss hull GUID that no longer resolves,
shared wreckage from the database loss. PlaceFactionsMain gives a boss zone
to every faction carrying a BossHull, so each dangling link claimed a
chokepoint that could never spawn a boss.

AetherDb.Open no longer registers the name file store. CultCache subscribes
Add to a store EntryAdded, MultiFileBackingStore.PullAll re-emits what it
loads, and Add pushes to that type store, whose Push writes a file: opening
the cache rewrote all twelve name files, 4.4 MB, on every command. They were
byte identical, and it only surfaced as an error because Unity had one of
them memory mapped. Name files now load only on request, and the scope doc
records the underlying smell.

Adds commands: factions, clear-boss-hulls, save, loadout (runs the real
LoadoutGenerator against every hull), hardpoint-fit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-12 02:05:33 +02:00
commit 285b57713f
4 changed files with 230 additions and 13 deletions

View file

@ -58,6 +58,15 @@ AI share it, so AI accuracy is no longer superhuman by construction.
- **Deferred Unity-physics surfaces:** ship collision (`HullCollider`), loot
pickup (`ShieldManager`), `TractorBeam`, `Mine`. Not blockers.
**Known ownership smell in CultCache: loading writes.** `AddBackingStore`
subscribes `Add` to a store's `EntryAdded`; `MultiFileBackingStore.PullAll`
re-emits every entry it loads; `Add` pushes to the store registered for that
type, and that `Push` writes a file. So a cache with a second store rewrites
that store's files on open, and the game does this to `GameData/NameFile` at
every startup. Nothing distinguishes "loaded this" from "changed this".
Whoever next owns persistence should separate the two; until then, readers
must not register a writable store they only mean to read.
**Invariant: game simulation runs independently of Unity.** `ServerShared`
cannot reference UnityEngine (`Aetheria.Shared.Unity.asmdef` sets
`noEngineReferences`), and `Aetheria.Shared/Aetheria.Shared.csproj` builds it