Repository navigation
app/: MCP upload_snapshots parses and decodes nothing in the app process (sc-8999) - #131
Merged
Merged
Conversation
…ess (sc-8999) MCP's classify fingerprinted every uploaded file in the app process, PDFs included (lopdf on customer documents), though docs/design.md says customer PDFs are parsed only on the render node. It now works out only the kind, the content type and a text's SHA-256, and registers images and PDFs by their hash alone through #127's path: an image's pixel fingerprint is computed in processing, and a PDF takes the fingerprint its renderer reports once it's drawn. An undecodable image now fails its snapshot in processing ("the image couldn't be read") instead of failing the upload call.
ndbroadbent
force-pushed
the
app-mcp-no-inprocess-fingerprints
branch
from
December 3, 2026 11:29
f4c8b42 to
0c4f3ef
Compare
This was referenced Dec 3, 2026
Merged
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.
Follow-up to #127 (sc-8999). MCP
upload_snapshotsfingerprinted every uploaded file in the app process, parsing customer PDFs with lopdf and decoding images there, though docs/design.md says customer PDFs are parsed only on the render node.classifynow works out only the kind, the content type and a text's SHA-256. Images and PDFs are registered by their hash alone through #127's sha256-only path:processing::fill_image_fingerprints), outside any transaction;document_fingerprint), or the blob's when it was drawn before.Behaviour change: an image that can't be decoded used to fail the
upload_snapshotscall ("decoding the image"); now its snapshot fails in processing ("the image couldn't be read"), as with the CI API.Tests
New
app/tests/mcp_uploads.rs: an MCP upload of a PDF (deliberately one lopdf can't parse, so an in-app fingerprint would have been its SHA-256) and a PNG registers both with an empty fingerprint and no fingerprint on the PDF's blob. After finalize the image has its pixel fingerprint from processing. After the renderer draws the PDF and reportsdocument_fingerprint, the snapshot and blob take that value and the build completes.Gates on agents-build-1, rebased on main with #127: app
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings, fullcargo test --lockedall pass; the MCP golden files are unchanged.Shortcut: sc-8999
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.