Skip to content

Commit 5636278

Browse files
JasonVMoCopilot
andcommitted
docs(agents): add upstream-sync forward-port checklist
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent aa4b3be commit 5636278

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
id: fork.upstream-sync
3+
summary: Classify local fixes from a version-sync branch before forwarding them to main.
4+
kind: procedure
5+
status: active
6+
load_when: Reviewing a large upstream version merge or deciding which release fixes to forward-port to main
7+
sources:
8+
- docsite/docs/releases/minor-release.md
9+
- https://github.com/microsoft/react-native-macos/pull/3022#discussion_r3719817893
10+
- https://github.com/microsoft/react-native-macos/pull/3022#discussion_r3722730469
11+
- https://github.com/microsoft/react-native-macos/pull/3099
12+
verified: 2026-10-29
13+
rules: [classify-each-fix, verify-target-branch, preserve-branch-config]
14+
related: [fork.diff-tags, fork.ownership, process.pull-requests]
15+
---
16+
17+
<!-- @format -->
18+
19+
# Forward-porting release fixes
20+
21+
Use when: you review local fixes on a version-sync branch and decide what belongs on `main`. Not for: merging upstream itself; follow the [minor-release procedure](../../../docsite/docs/releases/minor-release.md).
22+
23+
## Rules
24+
25+
- **fork.upstream-sync.classify-each-fix:** Classify every locally authored fix against the exact target branch; don't forward-port a whole release branch or infer applicability from a commit subject.
26+
- **fork.upstream-sync.verify-target-branch:** Inspect the target branch's implementation and later merge branches before proposing a forward-port; cite the commit, file, or call site that supports the classification.
27+
- **fork.upstream-sync.preserve-branch-config:** Keep release-specific configuration on its release branch and verify target-branch settings before copying config changes.
28+
29+
## Procedure
30+
31+
1. Identify the locally authored commits in the sync PR, separately from imported upstream history. Use the merge base and inspect the PR's local commits.
32+
2. Classify each local fix as one of:
33+
- Already present on `main`: cite the matching commit or implementation.
34+
- Already fixed in a later merge branch: cite that branch and fix; don't duplicate it.
35+
- Applicable to `main`: propose a separate forward-port PR, and note its dependencies or stack.
36+
- Release-only: keep version bumps and branch-specific release configuration on the stable branch.
37+
- Not applicable: the target has no corresponding file, implementation, or call site; don't invent one just to carry the patch.
38+
3. Split commits that mix categories when needed. For each decision, inspect the target branch itself and any relevant later merge branch; don't treat an open PR as already merged.
39+
4. Verify configuration against the target. For example, Changesets `baseBranch` is `origin/0.83-stable` on that stable branch and `origin/main` on `main`.
40+
5. Run the relevant checks on each forward-port target. Report the classification, evidence, validation, and any unmerged follow-up.
41+
42+
## Facts
43+
44+
- The 0.83 sync review in [#3022](https://github.com/microsoft/react-native-macos/pull/3022) separated changes already in `main`, fixes to forward-port, stable-only changes, fixes already present in later merge branches, and changes with no matching implementation. The review also kept the stable Changesets base branch distinct from `main`.
45+
- In [#3099](https://github.com/microsoft/react-native-macos/pull/3099), shared fixes were submitted separately to `main`; the review tracked that they were not yet merged rather than calling them landed.
46+
47+
## Pitfalls
48+
49+
- A fix present in a later `*-merge` branch may not belong on `main` yet; trace where the behavior first applies and whether it is already guarded.
50+
- An open forward-port PR is not evidence that the fix has landed. Track its status and stack explicitly.
51+
- A stable-only setting such as Changesets `baseBranch` can break `main` if copied without checking its branch-specific value.

‎.agents/knowledge/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Vocabulary, budgets, and routes are in [taxonomy.yaml](taxonomy.yaml). The table
1515
| [evals.knowledge-checks](evals/knowledge-checks.md) | A knowledge check fails, or you are changing knowledge.mts or its checks | Catalog of the KC checks that knowledge.mts runs on agent knowledge files, with severity and how to fix each failure. |
1616
| [fork.diff-tags](fork/diff-tags.md) | Changing a file that upstream React Native also has, or adding a fork-only file | How to mark macOS changes in shared upstream files so merges and audits can find every fork diff. |
1717
| [fork.ownership](fork/ownership.md) | Adding a file, choosing where fork content goes, or editing configs that upstream also ships | Which paths the fork owns, which it shares with upstream, and which it must never edit. |
18+
| [fork.upstream-sync](fork/upstream-sync.md) | Reviewing a large upstream version merge or deciding which release fixes to forward-port to main | Classify local fixes from a version-sync branch before forwarding them to main. |
1819
| [process.pull-requests](process/pull-requests.md) | Writing a commit or PR title or body, adding a Changeset, or backporting to a stable branch | PR titles, the PR body template, Changesets, and backport conventions for react-native-macos. |
1920
| [testing.rntester-macos](testing/rntester-macos.md) | Building, running, or debugging RNTester-macOS, or validating a native macOS change | Install Pods for and build RNTester-macOS the way CI does, then run it with Metro. |
2021
| [tooling.commands](tooling/commands.md) | Choosing a command to install, build, test, lint, or format, or when a Yarn command fails | Yarn 4 setup and the root commands for building, testing, linting, and formatting react-native-macos. |

0 commit comments

Comments
 (0)