Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
300 changes: 16 additions & 284 deletions .github/workflows/eval-browser-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,7 @@ jobs:
REASON: ${{ steps.gate.outputs.reason }}
LIST: .base/.github/standards/trusted-actors/trusted-actors.json
SENDER_ID: ${{ github.event.sender.id }}
run: |
if [ "$PROCEED" != true ]; then
echo "::error::the trigger is not trusted (reason: ${REASON:-unreadable})"
exit 1
fi
if ! jq -e --argjson id "$SENDER_ID" 'any(.actors[]; .id == $id and .kind == "human")' "$LIST" >/dev/null; then
echo "::error::untrusted-actor: the 'eval: run' label did not come from a listed human"
exit 1
fi
run: bash .base/.github/scripts/plugin-eval/check-label-sender.sh

# Only whether each secret is set reaches the action, never its value.
# `present` is whether this leg runs the eval: the key is set and the
Expand Down Expand Up @@ -372,34 +364,7 @@ jobs:
TARGET: ${{ inputs.target }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if [ "$EVENT" = workflow_dispatch ]; then
target=${TARGET%/}
if ! [[ $target =~ ^plugins/[A-Za-z0-9][A-Za-z0-9._-]*$ ]]; then
echo "::error::target must be a plugin directory, plugins/<name>"
exit 1
fi
selected=$target
else
merge_base=$(git -C .head merge-base "$BASE_SHA" "$HEAD_SHA")
files=$(git -C .head diff --no-renames --name-only "$merge_base" "$HEAD_SHA")
selected=$(printf '%s\n' "$files" |
node .base/.github/scripts/plugin-eval/select-plugins.mjs --repo .head --base "$merge_base" --head "$HEAD_SHA") || {
echo "::error::the pull request changes more of a selected plugin than its suite may run with the credential"
exit 1
}
fi
if [ -z "$selected" ]; then
echo "::notice::the pull request changes no plugin's skills, agents or evals; no eval runs."
echo "go=false" >>"$GITHUB_OUTPUT"
exit 0
fi
{
echo "go=true"
echo "list<<EOF"
echo "$selected"
echo "EOF"
} >>"$GITHUB_OUTPUT"
run: bash .base/.github/scripts/plugin-eval/choose-plugins.sh

# validate-cases.py makes no model call. A FAIL is a case the binary
# rejects at load, so the job stops before any spend. On a deterministic
Expand All @@ -411,42 +376,7 @@ jobs:
LIST: ${{ steps.plugins.outputs.list }}
ROOT: ${{ github.event_name == 'pull_request' && '.head' || '.base' }}
DETERMINISTIC: ${{ github.event_name == 'pull_request' || inputs.deterministic-only }}
run: |
staged=""
while IFS= read -r plugin; do
[ -n "$plugin" ] || continue
dir="$ROOT/$plugin"
eval_dir=$(jq -r '.experimental.evals // "evals"' "$dir/.claude-plugin/plugin.json" 2>/dev/null || echo evals)
if [ ! -d "$dir/$eval_dir" ]; then
echo "::notice::$plugin has no eval suite; skipped."
continue
fi
echo "== validate $plugin/$eval_dir"
if ! python3 .base/plugins/evals/skills/validate/scripts/validate-cases.py "$dir/$eval_dir"; then
echo "::error::$plugin/$eval_dir does not pass validate-cases.py, so no eval runs"
exit 1
fi
if [ "$DETERMINISTIC" = true ]; then
split=$(node .base/.github/scripts/plugin-eval/deterministic-suite.mjs "$dir" evals-deterministic)
echo "$split"
if [ "$(jq '.kept | length' <<<"$split")" -eq 0 ]; then
echo "::notice::$plugin has no case with deterministic graders only; skipped."
continue
fi
eval_dir=evals-deterministic
fi
staged+="$dir"$'\t'"$eval_dir"$'\n'
done <<<"$LIST"
if [ -z "$staged" ]; then
echo "go=false" >>"$GITHUB_OUTPUT"
exit 0
fi
{
echo "go=true"
echo "suites<<EOF"
printf '%s' "$staged"
echo "EOF"
} >>"$GITHUB_OUTPUT"
run: bash .base/.github/scripts/plugin-eval/stage-suites.sh

# The tools and Chromium go under /opt, outside HOME, which each eval
# run replaces with a temporary one. This step uses sudo only to make
Expand Down Expand Up @@ -525,37 +455,17 @@ jobs:
echo "/opt/tools/node_modules/.bin" >> "$GITHUB_PATH"

# Eval cases whose scaffold renders frames (explainer-video, knowledge)
# name ffmpeg as a host tool, and the hosted image carries none. Same
# BtbN static build, tag and SHA-256 as the pin in
# .github/scripts/lib/install-pinned-ffmpeg.sh. ffmpeg and ffprobe go into
# /opt/tools/bin, which every eval run's sandbox can read, after
# isolation, so neither runs with sudo.
# name ffmpeg as a host tool, and the hosted image carries none. The script
# holds the pinned BtbN build. ffmpeg and ffprobe go into /opt/tools/bin,
# which every eval run's sandbox can read, after isolation, so neither
# runs with sudo.
- name: Install ffmpeg for eval scaffolds
if: >-
steps.stage.outputs.go == 'true' &&
(contains(steps.plugins.outputs.list, 'plugins/explainer-video') ||
contains(steps.plugins.outputs.list, 'plugins/knowledge'))
timeout-minutes: 3
env:
FFMPEG_RELEASE: autobuild-2026-09-30-13-08
FFMPEG_BUILD: n8.1.3-9-g29e619e767
FFMPEG_SHA256: 97ce978979194b5cf7e06a5e68020dbdaa7a4f3294c5452b6a1bc347100dbb79
run: |
asset="ffmpeg-$FFMPEG_BUILD-linux64-gpl-8.1.tar.xz"
archive="$RUNNER_TEMP/$asset"
mkdir -p /opt/tools/bin
curl -fSL --no-progress-meter --retry 7 --retry-all-errors -o "$archive" \
"https://github.com/BtbN/FFmpeg-Builds/releases/download/$FFMPEG_RELEASE/$asset"
echo "$FFMPEG_SHA256 $archive" | sha256sum -c - ||
{ echo "::error::$asset does not match FFMPEG_SHA256"; exit 1; }
tar -xJf "$archive" -C /opt/tools/bin --strip-components=2 --wildcards '*/bin/ffmpeg' '*/bin/ffprobe'
rm -f "$archive"
echo "/opt/tools/bin" >> "$GITHUB_PATH"
for tool in ffmpeg ffprobe; do
line=$("/opt/tools/bin/$tool" -version | sed -n 1p)
echo "$line"
[[ "$line" == *"$FFMPEG_BUILD"* ]] || { echo "::error::$tool reports '$line', not $FFMPEG_BUILD"; exit 1; }
done
run: bash .base/.github/scripts/lib/install-pinned-ffmpeg.sh /opt/tools/bin

# The guardrails hooks read every Bash command through shfmt and refuse the
# call without it, so a guardrails eval needs it on PATH. The
Expand Down Expand Up @@ -1159,15 +1069,7 @@ jobs:
REASON: ${{ steps.gate.outputs.reason }}
LIST: .base/.github/standards/trusted-actors/trusted-actors.json
SENDER_ID: ${{ github.event.sender.id }}
run: |
if [ "$PROCEED" != true ]; then
echo "::error::the trigger is not trusted (reason: ${REASON:-unreadable})"
exit 1
fi
if ! jq -e --argjson id "$SENDER_ID" 'any(.actors[]; .id == $id and .kind == "human")' "$LIST" >/dev/null; then
echo "::error::untrusted-actor: the 'eval: run' label did not come from a listed human"
exit 1
fi
run: bash .base/.github/scripts/plugin-eval/check-label-sender.sh

# Only whether each secret is set reaches the action, never its value.
# `present` is whether this leg runs the eval.
Expand Down Expand Up @@ -1198,34 +1100,7 @@ jobs:
TARGET: ${{ inputs.target }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if [ "$EVENT" = workflow_dispatch ]; then
target=${TARGET%/}
if ! [[ $target =~ ^plugins/[A-Za-z0-9][A-Za-z0-9._-]*$ ]]; then
echo "::error::target must be a plugin directory, plugins/<name>"
exit 1
fi
selected=$target
else
merge_base=$(git -C .head merge-base "$BASE_SHA" "$HEAD_SHA")
files=$(git -C .head diff --no-renames --name-only "$merge_base" "$HEAD_SHA")
selected=$(printf '%s\n' "$files" |
node .base/.github/scripts/plugin-eval/select-plugins.mjs --repo .head --base "$merge_base" --head "$HEAD_SHA") || {
echo "::error::the pull request changes more of a selected plugin than its suite may run with the credential"
exit 1
}
fi
if [ -z "$selected" ]; then
echo "::notice::the pull request changes no plugin's skills, agents or evals; no eval runs."
echo "go=false" >>"$GITHUB_OUTPUT"
exit 0
fi
{
echo "go=true"
echo "list<<EOF"
echo "$selected"
echo "EOF"
} >>"$GITHUB_OUTPUT"
run: bash .base/.github/scripts/plugin-eval/choose-plugins.sh

- name: Validate and stage the suites
id: stage
Expand All @@ -1234,42 +1109,7 @@ jobs:
LIST: ${{ steps.plugins.outputs.list }}
ROOT: ${{ github.event_name == 'pull_request' && '.head' || '.base' }}
DETERMINISTIC: ${{ github.event_name == 'pull_request' || inputs.deterministic-only }}
run: |
staged=""
while IFS= read -r plugin; do
[ -n "$plugin" ] || continue
dir="$ROOT/$plugin"
eval_dir=$(jq -r '.experimental.evals // "evals"' "$dir/.claude-plugin/plugin.json" 2>/dev/null || echo evals)
if [ ! -d "$dir/$eval_dir" ]; then
echo "::notice::$plugin has no eval suite; skipped."
continue
fi
echo "== validate $plugin/$eval_dir"
if ! python3 .base/plugins/evals/skills/validate/scripts/validate-cases.py "$dir/$eval_dir"; then
echo "::error::$plugin/$eval_dir does not pass validate-cases.py, so no eval runs"
exit 1
fi
if [ "$DETERMINISTIC" = true ]; then
split=$(node .base/.github/scripts/plugin-eval/deterministic-suite.mjs "$dir" evals-deterministic)
echo "$split"
if [ "$(jq '.kept | length' <<<"$split")" -eq 0 ]; then
echo "::notice::$plugin has no case with deterministic graders only; skipped."
continue
fi
eval_dir=evals-deterministic
fi
staged+="$dir"$'\t'"$eval_dir"$'\n'
done <<<"$LIST"
if [ -z "$staged" ]; then
echo "go=false" >>"$GITHUB_OUTPUT"
exit 0
fi
{
echo "go=true"
echo "suites<<EOF"
printf '%s' "$staged"
echo "EOF"
} >>"$GITHUB_OUTPUT"
run: bash .base/.github/scripts/plugin-eval/stage-suites.sh

- name: Create the tool directories
if: steps.stage.outputs.go == 'true'
Expand Down Expand Up @@ -1332,26 +1172,7 @@ jobs:
(contains(steps.plugins.outputs.list, 'plugins/explainer-video') ||
contains(steps.plugins.outputs.list, 'plugins/knowledge'))
timeout-minutes: 3
env:
FFMPEG_RELEASE: autobuild-2026-09-30-13-08
FFMPEG_BUILD: n8.1.3-9-g29e619e767
FFMPEG_SHA256: 97ce978979194b5cf7e06a5e68020dbdaa7a4f3294c5452b6a1bc347100dbb79
run: |
asset="ffmpeg-$FFMPEG_BUILD-linux64-gpl-8.1.tar.xz"
archive="$RUNNER_TEMP/$asset"
mkdir -p /opt/tools/bin
curl -fSL --no-progress-meter --retry 7 --retry-all-errors -o "$archive" \
"https://github.com/BtbN/FFmpeg-Builds/releases/download/$FFMPEG_RELEASE/$asset"
echo "$FFMPEG_SHA256 $archive" | sha256sum -c - ||
{ echo "::error::$asset does not match FFMPEG_SHA256"; exit 1; }
tar -xJf "$archive" -C /opt/tools/bin --strip-components=2 --wildcards '*/bin/ffmpeg' '*/bin/ffprobe'
rm -f "$archive"
echo "/opt/tools/bin" >> "$GITHUB_PATH"
for tool in ffmpeg ffprobe; do
line=$("/opt/tools/bin/$tool" -version | sed -n 1p)
echo "$line"
[[ "$line" == *"$FFMPEG_BUILD"* ]] || { echo "::error::$tool reports '$line', not $FFMPEG_BUILD"; exit 1; }
done
run: bash .base/.github/scripts/lib/install-pinned-ffmpeg.sh /opt/tools/bin

- name: Install pinned shfmt for guardrails
if: steps.stage.outputs.go == 'true' && contains(steps.plugins.outputs.list, 'plugins/guardrails')
Expand Down Expand Up @@ -1823,15 +1644,7 @@ jobs:
REASON: ${{ steps.gate.outputs.reason }}
LIST: .base/.github/standards/trusted-actors/trusted-actors.json
SENDER_ID: ${{ github.event.sender.id }}
run: |
if [ "$PROCEED" != true ]; then
echo "::error::the trigger is not trusted (reason: ${REASON:-unreadable})"
exit 1
fi
if ! jq -e --argjson id "$SENDER_ID" 'any(.actors[]; .id == $id and .kind == "human")' "$LIST" >/dev/null; then
echo "::error::untrusted-actor: the 'eval: run' label did not come from a listed human"
exit 1
fi
run: bash .base/.github/scripts/plugin-eval/check-label-sender.sh

# Only whether the fallback token is set reaches the action, never its
# value. `present` is whether this leg runs the eval.
Expand Down Expand Up @@ -1861,34 +1674,7 @@ jobs:
TARGET: ${{ inputs.target }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if [ "$EVENT" = workflow_dispatch ]; then
target=${TARGET%/}
if ! [[ $target =~ ^plugins/[A-Za-z0-9][A-Za-z0-9._-]*$ ]]; then
echo "::error::target must be a plugin directory, plugins/<name>"
exit 1
fi
selected=$target
else
merge_base=$(git -C .head merge-base "$BASE_SHA" "$HEAD_SHA")
files=$(git -C .head diff --no-renames --name-only "$merge_base" "$HEAD_SHA")
selected=$(printf '%s\n' "$files" |
node .base/.github/scripts/plugin-eval/select-plugins.mjs --repo .head --base "$merge_base" --head "$HEAD_SHA") || {
echo "::error::the pull request changes more of a selected plugin than its suite may run with the credential"
exit 1
}
fi
if [ -z "$selected" ]; then
echo "::notice::the pull request changes no plugin's skills, agents or evals; no eval runs."
echo "go=false" >>"$GITHUB_OUTPUT"
exit 0
fi
{
echo "go=true"
echo "list<<EOF"
echo "$selected"
echo "EOF"
} >>"$GITHUB_OUTPUT"
run: bash .base/.github/scripts/plugin-eval/choose-plugins.sh

- name: Validate and stage the suites
id: stage
Expand All @@ -1897,42 +1683,7 @@ jobs:
LIST: ${{ steps.plugins.outputs.list }}
ROOT: ${{ github.event_name == 'pull_request' && '.head' || '.base' }}
DETERMINISTIC: ${{ github.event_name == 'pull_request' || inputs.deterministic-only }}
run: |
staged=""
while IFS= read -r plugin; do
[ -n "$plugin" ] || continue
dir="$ROOT/$plugin"
eval_dir=$(jq -r '.experimental.evals // "evals"' "$dir/.claude-plugin/plugin.json" 2>/dev/null || echo evals)
if [ ! -d "$dir/$eval_dir" ]; then
echo "::notice::$plugin has no eval suite; skipped."
continue
fi
echo "== validate $plugin/$eval_dir"
if ! python3 .base/plugins/evals/skills/validate/scripts/validate-cases.py "$dir/$eval_dir"; then
echo "::error::$plugin/$eval_dir does not pass validate-cases.py, so no eval runs"
exit 1
fi
if [ "$DETERMINISTIC" = true ]; then
split=$(node .base/.github/scripts/plugin-eval/deterministic-suite.mjs "$dir" evals-deterministic)
echo "$split"
if [ "$(jq '.kept | length' <<<"$split")" -eq 0 ]; then
echo "::notice::$plugin has no case with deterministic graders only; skipped."
continue
fi
eval_dir=evals-deterministic
fi
staged+="$dir"$'\t'"$eval_dir"$'\n'
done <<<"$LIST"
if [ -z "$staged" ]; then
echo "go=false" >>"$GITHUB_OUTPUT"
exit 0
fi
{
echo "go=true"
echo "suites<<EOF"
printf '%s' "$staged"
echo "EOF"
} >>"$GITHUB_OUTPUT"
run: bash .base/.github/scripts/plugin-eval/stage-suites.sh

- name: Create the tool directories
if: steps.stage.outputs.go == 'true'
Expand Down Expand Up @@ -1995,26 +1746,7 @@ jobs:
(contains(steps.plugins.outputs.list, 'plugins/explainer-video') ||
contains(steps.plugins.outputs.list, 'plugins/knowledge'))
timeout-minutes: 3
env:
FFMPEG_RELEASE: autobuild-2026-09-30-13-08
FFMPEG_BUILD: n8.1.3-9-g29e619e767
FFMPEG_SHA256: 97ce978979194b5cf7e06a5e68020dbdaa7a4f3294c5452b6a1bc347100dbb79
run: |
asset="ffmpeg-$FFMPEG_BUILD-linux64-gpl-8.1.tar.xz"
archive="$RUNNER_TEMP/$asset"
mkdir -p /opt/tools/bin
curl -fSL --no-progress-meter --retry 7 --retry-all-errors -o "$archive" \
"https://github.com/BtbN/FFmpeg-Builds/releases/download/$FFMPEG_RELEASE/$asset"
echo "$FFMPEG_SHA256 $archive" | sha256sum -c - ||
{ echo "::error::$asset does not match FFMPEG_SHA256"; exit 1; }
tar -xJf "$archive" -C /opt/tools/bin --strip-components=2 --wildcards '*/bin/ffmpeg' '*/bin/ffprobe'
rm -f "$archive"
echo "/opt/tools/bin" >> "$GITHUB_PATH"
for tool in ffmpeg ffprobe; do
line=$("/opt/tools/bin/$tool" -version | sed -n 1p)
echo "$line"
[[ "$line" == *"$FFMPEG_BUILD"* ]] || { echo "::error::$tool reports '$line', not $FFMPEG_BUILD"; exit 1; }
done
run: bash .base/.github/scripts/lib/install-pinned-ffmpeg.sh /opt/tools/bin

- name: Install pinned shfmt for guardrails
if: steps.stage.outputs.go == 'true' && contains(steps.plugins.outputs.list, 'plugins/guardrails')
Expand Down
Loading