Repository navigation
[Engine] Fix a crash on restore: resume at the mounted depth, not the prompt's prefix (1/4 of #7648) - #7650
Open
giphoo wants to merge 1 commit into
Open
[Engine] Fix a crash on restore: resume at the mounted depth, not the prompt's prefix (1/4 of #7648)#7650giphoo wants to merge 1 commit into
giphoo wants to merge 1 commit into
Conversation
…common prefix (Niko1221#7648) Two admissions asked the restored image for a checkpoint of exactly the common-prefix length. When the image's live state is longer than the prompt (a fork reading a prefix of it), that length is no checkpoint's depth: the lookup found nothing and the engine ended with "ERR restoring a conversation checkpoint failed". - SSD tier: the resume lands on the deepest checkpoint at or below the prefix; with none, the prompt is read from 0 rather than mounting a state the request overwrites. - Borrowing a parked conversation whose match was its live state: the borrow mounts that state, so the resume is a live mount. A checkpoint match keeps its depth, which is a checkpoint. Fixes Niko1221#7648.
|
Thanks for the pull request. To keep the tracker readable, every item needs an area prefix in the title and the parts of the pull request template filled in. This one is missing:
Edit the pull request (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment Details: CONTRIBUTING.md |
|
Thanks, this follows the format now. |
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.
Part 1/4 of #7648 — the smallest and most urgent piece: a real crash on the restore path.
Problem and result
Before: when a restore lands at a checkpoint depth (a fork, or a partial mount), the engine asks for a checkpoint of exactly the common-prefix length. If none exists, it answers
ERR restoring a conversation checkpoint failedand exits.After: the engine resumes at the depth actually mounted, and treats a partial mount as a live state. The failing case no longer occurs.
Background
Long agent conversations that alternate between sessions need the on-disk conversation cache. When a restore lands at a checkpoint depth (a fork, or a partial mount), the engine can exit.
The bug
Two admissions ask the restored image for a checkpoint of exactly the common-prefix length. When the image's live state is longer than the prompt (a fork reading a prefix), no such checkpoint exists, so the engine answers
ERR restoring a conversation checkpoint failedand exits.This happens on the native path too — it is not specific to our additions.
The fix
incoming->live.ids.size()), not at the prompt's common prefix;Review focus
Validation
rc=0, zero errors;ERR restoring a conversation checkpoint failed) no longer occurs.Fixes part 1/4 of #7648. Parts 2–4 follow in order.