Repository navigation
Commit 2cb66a3
fix(fork-sync): reruns continue the rebase, fork:ci gates the candidate, tip commits survive a recreate (#1833)
## Problem
The `v0.1.3-nightly` sync that landed `a4050c5` needed extra reruns and hand steps.
## Change
| Snag | Fix |
| --- | --- |
| Hand `rebase --continue` skipped regeneration | Rerun continues the rebase |
| Issue title renamed across reruns | Title names step and tag only |
| Lint red found after an hour of remote CI | Local `fork:ci` gates the push |
| Wait ran past a failed job | Returns at the first failed job |
| Recreate dropped tip commits | Tip commits cherry-pick over |
| Failed setup or pick lost the carry | Carry refs hold it until it lands |
| Killed removal left state; reruns crashed | State goes first; ancestry check runs first |
| Gate ran on pre-rebase deps | Frozen install runs before the gate |
| Fixup owner rule unstated | Docs and skill name it |
| CI `fork:fixup-fold` red on a blobless clone | Replay runs in a scratch repository |
Unblock drops from six steps to five; a lease refusal is a plain rerun.
### Fixup-fold in CI
CI's `blob:none` clone also fetches `sync/candidate`, which holds already-folded blobs.
In a promisor clone, merge-ort skips writing a folded blob another ref already names, then the checkout lazy-fetches it; `GIT_NO_LAZY_FETCH=1` makes that fatal.
The replay now runs in a throwaway `git init` that borrows the objects through `alternates` and has no promisor remote, so git writes the blob.
No fixture reproduces the dedupe; proof is a runtime transcript on a fresh blobless clone of the failing head:
| Code | Result |
| --- | --- |
| Before | fatal lazy fetch at `Rebasing (12/279)` |
| After | exit 0 |
`#1834` hits the same CI failure and goes green once this lands.
## Scope and approval
Maintainer request: fix that sync's snags with fewer rounds and steps.
## Verification
| Check | Exit |
| --- | --- |
| `vp test run scripts/fork-sync.test.ts` | 0 (77 passed) |
| `vp run typecheck` in `scripts` | 0 |
| `vp test run scripts/fork-fixup-fold.test.ts` | 0 (8 passed) |
| `vp run fork:ci` | 0 |
- **New test:** red local `fork:ci` refuses the push
- **Recreate test:** both tip kinds carry
- **Carry tests:** conflict, setup, killed removal
- **Old driver:** fails all 5 new or changed tests
- **Not run live:** the gate in a real sync worktree
Claude Opus 5.5, Claude Code in T3 Code.
## Fork trailers
Squashes:
- d3d29df fix(fork-sync): reruns continue the rebase, fork:ci gates the candidate, tip commits survive a recreate (#1833) (#1833)
- 436ae20 fixup! fix(fork-sync): reruns continue the rebase, fork:ci gates the candidate, tip commits survive a recreate (#1833) (#1833)
Fork-Domain: fork-meta
Fork-Tier: bugfix
Fork-Upstreamable: no
Co-authored-by: donjor <[email protected]>1 parent 80b6e0f commit 2cb66a3
6 files changed
Lines changed: 441 additions & 176 deletions
File tree
- .agents/skills/fork-sync
- docs/fork/operations
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
86 | 87 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 119 | + | |
| 120 | + | |
120 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 126 | + | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
120 | | - | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | | - | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | | - | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
| |||
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
247 | 252 | | |
248 | 253 | | |
249 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
45 | | - | |
46 | | - | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
| |||
66 | 59 | | |
67 | 60 | | |
68 | 61 | | |
69 | | - | |
70 | 62 | | |
71 | 63 | | |
72 | 64 | | |
| |||
86 | 78 | | |
87 | 79 | | |
88 | 80 | | |
89 | | - | |
90 | | - | |
| 81 | + | |
| 82 | + | |
91 | 83 | | |
92 | | - | |
93 | 84 | | |
94 | 85 | | |
95 | 86 | | |
| |||
112 | 103 | | |
113 | 104 | | |
114 | 105 | | |
115 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
116 | 110 | | |
117 | 111 | | |
118 | 112 | | |
119 | | - | |
120 | 113 | | |
| 114 | + | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
| |||
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
148 | | - | |
149 | 142 | | |
150 | 143 | | |
151 | 144 | | |
| |||
169 | 162 | | |
170 | 163 | | |
171 | 164 | | |
172 | | - | |
| 165 | + | |
173 | 166 | | |
174 | | - | |
175 | 167 | | |
176 | 168 | | |
177 | 169 | | |
| |||
204 | 196 | | |
205 | 197 | | |
206 | 198 | | |
207 | | - | |
208 | 199 | | |
209 | 200 | | |
210 | 201 | | |
| |||
0 commit comments