Skip to content

chore(fork): Add the patch-stack infrastructure - #1

Open
krlmlr wants to merge 1 commit into
a-fork-infrafrom
claude/a-fork-infra-42ve6t
Open

chore(fork): Add the patch-stack infrastructure#1
krlmlr wants to merge 1 commit into
a-fork-infrafrom
claude/a-fork-infra-42ve6t

Conversation

@krlmlr

@krlmlr krlmlr commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Patch a-fork-infra of the stack. This is the one patch that is fork-only and never a candidate for upstream — it sorts first, so it lands first.

Three files that make the fork maintainable without hand-holding.

.github/pull.yml lets the Pull app hard-reset main from r-lib/cpp11, so main becomes a 1:1 mirror and nothing else. Nothing may be committed to it after that; the patch branches carry this fork's work.

.github/workflows/patchstack-sync.yml rebuilds fork — the default branch — as main plus the squashed stack, nightly and on demand. It takes b-* and f-* as the stack, so a working branch under another name is left alone. It runs krlmlr/patchstack, which needed two features for this layout: tracking an upstream branch under a different name, and filtering which branches count as patches.

.github/PATCHSTACK.md says what the branches are and how to add a patch. It lives under .github/, which .Rbuildignore already covers, so it stays out of the built package.

R-CMD-check also runs on fork now. The integration is the thing that actually has to build, and nothing was checking it.

Before this can work

Three things outside a merge, in order: flip the repository's default branch to fork (Pull reads pull.yml from the default branch, and main must not be the default or Pull would hard-reset the integration away); install the Pull app; and set PATCHSTACK_TOKEN to a fine-grained PAT with Contents and Workflows read/write. GITHUB_TOKEN may not push changes to workflow files, and fork carries these two through this patch — it only bites when their content changes, so later syncs go through on the default token.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K8MneV8KqHYUuC8fWV3X5Q


Generated by Claude Code

Three files that make this fork maintainable without hand-holding.

`.github/pull.yml` lets the Pull app hard-reset `main` from r-lib/cpp11,
so `main` is a mirror and nothing else.

`.github/workflows/patchstack-sync.yml` rebuilds `fork` -- the default
branch -- as `main` plus the squashed stack, nightly and on demand. It
takes `b-*` and `f-*` as the stack, so a working branch under another
name is left alone.

`.github/PATCHSTACK.md` says what the branches are and how to add a
patch. It lives under `.github/`, which `.Rbuildignore` already covers.

R-CMD-check also runs on `fork` now: the integration is the thing that
has to build, and nothing else was checking it.
@krlmlr
krlmlr changed the base branch from main to claude/main-42ve6t August 17, 2026 21:12
@krlmlr
krlmlr changed the base branch from claude/main-42ve6t to a-fork-infra August 17, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant