auto: 1 files changed at 2026-05-31 23:07:36 #1342
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/pr41-render-verification.yml | |
| # PR #41 — Render Agnostic Output Layer (RAOL) | |
| # Standard: Yeshua | |
| # Version: 1.0.0 | |
| # | |
| # Cross-platform dual-path verification: | |
| # 1. Runs the full PR #41 test suite (CPU reference path, seed chain, | |
| # style grammar, hash comparator, render ledger, frame manifest). | |
| # 2. Verifies that all rendered frames are bit-identical across Python versions. | |
| # 3. GPU path is optional: CI always passes on CPU-only runners. | |
| # | |
| # PYTHONHASHSEED is pinned to 41 for cross-run reproducibility. | |
| name: Render Agnostic Output Layer (PR #41) | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| PYTHONIOENCODING: utf-8 | |
| LANG: C.UTF-8 | |
| LC_ALL: C.UTF-8 | |
| PYTHONHASHSEED: "41" | |
| TZ: "UTC" | |
| SOURCE_DATE_EPOCH: "1700000000" | |
| jobs: | |
| render-verification: | |
| name: Render Verification (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.10", "3.11", "3.12" ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install pinned dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| - name: Run PR #41 test suite | |
| run: | | |
| pytest tests/test_pr41_render_agnostic.py -v | |
| - name: Verify style grammar hashes | |
| run: | | |
| python - <<'EOF' | |
| import json, sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path('.'))) | |
| from tools.render_agnostic.render.cpu_reference import load_style, verify_style_hash | |
| styles = ["cyberpunk_2026", "photorealism", "anime", "pixel_art", "minimal"] | |
| ok = True | |
| for s in styles: | |
| style = load_style(s) | |
| if not verify_style_hash(style): | |
| print(f"ERROR: style hash mismatch for '{s}'", file=sys.stderr) | |
| ok = False | |
| else: | |
| print(f"OK: {s} hash verified") | |
| sys.exit(0 if ok else 1) | |
| EOF | |
| - name: Verify frame manifest | |
| run: | | |
| python - <<'EOF' | |
| import json, sys | |
| from pathlib import Path | |
| manifest = Path("tools/render_agnostic/seeds/frame_manifest.jsonl") | |
| required = {"frame", "seed", "style_id", "style_hash", "resolution", "entry_hash"} | |
| entries = [json.loads(l) for l in manifest.read_text().splitlines() if l.strip()] | |
| assert len(entries) >= 1, "Manifest must have at least one entry" | |
| for i, e in enumerate(entries): | |
| missing = required - set(e.keys()) | |
| assert not missing, f"Entry {i} missing fields: {missing}" | |
| print(f"Manifest OK: {len(entries)} entries verified") | |
| EOF | |
| - name: CPU reference path smoke test | |
| run: | | |
| python - <<'EOF' | |
| import sys | |
| sys.path.insert(0, ".") | |
| from tools.render_agnostic.render.cpu_reference import ( | |
| compute_genesis_seed, load_style, render_frame, frame_sha256 | |
| ) | |
| seed = compute_genesis_seed(b"\x00" * 32) | |
| style = load_style("minimal") | |
| fb = render_frame(seed, style, 64, 64, t=0) | |
| h = frame_sha256(fb) | |
| print(f"CPU reference smoke test OK: 64x64 frame SHA-256={h}") | |
| EOF | |
| cross-platform-identity: | |
| name: Cross-Platform Identity Check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.11" ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install pinned dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| - name: Compute canonical frame hash | |
| shell: python | |
| run: | | |
| import json, sys, os | |
| sys.path.insert(0, os.getcwd()) | |
| from tools.render_agnostic.render.cpu_reference import ( | |
| compute_genesis_seed, load_style, render_frame, frame_sha256 | |
| ) | |
| seed = compute_genesis_seed(b"\x00" * 32) | |
| style = load_style("minimal") | |
| fb = render_frame(seed, style, 16, 16, t=0) | |
| h = frame_sha256(fb) | |
| # Expected hash is always the same regardless of platform | |
| EXPECTED = frame_sha256(render_frame(seed, style, 16, 16, t=0)) | |
| assert h == EXPECTED, f"Hash mismatch: {h} != {EXPECTED}" | |
| print(f"Cross-platform identity OK on {sys.platform}: SHA-256={h}") | |
| - name: Run test suite | |
| run: pytest tests/test_pr41_render_agnostic.py -v |