Skip to content

[SOLID] [M17] Stop re-exporting concrete generators; collapse generator_interface shims (covers M18) #800

Description

@MichaelFisher1997

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

  1. Remove the concrete re-exports from world-worldgen/root.zig:53-61. Move any direct construction behind test-only imports.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    automated-auditIssues found by automated opencode audit scansbugSomething isn't workingenhancementNew feature or requestworld

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions