Repository navigation
Commit 985a836
fix(fork-sync): a stopped sync workspace builds and its report keeps every stop (#1501)
## Problem
A stopped sync left `.t3/fork-sync/worktree` without dependencies, so `tsc` was missing mid-conflict.
A rerun that adopted a hand-finished rebase reported `conflicts: []`, losing every stop's rows.
The report also carried a `rerere` block hard-coded to `false`.
## Change
| Part | Change |
| --- | --- |
| Setup | a new sync worktree runs the `t3.json` `runOnWorktreeCreate` step (`scripts/setup-worktree.ts`) |
| Setup env | the battery's scrubbed env plus `T3CODE_PROJECT_ROOT` and `T3CODE_WORKTREE_PATH` |
| Skip done work | an adopted worktree never reruns setup |
| Battery install | only when the tip changed the dependency set setup installed, or nothing was installed |
| Linking | `linkInstalledModules` removed; setup's real install replaces it |
| Stop rows | persist in `.t3/fork-sync/worktree.json` after each run |
| Report | `conflicts[]` carries every stop on the kept worktree, in stop order |
| Block issue | the subject line follows the blocking commit's row |
| Schema | `rerere` removed from the report and the run |
| Docs | fork-sync guide and skill |
Stop rows live in the worktree state file, not the report.
It shares the worktree's tag, target, and lease key and its lifetime.
A crash run rewrites the report with `conflicts: []`, but leaves the state file.
Rebased on #1500; its routes are unchanged.
Its held-lockfile test now expects the carried `shared.txt` manual row.
Two route-tree comments no longer claim the sync worktree has no `node_modules`.
#1495 is not addressed.
## Scope and approval
Closes #1490.
Its Decision table sets the scope.
## Close conditions
- [ ] **Setup test:** deps exist at the first stop
- [ ] **Report test:** adopted stop keeps its rows
- [ ] **Schema:** no `rerere` field
## Verification
| Condition | Test |
| --- | --- |
| Setup | `runs the repo's worktree setup once, so the first stop already has its dependencies` |
| Report | `stops at a conflict rerere and hooks cannot resolve, then applies after a hand resolution` |
| Schema | `writes no rerere field and still reads a report that carries one` |
| Install skip | `skips a second install when the tip kept the dependency set setup installed` |
The real setup command in a detached `origin/hyprws` worktree exited 0 in 13.5s, leaving `node_modules/.bin/tsc`.
In a set-up worktree, both generator routes exit 0: `vp install --lockfile-only` there, and `fork:regenerate-route-tree` from the root.
<details><summary>Commands</summary>
```text
vp run fork:ci → exit 0
vp run fork:delta --check → exit 0
vp run --filter @t3tools/scripts typecheck → exit 0
vp test run fork-sync.test.ts → exit 0 (57 passed)
```
</details>
Claude Opus 5.5 in Claude Code.
## Fork trailers
Squashes:
- 982fe93 fix(fork-sync): a stopped sync workspace builds and its report keeps every stop (#1501) (#1501)
- 63dae4d fixup! fix(fork-sync): a stopped sync workspace builds and its report keeps every stop (#1501) (#1501)
Fork-Domain: fork-meta
Fork-Tier: core
Fork-Upstreamable: no
Co-authored-by: donjor <[email protected]>1 parent 61f197e commit 985a836
5 files changed
Lines changed: 274 additions & 139 deletions
File tree
- .agents/skills/fork-sync
- docs/fork/operations
- scripts
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
119 | 129 | | |
120 | 130 | | |
121 | 131 | | |
| |||
293 | 303 | | |
294 | 304 | | |
295 | 305 | | |
296 | | - | |
| 306 | + | |
| 307 | + | |
297 | 308 | | |
298 | 309 | | |
299 | 310 | | |
300 | 311 | | |
301 | 312 | | |
302 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
303 | 379 | | |
304 | 380 | | |
305 | 381 | | |
| |||
746 | 822 | | |
747 | 823 | | |
748 | 824 | | |
749 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
750 | 829 | | |
751 | 830 | | |
752 | 831 | | |
| |||
937 | 1016 | | |
938 | 1017 | | |
939 | 1018 | | |
940 | | - | |
941 | 1019 | | |
942 | 1020 | | |
943 | 1021 | | |
| |||
979 | 1057 | | |
980 | 1058 | | |
981 | 1059 | | |
982 | | - | |
983 | 1060 | | |
984 | 1061 | | |
985 | 1062 | | |
| |||
1861 | 1938 | | |
1862 | 1939 | | |
1863 | 1940 | | |
1864 | | - | |
| 1941 | + | |
1865 | 1942 | | |
1866 | 1943 | | |
1867 | 1944 | | |
| |||
1884 | 1961 | | |
1885 | 1962 | | |
1886 | 1963 | | |
1887 | | - | |
| 1964 | + | |
1888 | 1965 | | |
1889 | 1966 | | |
1890 | 1967 | | |
| |||
1905 | 1982 | | |
1906 | 1983 | | |
1907 | 1984 | | |
1908 | | - | |
| 1985 | + | |
1909 | 1986 | | |
1910 | 1987 | | |
1911 | 1988 | | |
1912 | | - | |
1913 | | - | |
1914 | 1989 | | |
1915 | 1990 | | |
1916 | 1991 | | |
1917 | 1992 | | |
1918 | 1993 | | |
1919 | | - | |
| 1994 | + | |
1920 | 1995 | | |
1921 | 1996 | | |
1922 | 1997 | | |
| |||
1927 | 2002 | | |
1928 | 2003 | | |
1929 | 2004 | | |
1930 | | - | |
1931 | 2005 | | |
1932 | 2006 | | |
1933 | 2007 | | |
| |||
1939 | 2013 | | |
1940 | 2014 | | |
1941 | 2015 | | |
1942 | | - | |
| 2016 | + | |
1943 | 2017 | | |
1944 | 2018 | | |
1945 | | - | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
1946 | 2023 | | |
1947 | | - | |
1948 | | - | |
| 2024 | + | |
| 2025 | + | |
1949 | 2026 | | |
1950 | 2027 | | |
1951 | 2028 | | |
| |||
0 commit comments