Fold review findings into the conversation-forking plan - #504
Merged
Conversation
An independent review of the plan surfaced one real design bug and several gaps; this folds the fixes in before implementation starts. The GC now specifies a single leaf-to-root pass. The prior two-phase design (trim segments, then drop empty threads) deadlocks on chains of collectible hidden threads, because each child's restrict fork-point FK blocks deleting its parent's rows until the child thread row is gone. Cursor seeding at fork creation is dropped for null cursors: a fork's empty segment already keeps claim RPCs quiet, and per-thread cursor reads can never reach the inherited prefix, so seeding bought nothing but a cross-thread cursor oddity. M1 gains the SQL half of the ordering switch (~14 per-thread order-by-created_at sites in schema.sql RPCs that would otherwise disagree with position ordering about which row is terminal), M3 gains an enumerated hidden-filter checklist, and the design notes now cover the streaming loop's browser-supplied transcript, the recovery-synthesis-in-shared-prefix edge case, and a digest title mitigation.
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.
Doc-only amendment to the forking plan, folding in the findings from an independent review: the GC becomes a single leaf-to-root pass (the two-phase trim-then-drop design deadlocks on chains of collectible hidden threads via the restrict fork-point FK), null cursors replace fork-point seeding (a fork's empty segment already keeps claim RPCs quiet; per-thread cursor reads can never reach the inherited prefix), M1 gains the SQL half of the ordering switch (~14 per-thread order-by-created_at sites in schema.sql RPCs), M3 gains an enumerated hidden-filter checklist, plus notes on the streaming loop's browser-supplied transcript, the recovery-synthesis edge case in shared prefixes, and a digest hidden-title mitigation.
Generated by Claude Code