redline: take forge's dispatch from the default branch - #108
Conversation
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.
Deploying amnesia-site with
|
| Latest commit: |
62fcec6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://52305927.amnesia-site.pages.dev |
| Branch Preview URL: | https://redline-caller-dispatch.amnesia-site.pages.dev |
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
left a comment
There was a problem hiding this comment.
Approve at 62fcec6: the dispatch trigger and the pin move together, and both event paths still reach the called workflow with the inputs it expects.
On pull_request the inputs context is empty. So pr and head reach redline-review.yml at c70746c as '' and reread as false. The callee's if: inputs.pr != '' || (...) keeps the same-repo, non-draft gate it had before. The run name falls back to the PR title, which is also the default for that event. On workflow_dispatch the caller's job-level if lets the run through. The callee then refuses it before any checkout unless it is on the default branch, the PR is open, not a draft, with its head in this repo, and at the given full sha. The pinned c70746ceb1b3c4beaa76741f6eaba8516ec4799c is the current tip of askalf/ci main, and it declares the three pr/head/reread inputs, so the callee's "ref is on main" step accepts it.
The second commit keys each dispatch's concurrency group on head and mode (redline-workflow_dispatch-<pr>-<sha>-<reread>). That fixes the case the first head left open: a later dispatch for a different head, or a re-read, would have replaced a first dispatch that was still pending in the shared per-PR group. pull_request runs keep one group per PR with cancel-in-progress. Inputs only reach run-name and the group key. They are never interpolated into a shell step: the callee passes them through env.
Required checks are green at 62fcec6.
Same change as askalf/ci#5.
redline.ymltakes theworkflow_dispatchtrigger from askalf/ci#4, and its pin moves toc70746c; 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.mjsstill bumps only the two pin lines.