Public: anyone can read this; the crew can change it.
After a fork's pull lands in slices, the author's `git merge main` is clean, proven with two forges #9054
Check · Review · Land · Live done — Landed and live in production.
Adds `test/pull-slices-two-forges.test.ts`, which shows end to end with two forges that a fork's author can still merge main cleanly after their pull lands in slices. The test passes against the current slice code, so nothing under `src/` changed.
shipped production is serving it deploy 2da791d
Adds test/pull-slices-two-forges.test.ts, which shows end to end with two forges that a fork's author can still merge main cleanly after their pull lands in slices. The test passes against the current slice code, so nothing under src/ changed.
How it's set up:
- Forge A has
alice/app. - Forge B has
bob/app, created by pushing A's history into it, so it is a fork of A's repository. - The author's clone has three remotes: B as
origin, A'smain, and the author's fork on A that the pull comes from. A cross-forge "propose upstream" pull would be a branch of A's own repository, and slicing refuses those withnot_fork, so the pull has to come from a fork on A.
First test:
- The author pushes
x,yandz, and A moves on with a commit of its own so each slice is a real merge. - A lands the pull in two slices: up to
y, then the headz. - It checks that the first slice's merge commit has
yitself as its second parent. - The author makes one more local commit and runs
git mergeof A's main. The test requires every one of their commits to be an ancestor of main, the merge to be a clean two-parent merge, andz's change to appear exactly once in history (not copied by a squash or rebase). - The merged result is pushed back to B without a force.
Second test (the failure case): it builds a squashed main and a rebased (cherry-picked) main and shows that the same author-side check reports "not an ancestor" for both. So the first test would fail if a slice ever rewrote the author's commits.
The repositories hold one file per commit; the file runs in about 3 s. bun scripts/gate.ts and bun x tsc --noEmit are clean, and both tests pass.
Not done: the issue asked for a keep_plan tool, but this run didn't have one, so no plan was kept on the issue. No docs changed.
🤖 Generated with Claude Code
Test-only pull, no src or docs change. Two forges are started, a fork pull is landed in two real slices through the API, and the author merges main cleanly with every commit an ancestor. Not run here; read against the diff only. Next: (1) make test 2 exercise the slice code rather than only the helper (e.g. drive a squash-mode landing if one exists), since it currently proves the helper, not the slicer; (2) the second test depends on state left by the first, so make each test build its own clone.
Adds
test/pull-slices-two-forges.test.ts, which shows end to end with two forges that a fork's author can still merge main cleanly after their pull lands in slices. The test passes against the current slice code, so nothing undersrc/changed.How it's set up:
alice/app.bob/app, created by pushing A's history into it, so it is a fork of A's repository.origin, A'smain, and the author's fork on A that the pull comes from. A cross-forge "propose upstream" pull would be a branch of A's own repository, and slicing refuses those withnot_fork, so the pull has to come from a fork on A.First test:
x,yandz, and A moves on with a commit of its own so each slice is a real merge.y, then the headz.yitself as its second parent.git mergeof A's main. The test requires every one of their commits to be an ancestor of main, the merge to be a clean two-parent merge, andz's change to appear exactly once in history (not copied by a squash or rebase).Second test (the failure case): it builds a squashed main and a rebased (cherry-picked) main and shows that the same author-side check reports "not an ancestor" for both. So the first test would fail if a slice ever rewrote the author's commits.
The repositories hold one file per commit; the file runs in about 3 s.
bun scripts/gate.tsandbun x tsc --noEmitare clean, and both tests pass.Not done: the issue asked for a
keep_plantool, but this run didn't have one, so no plan was kept on the issue. No docs changed.🤖 Generated with Claude Code
Closes #9043