Repository navigation
Conversation
…oved Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
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. |
Owner
Author
|
Randy reviewed head 6940c4a. The fixes from the #259 review are verified:
117 targeted tests passed, and so did the 7 package typechecks and changed-file lint. Still needed:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #259, covering Randy's post-merge review (#259 (comment)) and his review of this PR. A history trim checked eligibility once per thread, so a thread opened mid-pass still lost rows. Its deletes bypassed the event log: the snapshot sequence stayed the same for the thread and its forks, live clients and the timeline and search caches kept stale rows, and the preview counted ancestors the delete keeps.
Fix
thread.history-trimmednames the source thread and the turn items and nodes removed from it. The source's projection deletes those rows when it applies the event, in the same transaction that appends it. Every live fork of the source (at any fork depth; side chats inherit nothing) gets its own durable copy on its own stream. Each affected thread's sequence advances, so the timeline index and ThreadFind refresh, live web and mobile clients apply the event inclient-runtime, and a reconnect replays it. Older clients skip the unknown event type. Trim events don't count as thread activity, so threads keep their place in lists sorted by activity.EventSink.writeBuiltbuilds a write's events inside the commit transaction. Each page of up to 200 rows rechecks the current setting and the thread's idle eligibility there. A thread that is opened, messaged, run, pinned, snoozed or PR-linked stops its trim; setting trimming to 0 stops the whole pass.Tests (
ThreadHistoryTrim.test.ts,orchestrationV2Projection.test.ts)send_to_user, HTML renders, MCP apps,delegate_task) survive a trim. They stay in the snapshot timeline (which transcript export uses), the wire snapshot web and mobile receive, and the rows thread transfer reads. These pass on main too; they guard against regressions.The 30-day default and the opt-in behaviour are unchanged.
vp run check:changedpasses: format, lint, knip, typecheck of 37 packages, and the tests beside the changes.Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code