diff --git a/lanes/COMMON-20260901.md b/lanes/COMMON-20260901.md index 4b8a1045..f6b3280d 100644 --- a/lanes/COMMON-20260901.md +++ b/lanes/COMMON-20260901.md @@ -15,6 +15,13 @@ WORKING RULES (binding): `systemd-run --user --scope -p MemoryMax=8G` and bound ffmpeg with `-t`. - Test scope: `cargo test -p ec-av1 --lib` only (plus `cargo check -p ec-av1`). Never the workspace suite. Set `EC_AV1_REQUIRE_AOMENC=1` so an absent oracle FAILS, never SKIPs. +- FIRST STEP of every lane, after `git worktree add`: `scripts/link-fixtures.sh`. The root + `fixtures/` directory is gitignored (`.gitignore:2`), so a worktree does NOT get it and + every fixture-backed gate (JVT/FLAC-xiph/RFC-6716 vectors, the ec-av1 pins) skips GREEN + having tested nothing. The script symlinks the primary checkout's `fixtures/` in + (`--check` for a preflight; it refuses loudly if the primary has none). Set + `EC_REQUIRE_FIXTURES=1` in EVERY batch unit (with EC_AV1_REQUIRE_FFMPEG / + EC_AV1_REQUIRE_AOMENC) so an absent fixture FAILS instead of skipping. - Oracle: `~/.cache/aom-oracle/build/aomenc` and instrumented `aomdec` (scripts/build-aom-oracle.sh, scripts/instrument-aom-oracle.sh; rungs EC_TRACE=1 / EC_TRACE_COEFF=1 / EC_TRACE_MODE=1 / EC_AV1_PREFILT_DUMP). Ours: EC_TRACE_COEFF / EC_TRACE_MODE / EC_TRACE_MODE_STEP in decode.rs. diff --git a/scripts/link-fixtures.sh b/scripts/link-fixtures.sh new file mode 100755 index 00000000..086240d9 --- /dev/null +++ b/scripts/link-fixtures.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# link-fixtures.sh — give this worktree the primary checkout's root `fixtures/`. +# +# The root `fixtures/` directory is listed in `.gitignore` (line 2) and is NOT +# committed, so `git worktree add` gives every lane worktree a tree WITHOUT it. +# Every test that reads a fixture through `/../../fixtures` then reports +# green having checked nothing: this is the "gate skips on its own failure" +# class, and it has already cost false verdicts (lane-av1skipfix 2026-09-29). +# +# This script makes a SYMLINK, never a copy: the fixtures are large and the +# lane worktrees exist to run tests, not to duplicate data. +# +# Usage: scripts/link-fixtures.sh [--check] +# (no args) create the symlink, or no-op if fixtures/ is already there +# --check report what would happen and exit non-zero if the fixtures are +# absent; for a batch preflight +# +# Idempotent and safe to run from any worktree of this repo. + +set -uo pipefail + +ROOT=$(cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT" || exit 2 + +# `--git-common-dir` resolves to the PRIMARY checkout's .git from any linked +# worktree (a linked worktree's own .git is a FILE, not the common dir), so +# this works identically in the primary tree and in ~/.cache/wt/. +COMMON=$(git rev-parse --git-common-dir 2>/dev/null) || { + echo "link-fixtures: not inside a git repository ($ROOT)" >&2 + exit 2 +} +COMMON=$(cd -- "$COMMON" && pwd) || exit 2 +PRIMARY=$(dirname -- "$COMMON") +SOURCE="$PRIMARY/fixtures" + +CHECK=0 +[ "${1:-}" = "--check" ] && CHECK=1 + +report() { # report + echo "link-fixtures: $1 — $2" + echo " primary checkout: $PRIMARY" + echo " this tree: $ROOT" +} + +if [ -e "$ROOT/fixtures" ] || [ -L "$ROOT/fixtures" ]; then + if [ -L "$ROOT/fixtures" ] && [ -d "$ROOT/fixtures" ]; then + report "already linked" "$ROOT/fixtures -> $(readlink -f "$ROOT/fixtures")" + exit 0 + fi + if [ -d "$ROOT/fixtures" ]; then + report "already a real directory" "nothing to do ($ROOT/fixtures)" + exit 0 + fi + report "REFUSING" "$ROOT/fixtures exists but is neither a directory nor a live symlink; remove it by hand" >&2 + exit 2 +fi + +if [ ! -d "$SOURCE" ]; then + report "REFUSING" "the primary checkout has no fixtures/ at $SOURCE" >&2 + echo " It is gitignored, so it exists only where someone generated it:" >&2 + echo " scripts/gen-fixtures.sh (containers) and scripts/fetch-vectors.sh" >&2 + echo " (conformance vectors). Run one there, then re-run this script." >&2 + exit 2 +fi + +if [ "$CHECK" = 1 ]; then + report "would link" "$ROOT/fixtures -> $SOURCE" + exit 1 +fi + +ln -s "$SOURCE" "$ROOT/fixtures" || exit 2 +report "linked" "$ROOT/fixtures -> $SOURCE" +echo " Fixtures are now reachable; run your crate's gates with" +echo " EC_REQUIRE_FIXTURES=1 so an absent fixture FAILS instead of skipping."