Version: plugin 2.1.1, server 0.3.0
Summary
When a local attachment grows beyond maxAttachmentSizeKB, the next authoritative reconcile replaces it on disk with the older remote bytes. No conflict artifact, no Notice.
Path (tag 2.1.1)
src/sync/blobSync.ts:661 - the reconcile size filter drops the oversized file from diskBlobs, but its path remains in crdtBlobPaths.
src/sync/blobSync.ts:704-713 - the "CRDT blob not on disk" branch schedules a download for a path that is on disk.
src/sync/blobSync.ts:876 - processUpload skips the file by size, so the newer local bytes never reach the server.
src/sync/blobSync.ts:1234 - processDownload sees diskHash !== item.hash, re-hashes, finds no change during the download, and takes the overwrite-existing branch via modifyBinary.
Related
src/runtime/capabilityUpdateService.ts:505-514 clamps maxAttachmentSizeKB down to the server's maxBlobUploadBytes and persists it with only a debug log, so a server-side cap reduction pushes every attachment above the new cap into this path.
- Oversized attachments are not counted in reconcile's
skipped and produce no Notice (unlike oversized notes at reconciliationController.ts:552), which is why the overwrite is invisible with debug off.
Repro
- Two devices in sync, attachment
a.png at 1 MB.
- On device A, replace
a.png with a 12 MB file (cap 10240 KB).
- Restart Obsidian on device A (or trigger a reconnect reconcile).
a.png on device A is back to the 1 MB remote copy. The 12 MB file is gone.
Expected
Oversized local attachments are excluded from download as well as upload, or preserved via a conflict artifact, and surfaced with a Notice like oversized notes.
Tests
tests/client/blob-download-conflicts.ts covers race and mismatch quarantine; nothing exercises the size-limit path.
Version: plugin 2.1.1, server 0.3.0
Summary
When a local attachment grows beyond
maxAttachmentSizeKB, the next authoritative reconcile replaces it on disk with the older remote bytes. No conflict artifact, no Notice.Path (tag 2.1.1)
src/sync/blobSync.ts:661- the reconcile size filter drops the oversized file fromdiskBlobs, but its path remains incrdtBlobPaths.src/sync/blobSync.ts:704-713- the "CRDT blob not on disk" branch schedules a download for a path that is on disk.src/sync/blobSync.ts:876-processUploadskips the file by size, so the newer local bytes never reach the server.src/sync/blobSync.ts:1234-processDownloadseesdiskHash !== item.hash, re-hashes, finds no change during the download, and takes theoverwrite-existingbranch viamodifyBinary.Related
src/runtime/capabilityUpdateService.ts:505-514clampsmaxAttachmentSizeKBdown to the server'smaxBlobUploadBytesand persists it with only a debug log, so a server-side cap reduction pushes every attachment above the new cap into this path.skippedand produce no Notice (unlike oversized notes atreconciliationController.ts:552), which is why the overwrite is invisible withdebugoff.Repro
a.pngat 1 MB.a.pngwith a 12 MB file (cap 10240 KB).a.pngon device A is back to the 1 MB remote copy. The 12 MB file is gone.Expected
Oversized local attachments are excluded from download as well as upload, or preserved via a conflict artifact, and surfaced with a Notice like oversized notes.
Tests
tests/client/blob-download-conflicts.tscovers race and mismatch quarantine; nothing exercises the size-limit path.