85453da49f
regression / regression-shards (style-16-prod style-9-prod style-17-prod iframe-render-compat variables-prod mp4-h265-sdr, shard-4) (push) Has been cancelled
regression / regression-shards (style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter parallel-capture-regression, shard-5) (push) Has been cancelled
regression / regression-shards (style-7-prod style-8-prod style-10-prod css-spinner-render-compat webm-transparency mp4-h264-sdr webm-vp9, shard-3) (push) Has been cancelled
regression / regression-shards (sub-composition-video style-18-prod raf-ball-render-compat font-variant-numeric sub-comp-t0 sub-comp-id-selector, shard-7) (push) Has been cancelled
Windows render verification / Detect changes (push) Has been cancelled
Windows render verification / Preflight (lint + format) (push) Has been cancelled
Windows render verification / Render on windows-latest (push) Has been cancelled
Windows render verification / Tests on windows-latest (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Fallow audit (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Producer: integration tests (push) Has been cancelled
CI / Producer: unit tests (push) Has been cancelled
CI / File size check (push) Has been cancelled
CI / Test: skills (push) Has been cancelled
CI / Skills: manifest in sync (push) Has been cancelled
CI / CLI: npx shim (macos-latest) (push) Has been cancelled
CI / CLI: npx shim (ubuntu-latest) (push) Has been cancelled
CI / CLI: npx shim (windows-latest) (push) Has been cancelled
CI / SDK: unit + contract + smoke (push) Has been cancelled
CI / Test: runtime contract (push) Has been cancelled
CI / Studio: load smoke (push) Has been cancelled
CI / Smoke: global install (push) Has been cancelled
CI / CLI smoke (required) (push) Has been cancelled
CI / Semantic PR title (push) Has been cancelled
Player perf / Detect changes (push) Has been cancelled
Player perf / Preflight (lint + format) (push) Has been cancelled
Player perf / player-perf (push) Has been cancelled
Player perf / Perf: drift (push) Has been cancelled
Player perf / Perf: fps (push) Has been cancelled
Player perf / Perf: parity (push) Has been cancelled
Player perf / Perf: scrub (push) Has been cancelled
Player perf / Perf: load (push) Has been cancelled
preview-regression / Detect changes (push) Has been cancelled
preview-regression / Preflight (lint + format) (push) Has been cancelled
preview-regression / Preview parity (push) Has been cancelled
preview-regression / preview-regression (push) Has been cancelled
regression / regression (push) Has been cancelled
regression / Detect changes (push) Has been cancelled
regression / Preflight (lint + format) (push) Has been cancelled
regression / regression-shards (hdr-regression style-5-prod style-3-prod mov-prores, shard-1) (push) Has been cancelled
regression / regression-shards (overlay-montage-prod style-12-prod chat missing-host-comp-id png-sequence portrait-edge-bleed, shard-6) (push) Has been cancelled
regression / regression-shards (style-13-prod style-6-prod vignelli-stacking gsap-letters-render-compat audio-mux-parity, shard-8) (push) Has been cancelled
regression / regression-shards (style-15-prod hdr-hlg-regression style-1-prod many-cuts vfr-screen-recording render-symlinked-assets, shard-2) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docs / Validate docs (push) Has been cancelled
Sync skills to ClawHub / Publish changed skills (push) Has been cancelled
91 lines
3.5 KiB
Bash
Executable File
91 lines
3.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# smoke.sh — exercise the eval harness scripts against synthetic inputs.
|
|
#
|
|
# Generates two synthetic videos with ffmpeg's testsrc filter, runs render_diff
|
|
# and frame_strip against them, and runs lint_source against fixture .tsx files.
|
|
# Asserts the harness produces sensible output without depending on a real
|
|
# Remotion or HyperFrames render pipeline being installed.
|
|
#
|
|
# Usage: ./smoke.sh
|
|
# Exit 0 on pass.
|
|
|
|
set -euo pipefail
|
|
|
|
THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
SCRIPTS_DIR="$(cd "$THIS_DIR/.." && pwd)"
|
|
WORK="$(mktemp -d)"
|
|
trap 'rm -rf "$WORK"' EXIT
|
|
|
|
echo "==> smoke: render_diff.sh against identical inputs"
|
|
# Generate the same test pattern twice. Identical inputs → SSIM should be ~1.0.
|
|
ffmpeg -y -hide_banner -loglevel error \
|
|
-f lavfi -i "testsrc=duration=2:size=320x240:rate=30" \
|
|
-pix_fmt yuv420p "$WORK/baseline.mp4"
|
|
cp "$WORK/baseline.mp4" "$WORK/translated.mp4"
|
|
|
|
R2HF_SSIM_THRESHOLD=0.99 "$SCRIPTS_DIR/render_diff.sh" \
|
|
"$WORK/baseline.mp4" "$WORK/translated.mp4" "$WORK/diff" >/dev/null
|
|
|
|
MEAN=$(python3 -c "import json,sys; print(json.load(open('$WORK/diff/summary.json'))['mean'])")
|
|
PASS=$(python3 -c "import json,sys; print(json.load(open('$WORK/diff/summary.json'))['pass'])")
|
|
if [[ "$PASS" != "True" ]]; then
|
|
echo "FAIL: identical inputs failed pass check (mean=$MEAN)"
|
|
exit 1
|
|
fi
|
|
echo " identical inputs → mean SSIM=$MEAN (pass=True)"
|
|
|
|
echo "==> smoke: render_diff.sh against different inputs"
|
|
# Different test pattern → SSIM should be lower. With a high threshold it should fail.
|
|
ffmpeg -y -hide_banner -loglevel error \
|
|
-f lavfi -i "testsrc2=duration=2:size=320x240:rate=30" \
|
|
-pix_fmt yuv420p "$WORK/different.mp4"
|
|
|
|
set +e
|
|
R2HF_SSIM_THRESHOLD=0.99 "$SCRIPTS_DIR/render_diff.sh" \
|
|
"$WORK/baseline.mp4" "$WORK/different.mp4" "$WORK/diff2" >/dev/null
|
|
RC=$?
|
|
set -e
|
|
if [[ "$RC" -eq 0 ]]; then
|
|
echo "FAIL: different inputs unexpectedly passed at threshold 0.99"
|
|
exit 1
|
|
fi
|
|
DIFF_MEAN=$(python3 -c "import json; print(json.load(open('$WORK/diff2/summary.json'))['mean'])")
|
|
echo " different inputs → mean SSIM=$DIFF_MEAN (correctly failed at 0.99)"
|
|
|
|
echo "==> smoke: frame_strip.sh produces a strip"
|
|
"$SCRIPTS_DIR/frame_strip.sh" "$WORK/baseline.mp4" "$WORK/different.mp4" "$WORK/strip" 4 >/dev/null
|
|
if [[ ! -f "$WORK/strip/strip.png" ]]; then
|
|
echo "FAIL: frame_strip.sh did not produce strip.png"
|
|
exit 1
|
|
fi
|
|
echo " strip.png written ($(stat -c%s "$WORK/strip/strip.png" 2>/dev/null || stat -f%z "$WORK/strip/strip.png") bytes)"
|
|
|
|
echo "==> smoke: lint_source.py on clean fixture (expect exit 0)"
|
|
set +e
|
|
python3 "$SCRIPTS_DIR/lint_source.py" "$THIS_DIR/fixtures/clean.tsx" --json >"$WORK/clean.json"
|
|
RC=$?
|
|
set -e
|
|
BLOCKERS=$(python3 -c "import json; print(json.load(open('$WORK/clean.json'))['blockers'])")
|
|
if [[ "$RC" -ne 0 || "$BLOCKERS" -ne 0 ]]; then
|
|
echo "FAIL: clean fixture reported $BLOCKERS blockers (rc=$RC)"
|
|
exit 1
|
|
fi
|
|
INFOS=$(python3 -c "import json; print(json.load(open('$WORK/clean.json'))['infos'])")
|
|
echo " clean.tsx → 0 blockers, $INFOS info findings"
|
|
|
|
echo "==> smoke: lint_source.py on blocker fixture (expect exit 1)"
|
|
set +e
|
|
python3 "$SCRIPTS_DIR/lint_source.py" "$THIS_DIR/fixtures/blocker.tsx" --json >"$WORK/blocker.json"
|
|
RC=$?
|
|
set -e
|
|
BLOCKERS=$(python3 -c "import json; print(json.load(open('$WORK/blocker.json'))['blockers'])")
|
|
if [[ "$RC" -eq 0 || "$BLOCKERS" -lt 3 ]]; then
|
|
echo "FAIL: blocker fixture reported $BLOCKERS blockers, expected >=3 (rc=$RC)"
|
|
cat "$WORK/blocker.json"
|
|
exit 1
|
|
fi
|
|
echo " blocker.tsx → $BLOCKERS blockers detected (correctly refused)"
|
|
|
|
echo
|
|
echo "✅ smoke tests passed"
|