mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5503] [Engine] Allow session snapshots without a draft layer #5482
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5482
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/5503
Author: @giphoo
Created: 11/7/2026
Status: 🔄 Open
Base:
main← Head:fix/optional-draft-snapshot📝 Commits (1)
2b2df49Allow session snapshots without a draft layer📊 Changes
2 files changed (+13 additions, -3 deletions)
View changed files
📝
include/strata/core/conversation_snapshot.hpp(+4 -0)📝
src/core/conversation_state.cpp(+9 -3)📄 Description
Problem and result
Session save/restore fails when the engine runs DFlash2 without an MTP draft layer.
conversation_snapshot_sources()always required aQsaState&reference and emitted exactly one draft KV source, even when no draft KV exists.After this change, a
QsaState*overload omits the draft K/V source whennullptris passed. The existing reference version delegates to the new pointer version.Related discussion
none
Approach
DFlash2 can run without MTP, in which case there is no draft-layer KV state to serialize. The old code unconditionally dereferenced the draft parameter and emitted
layers + 1K/V sources. This adds a nullable-pointer overload and makes the draft source conditional.No default behavior changes when a draft is present.
Validation
Passed (reference implementation, Linux/HIP, AMD W7900, DFlash2 spec 6 without MTP):
invalid K/V extentFailed: none observed
Not run:
Limits
None identified beyond the scope: this only affects
conversation_snapshot_sourcesand callers that passnullptrfor the draft state.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.