SceneLifecycle

Two-phase scene transition orchestrator: TEARDOWN then LOAD, with zero overlap between the phases.

Inherits QObject

In the namespace construct::lifecycle. Declared in src/libs/libconstruct/construct/lifecycle/SceneLifecycle.hpp.

Detailed description

Every scene-scoped subsystem registers a named teardown step once (at configure time). A transition runs ALL teardown steps first — best effort, a failing step never skips the remaining ones — then runs the per-invocation load steps in order, aborting the tail on the first failure so a corrupt file can never half-apply.

The INVARIANT this machine exists to enforce: no state from scene N survives into scene N+1. An optional invariant check runs between the phases (after teardown, before load) and reports violations — in tests these fail the test; at runtime they are logged loudly.

The machine is deliberately GUI-free (QObject only) so the phase discipline is testable headless. The modal overlay listens to phaseChanged / stepStarted and renders the progress.

In this section