Replies: 5 comments 2 replies
|
Yes |
|
A separate preflight sounds useful here, mainly because it keeps the check read-only and reproducible before anyone starts resolving a merge. One thing I would keep an eye on is where the policy itself lives: reading it from the fork's baseline, as you are doing, is the right call, since the incoming tree is exactly what you do not trust yet. If the syncs become frequent, attaching the same check to the sync PR as a status check could save the manual step, but I would keep the manual dispatch too for the cases where you want to test a candidate ref without opening a PR. |
|
I’d use the sync PR as the merge gate and keep
|
|
I’d keep manual dispatch for rehearsals and run the check on upstream sync PRs so maintainers can review the result alongside the changes. Reading the policy and verifier from the trusted base commit helps prevent an incoming change from weakening the check. Keep the verification job read-only, treat the candidate files as data, and don’t run scripts from the PR. Your separate job for publishing the verdict also makes sense: it can confirm the PR still points to the checked commits before attaching the result. Keeping the check advisory while you try it on real syncs seems like a practical next step. |
|
I'd attach the check to the upstream-sync PR, not keep it as a separate manual ritual. The whole point is that a maintainer sees the result at the moment they decide whether to merge. The important design detail is where you read the policy from. Read it from the PR's base ref — the trusted fork baseline — not from the head, because an incoming upstream change can rewrite the policy file and the workflow itself. Your read-only permissions help, but pinning the ref explicitly is what makes the check trustworthy. What I'd add on top of what you have:
Your "clean merge removes a requirement" case is the right one to guard. A plain Git merge has no idea that a CI workflow file or a lockfile is load-bearing for the fork. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Workflow Configuration
Discussion Details
I maintain a GitHub Actions workflow that reviews upstream updates before merging them. The failure I want to catch is a clean Git merge that removes something the fork still depends on, such as a dependency manifest or a CI workflow.
Our current workflow is manually dispatched on the fork’s default branch. It resolves both refs to commit IDs, reads the policy from the fork’s baseline, and evaluates the candidate tree with read-only repository permissions. The job summary distinguishes a merge conflict, a changed requirement, and an inconclusive result. The JSON artifact carries the exact commit IDs so the check can be reproduced.
For a fork that regularly syncs upstream, have you found a separate manual preflight useful, or do you attach the check to an upstream-sync PR so maintainers see it during review? How do you keep policy tied to the trusted baseline when the incoming change also modifies workflow files?
Here’s our working GitHub Actions run. If you maintain a fork and have a sync coming up, I’d be happy to help run one read-only check against one requirement you already rely on. The result and setup friction would help us decide whether the manual step is worth keeping.
AI assisted with drafting this discussion.
Update after testing the PR preflight
I kept manual dispatch for rehearsals and added a separate PR check. The verifier reads policy from the base SHA, and a separate job publishes the verdict on the checked head after confirming that the PR still points to the same commits.
In a draft PR, I removed a protected file and changed the incoming policy so it would ignore the removal. The first head reported a regression. Restoring the file produced a passing verdict on the new head. The draft is closed. The check is currently advisory.
If you have an upstream sync coming up, reply with the two branches and one requirement you need to keep. I can help turn that into a single check, and you can run it yourself. Here’s the copyable workflow.
All reactions