fix(tui): refuse empty truncation on prompt.submit to prevent silent session wipe (#70516) - #70718
Closed
webtecnica wants to merge 1 commit into
Closed
fix(tui): refuse empty truncation on prompt.submit to prevent silent session wipe (#70516)#70718webtecnica wants to merge 1 commit into
webtecnica wants to merge 1 commit into
Conversation
…cript P1: A stale truncate_before_user_ordinal from a desynced frontend (e.g. ordinal=0 on an ordinary prompt.submit) causes replace_messages() to silently DELETE all session messages — an unrecoverable data loss. Changes in tui_gateway/server.py prompt.submit handler: - Add guard: refuse empty truncation (truncated == []) unless the client explicitly passes confirm_empty_truncate=true. - Log every truncation (history N -> M, ordinal=k) so future incidents are traceable in agent.log. Fixes NousResearch#70516
Collaborator
Duplicate of #70570. It covers the same empty prompt.submit truncation guard, uses strict confirmation parsing, and updates intentional Desktop first-turn flows. |
Collaborator
|
Closing as the fix has been merged to main in commit 819e01c by @HexLab98 (#70570), which implements the same guard using |
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.
Problem
Stale truncate_before_user_ordinal=0 from a desynced frontend causes replace_messages() to DELETE all session messages silently (observed: 308 messages lost). No log, no confirmation.
Fix
Fixes #70516