user@andros:~/dev/quak$ ./dist/bin/quak.js files -v -v 1580559963372908
Refresh started
GET https://api.ente.io/collections/v2?sinceTime=0: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963143563&sinceTime=0: HTTP 200
Fetched the files of 1 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963002374&sinceTime=0: HTTP 200
Fetched the files of 2 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559962946858&sinceTime=0: HTTP 200
Fetched the files of 3 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559962954821&sinceTime=0: HTTP 200
Fetched the files of 4 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=0: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=1733898973271689: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=1733903920270083: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=1733908260469651: HTTP 200
Fetched the files of 5 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559962946951&sinceTime=0: HTTP 200
Fetched the files of 6 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559964347222&sinceTime=0: HTTP 200
Fetched the files of 7 of 102 collections
^C
```
user@andros:~/dev/quak$ ./dist/bin/quak.js files -v -v 1580559963372908
Refresh started
GET https://api.ente.io/collections/v2?sinceTime=0: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963143563&sinceTime=0: HTTP 200
Fetched the files of 1 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963002374&sinceTime=0: HTTP 200
Fetched the files of 2 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559962946858&sinceTime=0: HTTP 200
Fetched the files of 3 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559962954821&sinceTime=0: HTTP 200
Fetched the files of 4 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=0: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=1733898973271689: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=1733903920270083: HTTP 200
GET https://api.ente.io/collections/v2/diff?collectionID=1580559963196018&sinceTime=1733908260469651: HTTP 200
Fetched the files of 5 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559962946951&sinceTime=0: HTTP 200
Fetched the files of 6 of 102 collections
GET https://api.ente.io/collections/v2/diff?collectionID=1580559964347222&sinceTime=0: HTTP 200
Fetched the files of 7 of 102 collections
^C
```
sneak
added this to the 1.0.0 milestone 2026-10-22 19:02:34 +02:00
Recorded as a bug: quak files COLLECTION must fetch only that collection's files, not every collection's. quak's manager fixes it, with a test that listing one collection requests no other collection, when the fleet restarts at 23:00 UTC on 25 October.
Model: opus-5-5
Recorded as a bug: `quak files COLLECTION` must fetch only that collection's files, not every collection's. quak's manager fixes it, with a test that listing one collection requests no other collection, when the fleet restarts at 23:00 UTC on 25 October.
Model: opus-5-5
clawbot
self-assigned this 2026-10-22 19:06:24 +02:00
What is wrong.quak files COLLECTION calls freshFiles in src/cli-read.ts, which awaits lib.fresh(): a full refresh that fetches the files of every new or changed collection before it lists the one asked for. On an empty cache that is every collection in the account.
Fix.
Add a Library method in src/library/index.ts that brings one collection up to date in the store, given its record from freshCollections(). It does for that one collection exactly what a refresh does for a changed collection. When the store holds the collection at the same updationTime, it sends no request. Otherwise it fetches the collection's files since the stored copy's updationTime (from the beginning when the collection is not stored), commits them as refreshOnce does, files that do not decrypt included, and saves. Share the commit code with refreshOnce instead of copying it. The stored cursor collectionsSinceTime does not move, so a later full refresh still fetches every other collection that changed. If a refresh is running, wait for it first.
freshFiles(lib, collectionID) then makes one collections request through lib.freshCollections(), returns undefined when the ID is not among them, and otherwise brings that collection up to date and lists it from the store with listFiles, as today. quak files with no argument keeps the full refresh, because it lists every file.
Everything quak files COLLECTION prints stays the same: the rows, their order, --json, exit codes, and the files that do not decrypt (test/cli/backup-undecryptable.test.ts). The only change is which requests it makes. The Refresh started and Fetched the files of N of M collections lines go away for this case, because no full refresh runs.
The same method will serve quak get, which must find a file in the store to fetch its content; that is a separate issue.
Update the comment at the top of src/cli-read.ts, the FreshReadLibrary stand-in in test/cli/read.test.ts, and any README sentence about what quak files fetches.
Test. A test that runs filesCommand with quak's real Client against the fake server in test/ente-server.ts, holding at least three collections. It lists one of them and asserts two things: the server got a /collections/v2/diff request for that collection, and for no other. Recording the requests may need a small, plain addition to the fake server. A second run of the same listing sends no diff request at all, because the stored copy is current.
Done when both tests pass, quak files COLLECTION makes one collections request plus that collection's own file requests, and nothing else it prints changes.
Model: opus-5-5
Plan.
**What is wrong.** `quak files COLLECTION` calls `freshFiles` in `src/cli-read.ts`, which awaits `lib.fresh()`: a full refresh that fetches the files of every new or changed collection before it lists the one asked for. On an empty cache that is every collection in the account.
**Fix.**
- Add a `Library` method in `src/library/index.ts` that brings one collection up to date in the store, given its record from `freshCollections()`. It does for that one collection exactly what a refresh does for a changed collection. When the store holds the collection at the same `updationTime`, it sends no request. Otherwise it fetches the collection's files since the stored copy's `updationTime` (from the beginning when the collection is not stored), commits them as `refreshOnce` does, files that do not decrypt included, and saves. Share the commit code with `refreshOnce` instead of copying it. The stored cursor `collectionsSinceTime` does not move, so a later full refresh still fetches every other collection that changed. If a refresh is running, wait for it first.
- `freshFiles(lib, collectionID)` then makes one collections request through `lib.freshCollections()`, returns `undefined` when the ID is not among them, and otherwise brings that collection up to date and lists it from the store with `listFiles`, as today. `quak files` with no argument keeps the full refresh, because it lists every file.
- Everything `quak files COLLECTION` prints stays the same: the rows, their order, `--json`, exit codes, and the files that do not decrypt (`test/cli/backup-undecryptable.test.ts`). The only change is which requests it makes. The `Refresh started` and `Fetched the files of N of M collections` lines go away for this case, because no full refresh runs.
- The same method will serve `quak get`, which must find a file in the store to fetch its content; that is a separate issue.
- Update the comment at the top of `src/cli-read.ts`, the `FreshReadLibrary` stand-in in `test/cli/read.test.ts`, and any README sentence about what `quak files` fetches.
**Test.** A test that runs `filesCommand` with quak's real `Client` against the fake server in `test/ente-server.ts`, holding at least three collections. It lists one of them and asserts two things: the server got a `/collections/v2/diff` request for that collection, and for no other. Recording the requests may need a small, plain addition to the fake server. A second run of the same listing sends no diff request at all, because the stored copy is current.
**Done when** both tests pass, `quak files COLLECTION` makes one collections request plus that collection's own file requests, and nothing else it prints changes.
Model: opus-5-5
Built in #224. quak files COLLECTION reads the collection list, then brings that one collection up to date in the cache through the new Library.refreshCollection(). It fetches no other collection's files, and on a repeat run, when the cached copy is current, none at all.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/quak/pulls/224. `quak files COLLECTION` reads the collection list, then brings that one collection up to date in the cache through the new `Library.refreshCollection()`. It fetches no other collection's files, and on a repeat run, when the cached copy is current, none at all.
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.
Recorded as a bug:
quak files COLLECTIONmust fetch only that collection's files, not every collection's. quak's manager fixes it, with a test that listing one collection requests no other collection, when the fleet restarts at 23:00 UTC on 25 October.Model: opus-5-5
Plan.
What is wrong.
quak files COLLECTIONcallsfreshFilesinsrc/cli-read.ts, which awaitslib.fresh(): a full refresh that fetches the files of every new or changed collection before it lists the one asked for. On an empty cache that is every collection in the account.Fix.
Librarymethod insrc/library/index.tsthat brings one collection up to date in the store, given its record fromfreshCollections(). It does for that one collection exactly what a refresh does for a changed collection. When the store holds the collection at the sameupdationTime, it sends no request. Otherwise it fetches the collection's files since the stored copy'supdationTime(from the beginning when the collection is not stored), commits them asrefreshOncedoes, files that do not decrypt included, and saves. Share the commit code withrefreshOnceinstead of copying it. The stored cursorcollectionsSinceTimedoes not move, so a later full refresh still fetches every other collection that changed. If a refresh is running, wait for it first.freshFiles(lib, collectionID)then makes one collections request throughlib.freshCollections(), returnsundefinedwhen the ID is not among them, and otherwise brings that collection up to date and lists it from the store withlistFiles, as today.quak fileswith no argument keeps the full refresh, because it lists every file.quak files COLLECTIONprints stays the same: the rows, their order,--json, exit codes, and the files that do not decrypt (test/cli/backup-undecryptable.test.ts). The only change is which requests it makes. TheRefresh startedandFetched the files of N of M collectionslines go away for this case, because no full refresh runs.quak get, which must find a file in the store to fetch its content; that is a separate issue.src/cli-read.ts, theFreshReadLibrarystand-in intest/cli/read.test.ts, and any README sentence about whatquak filesfetches.Test. A test that runs
filesCommandwith quak's realClientagainst the fake server intest/ente-server.ts, holding at least three collections. It lists one of them and asserts two things: the server got a/collections/v2/diffrequest for that collection, and for no other. Recording the requests may need a small, plain addition to the fake server. A second run of the same listing sends no diff request at all, because the stored copy is current.Done when both tests pass,
quak files COLLECTIONmakes one collections request plus that collection's own file requests, and nothing else it prints changes.Model: opus-5-5
Built in #224.
quak files COLLECTIONreads the collection list, then brings that one collection up to date in the cache through the newLibrary.refreshCollection(). It fetches no other collection's files, and on a repeat run, when the cached copy is current, none at all.Model: opus-5-5