From 7d2274e143001613d2a2e425703b639abf928889 Mon Sep 17 00:00:00 2001 From: Titus Date: Fri, 27 Nov 2026 22:17:33 +0100 Subject: [PATCH] ci: OKF's own validator reads the example world's export at the pinned commit The README calls the export a valid OKF bundle, and only the reference parser and viewer held that in CI. The okf-reference job now also runs OKF's validate.py, from the same checkout, on the example world's bundle with --strict, and fails on any error or warning (its info notes pass). Watched locally: the export passes; a copy with one .md file lacking a type warns and fails the step. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04ea6a3..98b03e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,15 @@ jobs: run: | uv run pytest -q -rs tests/test_okf.py::test_reference_parser_and_viewer | tee "$RUNNER_TEMP/okf.txt" grep -q -E '^1 passed' "$RUNNER_TEMP/okf.txt" + # The README calls the export a valid OKF bundle: OKF's own validator at the same commit reads + # the example world's export, and a warning fails as an error does (its notes pass). + - name: OKF's validator on the example world's bundle + run: | + VALIDATOR="$RUNNER_TEMP/okf/skills/okf-generate/scripts/validate.py" + test -f "$VALIDATOR" || { echo "no validator at the pinned commit: $VALIDATOR"; exit 1; } + uv run python -m onlyworlds.okf codegen/schema-dist/example/hyperion "$RUNNER_TEMP/hyperion-okf" + uv run python "$VALIDATOR" "$RUNNER_TEMP/hyperion-okf" --strict | tee "$RUNNER_TEMP/validate.txt" + grep -q -E ' 0 errors, 0 warnings' "$RUNNER_TEMP/validate.txt" folder-conformance: # The folder format's conformance fixture lives in Atlas, the reference implementation.