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 9fa7d12
Browse filesBrowse the repository at this point in the historyBrowse files
authored and
rsi-pr-agent
committed
fix(fork-sync): a green dry-run keeps its tip for the real sync to publish (#1503)
## Problem
A green `vp run fork:sync <tag> --dry-run` dropped `.t3/fork-sync/worktree`, so its proven tip sat on no ref.
The real run rebased again; rerere replayed the resolutions but not the repairs committed after them, so it could publish a different, red tip.
## Change
| Part | Change |
| --- | --- |
| Dry run | a green dry run keeps the worktree and its state file |
| Report | `decision` names the worktree, `tip`, and `vp run fork:sync <tag>` |
| Real run | adopts the kept tip on the same tag, target, and lease; reruns the battery; pushes that tip |
| Recreate | a moved lease or a new tag still rebases from scratch (existing adoption key) |
| Stops | the dry run's conflict rows still reach the real run's report |
| Docs | fork-sync guide and skill state the dry-run-then-real route |
The real run rechecks rather than trusting the dry run's battery: skipping would need proof the tree and battery are identical.
## Scope and approval
Closes#1495.
## Close conditions
- [ ] Kept: a green dry-run leaves a tip the real run adopts
- [ ] Same tip: the real run after a green dry-run publishes that tip, with the same target and lease
- [ ] Guard: a test fails when a green dry-run drops its tip
- [ ] Runbook: the fork-sync guide states the dry-run-then-real route
## Verification
- `vp test run scripts/fork-sync.test.ts` → 58 passed
- New test: block, hand-resolve, commit a repair, green dry run, real run
- It asserts the kept HEAD, `decision`, pushed tip, carried rows, no `rebase` call
- Guard: with `dropWorktree` restored on the dry-run path, the new test fails
- `vp run fork:ci` → exit 0
- `vp run typecheck` (scripts) → exit 0
Claude Opus 5.5 via Claude Code.
## Fork trailers
Fork-Domain: fork-meta
Fork-Tier: core
Co-authored-by: donjor <[email protected]>
0 commit comments