Part of #776 — SOLID architecture debt umbrella.
Phase: P2 · Finding: M13
Problem
IWorldSimulation/IWorldRenderView/IWorldTelemetry exist and render_graph.zig uses them correctly. But game-core/game-ui reach past them into the concrete 845-line World, dragging the entire runtime dependency graph.
Evidence
modules/game-core/src/session.zig:228,320,328,355; player.zig:277,386; modules/game-ui/src/screens/world.zig:135,243:
session.zig:228 world.enableSaveManager(...)
session.zig:320 self.world.pauseGeneration()
player.zig:386 world.setBlock(...)
world.zig:135 session.world.setRenderDistance(...)
Fix
Migrate each call site onto the appropriate role interface. One focused PR per caller file is feasible:
session.zig → IWorldSimulation + IWorldTelemetry
player.zig → IWorldSimulation
game-ui/screens/world.zig → IWorldTelemetry
Verification
nix develop --command zig build test (includes shader validation)
- If rendering-touching: capture headless screenshot baseline before/after (
-Dskip-present)
- If behavior-preserving refactor: golden-output test must stay green
Constraints
- Small reviewable PR targeting
dev; conventional commit (refactor: / feat:)
- Preserve current behavior unless this issue explicitly changes it
- Keep worker-thread RHI isolation intact (no RHI calls off main thread)
Notes
The role interfaces already exist — this is purely a consumer-side migration. Coordinate with M19 if contracts move to engine-rhi.
Tracking: #776
Part of #776 — SOLID architecture debt umbrella.
Phase: P2 · Finding: M13
Problem
IWorldSimulation/IWorldRenderView/IWorldTelemetryexist andrender_graph.ziguses them correctly. But game-core/game-ui reach past them into the concrete 845-lineWorld, dragging the entire runtime dependency graph.Evidence
modules/game-core/src/session.zig:228,320,328,355;player.zig:277,386;modules/game-ui/src/screens/world.zig:135,243:Fix
Migrate each call site onto the appropriate role interface. One focused PR per caller file is feasible:
session.zig→IWorldSimulation+IWorldTelemetryplayer.zig→IWorldSimulationgame-ui/screens/world.zig→IWorldTelemetryVerification
nix develop --command zig build test(includes shader validation)-Dskip-present)Constraints
dev; conventional commit (refactor:/feat:)Notes
The role interfaces already exist — this is purely a consumer-side migration. Coordinate with M19 if contracts move to
engine-rhi.Tracking: #776