From c8fd1d5e224192d6be710c73f4bb1dc98abdf6f8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 11:22:56 +0100 Subject: [PATCH] Split typed state path from legacy catalog --- .voidbot/state/aetheria.cc | Bin 26536 -> 26721 bytes Assets/Scripts/Gameplay/ActionGameManager.cs | 2 +- .../Scripts/Gameplay/AetheriaStateBoundary.cs | 11 +++++++++++ .../Scripts/Gameplay/LegacyCatalogBoundary.cs | 5 ----- docs/aetheria-perfect-machine-map.md | 14 ++++++++++---- 5 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 Assets/Scripts/Gameplay/AetheriaStateBoundary.cs diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index e38382177676a8e1122774c0abdd7673592f34a4..43fb51f2af8ec65baddcf8a3f00ad25ab795fd03 100644 GIT binary patch delta 1341 zcmah}Noy2A6gCUlL@>r6?uAQ&Bz6|##H^AS3_>fY_1rZbmJSrYUP(-f*1^ovGPu{HVo*pvefXDf!>wDk(-uK?KFEu~E*1URB+tS}V zJdiL3`iE8@*0lTYYahf&B0_lGR*Vb|gx@sPpR8T!D0J4Fr}N7bpd1hcBk571kji;r zA(3H3Xq4DgLsyKkPh(>&nU!GNIydqY;5L`i4~^YMoFGw78W_x9BWpcXSLD#K_FG3YWV zWO62z$e2o^8w%W6%y6J0CAb^f;R&)481|1XTp>wao#$ z0Lkfw?nXI+XKd%tUW)}_3xvOWzRU0LZ1X2?wdFs|!KTulYjRVML^?d98*_0Q(1fY9 z_-WmDtdVG!38rKV5Uw`lp2`_UT~!^R5!!uQcN+WM9Y|#;1v)!>oyiiVRq42B?+LT3 z&(nC0ndxwG6H@ZqzMjHjr`6EaHH$s%h{=T&7y?Dj6;TW`>yIW*6wVrU(|DpxZY(Yg zf{7`W#i+zA+qapA{*u$0kApp6z6Qm7$_2?peTjIOA(O5v3F-|Y$Fst>=Q!vDW}*32?eBgyYFr%?9Qxa zX3s2*gOV;)wEqAN2|*Nzu1kX`XlS5Av1s@UfF^a`%-tCy%6&WUz2Dc&tLK&b&nkcY zK5?+oI5T%TSgtQ!`>k@Md@}LtxYAhg6*YO=R~Cc%@@Ze0nVOxrnhuUng-6fh1+p<| zfe=xuEJbid3R^&^WLNZZjaDdGGkKONZ6Qq17&4%83#tn$iON5}{<0g~;~yg3shrp# zYlZBYAT(8I-pZ6DX$2-Lx$e`jDEmSynR4BKU)>UhHdHR7i$X@+>#HauXv#cY6`=!w zx(LGZ@8#L;Z#zFyXsfVBMb$x7vI>`bQfX>Y+96#9rJ+T}V2|1u-h|xnOo)W$Hqj>& zz=qXWKrVB`Z1)}&sUvA%i!=cyMuBEc`h2RZRSK6drR^-iVob6b39ERcSFCx&|{Ue6XvHlBq< z2_3})ymPk5*u<4Qu`3v|4r7kSGIJ2pSi;B!dfjWVg5}e52R{xTpbTTBzoV{sx$opa zAB(2jZFZDn5h@)Suj%lj?A{Q6iyRS`0gev}>GJmhgN{o)$9hmX`SZ;B`grkBd)6Z( z&9_h($h7D?ly06E*T+`K_vvybtj@iJgMSw8?*HT=^+iN7q#^p*@{3bv2mgLkJ6t|! zpFJ>qGnSSX2d~?khu(db&nG`0Jr?uz;bZa350A!`Mt$_4OqcO>HRFaX2J?;b?c`_W Xf7kE$F|M#U`02)r1LLl_xoiIedMd0% diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 89aafd6b2..20016ed1b 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -35,7 +35,7 @@ public class ActionGameManager : MonoBehaviour get => _gameDataDirectory ??= new DirectoryInfo(Application.dataPath).Parent.CreateSubdirectory("GameData"); } - public static string AetheriaStateFilePath => LegacyCatalogBoundary.GetStateFilePath(GameDataDirectory); + public static string AetheriaStateFilePath => AetheriaStateBoundary.GetStateFilePath(GameDataDirectory); private static string LegacyAetherDatabasePath => LegacyCatalogBoundary.GetLegacyCatalogPath(GameDataDirectory); private static ILegacyCatalogReader LegacyCatalog => LegacyCatalogBoundary.GetCatalog(GameDataDirectory); diff --git a/Assets/Scripts/Gameplay/AetheriaStateBoundary.cs b/Assets/Scripts/Gameplay/AetheriaStateBoundary.cs new file mode 100644 index 000000000..1dbb894f1 --- /dev/null +++ b/Assets/Scripts/Gameplay/AetheriaStateBoundary.cs @@ -0,0 +1,11 @@ +using System.IO; + +public static class AetheriaStateBoundary +{ + public const string RuntimeStateFileName = "aetheria-world.cc"; + + public static string GetStateFilePath(DirectoryInfo gameDataDirectory) + { + return Path.Combine(gameDataDirectory.FullName, RuntimeStateFileName); + } +} diff --git a/Assets/Scripts/Gameplay/LegacyCatalogBoundary.cs b/Assets/Scripts/Gameplay/LegacyCatalogBoundary.cs index fe809f94d..00f320083 100644 --- a/Assets/Scripts/Gameplay/LegacyCatalogBoundary.cs +++ b/Assets/Scripts/Gameplay/LegacyCatalogBoundary.cs @@ -4,11 +4,6 @@ public static class LegacyCatalogBoundary { private static LegacyCatalogCache _catalogCache; - public static string GetStateFilePath(DirectoryInfo gameDataDirectory) - { - return Path.Combine(gameDataDirectory.FullName, "aetheria-world.cc"); - } - public static string GetLegacyCatalogPath(DirectoryInfo gameDataDirectory) { return Path.Combine(gameDataDirectory.FullName, "AetherDB.msgpack"); diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 22ebf38f3..c164cd883 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -20,10 +20,13 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - Unity client/runtime lives under `Assets/`. Gameplay still reads the legacy item/name catalog through a private `ActionGameManager` boot helper, which is now the only runtime entrypoint that calls `LegacyCatalogBoundary.GetCatalog`. - `ActionGameManager` no longer owns a global legacy cache. Local run saves, - loadouts, player settings files, zone files, and generated keyboard layout - caches no longer write bespoke durable files. The legacy `PlayerSettings` - runtime object is no longer decorated as a MessagePack persistence shape. + `ActionGameManager` no longer owns a global legacy cache. + `AetheriaStateBoundary` owns the Unity runtime path to + `GameData/aetheria-world.cc`; `LegacyCatalogBoundary` no longer names or owns + typed state paths. Local run saves, loadouts, player settings files, zone + files, and generated keyboard layout caches no longer write bespoke durable + files. The legacy `PlayerSettings` runtime object is no longer decorated as a + MessagePack persistence shape. - Shared domain state is still partly built around `DatabaseEntry`, GUID identity, MessagePack attributes, and static cache references. Newtonsoft, JsonKnownTypes, RethinkDB, LiteNetLib client transport, and the broken @@ -126,6 +129,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - `GameData/aetheria-world.cc` is now materialized from the importer as the project-local typed state file for the checked-in catalog. The importer stores relative provenance in the state document, not machine-local absolute paths. + Unity resolves this path through `AetheriaStateBoundary`, not through the + legacy catalog boundary. Import rebuilds clear the generated `.cc`, `.cc.records`, and `.cultmesh` outputs for the selected state path after capturing legacy inputs, so schema evolution can rematerialize typed state instead of being blocked by stale @@ -189,6 +194,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. ## Current Authority Map - Owner: `Aetheria.State` owns the new typed state spine for durable state. + `AetheriaStateBoundary` owns Unity's runtime typed state file path. `LegacyCatalogBoundary` is the only named owner for opening the old catalog and binding legacy `DatabaseLink` resolution until catalog migration lands. `ActionGameManager` has a private boot helper that calls it only to construct