test(e2e): fix pdf-server screenshot flake from random viewUUID#556
Open
test(e2e): fix pdf-server screenshot flake from random viewUUID#556
Conversation
The display_pdf result now includes a random viewUUID in its text content (visible in the first 100 chars of the Tool Result preview), making the pdf-server screenshot non-deterministic. Mask the collapsible panels as done for other servers with dynamic results.
@modelcontextprotocol/ext-apps
@modelcontextprotocol/server-basic-preact
@modelcontextprotocol/server-basic-react
@modelcontextprotocol/server-basic-solid
@modelcontextprotocol/server-basic-svelte
@modelcontextprotocol/server-basic-vanillajs
@modelcontextprotocol/server-basic-vue
@modelcontextprotocol/server-budget-allocator
@modelcontextprotocol/server-cohort-heatmap
@modelcontextprotocol/server-customer-segmentation
@modelcontextprotocol/server-debug
@modelcontextprotocol/server-map
@modelcontextprotocol/server-pdf
@modelcontextprotocol/server-scenario-modeler
@modelcontextprotocol/server-shadertoy
@modelcontextprotocol/server-sheet-music
@modelcontextprotocol/server-system-monitor
@modelcontextprotocol/server-threejs
@modelcontextprotocol/server-transcript
@modelcontextprotocol/server-video-resource
@modelcontextprotocol/server-wiki-explorer
commit: |
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
The
e2ejob is failing on main since #506 merged.Root cause:
display_pdfnow returns"PDF opened. viewUUID: <random-uuid>..."in its text content. The basic-host Tool Result panel shows the first 100 chars of the JSON-serialized result as a preview, which now includes the random UUID — sopdf-server.pngcan never match across runs.Before #506 the result text was just
"Displaying PDF: <url>"(the viewUUID lived only in_meta, past the 100-char preview cutoff).Fix
Add
pdf-servertoHOST_MASKSto mask thecollapsiblePanelelements (Tool Input/Result). Same pattern used byintegration,basic-*, andsystem-monitorservers that have dynamic result content.Next step
After this PR's CI runs, comment
/update-snapshotsto regeneratepdf-server.png— adding a mask changes the screenshot (masked regions render as pink boxes), plus #506 also changed the fullscreen button from⛶to an SVG icon.