from __future__ import annotations

from pathlib import Path

import yaml


def main() -> int:
    path = Path("spec/release/release_train.yaml")
    if not path.exists():
        print("FAIL")
        return 1
    data = yaml.safe_load(path.read_text(encoding="utf-8"))
    if data.get("stages", []) != ["dev", "shadow", "limited", "release"]:
        print("FAIL")
        return 1
    print("RELEASE_TRAIN_OK")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())

