Repository navigation
fix: pr-bug-scan validated finding from #7310 - #7364
Open
buf0-bot[bot] wants to merge 1 commit into
Open
buf0-bot[bot] wants to merge 1 commit into
buf0-bot[bot] wants to merge 1 commit into
Conversation
Cold-restore branch now clears screen+scrollback before writing daemon scrollback B, gated on the restored-viewport marker that signals saved buffer A was written — blocking A+B duplication.
This branch has not been deployed
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.
Automated fix-PR from pr-bug-scan for parent #7310.
Fixer status:
FIXED_WITH_CODE_PROOFSummary: Cold-restore branch now clears screen+scrollback before writing daemon scrollback B, gated on the restored-viewport marker that signals saved buffer A was written — blocking A+B duplication.
Blocked proof link:
pty-connection.ts:5274 — writeReplayData(connectResult.coldRestore.scrollback) is now preceded by a marker-gated writeReplayData('\x1b[2J\x1b[3J\x1b[H') at pty-connection.ts:5278-5280, which erases buffer A (written by restoreScrollbackBuffers at use-terminal-pane-lifecycle.ts:1412) before B is written, so the newline-scroll blanking at :5300 no longer preserves both copies.Typecheck:
skippedProof (from validator)
code_analysisReproduction
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-connection.test.ts -t "clears restored scrollback before cold-restore"Generated by
pr-bug-scan(proof-machine architecture). Human approval required before merge.ELI5
Automated fix: cold-restoring a terminal could duplicate scrollback (A+B). The screen is cleared before writing daemon scrollback when a restore marker is present.