Skip to content

ci(tend-review): pin actions/checkout back to v6 for fork-PR review - #3176

Merged
max-sixty merged 1 commit into
mainfrom
daily/review-runs-28013996665
Jun 23, 2026
Merged

max-sixty merged 1 commit into
mainfrom
daily/review-runs-28013996665

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

What

Pin actions/checkout back to @v6 in tend-review.yaml (only). This is the version the tend 0.1.6 generator emits; the @v7 in the committed file is Dependabot drift from #3131, and it broke automated review for fork PRs.

Why — fork-PR review is currently broken

actions/[email protected] (released 2026-06-18, actions/checkout#2454) added a guard that refuses to check out fork-PR code when the workflow is triggered by pull_request_target unless allow-unsafe-pr-checkout: true is set. tend-review.yaml is exactly that pattern (on: pull_request_target, then actions/checkout with ref: refs/pull/$PR/merge), so every fork PR now fails at the checkout step before the review runs.

This already hit a real external contribution. #3172 (a fork PR from @yzx9, opened 05:58Z) got zero review and zero bot comment — all three tend-review runs failed at actions/checkout@v7 in ~5–7s:

The failing step's error:

Refusing to check out fork pull request code from a 'pull_request_target' workflow. […]
To opt in, review the risks at https://gh.io/securely-using-pull_request_target and set
'allow-unsafe-pr-checkout: true' on the actions/checkout step.

The guard fires only on fork PRs — same-repo PRs (including all bot-authored branches) are unaffected, which is why the breakage stayed invisible until the first fork PR arrived after the bump.

Why @v6 is the right pin here (not allow-unsafe-pr-checkout: true)

  • @v6 has no guard — it restores the exact behavior worktrunk already ran before Dependabot chore: bump actions/checkout from 6 to 7 #3131, so this is not a new security tradeoff.
  • It matches what [email protected] generates: the generator emits actions/checkout@v6, so a future uvx tend@latest init regen produces zero diff on this line.
  • The alternative (allow-unsafe-pr-checkout: true) requires staying on v7 and explicitly opts back into the "pwn request" exposure the guard exists to prevent (fork code fetched into a context holding TEND_BOT_TOKEN + the harness OAuth token). That's a deliberate security decision, not a drift fix.

Scope kept minimal: only tend-review.yaml is touched. The other seven tend-*.yaml workflows and the non-tend CI workflows checkout the base repo (not a fork ref), so @v7 is fine for them and #3131 stays in place there.

Durable fix is upstream

The root cause is in the tend tend-review template (it feeds a fork ref straight to actions/checkout under pull_request_target), so the long-term fix belongs there and is already filed:

  • max-sixty/tend#723 — the template defect, with three candidate fixes (mirror tend-mention's version-agnostic gh pr checkout; allow-unsafe-pr-checkout: true; or review from the API diff). Security-sensitive, left to a maintainer.
  • max-sixty/tend#714 — the related nightly-regen-vs-Dependabot dynamic; the latest comment confirms the @v6 downgrade is the correct result for the pull_request_target review workflow.

Heads-up: Dependabot will try to re-bump this

.github/dependabot.yaml runs the github-actions ecosystem daily with no ignore, so Dependabot will likely open another actions/checkout 6→7 bump that re-touches this file. Until tend's review template adopts a v7-compatible pattern (#723), please don't merge that bump for tend-review.yaml — or add a scoped ignore for actions/checkout in the github-actions Dependabot config. Left out of this PR since freezing checkout repo-wide is a broader call than the drift fix.

actions/checkout@v7 refuses fork-PR checkout under pull_request_target,
breaking automated review for every fork PR (e.g. #3172 got zero review).
v6 has no guard and matches what the tend 0.1.6 generator emits; the v7
in the committed file was Dependabot drift (#3131). Durable fix is
upstream (max-sixty/tend#723).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@worktrunk-bot worktrunk-bot added the automated-fix Automated CI fix label Jun 23, 2026
@max-sixty
max-sixty merged commit d3f4b89 into main Jun 23, 2026
34 of 43 checks passed
@max-sixty
max-sixty deleted the daily/review-runs-28013996665 branch June 23, 2026 14:02
max-sixty pushed a commit that referenced this pull request Jun 25, 2026
Automated nightly regeneration of tend's workflow files.

**tend version:** 0.1.6 → 0.1.7

**Notable changes:**

- **Fork-PR review checkout fixed properly** (max-sixty/tend#725) —
`tend-review` now uses `actions/checkout@v7` with
`allow-unsafe-pr-checkout: true`, the upstream-intended way to re-enable
fork-PR ref checkout that v7 blocks by default. This supersedes the
manual `actions/checkout@v6` stopgap pinned in #3176: the generator now
carries the fix, so the regen restores v7 with the explicit opt-in
rather than the downgrade.
- **CI-poll loops trimmed to fit the Bash tool's 10-min cap**
(max-sixty/tend#695) — `running-in-ci` CI-monitoring loops are sized so
they don't auto-background and drop a gated follow-up.
- **Scope blockers surfaced instead of routed around**
(max-sixty/tend#717) — when a scope rule blocks the correct action, the
bot now reports the blocker on the thread rather than silently
substituting a workaround.
- **Nightly regen worktree bases on the open PR, not the branch ref**
(max-sixty/tend#721) — keeps the regen diff incremental and the PR body
accurate.
- **Shared step scripts; actions named by harness** (max-sixty/tend#712)
— explains the regenerated comment in `tend-notifications.yaml` ("the
harness action's post-step").

Compare: max-sixty/tend@0.1.6...0.1.7

Co-authored-by: worktrunk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-fix Automated CI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants