fix(server): preserve Claude rewind across fork history changes - #612
Conversation
…954) Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit eed974c122e192de45b54b7dac7ca1a51448c08f)
…nd rollback ownership Cover fork ancestry reordering, changed history lengths with interleaved system notices, negative conversation offset rejection, target validation (integers >= 1), empty session history, unresolvable turn boundaries, original session ownership preservation on failure, and stale session fencing during fork history reads.
…startup fencing test
Startup event stamp fencing tests used synthetic message content { content: uuid },
which made mock fork message bodies ('fork-user-1') diverge from retained ancestry
('user-1'). Under PR #11954 turn remapping, ancestry divergence correctly rejects
the fork before session restart, leaving the stamp hook unresolved and hanging the
test. Strip the fork prefix so test mock messages model genuine fork message retention.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Independent Antigravity adversarial review completed on author head The reviewer found the nine startup-stamp fixture failures; these are resolved by preserving message bodies across simulated forks. The reviewer rechecked the final fixture correction and additional adversarial cases and reported no remaining blockers. Original and corrected validation runs confirm 9 failures / 164 passes before the fixture fix, then 173 / 173 passes after it. Production deep-content validation was not weakened. Review covered suffix alignment, duplicate message bodies, metadata omission/insertion, tool results and steering, UUID remapping, reset-all, failed-fork state preservation, stop/replacement fencing, and account-scoped history workers. Server typecheck and targeted lint passed. Native paid-provider execution is not claimed. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Claude native forks can retain the correct conversation while changing system-message history length. Rewind now validates retained conversation bodies and remaps their fork UUIDs, preserving Pylon’s session ownership and checkpoint guards.
Adopts upstream #11954, source
eed974c122e192de45b54b7dac7ca1a51448c08f, with original author maria and coauthor provenance preserved. Part of #611; frozen upstream head6d1d549441be84f19696ab59ed7e2fbf305280d4. The review cursor remains unchanged.Validation:
Implementation and adversarial review used Gemini 3.8 Flash High through Pylon’s Antigravity delegation; integration and verification used GPT-6 through Codex.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.