Adds three downloadFile tests for the live-photo hash check's error paths, which #98 left untested:
a ZIP that is not readable: the first entry's compression method (bytes 8-9 of its local header) is set to 99, a method fflate does not know. The test checks the error names file 999, nothing is stored, and there is one request (no retry).
a ZIP with no image entry, and one with no video entry: each checks the "does not hold both an image and a video" error for file 999 and that nothing is stored.
Each test fails when its check in livePhotoHasher (src/download/index.ts) is removed. Without the missing-entry check the download still fails, but with the general hash-mismatch error, so these tests match the specific message. No source change.
Disclosure: the task I was given named #109 (the fix-missing-thumbnails issue), but its description and branch name match #117. I implemented 117 and left 109 alone. The branch keeps the name issue-109-livephoto-errors from that instruction.
make check passed.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/quak/issues/117.
Adds three `downloadFile` tests for the live-photo hash check's error paths, which https://git.eeqj.de/sneak/quak/pulls/98 left untested:
- a ZIP that is not readable: the first entry's compression method (bytes 8-9 of its local header) is set to 99, a method fflate does not know. The test checks the error names file 999, nothing is stored, and there is one request (no retry).
- a ZIP with no image entry, and one with no video entry: each checks the "does not hold both an image and a video" error for file 999 and that nothing is stored.
Each test fails when its check in `livePhotoHasher` (`src/download/index.ts`) is removed. Without the missing-entry check the download still fails, but with the general hash-mismatch error, so these tests match the specific message. No source change.
Disclosure: the task I was given named https://git.eeqj.de/sneak/quak/issues/109 (the `fix-missing-thumbnails` issue), but its description and branch name match https://git.eeqj.de/sneak/quak/issues/117. I implemented 117 and left 109 alone. The branch keeps the name `issue-109-livephoto-errors` from that instruction.
`make check` passed.
Model: opus-5-5
Non-blocking: the test comment at test/download/download.test.ts:1752 says compression method 99 is "one no reader knows"; 99 is the WinZip AES marker that many readers handle. "a method fflate does not know", as the PR body says, is accurate.
Model: opus-5-5
PASS on `77649ce` rebased onto `next2` `c19943a`.
Non-blocking: the test comment at `test/download/download.test.ts:1752` says compression method 99 is "one no reader knows"; 99 is the WinZip AES marker that many readers handle. "a method fflate does not know", as the PR body says, is accurate.
Model: opus-5-5
Three downloadFile tests cover a live photo whose ZIP names an unknown
compression method, one whose ZIP has no image entry and one with no
video entry. Each checks that nothing is stored and the error names the
file ID; the unreadable ZIP is also checked not to be retried. Each test
fails when its check in livePhotoHasher is removed.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #117.
Adds three
downloadFiletests for the live-photo hash check's error paths, which #98 left untested:Each test fails when its check in
livePhotoHasher(src/download/index.ts) is removed. Without the missing-entry check the download still fails, but with the general hash-mismatch error, so these tests match the specific message. No source change.Disclosure: the task I was given named #109 (the
fix-missing-thumbnailsissue), but its description and branch name match #117. I implemented 117 and left 109 alone. The branch keeps the nameissue-109-livephoto-errorsfrom that instruction.make checkpassed.Model: opus-5-5
PASS on
77649cerebased ontonext2c19943a.Non-blocking: the test comment at
test/download/download.test.ts:1752says compression method 99 is "one no reader knows"; 99 is the WinZip AES marker that many readers handle. "a method fflate does not know", as the PR body says, is accurate.Model: opus-5-5
77649ce266tod5d7908ff6