sneak, on his live Ente account (#187 (comment)): quak collections hangs with no output; login and whoami succeed.
Done when:quak collections lists the account's collections, or fails with a plain error naming the cause, within a bounded time; while it works it shows progress on stderr; a test covers the cause found.
Model: opus-5-5
sneak, on his live Ente account (https://git.eeqj.de/sneak/quak/issues/187#issuecomment-145033): `quak collections` hangs with no output; `login` and `whoami` succeed.
**Done when:** `quak collections` lists the account's collections, or fails with a plain error naming the cause, within a bounded time; while it works it shows progress on stderr; a test covers the cause found.
Model: opus-5-5
user@heraklion:~/tmp/quak$ time timeout 15 $Q collections
real 0m15.026s
user 0m2.412s
sys 0m0.325s
user@heraklion:~/tmp/quak$ time timeout 60 $Q collections
real 1m0.017s
user 0m11.745s
sys 0m1.382s
user@heraklion:~/tmp/quak$
```
user@heraklion:~/tmp/quak$ time timeout 15 $Q collections
real 0m15.026s
user 0m2.412s
sys 0m0.325s
user@heraklion:~/tmp/quak$ time timeout 60 $Q collections
real 1m0.017s
user 0m11.745s
sys 0m1.382s
user@heraklion:~/tmp/quak$
```
Likely cause, to be confirmed in the code before the fix: with an empty cache, quak collections opens the library, and Library.open waits for a first full refresh. That refresh fetches and decrypts the file list of every collection in the account, one collection after another, and saves nothing until all of it is done. On a large account this takes longer than the runs in the comment above, prints nothing, and a run that is stopped saves nothing, so the next run starts again from the beginning. fresh() then runs a second refresh.
Fix:
src/library/index.ts, whose doc covers the refresh and the fresh reads: a fresh read of the collection list alone. It makes one collections request and answers without fetching any collection's files. It must not record anything that would make a later full refresh skip a collection's files. The read commands must be able to open the library without waiting for a full first refresh first.
collections in src/cli-commands.ts (through src/cli-read.ts) uses it. The CLI keeps using the library and its fresh reads, as sneak ruled on #36.
During a refresh, the library reports each collection whose files it has fetched (how many of how many) through onProgress. The commands that wait on a refresh (files, get, get-thumb, backup-metadata, the helpers) print this on stderr, so a large account shows progress instead of nothing.
README "CLI surface" says this.
Tests against the fake server in test/ente-server.ts: collections on an account with many collections makes no file-list request and prints every collection; a command that waits on a full refresh prints progress on stderr.
If the code shows a different cause, the worker fixes that one and says so on the PR.
Model: opus-5-5
Plan.
Likely cause, to be confirmed in the code before the fix: with an empty cache, `quak collections` opens the library, and `Library.open` waits for a first full refresh. That refresh fetches and decrypts the file list of every collection in the account, one collection after another, and saves nothing until all of it is done. On a large account this takes longer than the runs in the comment above, prints nothing, and a run that is stopped saves nothing, so the next run starts again from the beginning. `fresh()` then runs a second refresh.
Fix:
- `src/library/index.ts`, whose doc covers the refresh and the fresh reads: a fresh read of the collection list alone. It makes one collections request and answers without fetching any collection's files. It must not record anything that would make a later full refresh skip a collection's files. The read commands must be able to open the library without waiting for a full first refresh first.
- `collections` in `src/cli-commands.ts` (through `src/cli-read.ts`) uses it. The CLI keeps using the library and its fresh reads, as sneak ruled on https://git.eeqj.de/sneak/quak/issues/36.
- During a refresh, the library reports each collection whose files it has fetched (how many of how many) through `onProgress`. The commands that wait on a refresh (`files`, `get`, `get-thumb`, `backup-metadata`, the helpers) print this on stderr, so a large account shows progress instead of nothing.
- README "CLI surface" says this.
- Tests against the fake server in `test/ente-server.ts`: `collections` on an account with many collections makes no file-list request and prints every collection; a command that waits on a full refresh prints progress on stderr.
If the code shows a different cause, the worker fixes that one and says so on the PR.
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.
sneak, on his live Ente account (#187 (comment)):
quak collectionshangs with no output;loginandwhoamisucceed.Done when:
quak collectionslists the account's collections, or fails with a plain error naming the cause, within a bounded time; while it works it shows progress on stderr; a test covers the cause found.Model: opus-5-5
Plan.
Likely cause, to be confirmed in the code before the fix: with an empty cache,
quak collectionsopens the library, andLibrary.openwaits for a first full refresh. That refresh fetches and decrypts the file list of every collection in the account, one collection after another, and saves nothing until all of it is done. On a large account this takes longer than the runs in the comment above, prints nothing, and a run that is stopped saves nothing, so the next run starts again from the beginning.fresh()then runs a second refresh.Fix:
src/library/index.ts, whose doc covers the refresh and the fresh reads: a fresh read of the collection list alone. It makes one collections request and answers without fetching any collection's files. It must not record anything that would make a later full refresh skip a collection's files. The read commands must be able to open the library without waiting for a full first refresh first.collectionsinsrc/cli-commands.ts(throughsrc/cli-read.ts) uses it. The CLI keeps using the library and its fresh reads, as sneak ruled on #36.onProgress. The commands that wait on a refresh (files,get,get-thumb,backup-metadata, the helpers) print this on stderr, so a large account shows progress instead of nothing.test/ente-server.ts:collectionson an account with many collections makes no file-list request and prints every collection; a command that waits on a full refresh prints progress on stderr.If the code shows a different cause, the worker fixes that one and says so on the PR.
Model: opus-5-5