Skip to content

Add scripts for the eval-dispatch leg steps and the pinned ffmpeg install #16021

Description

@kyle-sexton

Agent Brief

Type: Task
Summary: Add scripts under .github/scripts/ for four repeated eval-dispatch leg steps and for the pinned ffmpeg install (part of restructuring pass #15695). Switch only the call sites that are safe before this merges: the three bwrap checks and the required-checks ffmpeg install. Three of the five scripts (choose-plugins.sh, stage-suites.sh, check-label-sender.sh) get no caller here: their callers come in the follow-on item R2-8 ("Call the eval-dispatch leg scripts from the pull request path"), which switches the eval-dispatch pull request path once these scripts are on main. They are not dead code. install-pinned-ffmpeg.sh gets its first caller here and its eval-dispatch callers in R2-8.

Current behavior:
Line numbers are at 0bcb603a9b. The eval-dispatch legs are the jobs eval, eval-subscription and eval-fallback (eval-browser-dispatch.yml:192, :1057, :1744). Each repeated step below is byte-identical in the three legs.

  • "Check bwrap starts a sandbox": the same 18-line run: body at eval-browser-dispatch.yml:677-697, :1448-1468, :2129-2149. It checks bwrap and socat are on PATH, then starts bwrap bare and with playwright-cli.
    • Its if: holds it to workflow_dispatch (eval-browser-dispatch.yml:678). The job if: holds a dispatch to the default branch (:195-201), and .base is then the dispatched commit (:239). So the YAML and .base come from the same commit whenever it runs.
  • "Choose the plugins" (27 lines, eval-browser-dispatch.yml:367-402, :1210-1245, :1891-1926) and "Validate and stage the suites" (35 lines, :407-449, :1247-1289, :1928-1970). They pick the plugins from the target input or from the PR head's diff through select-plugins.mjs, then validate each suite and stage its deterministic copy.
  • "Stop on an untrusted pull request trigger": 8 lines at eval-browser-dispatch.yml:323-338, :1172-1187, :1854-1869. It refuses an untrusted gate verdict, or an eval: run label from anyone but a listed human.
  • Pinned ffmpeg install, 4 copies in 2 files with the same release, build and SHA-256:
    • "Install ffmpeg for eval scaffolds" at eval-browser-dispatch.yml:532-557, :1346-1371, :2027-2052. It downloads to RUNNER_TEMP and installs into /opt/tools/bin. Its comment mirrors the other copy's pin by hand (:527-531).
    • "Install ffmpeg for demo-video" at pr-require-checks.yml:3599-3623. It uses a download cache under $HOME/.cache/ci-tools-ffmpeg, installs into $HOME/.local/bin, and also checks each tool is executable (:3619).
  • None of these bodies holds a ${{ }} expression, and each runs before its job's model step.
  • No test reads their text. Tests that read this workflow name other steps: .github/scripts/plugin-eval/workflow.test.mjs, credential-legs.test.mjs, eval-handoff.test.mjs, .github/scripts/work-unblock/label-unblocked.test.mjs:4453. A repository-wide git grep for the bodies' distinctive text, outside the workflows directory, finds 0 files.
  • .github/actions/resolve-config/callers.test.mjs:9791-9801 holds the three legs' steps equal, so equal edits keep them equal.
  • Neither workflow sets defaults: or shell:, so each step runs as bash -e {0} (https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax, the unspecified-shell row).
  • Checkouts:
    • Eval-dispatch legs: .base (eval-browser-dispatch.yml:235-241), and on pull_request the PR head at .head (:355-362), which is never run. Nothing is checked out at the workspace root.
    • Required-checks job test-bash: a full checkout of the PR tree at the root (pr-require-checks.yml:3527-3530). It already calls a local action from it (:3582).

Desired behavior:

  • Five new scripts, each mode 100755 with a #!/usr/bin/env bash line and set -e to match the replaced step shell. Use no pipefail: "Choose the plugins" pipes printf into node. Each script holds its step's body verbatim and reads the same environment names:
    • .github/scripts/plugin-eval/check-bwrap.sh;
    • .github/scripts/plugin-eval/choose-plugins.sh;
    • .github/scripts/plugin-eval/stage-suites.sh;
    • .github/scripts/plugin-eval/check-label-sender.sh;
    • .github/scripts/lib/install-pinned-ffmpeg.sh <bin-dir> [cache-dir]. It holds the release, build and SHA-256. With a cache dir it keeps the archive there and downloads only when the archive is missing. Without one it downloads to RUNNER_TEMP and removes the archive after extracting. Both forms check each tool is executable and reports the pinned build.
  • Calls switched in this item:
    • The three "Check bwrap starts a sandbox" steps keep their name and if:. Their run: becomes bash .base/.github/scripts/plugin-eval/check-bwrap.sh, called from .base.
    • "Install ffmpeg for demo-video" keeps its name, timeout-minutes and the LEG_PLAN gate lines (pr-require-checks.yml:3606-3608). It drops its env: pin and calls bash .github/scripts/lib/install-pinned-ffmpeg.sh "$HOME/.local/bin" "$HOME/.cache/ci-tools-ffmpeg" from its root checkout.
    • The eval-dispatch ffmpeg comment (eval-browser-dispatch.yml:527-531) names install-pinned-ffmpeg.sh as the pin's home instead of the demo-video step. It is reworded in the key leg only; the other legs carry no comment.
  • Calls left for R2-8, because they run on pull_request, where the YAML is the PR's but .base is main's tip, so the script must be on main first: "Choose the plugins", "Validate and stage the suites", "Install ffmpeg for eval scaffolds" and "Stop on an untrusted pull request trigger", in all three legs.

Files:

  • .github/scripts/plugin-eval/check-bwrap.sh (new)
  • .github/scripts/plugin-eval/choose-plugins.sh (new)
  • .github/scripts/plugin-eval/stage-suites.sh (new)
  • .github/scripts/plugin-eval/check-label-sender.sh (new)
  • .github/scripts/lib/install-pinned-ffmpeg.sh (new)
  • the steps at eval-browser-dispatch.yml:677, :1448, :2129, and the comment at :527-531
  • the step at pr-require-checks.yml:3599 and its comment at :3585-3591

Key interfaces:

  • Each switched step's outputs, error lines, exit codes and installed files: identical for the same inputs. The required-checks ffmpeg step gains nothing: it already checks each tool is executable.
  • The required-checks cache key (pr-require-checks.yml:3598) is unchanged, so existing cache entries still hit.
  • Token scope and log shape: each step stays one run step before any model step, with no new token, permission or composite action.

Acceptance criteria:

  • The bwrap check exists once, in its script, and the three dispatch-only bwrap steps call it from main's checkout.
  • The ffmpeg release, build and SHA-256 appear once outside a cache key and the three eval-dispatch ffmpeg steps, in install-pinned-ffmpeg.sh, and the demo-video install calls it.
  • choose-plugins.sh, stage-suites.sh and check-label-sender.sh each hold their step's body verbatim. No pull request path step calls them yet; R2-8 adds their callers.
  • Every step name, id, if:, env: key the body reads, timeout-minutes, job id, trigger, permission and workflow file name is unchanged.
  • The three eval legs stay equal under the existing leg-shape check.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • The five scripts pass the repository's shellcheck and shfmt checks.
  • ci-status is green.

Out of scope:

  • Switching the pull request path call sites (R2-8), "Judge the leg" and "Print Bash error excerpts" (a test reads one, and both run after the eval), the three-leg structure, other duplication, eval cases, fixtures, and skill and agent text.

Activity

  1. added
    status: ready
    host-run
    on Nov 13, 2026
  2. added theissue type on Nov 13, 2026
  3. removed
    status: ready
    on Nov 13, 2026
  4. kyle-sexton commented on Nov 13, 2026

    @kyle-sexton
    MemberAuthor

    Scope note from the session that filed this issue (Simplify Planning): the criterion "The diff edits only the listed files and the lines of a test that assert on them" is amended for one file. PR #16025 may add scripts/eval-leg-scripts.test.sh, a behavior test for the five new scripts. Reason: three of the scripts get no caller until the follow-on #16026, so without the test nothing would run them, and the review lane asked for the same kind of test on #15970. Every other criterion stands. The reviewer's second point (nothing keeps the not-yet-called scripts equal to their step bodies) is handled in #16026: each step body is diffed against its script before the switch, and any drift is folded into the script.

  5. github-actions commented on Nov 13, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  6. github-actions commented on Nov 13, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: this adds five scripts under .github/scripts/ that hold the repeated eval-dispatch leg step bodies and the pinned ffmpeg install. It switches only the three bwrap checks and the required-checks ffmpeg install to call them. The pull request path call sites are left for #16026. The scope note allows one extra behavior test file. The brief gives exact files, acceptance criteria and out-of-scope items, so nothing is missing. I found no duplicate among the open issues and no merged pull request that already does this. It is part of the restructuring pass in #15695.

    Automated triage. A maintainer reviews it.

  7. melodic-automation-lanes commented on Nov 13, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  8. removed
    host-run
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions