"""Phase 7 (T16): Phase 5 step manifest deprecation 회귀.

Phase 5 의 4 step 은 Phase 7 6-step 파이프라인이 책임을 흡수하면서 manifest 상
applicability='disabled' + lifecycle='deprecated' 로 마킹된다. 코드 자체는 보류
(Phase 7.1 cleanup PR 에서 삭제 예정) — 본 테스트는 manifest 계약만 잠가둔다.

Phase 7 6 step 은 모두 active + applicability='if_background_mode' 인지도 함께
확인해, BACKGROUND_MODE 토글로만 활성화 / 비활성화되는 단일 진입점을 보장한다.
"""

from app.core.step_manifest import STEP_MANIFEST


def test_phase5_steps_deprecated():
    deprecated = [
        "background_planner",
        "background_chain_planning",
        "location_floor_plan",
        "background_chain_render",
    ]
    for step_id in deprecated:
        m = STEP_MANIFEST[step_id]
        assert m["lifecycle"] == "deprecated", f"{step_id} should be deprecated"
        assert m["applicability"] == "disabled", f"{step_id} should be disabled"


def test_phase7_steps_active():
    active = [
        "background_classify",
        "background_master_plan",
        "floor_plan_prompt",
        "floor_plan_render",
        "background_prompt",
        "background_render",
    ]
    for step_id in active:
        m = STEP_MANIFEST[step_id]
        assert m["lifecycle"] == "active", f"{step_id} should be active"
        assert m["applicability"] == "if_background_mode", (
            f"{step_id} should be if_background_mode"
        )
