Part of #776 — SOLID architecture debt umbrella.
Phase: P3 · Finding: M17
Problem
modules/world-worldgen/src/root.zig:53-61 re-exports concrete OverworldGenerator/FlatWorldGenerator/etc.; consumers (src/worldgen_tests.zig:11,19) reach past the registry. Separately (M18), three near-identical 17-line generator_interface.zig re-export shims exist in world-worldgen, worldgen-overworld, and worldgen-api — pure indirection that invites drift.
Evidence
(Full evidence and file:line citations are in the umbrella #776.)
Fix
- Remove the concrete re-exports from
world-worldgen/root.zig:53-61. Move any direct construction behind test-only imports.
- Delete the two non-api
generator_interface.zig shims; have those modules @import("worldgen-api") directly.
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
Resolves M17 + M18. The registry (createGenerator) remains the only sanctioned construction path.
Tracking: #776
Part of #776 — SOLID architecture debt umbrella.
Phase: P3 · Finding: M17
Problem
modules/world-worldgen/src/root.zig:53-61re-exports concreteOverworldGenerator/FlatWorldGenerator/etc.; consumers (src/worldgen_tests.zig:11,19) reach past the registry. Separately (M18), three near-identical 17-linegenerator_interface.zigre-export shims exist inworld-worldgen,worldgen-overworld, andworldgen-api— pure indirection that invites drift.Evidence
(Full evidence and
file:linecitations are in the umbrella #776.)Fix
world-worldgen/root.zig:53-61. Move any direct construction behind test-only imports.generator_interface.zigshims; have those modules@import("worldgen-api")directly.Verification
nix develop --command zig build test(includes shader validation)-Dskip-present)Constraints
dev; conventional commit (refactor:/feat:)Notes
Resolves M17 + M18. The registry (
createGenerator) remains the only sanctioned construction path.Tracking: #776