Skip to content

redline: take forge's dispatch from the default branch - #103

Merged
askalf merged 2 commits into
mainfrom
redline/caller-dispatch
Sep 28, 2026
Merged

askalf merged 2 commits into
mainfrom
redline/caller-dispatch

Conversation

@askalf

@askalf askalf commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Same change as askalf/ci#5. redline.yml takes the workflow_dispatch trigger from askalf/ci#4, and its pin moves to c70746c; the trigger and the pin must move together.

Forge then dispatches Redline on the default branch for a head the pull_request run cannot vouch for: a PR that changes CI definitions, a verdict forge refused, or a re-read after a description edit. That run executes the default branch's workflow files, not the PR's. Forge finds it by the title Redline review askalf/<repo>#<pr> @ <head>. Nothing is dispatched until the forge side (askalf/platform#1531) is deployed with the repo listed. Fork PRs are unchanged.

actionlint is clean. pin.mjs still bumps only the two pin lines.

redline.yml gains workflow_dispatch (pr, head, reread) and pins askalf/ci
c70746c, the commit with redline-review.yml's dispatch mode. The trigger
and the pin move together: new inputs passed to an older pin are an
invalid-input error.

Forge dispatches this on the default branch for a head the pull_request run
cannot vouch for: a PR that changes CI, a verdict forge refused, a re-read
after a description edit. It finds the run by its title. A dispatch is
queued, never cancelled.
@askalf
askalf enabled auto-merge (squash) September 28, 2026 11:09
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code size/S 10-49 hand-written lines labels Sep 28, 2026
A concurrency group holds one pending run, and a newer run cancels it. So one
group per PR let a second dispatch cancel a first that was still waiting,
leaving forge a run with no verdict. Each dispatch is now keyed on its head
and re-read flag.

@sprayberry-redline sprayberry-redline left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approve. The caller adds the workflow_dispatch entry point and moves the pin to the commit that accepts pr, head and reread, and both paths hold.

On pull_request the new with: values resolve to empty (pr, head) and false (reread: ${{ inputs.reread == true }}), so the called workflow's inputs.pr != '' guard keeps the existing same-repo, non-draft path. The review / redline run at this head shows that path working against the new pin. On dispatch, the caller-side if lets the job through, and redline-review.yml at c70746c refuses anything other than a workflow_dispatch on the default branch for an open, non-draft, same-repo PR at exactly the given sha before it fetches anything. The pin is on askalf/ci main (compare returns identical), and uses: and redline-ref name the same sha. The concurrency change keeps cancel-on-push for pull_request (redline-pull_request-<n>, since inputs.head is empty there) and gives each dispatch its own non-cancelling group keyed on head and re-read flag. So a re-read queued behind a first read of the same head is no longer replaced.

@askalf
askalf merged commit 66359b3 into main Sep 28, 2026
12 checks passed
@askalf
askalf deleted the redline/caller-dispatch branch September 28, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size/S 10-49 hand-written lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants