From 161dccd1ed54092c0bc34fe87f2b250fc34633db Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 18 Mar 2026 22:31:54 +0000 Subject: [PATCH] fix: prefer explicit qa-session.webm over corrupt auto-recorded videos The convert step was using find which picked up a 0-byte file from playwright's videos/ directory instead of the valid qa-session.webm. Now prefers qa-session.webm explicitly and skips empty files. --- .github/workflows/pr-qa.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-qa.yaml b/.github/workflows/pr-qa.yaml index 37cfab2779..c997e70c54 100644 --- a/.github/workflows/pr-qa.yaml +++ b/.github/workflows/pr-qa.yaml @@ -345,9 +345,15 @@ jobs: run: | for dir in qa-artifacts/qa-report-*; do [ -d "$dir" ] || continue - WEBM=$(find "$dir" -name '*.webm' -type f | head -1) + # Prefer explicitly-saved qa-session.webm over auto-recorded files + if [ -f "$dir/qa-session.webm" ] && [ -s "$dir/qa-session.webm" ]; then + WEBM="$dir/qa-session.webm" + else + # Fallback: find any non-empty webm + WEBM=$(find "$dir" -name '*.webm' -type f -size +0c | head -1) + fi if [ -z "$WEBM" ]; then - echo "No .webm video in $dir, skipping" + echo "No valid .webm video in $dir, skipping" continue fi echo "Converting $WEBM ($(du -h "$WEBM" | cut -f1)) to mp4"