You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bb85595
Browse filesBrowse the repository at this point in the historyBrowse files
authored and
rsi-pr-agent
committed
fix(fork): folds from a split head cite the old trunk shas (#1600)
## Problem
`fork:fold apply --head <split head>` cites members by their split-head shas.
A repair split replays every commit after the first repair, so those shas sit on no trunk; `prove` passed them as earlier folds and `fork:scan --replay-of` then dropped the owner's exemption.
## Change
- **Apply:** new `--old <pre-split tip>`
- **Cite:** a replayed member cites its `<old>` twin
- **Match:** subject, oldest first (`fork:scan`)
- **Guard:** split head without `--old` refuses
- **No twin:** a fold refuses that member
- **Prove:** refuses an unnamed `Squashes:` sha
The `fork-fold` skill documents `--old`.
Closes#1599
## Refresh onto the V2 trunk
The old head `b9ecfaa5639` sat on the pre-V2 trunk, so against today's `hyprws` the PR showed 100 commits and 100 files.
The branch is now `hyprws` `4899869dfff` plus this one commit.
- **Patch:** byte-identical to `b9ecfaa5639`
- **Size:** 4 files, +172/-19
- **Base:** the 4 files match the old parent
- **Still needed:** new tests fail on trunk
## Scope and approval
Bug tracked as #1599; both close conditions covered.
Jordon approved the refresh.
## Verification
- **Fixture:** a replayed member cites its old sha
- **Unit:** member guard finds an unnamed sha
- **Unit:** accepts an earlier fold's listed member
- **Existing split test:** now passes `--old`
```text
head 794da44, base hyprws 4899869
vp test run scripts/fork-fold.test.ts → exit 0 (38 passed)
without the fix: exit 1 (5 failed, 33 passed)
scripts: vp run typecheck → exit 0
vp run fork:ci → exit 0
```
<details>
<summary>Fresh review at 794da44: nothing blocking</summary>
All four predate the refresh; left as follow-ups to keep scope.
### Refused by prove
- **Shared subject:** remainder takes a twin's sha
- **No split pieces:** apply guard skipped
### Refused by apply
- **Folded remainder:** skill does not say so yet
- **Landed `fixup!`:** asks for `--old`
</details>
Claude Opus 5.5 via Claude Code
## Fork trailers
Fork-Domain: fork-meta
Fork-Tier: core
Fork-Upstreamable: no
Co-authored-by: donjor <[email protected]>
Copy file name to clipboardExpand all lines: .agents/skills/fork-fold/SKILL.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,9 +81,10 @@ Split each one on a detached copy of the head (`git worktree add --detach <dir>
81
81
3. One inseparable remainder: a single `upstream-fixes` commit naming the upstream change it adapts to, without `Fork-Repair`.
82
82
4.`git rebase --continue`. The split head is tree-equal to the old tip.
83
83
84
-
Run the fold with `--head <split head>`: each fixup joins its owner's plan line and squashes there, so the owner's `Squashes:` lists its own old sha, the repair sha, and the repair's references.
84
+
Run the fold with `--head <split head> --old <old>`: each fixup joins its owner's plan line and squashes there, so the owner's `Squashes:` lists its own old sha, the repair sha, and the repair's references.
85
+
A replayed member cites its `<old>` counterpart by subject, since its split sha sits on no trunk.
85
86
`prove` and `publish` take the pre-split tip as `<old>`; a tree-equal fold needs no retest.
86
-
`prove` also refuses a dropped PR link, a commit naming no `<old>` member or touching a path none of its members touched, and an old commit owned by no new commit or by several, unless it carries `Fork-Repair` or every owner cites it under `Squashes:`.
87
+
`prove` also refuses a dropped PR link, a `Squashes:` sha `<old>` never names, a commit naming no `<old>` member or touching a path none of its members touched, and an old commit owned by no new commit or by several, unless it carries `Fork-Repair` or every owner cites it under `Squashes:`.
87
88
88
89
## Stops
89
90
@@ -92,6 +93,7 @@ Run the fold with `--head <split head>`: each fixup joins its owner's plan line
92
93
|`does not apply at its plan position`| Reorder or split that line |
93
94
|`plan does not cover the stack`| Fix the listed shas |
94
95
|`a fixup! member carries no repair line`| Copy `list`'s fixup line into that piece |
96
+
|`--head is a split head`| Pass the pre-split tip as `--old`|
95
97
|`publish` refuses | Read the reason; nothing pushed |
0 commit comments