Skip to content

Support caller-selected checkouts in workflow runs - #42

Open
wbreza wants to merge 3 commits into
mainfrom
wbreza-action-workflow-run-support
Open

wbreza wants to merge 3 commits into
mainfrom
wbreza-action-workflow-run-support

Conversation

@wbreza

@wbreza wbreza commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Relates to #26.

A team can now run evals after another GitHub Actions workflow finishes. For example, a team can wait for CI to pass, check out the commit it wants to evaluate, and run the Action against that commit. Previously, the Action rejected this workflow trigger or required the checkout to match the workflow's own commit.

The job summary and saved results show the commit actually checked out. If the commit cannot be determined, the Action keeps the error in the summary instead of posting a potentially misleading PR comment. The README includes a lint-only example.

Verification

  • Model-free checks and source-to-bundle verification pass. corepack pnpm check — passed locally with Node 24.21.0 and pnpm 12.8.1; CI checks also passed.
  • Native integration evidence is distinguished from synthetic controls. CI's packaged Action smoke test passed using a mock evaluator and deterministic graders; the existing Copilot smoke workflow also passed one live trial in CI. No model was run locally.
  • Credential, process and artifact boundaries were reviewed. The documentation explains that code run by evals can access credentials and that workflow owners must choose appropriate permissions and approvals.
  • Documentation and packaged dist match source. The bundle verification in corepack pnpm check passed.

Limitations

The workflow owner must verify which run and commit to evaluate; the Action does not verify that a selected commit came from a particular PR. On workflow_run, results appear in the job summary and artifacts, not in an automatic PR comment. This is narrower than the verification requested in #26.

No release was published and no version tag was moved. The existing release automation remains unchanged.

Generated by 🌳Breza Bot

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@wbreza
wbreza requested a review from a team as a code owner November 20, 2026 19:27
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 19:27
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Evals: passed

Suite: copilot-smoke

Lint: validated (no model execution) - Evidence

Run: passed - 1 trial - Evidence

Eval Trials Result
copilot-skill-smoke 1 passed

Quality & token summary

Eval Model Verdict Score Turns Duration Tokens
copilot-skill-smoke - passed 1.00 (threshold 1.00) 2 2023ms 33346 tokens (33273 in / 73 out)

Exact revision | Workflow run

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread src/action.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unknown revisions from early failures are mishandled during evidence merging and PR commenting, obscuring original errors and artifact links or adding misleading reporting failures.

2 open issues
What changed in this PR

Enables the Vally-based GitHub Action to evaluate caller-selected checkouts, including in workflow_run jobs, without requiring HEAD to match GITHUB_SHA. Source provenance and approval remain the caller’s responsibility.

Changes:

  • Accept caller-configured events while retaining fork pull_request exclusion and pull_request_target rejection.
  • Record the actual checkout revision and detect revision changes during preparation.
  • Adjust report validation and expand tests and trust documentation for caller-selected checkouts.
File Description
tests/​policy.test.ts Tests broader event eligibility and checkout SHA validation.
tests/​action.test.ts Covers workflow_run, unknown revisions, and checkout changes.
src/​reporting.ts Makes expected revisions optional and permits unknown revisions for errors and not-run outcomes.
src/​policy.ts Supports caller-configured events and validates checkout SHAs.
src/​action.ts Records checkout HEAD, rechecks stability, and adjusts artifact imports.
SECURITY.md Clarifies provenance responsibilities and retained reporting safeguards.
README.md Documents event support, checkout selection, and artifact verification.

Review effort: Max (adaptive)

Comment thread src/action.ts Resolved
Comment thread src/action.ts Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants