chadtmiller.com/monolith
An atproto PDS
0
0
The largest blob is PDS_BLOB_UPLOAD_LIMIT, as the reference's
Merged Approved
This makes the blob upload limit configurable through PDS_BLOB_UPLOAD_LIMIT, defaulting to 5 MiB. uploadBlob, describeServer and the space importRepo all read it, and the spec, the guides and the harness change with the code.
- Code: the old space
importRepobound inbody_limitis replaced byarchive_limit, wired into bothread_limitand the handler's own size check. The otherbody_limitcallers I looked at are JSON or proxy paths, so the move is consistent. I did not read the one atspace_repo.rs:1198. - Spec: LIMITS.md, BLOBS.md and SPACES-EXPORT.md all carry the variable and its default, as do
deploying.mdandcomparing.md. - Harness: the new checks only add comparisons.
uploadSizecompares with the reference, andspaceImportSizeis held to the spec because the reference serves no spaces there. The limit 6291459 is past the default and not round, so a server that keeps the default or rounds would be caught. Other runs keep the default. - Server code: it adds no crates and takes nothing from the reference's source.
I only read the diff and searched the code. I did not run the checks. The PR body states that just quick passed and that the new checks fail against the old server.
Approved
Since the approved commit, the pull only reformats two spots: read_whole's signature in blobs.rs and the blob_upload_limit line in Config. Nothing about behaviour changes, so the earlier approval stands. I read only this diff and ran no checks.
Merged as 23b5458
The largest blob the server takes is now set by
PDS_BLOB_UPLOAD_LIMIT, under the reference's name, rather than fixed at 5 MiB, so that a server taking accounts from a reference PDS configured for video can take their blobs. The default is unchanged.Claude Opus 5.5 · high
What changes
spec/LIMITS.md, BLOBS.md, SPACES-EXPORT.md.
PDS_BLOB_UPLOAD_LIMIT, in LIMITS.md's environment table: the bytesuploadBlobtakes anddescribeServeranswers asblobUploadLimit, and the bytes of a space repo's archivecom.atproto.space.importRepotakes, 5242880 unless set.uploadBlob's and the spaceimportRepo's size steps name it. "How it is checked" says what--limitsdoes with it.harness. In
--limits, both sides start with the limit at 6291459 (LIMITS_UPLOAD_LIMITinlib/env.mjs): past the default and not round. Two checks inchecks/limits.mjs:uploadSize, against the reference:describeServer'sblobUploadLimit, thenuploadBlobof a body a byte past 5 MiB, one at the limit and one a byte past it, each with its length or chunked, compared whole.spaceImportSize, against the spec, as the reference here serves no spaces: a spaceimportRepoof a body a byte past 5 MiB is400 InvalidRequest(no archive), and one a byte past the limit is413 PayloadTooLarge.Every other run keeps the default, which
checks/blobs.mjsstill compares with the reference's.crates/pds-server.
Config::blob_upload_limit, read from the variable;uploadBlob,describeServerand the spaceimportRepo's read and size check take it.blobs::UPLOAD_LIMITbecomesDEFAULT_UPLOAD_LIMIT, andlimits::MAX_REPO_ARCHIVE_BODYgoes, replaced bylimits::archive_limit.docs/guide. The variable in
deploying.md's table, with when to raise it;comparing.md's--limits.Why
Moving a reference PDS's accounts here copies each blob with
uploadBlob(spec/MIGRATION.md, "The move", step 4). A reference PDS that serves the Bluesky app takes videos as blobs, so its upload limit is raised past 5 MiB. Here that limit could not be raised, solistMissingBlobsnever emptied for any account holding such a blob. The reference reads the limit fromPDS_BLOB_UPLOAD_LIMITand bounds every body that is neither JSON nor text by it, the spaces alpha'simportRepoarchive among them, so the server does the same, as LIMITS.md's "as large as the largest upload" already said.How it was checked
--limits --only uploadSizefails ondescribeServer(5242880 where the reference says 6291459), and--only spaceImportSizeon a body a byte past 5 MiB (413where the spec says400).uploadBlobkeeping the default whiledescribeServeranswered the variable.uploadSizefails on the 5242881-byte upload,200on the reference and413on the server. Put back.just quick.Shortcomings
The spaces run (
harness/spaces/compare.mjs) still runs its alpha reference and the server at the default only. A spaceimportRepounder a limit that is set is held to the spec, not compared with the alpha.