Skip to content

Do not let a clipboard failure replace the snapshot diff - #1907

Merged
SimonCropp merged 1 commit into
mainfrom
fix-clipboard-failure-guard
Aug 29, 2026
Merged

Do not let a clipboard failure replace the snapshot diff#1907
SimonCropp merged 1 commit into
mainfrom
fix-clipboard-failure-guard

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

The clipboard write runs from the OnFirstVerify and OnVerifyMismatch callbacks, which the engine awaits while building the failure, and nothing guarded it. So ClipboardService throwing replaced the snapshot diff with an unrelated error: no xsel or wl-copy on a headless Linux box, or another process holding the Windows clipboard.

That is the same failure mode ClipboardEnabled already avoids for its environment variable parse. Copying the accept command is a convenience, so it now fails quietly to Trace.

No test: making ClipboardService fail on demand needs an environment without a clipboard, and the alternative is injecting a writer purely to exercise a try/catch.

The clipboard write runs from the OnFirstVerify and OnVerifyMismatch callbacks,
which the engine awaits while building the failure, and nothing guarded it. So
ClipboardService throwing replaced the snapshot diff with an unrelated error:
no xsel or wl-copy on a headless Linux box, or another process holding the
Windows clipboard.

That is the same failure mode ClipboardEnabled already avoids for its
environment variable parse. Copying the accept command is a convenience, so it
now fails quietly to Trace.

No test: making ClipboardService fail on demand needs an environment without a
clipboard, and the alternative is injecting a writer purely to exercise a
try/catch.
@SimonCropp SimonCropp added this to the 33.0.0 milestone Aug 29, 2026
@SimonCropp
SimonCropp merged commit f0b82ad into main Aug 29, 2026
6 of 7 checks passed
@SimonCropp
SimonCropp deleted the fix-clipboard-failure-guard branch August 29, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant