Skip to content

ci: move functional, behaviour and vouch workflows off pull_request_target before the 2026-12-02 default block #1975

Closed

Description

@waynesun09

Problem

GitHub blocks pull_request_target by default on public repos from 2026-12-02 (changelog; next brownout 2026-11-16, 16:00–18:00 UTC). A blocked run ends in startup_failure with no jobs and cannot be re-run. fullsend-ai/agents is public, so its own PR workflows that use the trigger stop running. fullsend moved its own workflows in fullsend-ai/fullsend#9245 (PR fullsend-ai/fullsend#9246); this issue applies the same design here.

merge_group, push, schedule, workflow_dispatch and workflow_call runs are not affected.

Inventory on origin/main (94037d2d)

Workflow Why it uses pull_request_target In this issue
functional-tests.yml Functional evals need GCP WIF + EVAL_GH_TOKEN on fork PRs. A gate job authorizes (write+ author, trusted bot, or an ok-to-test label from a writer) before detect/functional-tests check out the PR head. functional-tests-complete fails with "Detect was skipped on pull_request_target" until authorized Yes
behaviour-tests.yml Live behaviour tests need the dev environment secrets (AGENTS_BT_*) on fork PRs; same gate job and ok-to-test label Yes
vouch-check.yml Closes and comments on PRs from unvouched first-time contributors; needs pull-requests: write on fork PRs Yes
fullsend.yaml The fullsend consumer shim, synced from fullsend's scaffold Out of scope: fullsend-ai/fullsend#9230 (ADR 0164, fullsend-ai/fullsend#9227) changes the shim, and the agents copy follows that sync

The main ruleset requires only script-test, test, commit-lint and skillsaw (GitHub Actions, app 15368). They come from lint.yml and script-test.yml, which already run on pull_request, so no required check changes. functional-tests-complete and behaviour are not required, but reviewers read them, so every path below must still produce them on the PR head.

Model to match: gh-aw

github/gh-aw (main at 62ddc3a8) compiles PR agent workflows to plain pull_request with a same-repo guard and has no pull_request_target agent workflows in its own repo:

Target design

functional-tests.yml and behaviour-tests.yml

Path Trigger What runs Checks on the PR head
Same-repo PR pull_request [opened, synchronize, reopened] gate (existing authorization) only when head.repo.id == repository_id, then the suites on head.sha with secrets functional-tests-complete, behaviour (unchanged names)
Fork PR, not authorized pull_request gate skipped; no secrets, no PR code run functional-tests-complete fails with a message that names /ok-to-test <sha>; behaviour skipped
Fork PR, writer authorized issue_comment /ok-to-test <full 40-char sha> (new ok-to-test.yml) An authorize job checks the commenter and the sha, then calls both workflows through workflow_call with pr_number and head_sha authorize creates check runs named functional-tests-complete and behaviour on that sha (GITHUB_TOKEN, checks: write, app 15368); a report job completes them from the called workflows' results
merge_group, push to main, workflow_dispatch, workflow_call from fullsend release.yml unchanged unchanged unchanged

Rules (same as fullsend-ai/fullsend#9246):

  • /ok-to-test names one commit. The first line is /ok-to-test and the full 40-character sha the writer reviewed. A short prefix is refused (the author controls the commit and can grind a matching prefix). The run is authorized only when the PR head, read when the check runs, equals that sha; otherwise reason=stale_ok_to_test. No timing heuristics. A later push needs a new comment.
  • The comment is read from the API by comment id, never from the event payload, and must be on that PR and by that commenter. The commenter needs admin, maintain or write from the collaborator permission API, not author_association.
  • Only authorize and report hold checks: write / pull-requests: write. Jobs that run PR code keep contents: read + id-token: write, as in the gh-aw safe-outputs split.
  • Fork authors with write access also need /ok-to-test: fork pull_request runs get no secrets.
  • The ok-to-test label no longer starts a run. Remove the labeled handling where nothing reads it any more.
  • Keep the existing workflow_call interface of functional-tests.yml backward compatible: fullsend's release.yml calls it cross-repo with fullsend_ref and tier. New inputs are optional.
  • Each called workflow needs its own concurrency group for issue_comment (for example functional-ok-to-test-<pr> / behaviour-ok-to-test-<pr>). In a called workflow github.workflow is the caller's name, so the current format('{0}-{1}', github.workflow, github.ref) fallback would put both callees in one group and deadlock.
  • eval-full keeps working: on /ok-to-test the tier is full when the PR carries eval-full, else release.

vouch-check.yml

pull_request cannot replace it: fork runs get a read-only token, and this repo requires approval for first-time contributors' pull_request runs (approval_policy: first_time_contributors), which is the population the vouch gate targets.

Move it to schedule (every 10 minutes) + workflow_dispatch, running a script that never checks out PR code. Same rules as today and as fullsend's scripts/vouch-sweep.sh:

  • only PRs opened or reopened inside a lookback window (default 60 minutes), so the first run does not sweep older open PRs;
  • skip Bot authors, skip collaborators with write+, read .github/VOUCHED.td from the vouched branch of fullsend-ai/fullsend (the org-wide list, as today);
  • close before commenting; one comment per PR across overlapping runs (marker comment); API errors never close a PR.

Codeable part (for the code agent)

The code agent cannot push .github/workflows/. The maintainer who takes over the PR adds the workflow edits. Everything else is in scope here, including .github/scripts/ and .github/actions/. Port from fullsend main (f31165c1a): scripts/check-e2e-authorization.sh + test, .github/actions/check-e2e-authorization/action.yml, scripts/vouch-sweep.sh + test.

  1. /ok-to-test <sha> command mode in .github/scripts/check-e2e-authorization.sh and .github/actions/check-e2e-authorization/action.yml, with cases in .github/scripts/check-e2e-authorization-test.sh:
    • new inputs event_name, commenter_login, comment_id; new output head_sha;
    • reasons ok_to_test, untrusted_commenter, missing_sha, stale_ok_to_test, error, per the rules above;
    • the gate comment text says /ok-to-test <full sha of the latest push> instead of the label.
  2. Roll-up .github/scripts/check-rollup-result.sh + check-rollup-result-test.sh: handle pull_request and issue_comment instead of pull_request_target; drop the labeled mirroring (no labeled trigger remains); the fork-PR failure message tells a writer to comment /ok-to-test <sha>.
  3. Vouch sweep .github/scripts/vouch-sweep.sh + .github/scripts/vouch-sweep-test.sh (stubbed gh, --dry-run) implementing the rules above. Replace .github/scripts/vouch-check-test.sh (it tests the inline script in the workflow) in the Makefile.
  4. Guard test .github/scripts/workflow-triggers-test.sh (yq): fails when any file in .github/workflows/ declares pull_request_target under on: (map, list or string form); fullsend.yaml is the only allowlisted file, with a comment pointing at fix(dispatch)!: move the shim from pull_request_target to pull_request fullsend#9230; a check that the allowlist entry exists; self-tests on temp files, including a workflow that only compares github.event_name strings (must pass).
  5. Wire the new tests into make script-test.
  6. Docs: CONTRIBUTING.md "Functional tests for external contributors" (who needs /ok-to-test <sha>, that a push needs a new one, that fork authors with write access need it too), eval/README.md (tier row), and any comment that says pull_request_target or "the workflow file comes from main".

Out of scope

Done when

  • No workflow in .github/workflows/ other than fullsend.yaml declares pull_request_target, and the guard test enforces it.
  • A same-repo PR gets functional-tests-complete and behaviour from pull_request.
  • A fork PR runs no PR code with secrets until a writer comments /ok-to-test <sha>, and then gets functional-tests-complete and behaviour on that sha.
  • merge_group, push-to-main and fullsend release.yml runs are unchanged.

Activity

  1. waynesun09 commented on Nov 12, 2026

    @waynesun09
    MemberAuthor

    /fs-code
    Do not use git commit -s; bot commits must not carry a DCO sign-off.

  2. fullsend-ai-triage commented on Nov 12, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 7:14 PM UTC · Completed 7:16 PM UTC

    Commit: 94037d2 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.19

  3. fullsend-ai-coder commented on Nov 12, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Code · ❌ Terminated · Started 7:14 PM UTC · Ended 7:26 PM UTC

    Commit: 94037d2 · View workflow run →

  4. fullsend-ai-triage commented on Nov 12, 2026

    @fullsend-ai-triage

    Triage found this issue actionable and complete. No open PR addresses it, and no duplicate exists.

    Scope note: The full migration requires editing .github/workflows/ files (functional-tests.yml, behaviour-tests.yml, vouch-check.yml and the new ok-to-test.yml). The code agent cannot push workflow files under its current permissions, so a maintainer must make those edits. Auto-promotion is skipped for that reason. The script, action, test, Makefile and docs part is listed in the issue and can be implemented without touching workflows.

    Verified: the existing files to change (check-e2e-authorization.sh and its test, check-rollup-result.sh and its test, vouch-check-test.sh, and the check-e2e-authorization action) are all in this repo. The vouch-sweep*.sh and workflow-triggers-test.sh files are new.

    Timing: the next brownout is 2026-11-16 and the default block starts 2026-12-02, so the workflow edits are time-sensitive.

    Suggested test case:

    /ok-to-test <full 40-char sha> by write+ commenter, sha == PR head -> ok_to_test
    short sha                                                           -> missing_sha
    sha != current PR head                                              -> stale_ok_to_test
    commenter without write/maintain/admin                              -> untrusted_commenter
    API error                                                           -> error (never authorizes)
    workflow-triggers-test: pull_request_target as map/list/string fails; only fullsend.yaml allowlisted; event_name string comparison passes
    

    Labels: This is CI infrastructure work with a documentation component; no existing label fits it more precisely.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  5. fullsend-ai-coder commented on Nov 12, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 7:14 PM UTC · Completed 7:26 PM UTC

    Commit: 94037d2 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.50

  6. added 2 commits that reference this issue on Nov 12, 2026
  7. added 2 commits that reference this issue 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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions