from pathlib import Path ROOT = Path(__file__).resolve().parents[2] FIRSTBOOT = ROOT / "autoinstall/firstboot-setup.sh" def test_console_setup_preserves_workstation_separation_and_safe_completion(): source = FIRSTBOOT.read_text() assert 'WORKSTATION_MODE' in source assert 'TIER_DISPLAY="workstation"' in source assert 'touch /opt/cezen/.setup-done' in source assert source.index('touch /opt/cezen/.setup-done') > source.index('if bash "$AIPACKAGE_DIR/install.sh"') def test_console_setup_has_resume_and_recovery_contract(): source = FIRSTBOOT.read_text() # Intentionally red until T028 adds durable console progress. assert "cezen.setup_operation.v1" in source assert "recovery_required" in source assert "resume" in source.lower()