From d8cd07fd845c360451640cf5e50f036330bcf93e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 23:01:27 +0100 Subject: [PATCH] Demote item reference projection value --- .voidbot/state/aetheria.cc | Bin 52437 -> 52860 bytes Aetheria.State/README.md | 8 +++-- Assets/Scripts/ServerShared/ItemManager.cs | 6 ++-- .../RuntimeItemProjectionEntry.cs | 8 ++--- docs/aetheria-perfect-machine-map.md | 33 +++++++++++------- 5 files changed, 33 insertions(+), 22 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index d0cde33c081c82a25dfeb117195ddb1c790898f3..dc409aaf84d4d9c105f532718162f31996ab7f29 100644 GIT binary patch delta 1084 zcmY*ZJxmlq6c!GJGsF-L5)tAf!O$E>4mc343`8LTxfo(W<=pPv?Qpw0o7veruR8x4 z4UJA=jD|)HhC;iHX{qsGUX&-|X%Iwma{A?|a|(z5RGU@%Lfk#cFeM z{PajRJ)D_XywlXF-Zn3{MIVO8)aL6R6(oYVVk8q*w6*j$Z=9_Uv~=97-+l@ERqDa5 zrVHvvs?xw)y5-t%tpy?-uO_;O& zPFDhReMwvcQFz4#;vyJz22EOEF4K*`%rhV@3VtBUtjyeEJfR&&@Vtfx?yB#pqtndS z{oK=S#NK7(?XUoY7zkxj!OBQgT7m~fD+HV)E-6xh2&TH)-&aeoO6vNEw0&~{TexjT z?8BA8Atnu3O)bpFpf=|vuvrP=13~gO4L1SYPEw5u1`iO#3v3$-feZwN3Ku2F6Qcx@ zSBNmdrbS{@HJ@6nVIVCon5?GPNvPwDq8zS`t$Hg# zu>b+JnW60lcm2Sj!iNfz7Rn`2YmikB1=mcWfaST&hQ>S!9# z8SO=6?qjwzJ1qke-p!=?a(?#IqJCk;+d9iaL2#r zQBv?u9ImraUwd^Z8J#k=st<|o_>4!h;Tiwh+>8%Bo54e0j$gB*;p@`Y_15S&kX1hu PUG;-+wvuthSZ47bb5f1v delta 951 zcmY*YJ8KkC6gJry-9{2YB#3${ADB$uPb=}o28qPYHtFup+}XLwoqLD-*mV?KP_R~} zkf>llC17L1A}Cl$3|LrMSSU9B1bYk5%+4kerkU@a`P|bXIh@=VbTCr>(O+eNU3=`n_gl zDWJeaWDO`9k|<)L2CFo#N}@dQn2tD!K}g_I)TqKD;%Oj4v(b?WXGKc^CQ#DW0w}XE z;&dJ%=e5fT3x9T6{J-D<`E)5~&ZcAUu5KJ85 zSw@oIR~^vwtQMwsN|eil_)?;mCt@|i#}SL<~6vgHQLm}sUW(^mP!rR@;h z_6%j6YT&F+VZMBG0bFH$1MM_XlWUct!T@qKmL<+NOn@?5aNhm$41iM2FN=-## zf2ITKIa`%noj2s@Z28U7pALnt9YEYHw#<;s#VZZ-{UMscunU z|2ojudh~L$*cy0yrg(H>d~Raa85^Hjeq~4v5BrnF_rF_%&n_HnEq*vs#3xluz7+=Y rcQZMYKdw(XFg2C|ve276_#Ab>$qek@x!(b@Ypt!F?P88hk1hWL5S~^x diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index b56980533..7d2483af9 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -66,9 +66,11 @@ Dead legacy catalog roots for user records and galaxy map-layer resources have been deleted from live Unity source. Surviving runtime DTOs no longer carry legacy catalog group/table annotations; their remaining metadata is projection and inspection metadata for the typed runtime bridge. -Item instances now carry `RuntimeItemReference`, a narrow item-id/value holder. -The old generic `RuntimeCatalogLink` abstraction has been deleted; item data -projection is routed through `ItemManager` and the typed runtime catalog reader. +Item instances now carry `RuntimeItemReference`, a narrow item-definition id plus +optional hydrated projection cache. The old generic `RuntimeCatalogLink` +abstraction has been deleted; item data projection is routed through +`ItemManager` and the typed runtime catalog reader. `Projection` is not durable +state; it is a bridge for surviving simulation and UI code. Surviving item catalog Unity DTOs inherit `RuntimeItemProjectionEntry`; the old `RuntimeCatalogEntry` base name no longer appears in live source. Temporary faction/corporation projections and zone body/orbit DTOs keep local GUID fields diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs index fb237f8eb..e1b211bfc 100644 --- a/Assets/Scripts/ServerShared/ItemManager.cs +++ b/Assets/Scripts/ServerShared/ItemManager.cs @@ -65,12 +65,12 @@ public class ItemManager public ItemData GetData(ItemInstance item) { Hydrate(item); - return item?.Data?.Value; + return item?.Data?.Projection; } public void Hydrate(ItemInstance item) { - if (item?.Data == null || item.Data.Value != null) + if (item?.Data == null || item.Data.Projection != null) { return; } @@ -82,7 +82,7 @@ public class ItemManager return; } - item.Data.SetValue(data); + item.Data.SetProjection(data); } public void Log(string s) diff --git a/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs b/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs index c0474bf72..61d1a0279 100644 --- a/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs +++ b/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs @@ -28,7 +28,7 @@ public abstract class RuntimeItemProjectionEntry public class RuntimeItemReference { - public ItemData Value { get; private set; } + public ItemData Projection { get; private set; } public Guid ItemId; public RuntimeItemReference() @@ -37,12 +37,12 @@ public class RuntimeItemReference public RuntimeItemReference(ItemData value) { - SetValue(value); + SetProjection(value); } - public void SetValue(ItemData value) + public void SetProjection(ItemData value) { - Value = value; + Projection = value; ItemId = value?.ID ?? Guid.Empty; } } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 665323ecf..c66d59751 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -99,8 +99,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - `ActionGameManager` opens `AetheriaRuntimeCatalogStore` over `aetheria-world.cc`, projects it through `AetheriaRuntimeItemCatalog`, and gives `ItemManager` explicit item lookup authority. Item instances carry - `RuntimeItemReference`, a hydrated item-id/value holder, not a process-global - catalog resolver. The old `LegacyItemCatalogBoundary`, + `RuntimeItemReference`, an item-definition id plus optional hydrated + projection cache, not a process-global catalog resolver or durable item-data + owner. The old `LegacyItemCatalogBoundary`, `LegacyItemCatalogCache`, and runtime MessagePack deserializer path have been deleted. The old `DatabaseEntry`/`RuntimeCatalogEntry` base has been demoted to `RuntimeItemProjectionEntry` for surviving item DTOs, and the old generic @@ -130,11 +131,12 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `Faction` DTOs, including allegiance edges, for the existing simulation shape and resolves full name arrays from `aetheria.name_file.v2` records. The runtime no longer opens the old `GameData/NameFile/*.msgpack` directory. -- Item instances carry `RuntimeItemReference`, a narrow item-id/value holder +- Item instances carry `RuntimeItemReference`, a narrow item-definition id resolved by `ItemManager` against the typed runtime item catalog projected - from `aetheria-world.cc`. MessagePack catalog construction no longer grabs - global link-resolution authority, and the old generic `RuntimeCatalogLink` - abstraction is gone. + from `aetheria-world.cc`. The optional `Projection` on the reference is a + hydrated DTO cache for legacy simulation/UI code, not state authority. + MessagePack catalog construction no longer grabs global link-resolution + authority, and the old generic `RuntimeCatalogLink` abstraction is gone. - `Economy.Server` now starts the modern `Aetheria.State` CultMesh node, drains pending Unity runtime commits through the typed state applicator, and no longer owns RethinkDB/LiteNetLib state. @@ -378,8 +380,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `AetheriaRuntimeItemCatalog` materializes temporary `ItemData` DTOs from typed item records for the old simulation object model. `RuntimeItemProjectionEntry` is an item projection identity helper, not a persistence base or corporation - owner, and behavior type selection now uses an explicit runtime catalog map instead of - `UnionAttribute` reflection. + owner. `RuntimeItemReference.Projection` is a hydrated DTO cache derived from + `RuntimeItemReference.ItemId` through `ItemManager`; it is not allowed to own + item identity or persistence. Behavior type selection now uses an explicit + runtime catalog map instead of `UnionAttribute` reflection. Item/behavior DTO field layout for the temporary projection bridge is now marked with project-owned `LegacyPayloadKeyAttribute`, not MessagePack metadata. Item properties @@ -680,11 +684,16 @@ First Aetheria surfaces to publish: - Done: demote `PlayerSettings` and nested settings from MessagePack shapes after the legacy settings writer was disabled. - Done: delete the process-global runtime catalog resolver from - `RuntimeCatalogLink`; item instances now carry hydrated identifiers and - `ItemManager` owns resolution through the typed runtime catalog reader. + `RuntimeCatalogLink`; item instances now carry item-definition + identifiers and `ItemManager` owns hydration through the typed runtime + catalog reader. - Done: collapse the old generic `RuntimeCatalogLink` abstraction into `RuntimeItemReference`, an item-specific runtime projection reference owned by `ItemManager`. + - Done: demote `RuntimeItemReference.Value` to + `RuntimeItemReference.Projection`, making the hydrated `ItemData` DTO a + cache/display/behavior bridge derived from `ItemId` instead of the + reference's apparent state value. - Done: quarantine the vendored Unity `MessagePack` assembly by disabling asmdef auto-reference; only explicit state-spine assemblies should see it while the Unity CultCache bridge still needs a low-level `.cc` codec. @@ -738,8 +747,8 @@ First Aetheria surfaces to publish: - Unity batchmode compile with Editor `6000.4.2f1` returned cleanly after the runtime catalog resolver cut; `Logs/codex-unity-compile.log` has no compiler error hits. -- `rg ".Data.Value|BindRuntimeItemCatalog|ResolveRuntimeItemCatalog|private static IRuntimeItemCatalogReader"` in - `Assets/Scripts` now finds only `ItemManager` checking its own hydrated value. +- `rg ".Data.Value|SetValue|BindRuntimeItemCatalog|ResolveRuntimeItemCatalog|private static IRuntimeItemCatalogReader"` in + `Assets/Scripts` is zero for the old item value/resolver path. - Live Unity source has no `RuntimeCatalogLink` or `RuntimeCatalogLinkBase`; item instances use `RuntimeItemReference` and expose `Data.ItemId`. - Live Unity source has no `RuntimeCatalogEntry`; only surviving item DTOs