Skip to content

AI-3202: keep a fork's recall when its cut is empty, and fix stale fork comments - #2683

Merged
Loschcode merged 1 commit into
mainfrom
laurentschaffner/ai-3202-fork-recall-followups
Nov 27, 2026
Merged

Loschcode merged 1 commit into
mainfrom
laurentschaffner/ai-3202-fork-recall-followups

Conversation

@Loschcode

Copy link
Copy Markdown
Contributor

Why

Follow-ups to #2680: https://linear.app/stream/issue/AI-3202/a-reopened-fork-loses-its-parents-turns

What changed

  • carryOn regression.
    • A whole fork of a parent that had recorded no response has an empty cut, so forkRecall returns nil.
    • Before this PR, a fork that ended here then lost the channel recall it was opened with; before AI-3202: a reopened fork keeps its parent's turns #2680 it kept it.
    • The in-process reopen now re-reads the recall only for a fork whose cut has a ResponseID.
  • Stale comments:
    • the Recall doc in session/spec.go: re-reading the parent channel is now only the fallback;
    • ForkPoint.ResponseID in store/session.go;
    • the forkSpec comment, which claimed the parent's channel "already holds both";
    • the comment in shard migration 20270301001930. It is merged but not yet deployed. Only the comment changed, not the SQL.
  • Throttling. The info lines for a deleted parent and a deleted cut are throttled to once a minute per app, like the warns.

Tests

  • New TestAWholeForkOfAParentWithNoRecordedTurnKeepsWhatItWasOpenedWithHere.
    • Setup: the parent's response rows are deleted, so its channel holds turns it never recorded and the whole fork has no cut. The fork then ends in process and is carried on.
    • Assertion: the reopened fork's history starts with what it had before.
    • Result: it fails on main and passes here.
  • ForkReopenSuite, ForkRunningSuite, ResponseBranchesSuite, and the migration and schema tests pass locally.

🤖 Generated with Claude Code

…ork comments (AI-3202)

A whole fork of a parent that had recorded no response has no cut, so
forkRecall hands it nothing; a fork that ended here then lost the
channel recall it was opened with. Only a fork with a cut is re-read.

The deleted-parent and deleted-cut lines are throttled as the warns are,
and the comments on Recall, ForkPoint.ResponseID, the fork_point
migration and forkSpec say what the code now does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Loschcode

Copy link
Copy Markdown
Contributor Author

/jeffery review

@getstream-metis

Copy link
Copy Markdown

Thanks for asking Jeffery for review. I'll stay on this PR until I can approve it.

How it works

  • Findings come as inline comments, each starting with [Must Fix], [Should Fix], nit: or consider:.
  • Push fixes whenever you're ready. Once the branch has been quiet for 10 minutes I review the new head and resolve the threads it fixes. To skip the wait, comment /jeffery review.
  • If you disagree or have a question, reply in the thread. I'll answer there, and resolve it if you're right.
  • I approve once every must-fix and should-fix is closed and nobody has requested changes. CI isn't part of that; branch protection still holds the merge until it's green. From round 3 on, open should-fix findings stop blocking.
  • I don't approve release/* branches or changes to protected paths, and I'll say so when that applies.
  • If a must-fix is still open after round 8, I stop and hand the PR to a human. Draft PRs wait until they're marked ready.

Commands (each as a whole comment)

Command What it does
/jeffery review Review the current head now
/jeffery rereview Start over at round 1 on the current head and withdraw my approval. This redoes the whole review and costs as much as the first one, so use it only when you don't trust the earlier rounds. If nothing changed since my last round I say so instead; add force to redo it anyway
/jeffery pause / /jeffery resume Stop or restart automatic reviews on this PR
/jeffery status What I last reviewed, and why I have or haven't approved
/jeffery help This list

/review-agent or a mention of me works in place of /jeffery.

@getstream-metis getstream-metis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved aa243cddcf61 after 1 round

@Loschcode
Loschcode merged commit 26a72b5 into main Nov 27, 2026
14 of 16 checks passed
@Loschcode
Loschcode deleted the laurentschaffner/ai-3202-fork-recall-followups branch November 27, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant