name: Rebuild V2 candidate verification on: push: branches: [codex/videoreg-rebuild-v2] workflow_dispatch: jobs: candidate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "22" - run: npm ci --no-audit --no-fund - name: Types, tests and complete static build env: COMMIT_SHA: ${{ github.sha }} NEXT_TELEMETRY_DISABLED: "1" run: npm run ci:quality - name: Verify offline pinned checker dependencies and raster failure behavior run: | python3 -S scripts/rebuild-v2/verify-vendor.py node scripts/rebuild-v2/check-raster-sharp.mjs - name: Validate complete export and safe preview shell: bash run: | set -euo pipefail export PYTHONPATH="$PWD/scripts/rebuild-v2/vendor" export PYTHONDONTWRITEBYTECODE=1 export VIDEOREG_RASTER_DECODER=sharp py=python3 "$py" -S scripts/rebuild-v2/check-preview.py "$py" -S scripts/rebuild-v2/check-fetch-rate-limit.py "$py" -S deploy/serve-local.py > "${RUNNER_TEMP}/videoreg-v2-preview.log" 2>&1 & preview_pid=$! trap 'kill "$preview_pid" 2>/dev/null || true' EXIT base=$("$py" -S - "$preview_pid" <<'PYREADY' import json, pathlib, sys, time, urllib.request expected_pid = int(sys.argv[1]) for attempt in range(50): try: state = json.loads(pathlib.Path('.local-run/server.json').read_text()) if state['pid'] == expected_pid: with urllib.request.urlopen(state['url'] + '/health/ready', timeout=1) as response: if response.status == 200: print(state['url']) break except (OSError, ValueError, KeyError): pass time.sleep(0.1) else: raise SystemExit('Candidate preview did not become ready') PYREADY ) "$py" -S scripts/rebuild-v2/check-built.py --base "$base" - name: Record verification identity and failures in job log if: always() run: | python3 - <<'PYREPORT' import json, pathlib path = pathlib.Path('docs/rebuild-v2/evidence/built-crawl.json') if path.is_file(): data = json.loads(path.read_text()) print(json.dumps({key: data.get(key) for key in ('sourceCommit', 'repositoryHead', 'builtSourceManifestSha256', 'sourceManifestSha256', 'exportManifestSha256', 'rasterDecoder', 'summary', 'errors')}, ensure_ascii=False, indent=2)) else: print('No complete crawl report: inspect earlier setup/build failure') PYREPORT