docs: state the PDF resource limit, and bring the PNG one up to date - #13
Merged
Merged
Conversation
Two corrections to "What FilePass refuses to spend", both about what the section already claims rather than about anything the code does. PDFs have no unpacking ceiling and the text implied otherwise by saying nothing. FilePass unpacks nothing in a PDF itself; pdf-lib and pdfjs-dist do it while they parse, some of it before FilePass has seen enough of the file to have an opinion. A one megabyte file whose metadata is compressed around a thousand to one expands to roughly a gigabyte and takes the better part of a minute. The 50 MB limit is a limit on the file as it arrives, not on what it turns into, and that distinction is the part a reader could not previously have known. What it costs was measured: the file is still read correctly, the copy is still verified honestly, the page does not freeze and the tab does not fall over. The cost is time and memory on the reader's own device, and this version accepts it and says so. The PNG paragraph had been accurate until the shared budget landed, and then quietly was not: it still described one megabyte per chunk and eight per file, with no mention of the sixteen megabyte profile ceiling or the shared total that stops text and profile being added together. Left alone it would have sat beside the new PDF paragraph contradicting it. Documentation only. No product code, no test, no fixture. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Review of #13. Two overstatements, both in the direction that flatters FilePass. "PDFs have no such ceiling" reads as a statement about the format and about both libraries. The audit was narrower: no bound was found in the paths FilePass uses, which is not the same as none existing anywhere. Now says FilePass has no corresponding ceiling for the PDF paths it uses today. "The page does not freeze, the tab does not fall over, and no verdict changes" turned a measurement into a guarantee. It held in the browser cases measured, up to a 1 GiB expanded payload; weak devices and behaviour near the 50 MB input cap were never tested. Now stated in the past tense and scoped to those cases. Nothing else changed. The rewrap keeps the wording identical.
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.
Documentation only. One file,
README.md, +20 / −4. No product code, no test, no fixture.This is the v0.1 half of the decision in #10 (
B) document/accept for v0.1, harden later).Option 1 there was mandatory rather than optional: a limit nobody states is an unnoticed one,
not an accepted one.
Both changes land in What FilePass refuses to spend, and they are separate things.
1. PDF — the limit that was never stated
The section described a PNG ceiling and said nothing about PDFs, which implied a symmetry that
does not exist. FilePass unpacks nothing in a PDF itself:
pdf-libandpdfjs-distdo it whilethey parse, and some of it happens before FilePass has seen enough of the file to have an
opinion about it.
The sentence that carries the actual correction:
That distinction is the part a reader could not previously have worked out. A one megabyte file
whose metadata is compressed around a thousand to one expands to roughly a gigabyte and takes
the better part of a minute.
The paragraph is equally explicit about what the cost is not, because that is what makes
accepting it defensible rather than resigned. Measured in #8 and #10, up to a 1 GiB payload:
the file is still read correctly, the cleaned copy is still verified honestly, the page does not
freeze, the tab does not fall over, and no verdict changes. What it spends is time and memory on
the reader's own device.
2. PNG — bringing an existing claim up to date
The PNG paragraph was accurate when written and quietly stopped being so when the shared budget
landed in #6. It still described one megabyte per chunk and eight megabytes for a whole file,
with no mention of the sixteen megabyte colour-profile ceiling or the shared total that stops
text and profile being added together to claim more than either.
Not new scope: it is the same section, the same subject, and leaving it would have placed a
stale claim directly beside a new honest one. Nothing about the code changes — this describes
what #6 already shipped.
Gates
tsc --noEmitvite buildnpm audit --audit-level=highgit diff --checkgit diff audit/git status --porcelainafter the commitNot in this PR
The hardening the decision deferred is tracked in #12, with the concurrency guard and the
cancellation architecture kept as separate workstreams on purpose. No tag, release or deploy
proposed.
🤖 Generated with Claude Code