Skip to content

docs(adr): add ADR 0171, poll for fork PRs from authorized authors - #9381

Open
waynesun09 wants to merge 1 commit into
adr-9221-pull-request-shimfrom
adr-fork-pr-review-poll
Open

waynesun09 wants to merge 1 commit into
adr-9221-pull-request-shimfrom
adr-fork-pr-review-poll

Conversation

@waynesun09

Copy link
Copy Markdown
Member

Summary

ADR 0164 (#9227) moves the shim to pull_request and skips every fork PR, so fork PRs from authorized authors lose automatic review. It leaves restoring that as a follow-up decision. This ADR makes it: an opt-in scheduled poll finds fork PRs from authorized authors and starts review for them from a default-branch workflow.

Stacked on #9227. The base branch is adr-9221-pull-request-shim, because this ADR links ADR 0164. Merge #9227 first. Docs only; no implementation here.

What is decided

Trigger A scheduled workflow (every 5 minutes) on the default branch runs fullsend poll with a new GitHub pull request input
Who qualifies The PR author passes the authorization automatic review used before ADR 0164, and owns the fork
How often One review per head commit, with bounded retries and a bounded number of starts per cycle
Default Off. A repository turns it on in its fullsend configuration
Delay About 5 to 20 minutes; /fs-review stays for an immediate review
Not decided The hosted webhook receiver (option D of ADR 0164). If added later, this poll stays as its backstop
Out of scope Fork retro, the ready-for-review label on fork PRs, Dependabot PRs and PRs with merge conflicts

Why a poll

  • No fork-triggered run. The workflow file and CLI come from the default branch, so a fork cannot edit them. No pull_request_target exception, no workflow_run, no new hosted service, no new App permission.
  • fullsend already does this for Jira, for GitLab merge requests, and for its own vouch check.
  • gh-aw has no faster pattern. It skips fork PRs by default, its forks: allowlist "does not grant permissions or expose secrets", and Document fork PR, issue-template, and runner-step guidance github/gh-aw#76299 says not to use workflow_run "as a way to bypass fork safeguards". It does run scheduled agents that read PRs, forks included, through the API (checked at gh-aw 1802a3bb0).

Evidence

Counts from the GitHub REST API on 2026-11-12, PRs created since 2026-10-13, bots excluded. Author role is role_name from the collaborator permission endpoint, as of that day.

Repository Human PRs From forks Author triage or higher Of those, triage only Of those, fork owned by the author
fullsend-ai/fullsend 166 105 87 31 85
fullsend-ai/agents 48 24 21 5 21

Schedule delay: the last 200 scheduled runs of vouch-check.yml (*/10) in this repository, 2026-11-10 21:45Z to 2026-11-12 15:13Z. Gap between runs: median 11.1 min, 90th percentile 17.7 min, longest 47.3 min. Run duration: median 15 s. A */5 schedule was not measured.

Current behaviour the ADR describes, at main 48288e014:

  • Jira poll caller, written by repos install when Jira polling is on, cron */5: internal/scaffold/fullsend-repo/templates/jira-poll-per-repo.yaml, internal/scaffold/jira_poll.go.
  • Automatic review authorizes the PR author at triage on opened|synchronize|ready_for_review, with no draft check: the Determine stage step of .github/workflows/reusable-dispatch.yml.
  • The GitLab poller skips pushes to fork merge requests: routeSynchronized in internal/dispatch/router.go.
  • The vouch check runs on a schedule: .github/workflows/vouch-check.yml (changed in d8a5ac4 for ci: move fullsend's own workflows off pull_request_target before the Dec 2 default block #9245). The base branch of this PR predates that commit, so the file still shows pull_request_target here.

Review notes

  • Fork pushers. The poll cannot tell who pushed to a fork. The author-owned-fork rule removes shared and organization-owned forks; someone the author added to their own fork can still start a review by pushing, as before ADR 0164. The ADR states this as a consequence.
  • Living documents. docs/architecture.md gets one new bullet. No accepted ADR is edited.
  • Implementation will be tracked in a follow-up issue once the decision is accepted.

Assisted-by: Claude

ADR 0164 moves the shim to pull_request and skips fork PRs, so fork PRs
from authorized authors lose automatic review. This ADR decides the
follow-up: an opt-in scheduled poll lists open fork PRs, keeps those
whose author passes review authorization, and dispatches one review per
head commit from a default-branch workflow.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
@waynesun09
waynesun09 requested a review from a team as a code owner November 12, 2026 15:56
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can open the rule or relationship behind a finding in one click

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Document opt-in polling for authorized fork PR reviews

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Accept ADR 0171 to restore automatic review for eligible fork PRs without fork-triggered
 workflows.
• Define author and fork-ownership checks, per-commit deduplication, bounded retries, and an opt-in
 schedule.
• Record the target architecture; this PR does not implement the poll.
Diagram

graph TD
  Config["Repository Config"] --> Installer["Repo Installer"] --> Poll["Default Branch Poll"] --> API["GitHub PR API"] --> Gate{"Eligible Commit?"} --> Dispatch["Review Dispatch"] --> App["Review App"] --> Records["Review Records"]
  Records -.->|deduplication| Gate
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Hosted GitHub App webhook receiver
  • ➕ Could start eligible reviews sooner than a scheduled poll.
  • ➖ Requires a hosted service, webhook setup, an additional App permission, and a new trust boundary.

Recommendation: The proposed poll is the pragmatic first path: it reuses existing work-discovery and dispatch patterns while keeping privileged execution off fork-triggered events. Leave a webhook receiver as a separate decision if lower latency later justifies its operational and security costs.

Files changed (2) +158 / -0

Documentation (2) +158 / -0
0171-review-fork-prs-from-authorized-authors-through-a-scheduled-poll.mdAccept a scheduled-poll design for eligible fork PR reviews +157/-0

Accept a scheduled-poll design for eligible fork PR reviews

• Adds ADR 0171 as the follow-up to ADR 0164, choosing an opt-in GitHub poll over privileged fork-triggered workflows. It specifies author authorization, author-owned forks, review-record-based per-commit deduplication, bounded starts and retries, and the scope left to manual review.

docs/ADRs/0171-review-fork-prs-from-authorized-authors-through-a-scheduled-poll.md

architecture.mdRecord the fork PR poll as a target-state architecture decision +1/-0

Record the fork PR poll as a target-state architecture decision

• Adds a link and concise summary of the optional default-branch poll alongside the existing shim security architecture. The entry describes the decided design, not a shipped implementation.

docs/architecture.md

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:58 PM UTC · Completed 4:08 PM UTC

Commit: 8bee79f · View workflow run →

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

@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://72b09034-site.fullsend-ai.workers.dev

Commit: 8bee79f86f67d46b4fedfc392e200c33909b18cc

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 12, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Low metadata risk for a two-file documentation change adding an ADR without protected path or CI changes, balanced by high historical churn and author contention on docs/architecture.md.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Low

  • [doc-style] docs/ADRs/0171-review-fork-prs-from-authorized-authors-through-a-scheduled-poll.md:50 — Per docs/contributing/documentation.md § "Product name casing", the product name is capitalized as "Fullsend" at the start of a sentence. Line 50 starts a sentence with lowercase "fullsend" ("fullsend already finds work..."), and line 53 does the same ("fullsend's own contributor vouch check...").
    Remediation: Capitalize "Fullsend" at the start of each sentence on lines 50 and 53.

Labels: ADR on fork PR review dispatch; type/adr and docs/dispatch/security labels match prior ADR PRs.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot 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.

See the review comment for full details.

ADR 0164 suggests pushing the branch to the repository instead of a fork.
Authors with only triage access have no push access, so they cannot.

fullsend already finds work on a schedule. A scheduled workflow runs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] doc-style

Per docs/contributing/documentation.md § 'Product name casing', the product name is capitalized as 'Fullsend' at the start of a sentence. Line 50 starts a sentence with lowercase 'fullsend' ('fullsend already finds work...'), and line 53 does the same ('fullsend's own contributor vouch check...').

Suggested fix: Capitalize 'Fullsend' at the start of each sentence on lines 50 and 53: 'Fullsend already finds work on a schedule.' and 'Fullsend's own contributor vouch check ...'.

@fullsend-ai-review fullsend-ai-review Bot added type/adr component/docs User-facing documentation component/dispatch Workflow dispatch and triggers security Security threat model and related concerns labels Nov 12, 2026

This branch was successfully deployed

1 active deployment
site-preview — 8bee79f8 Deployed Nov 12, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/dispatch Workflow dispatch and triggers component/docs User-facing documentation risk/moderate PR risk: moderate security Security threat model and related concerns type/adr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant