Repository navigation
automation: rebase edera/4.22 onto upstream staging-4.22 nightly - #46
Merged
Merged
Conversation
Add a scheduled workflow in which Claude rebases the downstream series onto xen-project staging-4.22, following .automation/skills/upstream-rebase/SKILL.md: it replays the series, resolves conflicts, fixes what the replay broke, builds, audits any XSAs upstream brought in, and writes a report. The model's own account of its result decides nothing. It runs with a read-only token and cannot push; its branch leaves the job as a git bundle and is judged independently: - verify-upstream-rebase.sh proves the series sits on the upstream tip, is linear, lost or gained no commit (a changed patch-id is accepted only where the commit's own +/- lines are identical), and changed the tree by exactly the upstream delta; - x86, arm64 defconfig and arm64 with PCI passthrough are built. If all pass, edera/4.22 is force-pushed with a lease pinned to the tip the rebase started from, and the old tip is kept as a backup branch. Otherwise the result is opened as a pull request carrying the report, and approving it lands it (upstream-rebase-land.yml). A night with no result opens an issue. Pull-request-triggered workflows run the branch's own .github/ with repository secrets, so a result whose .github/, .automation/ or .review/ changes differ from upstream's is never pushed anywhere. Nights with nothing new upstream stop before the model starts. Needs a GitHub App (vars.REBASE_APP_CLIENT_ID, secrets.REBASE_APP_PRIVATE_KEY) with contents, pull-requests and workflows write and a bypass on the edera/4.22 rules, and a federation rule that accepts a scheduled run (REBASE_* variables, falling back to PR_REVIEW_*).
kaniini
requested review from
alexandermerritt,
azenla,
bleggett and
tycho
as code owners
October 6, 2026 22:40
bleggett
previously approved these changes
Oct 6, 2026
azenla
previously approved these changes
Oct 6, 2026
found-it
reviewed
Oct 7, 2026
found-it
reviewed
Oct 7, 2026
| - name: Normalize identifiers | ||
| id: ids | ||
| env: | ||
| RULE: ${{ vars.REBASE_FEDERATION_RULE_ID || vars.PR_REVIEW_FEDERATION_RULE_ID }} |
Contributor
There was a problem hiding this comment.
Just a note, this will never be PR_REVIEW_FEDERATION_RULE_ID, since REBASE_FEDERATION_RULE_ID is set it will always take precedence. It's not harmful since this workflow isn't triggered on pull_request_review anyways. Just wanted to note that though
tycho
previously approved these changes
Oct 7, 2026
Co-authored-by: James Petersen <jpetersenames@gmail.com> Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a nightly workflow in which Claude rebases
edera/4.22onto xen-projectstaging-4.22, then lands the result automatically if it is clean or opens a pull request for review if it is not.How a night runs
edera/4.22already containsstaging-4.22, or if an open rebase PR already covers the same pair of tips, so quiet nights never start the model..automation/skills/upstream-rebase/SKILL.md: replay, resolve conflicts, fix build breaks in the commit at fault, build, audit any new XSAs (including whether each fix survived the replay), write a report. This job holds a read-only token and cannot push; the branch leaves it as a git bundle.verify-upstream-rebase.sh: on the upstream tip, linear, no commit lost or gained (a changed patch-id is accepted only where the commit's own +/- lines are identical and just the hunk context moved), and the tree changed by exactly the upstream delta.defconfig, arm64 +PCI_PASSTHROUGH.edera/4.22with--force-with-leasepinned to the starting tip; old tip kept asbackup/edera-4.22-pre-rebase-….rebase/edera-4.22/<date>-<old>-<upstream>and open a PR with the report and checker output. Approving it lands it viaupstream-rebase-land.yml(the merge button would graft a second copy of the series). Older rebase PRs are closed as superseded.Any conflict Claude resolves shows up as drift, so those nights always go to a human.
Safety
github_tokenis passed explicitly so the action does not mint its own..github/with repository secrets.publishtherefore refuses to push anything, asedera/4.22or as a PR, whose.github/,.automation/or.review/changes differ from upstream's changes to those paths.edera/4.22tip from the branch name, which cannot be edited on an open PR. Ifedera/4.22moved, it pushes nothing.Testing
.github/scripts/tests/verify-upstream-rebase.test.sh(8 cases, run byupstream-rebase-selftest.yml) builds a throwaway repo and checks that honest replays pass and that edited (with a repeated subject), dropped, added and merge commits and a stale base are refused. Mutation-checked: reintroducing an earlier checker bug makes it fail.Configuration needed before it can run
edera/4.22rules:vars.REBASE_APP_CLIENT_ID,secrets.REBASE_APP_PRIVATE_KEY.GITHUB_TOKENcannot push commits that touch.github/workflows/, and PRs it opens do not trigger the review checks.vars.REBASE_FEDERATION_RULE_ID,REBASE_ORGANIZATION_ID,REBASE_SERVICE_ACCOUNT_ID,REBASE_WORKSPACE_ID, each falling back to thePR_REVIEW_*variable. The rule must accept a scheduled run's OIDC subject, which a rule written forpull_requestevents will not.