acdream/docs/research/2026-07-24-arch-render-scene-dependency.md
Erik dbd8318417 feat(rendering): contain incremental render scene
Pin Arch behind acdream-owned identities, deltas, queries, generation gates, and memory diagnostics. The new five-archetype store is unbound and non-drawing so static publication can be shadowed without changing production behavior.

Co-authored-by: Erik Nilsson <erikn@users.noreply.github.com>
2026-07-24 21:42:42 +02:00

2.8 KiB

Arch render-scene dependency decision

Date: 2026-07-24

Scope: Modern Runtime Slice F1 only

Decision

Pin Arch version 2.1.0 directly in AcDream.App. Do not reference it from Core, UI abstractions, plugins, or any other production project. Do not use Arch systems, command buffers, parallel queries, jobs, events, source generators, persistence, relationships, or extension packages.

The only allowed Arch namespace is:

src/AcDream.App/Rendering/Scene/Arch/

Everything outside that folder uses acdream-owned IRenderScene, wrapper identities, packed component values, deltas, borrowed queries, digests, and memory-accounting values. Arch entities and primitive wrapper values cannot cross that boundary.

Verification

The selected package supplies .NET 6 and .NET Standard 2.1 assets, both compatible with acdream's .NET 10 App target. The v2.1.0 source was inspected for the exact API used by the adapter:

  • World.Create
  • generic World.Create<T...>
  • World.Set<T> / World.Get<T>
  • World.Destroy(Entity) / World.Destroy(World)
  • World.Size, World.Capacity, and World.Archetypes
  • archetype chunk count and chunk-size accounting

The resolved dependency graph was captured with dotnet list package --include-transitive. It resolves:

Arch                         2.1.0
Arch.LowLevel                1.1.5
Collections.Pooled           2.0.0-preview.27
CommunityToolkit.HighPerformance 8.4.0
Microsoft.Extensions.ObjectPool  7.0.0
ZeroAllocJobScheduler        1.1.2

No package in the resolved App graph was reported vulnerable by NuGet's --vulnerable --include-transitive audit on 2026-07-24. The transitive job scheduler is not initialized or called by acdream; Slice F uses only single-threaded structural operations and direct component access on the existing update thread.

Containment proof

RenderSceneArchitectureTests enforces all of the following:

  1. Arch is a direct package reference in AcDream.App only.
  2. Arch namespaces occur only in the contained adapter folder.
  3. Reflection finds no Arch field, property, parameter, or return type outside that namespace.
  4. Raw wrapper identity extraction occurs only in the adapter (apart from the private contract declarations themselves).

This is storage selection, not simulation architecture. LiveEntityRuntime, GpuWorldState, gameplay identities, retail PView, GL ownership, and all behavioral owners remain authoritative and unchanged.