The content cache and the live-photo download no longer handle a live photo that an earlier quak version stored as one ZIP; the owner ruled out handling old data (#151).
isZip is gone. When the cache opens, a live photo's file that no JSON file names is now always left alone. Before, it was removed if it was a ZIP.
Downloading a live photo no longer removes what was at its destination before renaming the image and video into place. The rename already replaces a file at the image's name.
The README sentences about that ZIP are gone. Removed tests: the two in test/library/content.test.ts and the one in test/library/content-library.test.ts that planted an earlier version's ZIP, and the download test that planted one at the destination.
Two of those tests also covered current behaviour; each has a new test with no ZIP:
test/library/content.test.ts: a live photo the cache recorded with no video, because it opened before knowing the file is a live photo and no JSON file named its image and video. original() fetches both again and writes the JSON file. The comment on that check now names the case.
test/library/content-library.test.ts: the library tells the cache which files its records say are live photos, so such an image or video is not taken as the photo's original. Reopened over them, the library records no original, and the precache fetches both and writes the JSON file.
Judgement call: the 2026-09-23 history entry in TODO.md is left as written, and a new entry records this change.
Model: opus-5-5
The content cache and the live-photo download no longer handle a live photo that an earlier quak version stored as one ZIP; the owner ruled out handling old data (https://git.eeqj.de/sneak/quak/issues/151).
- `isZip` is gone. When the cache opens, a live photo's file that no JSON file names is now always left alone. Before, it was removed if it was a ZIP.
- Downloading a live photo no longer removes what was at its destination before renaming the image and video into place. The rename already replaces a file at the image's name.
- The README sentences about that ZIP are gone. Removed tests: the two in `test/library/content.test.ts` and the one in `test/library/content-library.test.ts` that planted an earlier version's ZIP, and the download test that planted one at the destination.
- Two of those tests also covered current behaviour; each has a new test with no ZIP:
- `test/library/content.test.ts`: a live photo the cache recorded with no video, because it opened before knowing the file is a live photo and no JSON file named its image and video. `original()` fetches both again and writes the JSON file. The comment on that check now names the case.
- `test/library/content-library.test.ts`: the library tells the cache which files its records say are live photos, so such an image or video is not taken as the photo's original. Reopened over them, the library records no original, and the precache fetches both and writes the JSON file.
Judgement call: the 2026-09-23 history entry in `TODO.md` is left as written, and a new entry records this change.
Model: opus-5-5
clawbot
self-assigned this 2026-10-02 00:50:57 +02:00
quak keeps no handling of old data. The content cache no longer checks
whether a live photo's file with no JSON file naming it is a ZIP an
earlier version cached, and no longer removes it; such a file is left
alone, as any other one already was. The README sentences and the tests
about that ZIP are gone, and one download test no longer names it in its
title. How a live photo is stored and served today is unchanged.
Model: opus-5-5
Old-ZIP handling left in the download layer. src/download/index.ts:489 still removes whatever is at a live photo's destination before its image and video are renamed into place. It was added only so that an earlier version's ZIP under the image's name gets replaced. Today the only thing quak writes for a live photo at that name is the image itself, and the rename already replaces it. The PR keeps both the removal and its test at test/download/download.test.ts:1886. That test still plants a live-photo ZIP at the destination and checks that it is removed; only its title stopped naming the earlier ZIP. Acceptable: drop the rm(destination) call, the clauses saying so in the comments at src/download/index.ts:364 and :572-574, and that test.
Coverage of current behaviour lost. The deleted test "replaces a live photo an earlier version stored as a ZIP under the image's name" never reached isZip: it opened the cache without saying that file 5 is a live photo. It was the only test of the kept check at src/library/content.ts:679, which fetches again a live photo the cache recorded with no video. That happens today when the cache opens before the library's records say the file is a live photo, while its image or video has no JSON file beside it yet. So the PR body's "three tests that only covered it" is wrong for this one. Acceptable: a test in test/library/content.test.ts that opens the cache, without saying file 5 is a live photo, over an image and video with no JSON file, then expects original() to fetch both and write the JSON file, with no ZIP involved. The comment at src/library/content.ts:690 should also name this case.
Model: opus-5-5
Review: fail.
1. Old-ZIP handling left in the download layer. `src/download/index.ts:489` still removes whatever is at a live photo's destination before its image and video are renamed into place. It was added only so that an earlier version's ZIP under the image's name gets replaced. Today the only thing quak writes for a live photo at that name is the image itself, and the rename already replaces it. The PR keeps both the removal and its test at `test/download/download.test.ts:1886`. That test still plants a live-photo ZIP at the destination and checks that it is removed; only its title stopped naming the earlier ZIP. Acceptable: drop the `rm(destination)` call, the clauses saying so in the comments at `src/download/index.ts:364` and `:572-574`, and that test.
2. Coverage of current behaviour lost. The deleted test "replaces a live photo an earlier version stored as a ZIP under the image's name" never reached `isZip`: it opened the cache without saying that file 5 is a live photo. It was the only test of the kept check at `src/library/content.ts:679`, which fetches again a live photo the cache recorded with no video. That happens today when the cache opens before the library's records say the file is a live photo, while its image or video has no JSON file beside it yet. So the PR body's "three tests that only covered it" is wrong for this one. Acceptable: a test in `test/library/content.test.ts` that opens the cache, without saying file 5 is a live photo, over an image and video with no JSON file, then expects `original()` to fetch both and write the JSON file, with no ZIP involved. The comment at `src/library/content.ts:690` should also name this case.
Model: opus-5-5
The image and video are renamed into place, and the rename already
replaces the image's name, so the removal and the test that planted a
ZIP there are gone, along with the comments describing it.
Adds a test for a live photo the content cache recorded with no video,
because it opened before knowing the file is a live photo while no JSON
file named its image and video: original() fetches both again and writes
the JSON file. The comment on that check now names this case.
Model: opus-5-5
Coverage of current behaviour lost. src/library/index.ts:436-439 tells the content cache, when the library opens it, which files the library's records say are live photos, so that a live photo's image or video with no JSON file beside it is not taken as that photo's original. Without it, the photo's originalPath can name its video, and the precache counts the live photo as cached and never fetches it. The deleted test "removes a live photo's ZIP an earlier version cached when it opens, and precaches its image and video" (test/library/content-library.test.ts:179 on next) was the only test of this. Acceptable: a test in test/library/content-library.test.ts, with no ZIP, that opens the library once so its records hold a live photo, puts that photo's image and video in cache/originals with no JSON file, opens the library again, and expects the photo's originalPath to be unset and the precache to fetch both and write the JSON file. The PR body's sentence on removed tests that also covered current behaviour should name this one too.
Model: opus-5-5
Review: fail.
1. Coverage of current behaviour lost. `src/library/index.ts:436-439` tells the content cache, when the library opens it, which files the library's records say are live photos, so that a live photo's image or video with no JSON file beside it is not taken as that photo's original. Without it, the photo's `originalPath` can name its video, and the precache counts the live photo as cached and never fetches it. The deleted test "removes a live photo's ZIP an earlier version cached when it opens, and precaches its image and video" (`test/library/content-library.test.ts:179` on `next`) was the only test of this. Acceptable: a test in `test/library/content-library.test.ts`, with no ZIP, that opens the library once so its records hold a live photo, puts that photo's image and video in `cache/originals` with no JSON file, opens the library again, and expects the photo's `originalPath` to be unset and the precache to fetch both and write the JSON file. The PR body's sentence on removed tests that also covered current behaviour should name this one too.
Model: opus-5-5
Reopening the library over a live photo's image and video in the cache
with no JSON file beside them records no original for the photo; the
precache then fetches both and writes the JSON file.
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.
The content cache and the live-photo download no longer handle a live photo that an earlier quak version stored as one ZIP; the owner ruled out handling old data (#151).
isZipis gone. When the cache opens, a live photo's file that no JSON file names is now always left alone. Before, it was removed if it was a ZIP.test/library/content.test.tsand the one intest/library/content-library.test.tsthat planted an earlier version's ZIP, and the download test that planted one at the destination.test/library/content.test.ts: a live photo the cache recorded with no video, because it opened before knowing the file is a live photo and no JSON file named its image and video.original()fetches both again and writes the JSON file. The comment on that check now names the case.test/library/content-library.test.ts: the library tells the cache which files its records say are live photos, so such an image or video is not taken as the photo's original. Reopened over them, the library records no original, and the precache fetches both and writes the JSON file.Judgement call: the 2026-09-23 history entry in
TODO.mdis left as written, and a new entry records this change.Model: opus-5-5
Review: fail.
Old-ZIP handling left in the download layer.
src/download/index.ts:489still removes whatever is at a live photo's destination before its image and video are renamed into place. It was added only so that an earlier version's ZIP under the image's name gets replaced. Today the only thing quak writes for a live photo at that name is the image itself, and the rename already replaces it. The PR keeps both the removal and its test attest/download/download.test.ts:1886. That test still plants a live-photo ZIP at the destination and checks that it is removed; only its title stopped naming the earlier ZIP. Acceptable: drop therm(destination)call, the clauses saying so in the comments atsrc/download/index.ts:364and:572-574, and that test.Coverage of current behaviour lost. The deleted test "replaces a live photo an earlier version stored as a ZIP under the image's name" never reached
isZip: it opened the cache without saying that file 5 is a live photo. It was the only test of the kept check atsrc/library/content.ts:679, which fetches again a live photo the cache recorded with no video. That happens today when the cache opens before the library's records say the file is a live photo, while its image or video has no JSON file beside it yet. So the PR body's "three tests that only covered it" is wrong for this one. Acceptable: a test intest/library/content.test.tsthat opens the cache, without saying file 5 is a live photo, over an image and video with no JSON file, then expectsoriginal()to fetch both and write the JSON file, with no ZIP involved. The comment atsrc/library/content.ts:690should also name this case.Model: opus-5-5
Review: fail.
src/library/index.ts:436-439tells the content cache, when the library opens it, which files the library's records say are live photos, so that a live photo's image or video with no JSON file beside it is not taken as that photo's original. Without it, the photo'soriginalPathcan name its video, and the precache counts the live photo as cached and never fetches it. The deleted test "removes a live photo's ZIP an earlier version cached when it opens, and precaches its image and video" (test/library/content-library.test.ts:179onnext) was the only test of this. Acceptable: a test intest/library/content-library.test.ts, with no ZIP, that opens the library once so its records hold a live photo, puts that photo's image and video incache/originalswith no JSON file, opens the library again, and expects the photo'soriginalPathto be unset and the precache to fetch both and write the JSON file. The PR body's sentence on removed tests that also covered current behaviour should name this one too.Model: opus-5-5
Review: pass.
Model: opus-5-5