Skip to content

Add PR template + CONTRIBUTING.md for fork-vs-upstream policy#3

Merged
McSim85 merged 3 commits into
main-qnfrom
qn/fork-contribution-policy
May 12, 2026
Merged

Add PR template + CONTRIBUTING.md for fork-vs-upstream policy#3
McSim85 merged 3 commits into
main-qnfrom
qn/fork-contribution-policy

Conversation

@McSim85
Copy link
Copy Markdown

@McSim85 McSim85 commented May 11, 2026

Summary

This is the policy/process half of the conversation about keeping fork-specific changes from being accidentally contributed upstream. The technical CI fixes in #2 don't belong in jito-labs/shredstream-proxy, but gh pr create defaults to upstream and the GitHub web UI's "compare across forks" defaults the base to upstream's master — so there's a real risk someone routes a fork-only change to the wrong place.

This PR introduces two lightweight guards that together cost <30 min of setup and catch ~all realistic accidents:

.github/PULL_REQUEST_TEMPLATE.md

GitHub auto-fills the PR body with this when opening any PR. It forces the author to consciously tick one of two boxes:

  • Yes — upstreamable. Use unprefixed or feature/* branch. Open an upstream PR after this one merges.
  • No — QN-specific. Use qn/* branch. Don't open upstream.

CONTRIBUTING.md

Top-level doc explaining the convention with concrete examples, the right gh pr create invocations for each case (always include --repo!), and a note on gh repo sync for pulling new upstream commits without ever pushing back.

Convention introduced

Prefix Use for Upstream-bound?
qn/* CI workflows, deploy plumbing, infra integration, fleet defaults No
feature/* or unprefixed Bug fixes, generic features, refactors Yes, optionally

Examples cited:

What this does NOT do

GitHub has no native "block contributions to upstream" toggle for forks. This PR is process control, not a hard technical block. If a determined contributor wants to route a qn/* change upstream, they still can — the template + docs just make it unlikely to happen by accident.

If we ever want a hard guard, the next step is the long-lived-vendor-branch model: master mirrors upstream exactly, qn-master carries our patches, fork's default branch is qn-master. Heavier workflow but stronger separation. Not needed yet.

Test plan

  • PR template renders correctly when opening this PR (the body above came from it).
  • Files validate as Markdown (rendering check on the GitHub web UI).
  • After merge, the next opened PR on this repo should auto-populate the new template.

🤖 Generated with Claude Code


Note

Low Risk
Low risk: adds only documentation and a GitHub PR template, with no changes to runtime code, build outputs, or CI behavior.

Overview
Adds a new .github/PULL_REQUEST_TEMPLATE.md that prompts authors to explicitly mark whether a change is upstreamable vs QuickNode-specific, with guidance on branch naming and follow-up upstream PRs.

Introduces a top-level CONTRIBUTING.md documenting the fork’s two-branch model (main-qn vs master), branch protections, and the recommended gh workflows for landing fork-only changes and cherry-picking upstreamable fixes.

Reviewed by Cursor Bugbot for commit d9545ec. Bugbot is set up for automated code reviews on this repo. Configure here.

@McSim85 McSim85 changed the base branch from master to main-qn May 12, 2026 16:39
McSim85 and others added 3 commits May 12, 2026 14:06
quiknode-labs/shredstream-proxy is a fork of jito-labs/shredstream-proxy.
Changes here split into two buckets:

1. Generic improvements (bug fixes, features) that should also flow
   upstream — branch as `feature/*` or unprefixed, optionally PR
   upstream after merging here.
2. Fork-specific overrides (CI, deploy, infra) that should never go
   upstream — branch as `qn/*`.

This PR introduces:

- `.github/PULL_REQUEST_TEMPLATE.md` — checkbox that forces every PR
  author to consciously declare whether the change is upstreamable.
  GitHub renders it as the default body when opening a PR.
- `CONTRIBUTING.md` — branch naming convention, examples, the right
  `gh pr create` invocations for each case, and a note on `gh repo sync`
  for pulling from upstream.

The goal is to make accidental upstream contribution of fork-specific
code unlikely without resorting to maintaining a separate vendor branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Now that `main-qn` exists as the QN-side default branch and `master` is
being repositioned as a clean mirror of jito-labs/shredstream-proxy,
the policy docs need to reflect the new two-branch model.

Changes:

- PR template: target text now references `main-qn` (default) vs
  `master` (upstream mirror). The upstreamable workflow is described
  as "land on main-qn first, then cherry-pick to master and open
  upstream PR" — same pattern, just made explicit.

- CONTRIBUTING.md: rewritten with a clear two-branch table at the top,
  branch-naming rules updated to specify branch-off and PR-target
  separately, full day-to-day workflow for both fork-only and
  upstreamable changes (with the cherry-pick step spelled out), and a
  section on `gh repo sync` for refreshing master from upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds two sections to CONTRIBUTING.md that became relevant after PR #4
(CI fixes) landed and branch protection rulesets were configured:

- "What's currently QN-specific" — lists the three categories of changes
  on main-qn that diverge from upstream: the metric label patch (eligible
  for upstream), the CI workflow overrides (fork-specific), and the
  policy docs themselves. Future contributors can use this as a
  reference for what "broadly useful" looks like vs "QN-only".

- "Branch protection" — explains the two rulesets (master-mirror-lock
  and main-qn-pr-review), why direct pushes to master fail, and which
  CI checks must pass on PRs to main-qn.

No content changes elsewhere in the doc — the two-branch model and
gh CLI invocations are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@McSim85 McSim85 force-pushed the qn/fork-contribution-policy branch from 8228f9e to d9545ec Compare May 12, 2026 18:07
@McSim85 McSim85 requested a review from a team May 12, 2026 18:09
@McSim85 McSim85 merged commit d3c6293 into main-qn May 12, 2026
3 checks passed
@McSim85 McSim85 deleted the qn/fork-contribution-policy branch May 12, 2026 18:56
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.

2 participants