From 42565ef3c656f7dfe79d37dd0fb230aa0ce3d7b9 Mon Sep 17 00:00:00 2001 From: Stuart Cameron Date: Sun, 22 Nov 2026 17:16:14 +1100 Subject: [PATCH 1/6] test(conformance): bound every subprocess, keep failing outputs, repro workflow (task #99) The output conformance matrix's measuring ffprobe/ffmpeg runs had no time limit and a hung job ran into the test's own 3-minute timeout, naming and killing nothing. Every subprocess now has a named limit (runBounded), the job's is below the case's, a hang is sampled before the kill, and a failing case prints the job log tail, packet and decoded counts, the decoder and the job, and is kept under VAPOURBOX_CONFORMANCE_KEEP (nightly uploads it). repro-output-conformance.yml loops the AV1 cases on the nightly's macOS runners and replays the encoder and the test's decodes alone. The worker logs its encoder arguments, as it does the decoder's. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/nightly.yml | 45 ++++ .../workflows/repro-output-conformance.yml | 202 +++++++++++++++++ .../integration_output_conformance_test.dart | 117 +++++++++- app/test/support/av_sync.dart | 11 +- app/test/support/bounded_process.dart | 143 ++++++++++++ app/test/support/worker_harness.dart | 17 +- .../scripts/capture-vspipe-stdout.sh | 36 ++++ .../scripts/measure_decode.py | 94 ++++++++ .../scripts/replay_encoder.py | 204 ++++++++++++++++++ .../scripts/summarize_flutter_json.py | 52 +++++ worker/src/pipeline_executor.rs | 4 + 11 files changed, 908 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/repro-output-conformance.yml create mode 100644 app/test/support/bounded_process.dart create mode 100644 docs/reports/task-99-av1-conformance-flake/scripts/capture-vspipe-stdout.sh create mode 100644 docs/reports/task-99-av1-conformance-flake/scripts/measure_decode.py create mode 100644 docs/reports/task-99-av1-conformance-flake/scripts/replay_encoder.py create mode 100644 docs/reports/task-99-av1-conformance-flake/scripts/summarize_flutter_json.py diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8c2f0168..f2f38ff0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -150,6 +150,9 @@ jobs: # found" and prove nothing. env: VAPOURBOX_WORKER: ${{ github.workspace }}/worker/target/debug/vapourbox-worker + # A failing output conformance case keeps its output, job and log + # here, uploaded below (task #99). + VAPOURBOX_CONFORMANCE_KEEP: ${{ github.workspace }}/conformance-failures # Not @Tags(['gpu']): the hosted runners have no GPU (dart_test.yaml). # `sweep` tests are also `heavy`; each leg takes its own. run: >- @@ -163,6 +166,18 @@ jobs: if: ${{ !cancelled() && matrix.suite == 'heavy' && steps.build.outcome == 'success' }} run: cd worker && cargo test --test subtitle_integration_test -- --ignored --nocapture + - name: Failing conformance cases (task #99) + # Each failing case of integration_output_conformance_test.dart: its + # output file, job and log, so an intermittent failure can be measured + # offline. + if: ${{ failure() && matrix.suite == 'heavy' }} + uses: actions/upload-artifact@v5 + with: + name: conformance-failures-${{ matrix.asset }} + path: conformance-failures/ + if-no-files-found: ignore + retention-days: 14 + - name: Format sweep results # Every row's outcome, time and differences (integration_format_sweep_test.dart). if: ${{ always() && matrix.suite == 'sweep' }} @@ -289,6 +304,9 @@ jobs: # `flutter test`, where the running executable is the test runner. env: VAPOURBOX_WORKER: ${{ github.workspace }}\worker\target\debug\vapourbox-worker.exe + # A failing output conformance case keeps its output, job and log + # here, uploaded below (task #99). + VAPOURBOX_CONFORMANCE_KEEP: ${{ github.workspace }}/conformance-failures # Not @Tags(['gpu']): the hosted runners have no GPU (dart_test.yaml). # `sweep` tests are also `heavy`; each leg takes its own. run: >- @@ -302,6 +320,18 @@ jobs: if: ${{ !cancelled() && matrix.suite == 'heavy' && steps.build.outcome == 'success' }} run: cd worker && cargo test --test subtitle_integration_test -- --ignored --nocapture + - name: Failing conformance cases (task #99) + # Each failing case of integration_output_conformance_test.dart: its + # output file, job and log, so an intermittent failure can be measured + # offline. + if: ${{ failure() && matrix.suite == 'heavy' }} + uses: actions/upload-artifact@v5 + with: + name: conformance-failures-${{ matrix.asset }} + path: conformance-failures/ + if-no-files-found: ignore + retention-days: 14 + - name: Format sweep results # Every row's outcome, time and differences (integration_format_sweep_test.dart). if: ${{ always() && matrix.suite == 'sweep' }} @@ -415,6 +445,9 @@ jobs: # found" and prove nothing. env: VAPOURBOX_WORKER: ${{ github.workspace }}/worker/target/debug/vapourbox-worker + # A failing output conformance case keeps its output, job and log + # here, uploaded below (task #99). + VAPOURBOX_CONFORMANCE_KEEP: ${{ github.workspace }}/conformance-failures # Not @Tags(['gpu']): the hosted runners have no GPU (dart_test.yaml). # `sweep` tests are also `heavy`; each leg takes its own. run: >- @@ -428,6 +461,18 @@ jobs: if: ${{ !cancelled() && matrix.suite == 'heavy' && steps.build.outcome == 'success' }} run: cd worker && cargo test --test subtitle_integration_test -- --ignored --nocapture + - name: Failing conformance cases (task #99) + # Each failing case of integration_output_conformance_test.dart: its + # output file, job and log, so an intermittent failure can be measured + # offline. + if: ${{ failure() && matrix.suite == 'heavy' }} + uses: actions/upload-artifact@v5 + with: + name: conformance-failures-${{ matrix.asset }} + path: conformance-failures/ + if-no-files-found: ignore + retention-days: 14 + - name: Format sweep results # Every row's outcome, time and differences (integration_format_sweep_test.dart). if: ${{ always() && matrix.suite == 'sweep' }} diff --git a/.github/workflows/repro-output-conformance.yml b/.github/workflows/repro-output-conformance.yml new file mode 100644 index 00000000..1c623136 --- /dev/null +++ b/.github/workflows/repro-output-conformance.yml @@ -0,0 +1,202 @@ +name: Reproduce an output conformance flake (macOS) + +# Task #99: AV1-into-MP4 cases of integration_output_conformance_test.dart +# failed now and then on the macOS x64 nightly (99 pictures for 100; a case +# that hung past the test's 3 minutes). This runs the suspects in a loop on +# the nightly's runners, layer by layer. Phases (space-separated `phases`): +# versions the bundle's FFmpeg, SVT-AV1 and AV1 decoders (B0) +# b1 the cases matching `name`, `iterations` times each, in one +# flutter test process (VAPOURBOX_CONFORMANCE_REPEAT) +# b1load every mp4+av1 case, `load_iterations` times each, with every +# core but one busy, as nightly's concurrent test files are +# b2 the encoder alone: one job's captured Y4M fed to its exact +# encoder command `replays` times, from a file and throttled, +# then 4 at once under load (scripts/replay_encoder.py) +# b3 the test's own decodes of that output (and of any output b1 +# kept failing), `replays` times per decoder variant +# (scripts/measure_decode.py) +# Scripts: docs/reports/task-99-av1-conformance-flake/scripts. Every failing +# case's output, job and log are uploaded (VAPOURBOX_CONFORMANCE_KEEP). +# +# Dispatch it, or push a change to this file on a `stuart/99-probe-*` +# branch: a workflow that is not on the default branch cannot be dispatched, +# and a push then runs it with the defaults below. + +on: + workflow_dispatch: + inputs: + name: + description: 'b1: --name regex of the cases to loop' + default: 'mp4\+av1/passthrough/delayed-avi/(untrimmed|near-start)' + iterations: + description: 'b1: runs of each case' + default: '60' + load_iterations: + description: 'b1load: runs of each mp4+av1 case under load' + default: '15' + replays: + description: 'b2/b3: runs per mode or decoder variant' + default: '300' + phases: + description: 'Space-separated: versions b1 b1load b2 b3' + default: 'versions b1 b1load b2 b3' + push: + branches: ['stuart/99-probe-*'] + paths: ['.github/workflows/repro-output-conformance.yml'] + +permissions: + contents: read + actions: read + +jobs: + repro: + strategy: + fail-fast: false + matrix: + include: + - {arch: x64, runner: macos-15-intel, asset: macos-x64} + - {arch: x64, runner: macos-15-intel, asset: macos-x64-v2} + # The control: arm64 never failed these cases. + - {arch: arm64, runner: macos-15, asset: macos-arm64} + name: repro (${{ matrix.asset }}) + runs-on: ${{ matrix.runner }} + timeout-minutes: 200 + env: + VAPOURBOX_DEPS_DIR: ${{ github.workspace }}/deps/macos-${{ matrix.arch }} + VAPOURBOX_WORKER: ${{ github.workspace }}/worker/target/debug/vapourbox-worker + NAME: ${{ inputs.name || 'mp4\+av1/passthrough/delayed-avi/(untrimmed|near-start)' }} + ITER: ${{ inputs.iterations || '60' }} + LOAD_ITER: ${{ inputs.load_iterations || '15' }} + REPLAYS: ${{ inputs.replays || '300' }} + PHASES: ${{ inputs.phases || 'versions b1 b1load b2 b3' }} + S: ${{ github.workspace }}/docs/reports/task-99-av1-conformance-flake/scripts + R: ${{ github.workspace }}/repro-out + steps: + - uses: actions/checkout@v5 + + - name: Resolve deps tag + id: deps + run: | + TAG=$(python3 -c "import json;print(json.load(open('app/assets/deps-version.json'))['releaseTag'])") + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + echo "ver=${TAG#deps-v}" >> "$GITHUB_OUTPUT" + + - uses: subosito/flutter-action@v2 + with: + channel: stable + cache: false + pub-cache-path: ${{ runner.temp }}/pub-cache + + - uses: dtolnay/rust-toolchain@stable + + - name: Download dependencies (${{ matrix.asset }}) + env: + GH_TOKEN: ${{ github.token }} + run: | + bash .github/scripts/install-deps-bundle.sh "${{ matrix.asset }}" \ + "${{ steps.deps.outputs.tag }}" "${{ steps.deps.outputs.ver }}" "deps/macos-${{ matrix.arch }}" + xattr -cr "deps/macos-${{ matrix.arch }}" 2>/dev/null || true + + - name: Build worker and generate Dart serialization + run: | + (cd worker && cargo build) + cd app && flutter pub get && dart run build_runner build --delete-conflicting-outputs + + - name: B0 versions + if: contains(env.PHASES, 'versions') + run: | + mkdir -p "$R" + FF="$VAPOURBOX_DEPS_DIR/ffmpeg/ffmpeg"; [ -x "$FF" ] || FF=$(find "$VAPOURBOX_DEPS_DIR" -name ffmpeg -type f -perm +111 | head -1) + { + echo "cpu: $(sysctl -n machdep.cpu.brand_string) cores $(sysctl -n hw.ncpu)" + "$FF" -hide_banner -version | head -3 + "$FF" -hide_banner -buildconf | grep -iE 'svt|dav1d|aom' || true + echo "AV1 decoders:"; "$FF" -hide_banner -decoders | grep -i av1 + echo "SVT-AV1 banner:" + SVT_LOG=4 "$FF" -hide_banner -v info -f lavfi -i testsrc2=s=160x120:r=25:d=0.2 \ + -c:v libsvtav1 -preset 10 -f null - 2>&1 | grep -iE 'svt|version|lib' | head -12 + echo "decoder ffmpeg picks for AV1:" + "$FF" -hide_banner -v error -y -f lavfi -i testsrc2=s=160x120:r=25:d=0.2 -c:v libsvtav1 "$RUNNER_TEMP/v.mp4" + "$FF" -hide_banner -nostats -v verbose -i "$RUNNER_TEMP/v.mp4" -f null - 2>&1 | grep -E 'Stream #0:0 ->|dav1d|libaom' | head -5 + } 2>&1 | tee "$R/versions.txt" + + - name: B1 the cases in a loop + if: contains(env.PHASES, 'b1 ') || endsWith(env.PHASES, 'b1') + run: | + mkdir -p "$R/kept-b1" + cd app + VAPOURBOX_CONFORMANCE_REPEAT=$ITER VAPOURBOX_CONFORMANCE_KEEP="$R/kept-b1" \ + flutter test --tags heavy test/integration_output_conformance_test.dart \ + --name "$NAME" --reporter compact --file-reporter "json:$R/b1.json" > "$R/b1.log" 2>&1 || true + tail -5 "$R/b1.log" + python3 "$S/summarize_flutter_json.py" "$R/b1.json" "B1 $NAME x$ITER" | tee "$R/b1-summary.txt" + + - name: B1 every mp4+av1 case under load + if: contains(env.PHASES, 'b1load') + run: | + mkdir -p "$R/kept-b1load" + N=$(sysctl -n hw.ncpu); for i in $(seq $((N - 1))); do yes > /dev/null & done + cd app + VAPOURBOX_CONFORMANCE_REPEAT=$LOAD_ITER VAPOURBOX_CONFORMANCE_KEEP="$R/kept-b1load" \ + flutter test --tags heavy test/integration_output_conformance_test.dart \ + --name 'mp4\+av1/' --reporter compact --file-reporter "json:$R/b1load.json" > "$R/b1load.log" 2>&1 || true + pkill yes || true + tail -5 "$R/b1load.log" + python3 "$S/summarize_flutter_json.py" "$R/b1load.json" "B1 load mp4+av1 x$LOAD_ITER" | tee "$R/b1load-summary.txt" + + - name: B2 the encoder alone + if: contains(env.PHASES, 'b2') + run: | + VS="$VAPOURBOX_DEPS_DIR/vapoursynth" + bash "$S/capture-vspipe-stdout.sh" install "$VS" "$R/capture" + (cd app && VAPOURBOX_CONFORMANCE_KEEP="$R/kept-b2" VAPOURBOX_CONFORMANCE_KEEP_ALL=1 \ + flutter test --tags heavy test/integration_output_conformance_test.dart \ + --plain-name 'mp4+av1/passthrough/delayed-avi/untrimmed' --reporter compact) || true + bash "$S/capture-vspipe-stdout.sh" uninstall "$VS" + Y4M=$(ls "$R"/capture/run.*/out.y4m | head -1) + LOG=$(ls "$R"/kept-b2/*/log.txt | head -1) + echo "y4m $Y4M ($(wc -c < "$Y4M") bytes), log $LOG" + FF="$VAPOURBOX_DEPS_DIR/ffmpeg/ffmpeg"; FP="$VAPOURBOX_DEPS_DIR/ffmpeg/ffprobe" + for mode in file throttled; do + python3 -I "$S/replay_encoder.py" --log "$LOG" --y4m "$Y4M" --ffmpeg "$FF" --ffprobe "$FP" \ + --out "$R/b2-$mode" --runs "$REPLAYS" --mode "$mode" | tee "$R/b2-$mode.txt" + done + N=$(sysctl -n hw.ncpu); for i in $(seq $((N - 1))); do yes > /dev/null & done + python3 -I "$S/replay_encoder.py" --log "$LOG" --y4m "$Y4M" --ffmpeg "$FF" --ffprobe "$FP" \ + --out "$R/b2-load" --runs "$REPLAYS" --mode throttled --parallel 4 | tee "$R/b2-load.txt" + pkill yes || true + rm -rf "$R/capture" + + - name: B3 the test's own decodes + if: contains(env.PHASES, 'b3') + run: | + FF="$VAPOURBOX_DEPS_DIR/ffmpeg/ffmpeg"; FP="$VAPOURBOX_DEPS_DIR/ffmpeg/ffprobe" + GOOD=$(ls "$R"/kept-b2/*/*.mp4 2>/dev/null | head -1) + BAD=$(ls "$R"/kept-b1*/*/*.mp4 2>/dev/null | head -1) + for f in $GOOD $BAD; do + tag=$( [ "$f" = "$GOOD" ] && echo good || echo bad ) + python3 -I "$S/measure_decode.py" --file "$f" --ffmpeg "$FF" --ffprobe "$FP" \ + --out "$R/b3-$tag" --runs "$REPLAYS" | tee "$R/b3-$tag.txt" + N=$(sysctl -n hw.ncpu); for i in $(seq $((N - 1))); do yes > /dev/null & done + python3 -I "$S/measure_decode.py" --file "$f" --ffmpeg "$FF" --ffprobe "$FP" \ + --out "$R/b3-$tag-load" --runs "$REPLAYS" --parallel 4 | tee "$R/b3-$tag-load.txt" + pkill yes || true + done + + - name: Summary + if: always() + run: | + for f in "$R"/versions.txt "$R"/*summary.txt "$R"/b2-*.txt "$R"/b3-*.txt; do + [ -f "$f" ] && { echo "=== $(basename "$f")"; tail -30 "$f"; } + done + + - name: Upload + if: always() + uses: actions/upload-artifact@v5 + with: + name: repro-output-conformance-${{ matrix.asset }} + path: | + repro-out/ + !repro-out/capture/ + if-no-files-found: ignore + retention-days: 14 diff --git a/app/test/integration_output_conformance_test.dart b/app/test/integration_output_conformance_test.dart index 0b6a3cf4..f2c5df8b 100644 --- a/app/test/integration_output_conformance_test.dart +++ b/app/test/integration_output_conformance_test.dart @@ -18,6 +18,7 @@ @Tags(['heavy']) library; +import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; @@ -37,6 +38,7 @@ import 'package:vapourbox/services/timestamp_continuity_service.dart'; import 'package:vapourbox/services/tool_locator.dart'; import 'support/av_sync.dart'; +import 'support/bounded_process.dart'; import 'support/output_matrix.dart'; import 'support/worker_harness.dart'; @@ -87,10 +89,11 @@ class _Source { /// across containers that packetise the same frames differently (a TS PES /// holds several MP2 frames, Matroska one each). Future _payload(String path) async { - final r = await Process.run( + final r = await runBounded( WorkerHarness.ffmpegPath, ['-v', 'error', '-i', path, '-map', '0:a:0', '-c', 'copy', '-f', 'data', '-'], - stdoutEncoding: null, + label: 'the sound payload copy', + binaryStdout: true, environment: WorkerHarness.ffmpegEnv, ); expect(r.exitCode, 0, reason: '${r.stderr}'); @@ -98,11 +101,12 @@ Future _payload(String path) async { } Future _samples(String path, {String? decoder}) async { - final r = await Process.run( + final r = await runBounded( WorkerHarness.ffmpegPath, ['-v', 'error', if (decoder != null) ...['-c:a', decoder], '-i', path, '-map', '0:a:0', '-ac', '1', '-f', 'f32le', '-'], - stdoutEncoding: null, + label: 'the sample decode', + binaryStdout: true, environment: WorkerHarness.ffmpegEnv, ); final bytes = Uint8List.fromList(r.stdout as List); @@ -269,10 +273,97 @@ String? _byteRun(Uint8List out, Uint8List src) { '(the longest match: $best bytes, at $bestAt)'; } +/// Each case's limit, and its job's: the job's is below the case's, so a +/// hung job is killed as a tree and reported with where it hung (task #99), +/// not cut off by the test's bare TimeoutException with its processes left +/// running. `conformance_timeouts_test.dart` (push gate) holds the order. +const caseTimeout = Duration(minutes: 3); +const jobTimeout = Duration(seconds: 150); + +/// Encodes [c] and checks the output; on any failure prints what tells an +/// encoder that lost a picture from a decoder that did, or a pipeline that +/// did ([_evidence]), and keeps the output in `$VAPOURBOX_CONFORMANCE_KEEP`. Future _check(MatrixCase c, _Source s) async { - final r = await WorkerHarness.runJob(_job(c, s).toJson(), label: c.id); - expect(r.success, isTrue, reason: '1. the job: ${r.error}'); - final out = r.outputPath!; + final job = _job(c, s).toJson(); + final r = await WorkerHarness.runJob(job, label: c.id, timeout: jobTimeout); + try { + expect(r.success, isTrue, reason: '1. the job: ${r.error}'); + await _checkOutput(c, s, r.outputPath!); + } catch (_) { + await _evidence(c, job, r); + rethrow; + } + // `VAPOURBOX_CONFORMANCE_KEEP_ALL=1` keeps passing cases too: the repro + // workflow replays a good job's encoder from them (task #99). + if (Platform.environment['VAPOURBOX_CONFORMANCE_KEEP_ALL'] == '1') { + await _evidence(c, job, r, failed: false); + } +} + +/// What a failed case leaves behind for its diagnosis (task #99): the job's +/// log tail (vspipe's "Output N frames", the encoder's last lines), the +/// output's video packet count beside the frames ffprobe and an ffmpeg +/// decode count, the decoder ffmpeg chose, and the job. With +/// `$VAPOURBOX_CONFORMANCE_KEEP` set, the output and the job are copied +/// there (nightly uploads it). +Future _evidence(MatrixCase c, Map job, JobResult r, + {bool failed = true}) async { + final b = StringBuffer('--- evidence for ${c.id} (task #99) ---\n'); + b.writeln('job: ${r.success ? 'succeeded' : 'failed: ${r.error}'} in ${r.duration.inMilliseconds} ms'); + final out = r.outputPath ?? '${job['outputPath']}'; + for (final l in r.logs) { + if (l.contains('Output ') && l.contains(' frames')) b.writeln('vspipe: $l'); + } + final tail = r.logs.length > 40 ? r.logs.sublist(r.logs.length - 40) : r.logs; + b.writeln('job log, last ${tail.length} lines:'); + for (final l in tail) { + b.writeln(' ${l.length > 400 ? '${l.substring(0, 400)}…' : l}'); + } + if (File(out).existsSync()) { + try { + final v = await WorkerHarness.ffprobeJson([ + '-v', 'error', '-select_streams', 'v:0', '-count_packets', '-count_frames', + '-show_entries', 'stream=codec_name,nb_frames,nb_read_packets,nb_read_frames', + '-of', 'json', out, + ], timeout: const Duration(seconds: 60)); + b.writeln('video stream: ${(v['streams'] as List).firstOrNull}'); + } catch (e) { + b.writeln('ffprobe count: $e'); + } + try { + final d = await runBounded( + WorkerHarness.ffmpegPath, + ['-hide_banner', '-nostats', '-v', 'info', '-i', out, '-map', '0:v:0', '-f', 'null', '-'], + label: 'the evidence decode', + timeout: const Duration(seconds: 60), + environment: WorkerHarness.ffmpegEnv, + ); + for (final l in '${d.stderr}'.split('\n')) { + if (l.contains('Stream #0:') && l.contains('->') || l.contains('frames decoded') || + l.contains('frames encoded') || l.contains('frame=')) { + b.writeln('ffmpeg decode: ${l.trim()}'); + } + } + } catch (e) { + b.writeln('ffmpeg decode: $e'); + } + } else { + b.writeln('no output file at $out'); + } + b.writeln('job: ${jsonEncode(job)}'); + final keep = Platform.environment['VAPOURBOX_CONFORMANCE_KEEP']; + if (keep != null && keep.isNotEmpty) { + final dir = Directory(p.join(keep, c.id.replaceAll(RegExp(r'[^A-Za-z0-9]+'), '_'))) + ..createSync(recursive: true); + if (File(out).existsSync()) File(out).copySync(p.join(dir.path, p.basename(out))); + File(p.join(dir.path, 'job.json')).writeAsStringSync(jsonEncode(job)); + File(p.join(dir.path, 'log.txt')).writeAsStringSync('${b.toString()}\n${r.logs.join('\n')}'); + b.writeln('kept in ${dir.path}'); + } + if (failed) print(b); +} + +Future _checkOutput(MatrixCase c, _Source s, String out) async { // 1. The header wrote: one video stream and the expected sound. final streams = await WorkerHarness.ffprobeJson([ @@ -389,8 +480,14 @@ void main() { av1 = await WorkerHarness.hasEncoder('libsvtav1'); }); - for (final c in cases) { - test(c.id, () async { + // `VAPOURBOX_CONFORMANCE_REPEAT=N` registers each case N times, for + // reproducing an intermittent one in one process + // (`repro-output-conformance.yml`, task #99). Never a retry: each run is + // its own test and its own verdict. + final repeat = int.tryParse(Platform.environment['VAPOURBOX_CONFORMANCE_REPEAT'] ?? '') ?? 1; + final runs = [for (final c in cases) for (var k = 1; k <= repeat; k++) (c, k)]; + for (final (c, run) in runs) { + test(repeat == 1 ? c.id : '${c.id} (run $run of $repeat)', () async { if (c.video == VideoCodec.av1 && !av1) { markTestSkipped('no libsvtav1 in this FFmpeg'); return; @@ -409,7 +506,7 @@ void main() { expect(failure, isNotNull, reason: 'a known failure ($known) now passes: remove it from knownFailures'); print(' known failure ($known): $failure'); - }, timeout: const Timeout(Duration(minutes: 3))); + }, timeout: const Timeout(caseTimeout)); } // Found by the matrix: a reset whose first part's sound ends off the diff --git a/app/test/support/av_sync.dart b/app/test/support/av_sync.dart index da359568..79deecbe 100644 --- a/app/test/support/av_sync.dart +++ b/app/test/support/av_sync.dart @@ -10,6 +10,7 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; +import 'bounded_process.dart'; import 'worker_harness.dart'; /// Width x height of the first video stream. @@ -40,11 +41,12 @@ Future<({List flashes, List beeps, double videoStart})> events( pts.add(pts.isEmpty ? 0 : pts.last); } } - final luma = await Process.run( + final luma = await runBounded( WorkerHarness.ffmpegPath, ['-v', 'quiet', '-i', path, '-map', '0:v:0', '-fps_mode', 'passthrough', '-f', 'rawvideo', '-pix_fmt', 'gray', '-'], - stdoutEncoding: null, + label: 'the luma decode', + binaryStdout: true, environment: WorkerHarness.ffmpegEnv, ); final y = luma.stdout as List; @@ -72,10 +74,11 @@ Future> beepOnsets(String path) async { 'frame=pts_time,nb_samples:stream=sample_rate', '-of', 'json', path, ]); final rate = int.parse('${(af['streams'] as List).first['sample_rate']}'); - final pcm = await Process.run( + final pcm = await runBounded( WorkerHarness.ffmpegPath, ['-v', 'quiet', '-i', path, '-map', '0:a:0', '-ac', '1', '-f', 'f32le', '-'], - stdoutEncoding: null, + label: 'the sound decode', + binaryStdout: true, environment: WorkerHarness.ffmpegEnv, ); final bytes = Uint8List.fromList(pcm.stdout as List); diff --git a/app/test/support/bounded_process.dart b/app/test/support/bounded_process.dart new file mode 100644 index 00000000..02825cc2 --- /dev/null +++ b/app/test/support/bounded_process.dart @@ -0,0 +1,143 @@ +/// Subprocesses with a time limit, for the heavy tests (task #99). +/// +/// `Process.run` waits forever. In the output conformance matrix a measuring +/// ffprobe or a hung job ran into the test's own 3-minute timeout, which +/// names nothing, kills nothing, and leaves the stuck process tree running +/// beside the next case. [runBounded] kills the process (and its group) at +/// its limit and throws a [BoundedTimeout] naming the command; before the +/// kill, [describeHang] records where each process of the tree is stuck +/// (macOS `sample`, Linux `gdb` when present), so a hang in CI says which +/// process hung and in what. +library; + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:vapourbox/services/process_tree.dart'; + +/// A [runBounded] process that outlived its limit. [hang] is what +/// [describeHang] found before it was killed. +class BoundedTimeout implements Exception { + BoundedTimeout(this.label, this.limit, this.command, this.hang); + + final String label; + final Duration limit; + final String command; + final String hang; + + @override + String toString() => '$label: still running after ${limit.inSeconds} s, killed: ' + '$command${hang.isEmpty ? '' : '\n$hang'}'; +} + +/// Runs [executable] like `Process.run`, but kills it after [timeout] and +/// throws a [BoundedTimeout] naming [label] and the command. `stdout` is a +/// [String] (UTF-8) unless [binaryStdout], then a [Uint8List]. +/// +/// The default limit is generous on purpose: the heavy tests measure small +/// files, so a bounded run only trips on a hang, never on a slow machine. +Future runBounded( + String executable, + List arguments, { + required String label, + Duration timeout = const Duration(seconds: 120), + Map? environment, + bool binaryStdout = false, +}) async { + final process = await Process.start(executable, arguments, environment: environment); + final out = BytesBuilder(copy: false); + final err = BytesBuilder(copy: false); + final outDone = process.stdout.listen(out.add).asFuture(); + final errDone = process.stderr.listen(err.add).asFuture(); + final int code; + try { + code = await process.exitCode.timeout(timeout); + } on TimeoutException { + final hang = await describeHang(process.pid); + await ProcessTree.killTree(process, ProcessSignal.sigkill); + throw BoundedTimeout(label, timeout, _command(executable, arguments), hang); + } + await Future.wait([outDone, errDone]); + final stdoutBytes = out.takeBytes(); + return ProcessResult( + process.pid, + code, + binaryStdout ? stdoutBytes : utf8.decode(stdoutBytes, allowMalformed: true), + utf8.decode(err.takeBytes(), allowMalformed: true), + ); +} + +String _command(String exe, List args) => + [exe, ...args].map((a) => a.contains(' ') ? "'$a'" : a).join(' '); + +/// [pid] and every process under it, as `(pid, command)`, parents first. +/// Empty on Windows (no `ps`). +Future> processTree(int pid) async { + if (Platform.isWindows) return []; + final ps = await Process.run('ps', ['-A', '-o', 'pid=,ppid=,command=']); + if (ps.exitCode != 0) return []; + final children = >{}; + final command = {}; + for (final line in (ps.stdout as String).split('\n')) { + final m = RegExp(r'^\s*(\d+)\s+(\d+)\s+(.*)$').firstMatch(line); + if (m == null) continue; + final p = int.parse(m.group(1)!), pp = int.parse(m.group(2)!); + command[p] = m.group(3)!; + children.putIfAbsent(pp, () => []).add(p); + } + if (!command.containsKey(pid)) return []; + final out = <(int, String)>[]; + final queue = [pid]; + while (queue.isNotEmpty) { + final p = queue.removeAt(0); + out.add((p, command[p] ?? '?')); + queue.addAll(children[p] ?? const []); + } + return out; +} + +/// Where each process under [pid] is stuck, for a hang's report: the tree +/// (`ps`), then each process's threads' stacks: macOS `sample 2`, +/// Linux `gdb -batch -ex 'thread apply all bt'` when gdb is installed. +/// Nothing on Windows. Never throws: a report that fails says why. +Future describeHang(int pid, {int maxLinesEach = 120}) async { + try { + final tree = await processTree(pid); + if (tree.isEmpty) return ''; + final b = StringBuffer('process tree at the timeout:\n'); + for (final (p, c) in tree) { + b.writeln(' $p ${c.length > 300 ? '${c.substring(0, 300)}…' : c}'); + } + for (final (p, c) in tree) { + final name = c.split(' ').first.split('/').last; + ProcessResult? r; + if (Platform.isMacOS) { + r = await Process.run('sample', ['$p', '2', '-mayDie']) + .timeout(const Duration(seconds: 30)); + } else if (Platform.isLinux) { + try { + r = await Process.run('gdb', ['-batch', '-p', '$p', '-ex', 'thread apply all bt']) + .timeout(const Duration(seconds: 60)); + } on ProcessException { + b.writeln('(no gdb: no stacks)'); + break; + } + } + if (r == null) continue; + final lines = '${r.stdout}${r.stderr}'.split('\n') + .where((l) => l.trim().isNotEmpty) + .toList(); + // `sample`'s call graph starts at "Call graph:"; its header is noise. + final start = lines.indexWhere((l) => l.startsWith('Call graph:')); + final body = start < 0 ? lines : lines.sublist(start); + b.writeln('--- $p $name ---'); + b.writeln((body.length > maxLinesEach ? [...body.take(maxLinesEach), '…'] : body) + .join('\n')); + } + return b.toString(); + } catch (e) { + return '(could not describe the hang: $e)'; + } +} diff --git a/app/test/support/worker_harness.dart b/app/test/support/worker_harness.dart index 5fbf7eda..28af0308 100644 --- a/app/test/support/worker_harness.dart +++ b/app/test/support/worker_harness.dart @@ -40,6 +40,8 @@ import 'package:vapourbox/services/whisper_addon_manager.dart'; import 'package:vapourbox/services/dependency_manager.dart' show DepsVersionInfo, DependencyManager; +import 'bounded_process.dart'; + /// Static entry point used by every integration test's `setUpAll`/helpers. class WorkerHarness { WorkerHarness._(); @@ -474,10 +476,14 @@ class WorkerHarness { final exitCode = await process.exitCode.timeout( timeout, onTimeout: () async { + // Where each process of the tree is stuck, before it is killed + // (task #99: a hung job used to say nothing at all). + final hang = await describeHang(process.pid); // The whole tree: on Windows killing the worker alone leaves its // vspipe running a network on every core, starving later tests. await ProcessTree.killTree(process, ProcessSignal.sigkill); - throw TimeoutException('$label timed out after ${timeout.inSeconds}s'); + throw TimeoutException( + '$label timed out after ${timeout.inSeconds}s${hang.isEmpty ? '' : '\n$hang'}'); }, ); stopwatch.stop(); @@ -584,8 +590,13 @@ class WorkerHarness { } /// Run ffprobe and return decoded JSON. - static Future> ffprobeJson(List args) async { - final result = await Process.run(ffprobePath, args, environment: ffmpegEnv); + /// + /// Bounded (task #99): a measuring ffprobe that hangs is killed after + /// [timeout] and named, rather than holding the test to its own limit. + static Future> ffprobeJson(List args, + {Duration timeout = const Duration(seconds: 120)}) async { + final result = await runBounded(ffprobePath, args, + label: 'ffprobe', timeout: timeout, environment: ffmpegEnv); if (result.exitCode != 0) { throw Exception('ffprobe failed: ${result.stderr}'); } diff --git a/docs/reports/task-99-av1-conformance-flake/scripts/capture-vspipe-stdout.sh b/docs/reports/task-99-av1-conformance-flake/scripts/capture-vspipe-stdout.sh new file mode 100644 index 00000000..7dec1272 --- /dev/null +++ b/docs/reports/task-99-av1-conformance-flake/scripts/capture-vspipe-stdout.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Keep what vspipe writes to the encoder (task #99, B2). +# +# capture-vspipe-stdout.sh install +# Moves the bundle's vspipe-bin to vspipe-bin.real and puts a script in +# its place (the worker runs vspipe-bin itself) that runs the real one +# and copies its stdout, the Y4M the encoder reads, to +# /run.*/out.y4m, with its script and exit status. +# capture-vspipe-stdout.sh uninstall +# +# The copy goes through `tee`, so the encoder still reads vspipe as it runs. +set -uo pipefail +cmd="$1"; VSDIR="$2" +case "$cmd" in +install) + CAP="$3"; mkdir -p "$CAP" + [ -f "$VSDIR/vspipe-bin.real" ] || mv "$VSDIR/vspipe-bin" "$VSDIR/vspipe-bin.real" + cat > "$VSDIR/vspipe-bin" < "\$d/rc" +exit "\$rc" +EOF + chmod +x "$VSDIR/vspipe-bin" + echo "capture script installed in $VSDIR" + ;; +uninstall) + [ -f "$VSDIR/vspipe-bin.real" ] && mv -f "$VSDIR/vspipe-bin.real" "$VSDIR/vspipe-bin" + ;; +esac diff --git a/docs/reports/task-99-av1-conformance-flake/scripts/measure_decode.py b/docs/reports/task-99-av1-conformance-flake/scripts/measure_decode.py new file mode 100644 index 00000000..7be24053 --- /dev/null +++ b/docs/reports/task-99-av1-conformance-flake/scripts/measure_decode.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +"""Decode one output many times the way the conformance test does (task #99, B3). + + measure_decode.py --file --ffmpeg --ffprobe + --out [--runs 500] [--parallel 1] [--hang 60] + +Per variant, --runs times: `ffprobe -count_frames` (the test's check 2, +`countFrames`) and the luma decode of check 4 (`events`: rawvideo gray to +stdout, counted in pictures). Variants: FFmpeg's own choice of decoder, the +same with `-threads 1`, and each AV1 decoder this FFmpeg has forced with +`-c:v`. A run still going after --hang seconds is sampled and killed. + +Prints, per variant, how many runs counted each number of pictures and how +many hung. The question it answers: does the test's own decode of a good +file ever count one picture short, or block? +""" +import argparse +import collections +import os +import re +import subprocess +from concurrent.futures import ThreadPoolExecutor + + +def run(cmd, hang): + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + try: + out, err = p.communicate(timeout=hang) + return p.returncode, out, err, "" + except subprocess.TimeoutExpired: + s = subprocess.run(["sample", str(p.pid), "2", "-mayDie"], capture_output=True, + text=True, timeout=30).stdout + p.kill() + out, err = p.communicate() + return -9, out, err, s[s.find("Call graph:"):][:20000] + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--file", required=True) + ap.add_argument("--ffmpeg", required=True) + ap.add_argument("--ffprobe", required=True) + ap.add_argument("--out", required=True) + ap.add_argument("--runs", type=int, default=500) + ap.add_argument("--parallel", type=int, default=1) + ap.add_argument("--hang", type=float, default=60) + o = ap.parse_args() + os.makedirs(o.out, exist_ok=True) + f = o.file + wh = subprocess.run([o.ffprobe, "-v", "error", "-select_streams", "v:0", "-show_entries", + "stream=width,height", "-of", "csv=p=0", f], + capture_output=True, text=True).stdout.strip().split(",") + size = int(wh[0]) * int(wh[1]) + decs = subprocess.run([o.ffmpeg, "-hide_banner", "-decoders"], capture_output=True, + text=True).stdout + av1 = [m.group(1) for m in re.finditer(r"^\s*V\S*\s+(\S*av1\S*)\s", decs, re.M)] + print(f"AV1 decoders in this ffmpeg: {av1}") + variants = [("default", []), ("threads1", ["-threads", "1"])] + variants += [(f"c:v {d}", ["-c:v", d]) for d in av1] + + def probe(extra): + rc, out, err, hung = run([o.ffprobe, "-v", "error", *extra, "-select_streams", "v:0", + "-count_frames", "-show_entries", "stream=nb_read_frames", + "-of", "csv=p=0", f], o.hang) + return ("probe", rc, out.decode().strip(), hung, err.decode()[-300:]) + + def luma(extra): + rc, out, err, hung = run([o.ffmpeg, "-v", "error", *extra, "-i", f, "-map", "0:v:0", + "-fps_mode", "passthrough", "-f", "rawvideo", "-pix_fmt", + "gray", "-"], o.hang) + return ("luma", rc, str(len(out) // size), hung, err.decode()[-300:]) + + with open(os.path.join(o.out, "results.tsv"), "w") as tsv: + tsv.write("variant\tcheck\trc\tpictures\thung\n") + for name, extra in variants: + with ThreadPoolExecutor(o.parallel) as ex: + rows = list(ex.map(lambda _: probe(extra), range(o.runs))) + rows += list(ex.map(lambda _: luma(extra), range(o.runs))) + for kind in ("probe", "luma"): + rs = [r for r in rows if r[0] == kind] + c = collections.Counter(r[2] for r in rs) + hung = sum(1 for r in rs if r[3]) + fails = sum(1 for r in rs if r[1] != 0) + print(f"{name:14} {kind:5}: pictures {dict(c)}; nonzero exit {fails}; hung {hung}") + for r in rs: + tsv.write(f"{name}\t{kind}\t{r[1]}\t{r[2]}\t{bool(r[3])}\n") + for k, r in enumerate([r for r in rs if r[3] or r[1] != 0][:3]): + with open(os.path.join(o.out, f"bad_{name.replace(' ', '_')}_{kind}_{k}.txt"), + "w") as fh: + fh.write(f"rc {r[1]} pictures {r[2]}\n{r[4]}\n{r[3]}") + + +if __name__ == "__main__": + main() diff --git a/docs/reports/task-99-av1-conformance-flake/scripts/replay_encoder.py b/docs/reports/task-99-av1-conformance-flake/scripts/replay_encoder.py new file mode 100644 index 00000000..a83afe7f --- /dev/null +++ b/docs/reports/task-99-av1-conformance-flake/scripts/replay_encoder.py @@ -0,0 +1,204 @@ +#!/usr/bin/env python3 +"""Replay one job's encoder ffmpeg many times from its captured Y4M (task #99, B2). + + replay_encoder.py --log --y4m --ffmpeg + --ffprobe --out [--runs 300] + [--parallel 1] [--mode file|throttled] [--hang 60] + + is the worker's stdout as the conformance test keeps it +(`VAPOURBOX_CONFORMANCE_KEEP`, log.txt): its `Encoder args: [...]` line is the +encoder command (worker/src/pipeline_executor.rs). is what vspipe wrote +for that job (capture-vspipe-stdout.sh). Each run feeds the Y4M to the same +command on stdin, either as fast as ffmpeg reads (`file`) or one frame at a +time with a short sleep, as vspipe does under load (`throttled`), and records: +exit status, wall time, the output's video packet count +(`ffprobe -count_packets`) and an MD5 of the video packets +(`-map 0:v -c copy -f md5`). A run still going after --hang seconds is +sampled (macOS `sample`) and killed. + +Writes /results.tsv and prints a summary: how many runs wrote each packet +count, how many distinct video hashes there were, and every non-zero exit or +hang. The question it answers: does the encoder alone ever write fewer +packets than frames in, or block? +""" +import argparse +import collections +import json +import os +import subprocess +import sys +import tempfile +import threading +import time +from concurrent.futures import ThreadPoolExecutor + + +def encoder_args(log_path): + for line in open(log_path, encoding="utf-8", errors="replace"): + line = line.strip() + msg = line + try: + msg = json.loads(line).get("message", "") + except ValueError: + pass + if msg.startswith("Encoder args: "): + return json.loads(msg[len("Encoder args: "):]) + sys.exit(f"no 'Encoder args:' line in {log_path}") + + +def y4m_frames(path): + """The Y4M stream split into its header and its frames (FRAME + payload).""" + data = open(path, "rb").read() + head_end = data.index(b"\n") + 1 + head = data[:head_end].decode() + w = h = None + cs = "420" + for tok in head.split()[1:]: + if tok[0] == "W": + w = int(tok[1:]) + elif tok[0] == "H": + h = int(tok[1:]) + elif tok[0] == "C": + cs = tok[1:] + depth = 2 if "p1" in cs else 1 + chroma = {"420": 0.5, "422": 1.0, "444": 2.0}.get(cs[:3], 0.5) + size = int(w * h * (1 + chroma) * depth) + frames = [] + i = head_end + while i < len(data): + nl = data.index(b"\n", i) + 1 + frames.append(data[i:nl + size]) + i = nl + size + return data[:head_end], frames + + +def prepare(args, tmp, run_dir): + """The command for one run: stdin for `-i -`, its own output and progress + file, and an empty FFMETADATA file where the job's has gone.""" + a = list(args) + out = os.path.join(run_dir, "out" + os.path.splitext(a[-1])[1]) + a[-1] = out + for k in range(len(a) - 1): + if a[k] == "-progress": + a[k + 1] = os.path.join(run_dir, "progress.txt") + if a[k] == "-i" and a[k + 1] != "-" and not os.path.exists(a[k + 1]): + if "vb_metadata_" in a[k + 1]: + meta = os.path.join(tmp, "metadata.txt") + with open(meta, "w") as f: + f.write(";FFMETADATA1\n") + a[k + 1] = meta + else: + sys.exit(f"input {a[k + 1]} is gone: replay a job whose inputs remain") + return a, out + + +def feed(proc, header, frames, mode): + try: + proc.stdin.write(header) + for f in frames: + proc.stdin.write(f) + if mode == "throttled": + proc.stdin.flush() + time.sleep(0.01) + proc.stdin.close() + except BrokenPipeError: + pass + + +def sample(pid): + try: + r = subprocess.run(["sample", str(pid), "2", "-mayDie"], capture_output=True, + text=True, timeout=30) + return r.stdout[r.stdout.find("Call graph:"):][:20000] + except Exception as e: # noqa: BLE001 + return f"(sample failed: {e})" + + +def one(i, a, ffmpeg, ffprobe, header, frames, mode, out_root, hang, tmp): + run_dir = os.path.join(out_root, f"run{i:04d}") + os.makedirs(run_dir, exist_ok=True) + cmd, out = prepare(a, tmp, run_dir) + env = dict(os.environ, SVT_LOG="2") + t0 = time.time() + proc = subprocess.Popen([ffmpeg] + cmd, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, + stderr=subprocess.PIPE, env=env) + errbuf = [] + te = threading.Thread(target=lambda: errbuf.append(proc.stderr.read())) + te.start() + tf = threading.Thread(target=feed, args=(proc, header, frames, mode)) + tf.start() + hung = "" + try: + rc = proc.wait(timeout=hang) + except subprocess.TimeoutExpired: + hung = sample(proc.pid) + proc.kill() + rc = proc.wait() + tf.join() + te.join() + wall = time.time() - t0 + packets, md5 = -1, "" + if os.path.exists(out): + p = subprocess.run([ffprobe, "-v", "error", "-select_streams", "v:0", "-count_packets", + "-show_entries", "stream=nb_read_packets", "-of", "csv=p=0", out], + capture_output=True, text=True, timeout=120) + packets = int(p.stdout.strip() or -1) + m = subprocess.run([ffmpeg, "-v", "error", "-i", out, "-map", "0:v", "-c", "copy", + "-f", "md5", "-"], capture_output=True, text=True, timeout=120) + md5 = m.stdout.strip().replace("MD5=", "") + if rc == 0 and not hung and packets == len(frames): + # Keep only what tells a bad run apart; a good run's output is noise. + for f in os.listdir(run_dir): + os.remove(os.path.join(run_dir, f)) + os.rmdir(run_dir) + else: + with open(os.path.join(run_dir, "stderr.txt"), "wb") as f: + f.write(b"".join(errbuf)) + if hung: + with open(os.path.join(run_dir, "sample.txt"), "w") as f: + f.write(hung) + return i, rc, round(wall, 3), packets, md5, bool(hung) + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--log", required=True) + ap.add_argument("--y4m", required=True) + ap.add_argument("--ffmpeg", required=True) + ap.add_argument("--ffprobe", required=True) + ap.add_argument("--out", required=True) + ap.add_argument("--runs", type=int, default=300) + ap.add_argument("--parallel", type=int, default=1) + ap.add_argument("--mode", choices=["file", "throttled"], default="file") + ap.add_argument("--hang", type=float, default=60) + o = ap.parse_args() + os.makedirs(o.out, exist_ok=True) + args = encoder_args(o.log) + header, frames = y4m_frames(o.y4m) + tmp = tempfile.mkdtemp() + print(f"encoder: {' '.join(args)}") + print(f"input: {len(frames)} frames; {o.runs} runs, {o.parallel} at once, {o.mode}") + rows = [] + with ThreadPoolExecutor(o.parallel) as ex: + futs = [ex.submit(one, i, args, o.ffmpeg, o.ffprobe, header, frames, o.mode, o.out, + o.hang, tmp) for i in range(o.runs)] + for f in futs: + rows.append(f.result()) + with open(os.path.join(o.out, "results.tsv"), "w") as f: + f.write("run\trc\twall_s\tpackets\tmd5\thung\n") + for r in rows: + f.write("\t".join(map(str, r)) + "\n") + counts = collections.Counter(r[3] for r in rows) + hashes = collections.Counter(r[4] for r in rows if r[3] == len(frames)) + walls = sorted(r[2] for r in rows) + print(f"packets written: {dict(counts)} (frames in: {len(frames)})") + print(f"distinct video hashes among full outputs: {len(hashes)} {dict(hashes)}") + print(f"wall s: min {walls[0]} median {walls[len(walls) // 2]} max {walls[-1]}") + bad = [r for r in rows if r[1] != 0 or r[5] or r[3] != len(frames)] + print(f"bad runs: {len(bad)} of {len(rows)}") + for r in bad[:20]: + print(f" run {r[0]}: rc {r[1]} packets {r[3]} hung {r[5]} wall {r[2]}") + + +if __name__ == "__main__": + main() diff --git a/docs/reports/task-99-av1-conformance-flake/scripts/summarize_flutter_json.py b/docs/reports/task-99-av1-conformance-flake/scripts/summarize_flutter_json.py new file mode 100644 index 00000000..2d283482 --- /dev/null +++ b/docs/reports/task-99-av1-conformance-flake/scripts/summarize_flutter_json.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +"""Count a `flutter test --file-reporter json:` run's results (task #99). + + summarize_flutter_json.py [