Skip to content

Phase 5: Integration and Polish #457

@MichaelFisher1997

Description

@MichaelFisher1997

Phase 5: Integration and Polish

Goal

Clean up the remaining call sites, move feature toggles closer to the code they control, and document the new ownership model.

Why this matters

The earlier phases only pay off if the rest of the codebase is updated to use the new seams consistently. This phase removes the last old-style dependencies and makes the refactor easy to maintain.

Parallel Tasks

Issue 5.1: Update constructors and call sites to the new ownership model

  • Type: refactor / integration
  • Scope: src/game/app.zig, src/world/world.zig, src/game/session.zig, and any screen setup paths
  • Problem: top-level wiring still assumes the old monolithic ownership model.
  • Work:
    • Update object construction to use the extracted coordinators and interfaces
    • Remove stale getters/setters that only exist for old wiring
    • Keep startup and shutdown ordering correct
  • Acceptance criteria:
    • The app boots with the new module boundaries
    • No call site depends on removed compatibility paths
  • Parallel-safe: yes, but coordinate carefully with the other integration task

Issue 5.2: Move feature toggles into the systems they control

  • Type: refactor / solid
  • Scope: src/engine/graphics/render_system.zig, render pass structs, and related settings paths
  • Problem: render feature flags are still stored at the top level instead of with the pass or system they affect.
  • Work:
    • Push disable flags into the relevant pass/system structs
    • Keep environment-variable overrides working
    • Reduce the number of render-system fields whose only job is configuration forwarding
  • Acceptance criteria:
    • Feature toggles live closer to the code they control
    • Rendering behavior remains identical when flags are set
  • Parallel-safe: yes

Issue 5.3: Add docs and validation notes for the new structure

  • Type: docs / maintenance
  • Scope: docs/refactoring/solid-audit/*, README.md if needed
  • Problem: the refactor needs a durable map so future changes do not reintroduce the same coupling.
  • Work:
    • Document the final module boundaries
    • Add a short migration note for future contributors
    • Record the verification commands used for the refactor
  • Acceptance criteria:
    • Documentation explains the new dependency boundaries clearly
    • Verification steps are easy to follow
  • Parallel-safe: yes

Dependencies

  • Requires phases 1 to 4 to be merged or at least mechanically stable

Verification

  • nix develop --command zig build test
  • nix develop --command zig build
  • nix develop --command zig build run for a manual smoke check

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions