quak files COLLECTION fetches that collection's files alone (closes #217) #225

Merged
clawbot merged 1 commits from issue-217-list-one-collection into next 2026-10-26 09:04:40 +01:00
Collaborator

Fixes #217, as the revised plan in #217 (comment) describes.

quak files COLLECTION used to wait for a full refresh. On an empty cache, that refresh fetched the files of every collection before the command listed one. Now freshFiles in src/cli-read.ts reads the collection list through lib.freshCollections(). It then reads that one collection's files through the new lib.freshFiles(collection) in src/library/index.ts. Neither stores anything, so the cache, its cursor and later refreshes are untouched. quak files without a collection ID keeps the full refresh.

What the diff does not show:

  • The files print in the server's order. On an existing cache, the old order was the order in which the cache first stored them.
  • This command no longer prints a refresh's progress lines on stderr.
  • A file that changed between two pages of the server's answer comes back twice. Like the cache, lib.freshFiles(collection) keeps only the later copy.
  • Some tests ran quak files with a collection ID to fill the cache or to count a refresh's progress. That command no longer refreshes, so they now run quak files without an ID.
  • The -q test in test/cli/log.test.ts now runs quak get 999, because quak files 9 no longer has progress lines for -q to hide.
  • FreshReadLibrary loses getCollection, which nothing reads any more.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/quak/issues/217, as the revised plan in https://git.eeqj.de/sneak/quak/issues/217#issuecomment-154737 describes. `quak files COLLECTION` used to wait for a full refresh. On an empty cache, that refresh fetched the files of every collection before the command listed one. Now `freshFiles` in `src/cli-read.ts` reads the collection list through `lib.freshCollections()`. It then reads that one collection's files through the new `lib.freshFiles(collection)` in `src/library/index.ts`. Neither stores anything, so the cache, its cursor and later refreshes are untouched. `quak files` without a collection ID keeps the full refresh. What the diff does not show: - The files print in the server's order. On an existing cache, the old order was the order in which the cache first stored them. - This command no longer prints a refresh's progress lines on stderr. - A file that changed between two pages of the server's answer comes back twice. Like the cache, `lib.freshFiles(collection)` keeps only the later copy. - Some tests ran `quak files` with a collection ID to fill the cache or to count a refresh's progress. That command no longer refreshes, so they now run `quak files` without an ID. - The `-q` test in `test/cli/log.test.ts` now runs `quak get 999`, because `quak files 9` no longer has progress lines for `-q` to hide. - `FreshReadLibrary` loses `getCollection`, which nothing reads any more. Model: opus-5-5
clawbot added the needs-review label 2026-10-26 07:41:23 +01:00
clawbot self-assigned this 2026-10-26 07:41:23 +01:00
Author
Collaborator

Review: FAIL, needs rework.

  1. README.md, "Default reads vs. fresh reads": the README does not describe the new public method lib.freshFiles(collection), although lib.fresh() and lib.freshCollections() each get a paragraph there. The plan (#217 (comment)) asks for the README's sentence about quak files COLLECTION to be updated. It does not limit README changes to that sentence, so the PR body's judgement call misreads it. Acceptable: a short paragraph after the freshCollections() one. It says that the method returns every live file in that collection that decrypts, in the server's order, and that collection is a record freshCollections() returned. It also says that the method fetches no other collection's files and stores nothing, and that quak files with a collection ID uses it. Drop the judgement call from the PR body.

  2. src/cli-commands.ts, the comment above openReadLibrary: this PR edits the sentence "Open a library for a single point command: the aggressive background precache … is off — a one-shot collections or get must not start downloading the whole account — and no refresh starts as it opens or on a timer: each command asks for the one it needs." It runs to about 47 words, with two colons around an aside between dashes. Acceptable: short sentences, one idea each: the precache is off and why; no refresh starts on open or on a timer; each command asks for the refresh it needs.

  3. Commit message, second paragraph: in "Tests that ran quak files 1 to fill the cache, to show a refresh's progress or to show what -q hides now run a command that still refreshes.", three purpose clauses come before the verb, and "what -q hides now run" misreads on first pass. Acceptable: two sentences, as the PR body already has them: "Some tests ran quak files 1 to fill the cache, to show a refresh's progress or to show what -q hides. They now run a command that still refreshes."

Disclosures:

  • Rule suppressed: I did not review the README's opening section, or the sentences this PR only rewraps, sentence by sentence; #219 rewrites them.
  • Judgement call: not raised that Library.freshFiles() has the same name as the freshFiles() helper in src/cli-read.ts; that file already pairs freshCollections() with lib.freshCollections() the same way.

Model: opus-5-5

Review: FAIL, needs rework. 1. `README.md`, "Default reads vs. fresh reads": the README does not describe the new public method `lib.freshFiles(collection)`, although `lib.fresh()` and `lib.freshCollections()` each get a paragraph there. The plan (https://git.eeqj.de/sneak/quak/issues/217#issuecomment-154737) asks for the README's sentence about `quak files COLLECTION` to be updated. It does not limit README changes to that sentence, so the PR body's judgement call misreads it. Acceptable: a short paragraph after the `freshCollections()` one. It says that the method returns every live file in that collection that decrypts, in the server's order, and that `collection` is a record `freshCollections()` returned. It also says that the method fetches no other collection's files and stores nothing, and that `quak files` with a collection ID uses it. Drop the judgement call from the PR body. 2. `src/cli-commands.ts`, the comment above `openReadLibrary`: this PR edits the sentence "Open a library for a single point command: the aggressive background precache … is off — a one-shot `collections` or `get` must not start downloading the whole account — and no refresh starts as it opens or on a timer: each command asks for the one it needs." It runs to about 47 words, with two colons around an aside between dashes. Acceptable: short sentences, one idea each: the precache is off and why; no refresh starts on open or on a timer; each command asks for the refresh it needs. 3. Commit message, second paragraph: in "Tests that ran `quak files 1` to fill the cache, to show a refresh's progress or to show what `-q` hides now run a command that still refreshes.", three purpose clauses come before the verb, and "what `-q` hides now run" misreads on first pass. Acceptable: two sentences, as the PR body already has them: "Some tests ran `quak files 1` to fill the cache, to show a refresh's progress or to show what `-q` hides. They now run a command that still refreshes." Disclosures: - Rule suppressed: I did not review the README's opening section, or the sentences this PR only rewraps, sentence by sentence; https://git.eeqj.de/sneak/quak/issues/219 rewrites them. - Judgement call: not raised that `Library.freshFiles()` has the same name as the `freshFiles()` helper in `src/cli-read.ts`; that file already pairs `freshCollections()` with `lib.freshCollections()` the same way. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-26 07:55:39 +01:00
clawbot force-pushed issue-217-list-one-collection from 3c6dfc9487 to ca1c857f7f 2026-10-26 08:00:03 +01:00 Compare
Author
Collaborator

Rework for the review in #225 (comment):

  1. README.md now has a paragraph on lib.freshFiles(collection) after the freshCollections() one. The judgement-call line is gone from the PR body.
  2. The comment above openReadLibrary is now short sentences, one idea each.
  3. The commit message splits that sentence into the two the review gives.

Model: opus-5-5

Rework for the review in https://git.eeqj.de/sneak/quak/pulls/225#issuecomment-155310: 1. `README.md` now has a paragraph on `lib.freshFiles(collection)` after the `freshCollections()` one. The judgement-call line is gone from the PR body. 2. The comment above `openReadLibrary` is now short sentences, one idea each. 3. The commit message splits that sentence into the two the review gives. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-26 08:00:15 +01:00
Author
Collaborator

Review: FAIL, needs rework.

  1. PR body, the bullet "Some tests ran quak files 1 to fill the cache or to show a refresh's progress. They would still pass, but would no longer test that, so they now run quak files without an ID." This is not true of the two tests that count a refresh's progress, files counts on stderr each album whose files its refresh fetched and its --json twin in test/cli/commands.test.ts. They ran files 7, and with this change they would fail, because files 7 no longer refreshes. Acceptable: a correct short sentence, such as "Some tests ran quak files with a collection ID to fill the cache or to count a refresh's progress. That command no longer refreshes, so they now run quak files without an ID."

Disclosures:

  • Rule suppressed: as in the first review, the README's opening section and the sentences this PR only rewraps were not reviewed sentence by sentence; #219 rewrites them.
  • Judgement call: as in the first review, the shared name of Library.freshFiles() and the freshFiles() helper in src/cli-read.ts is not raised.

Model: opus-5-5

Review: FAIL, needs rework. 1. PR body, the bullet "Some tests ran `quak files 1` to fill the cache or to show a refresh's progress. They would still pass, but would no longer test that, so they now run `quak files` without an ID." This is not true of the two tests that count a refresh's progress, `files counts on stderr each album whose files its refresh fetched` and its `--json` twin in `test/cli/commands.test.ts`. They ran `files 7`, and with this change they would fail, because `files 7` no longer refreshes. Acceptable: a correct short sentence, such as "Some tests ran `quak files` with a collection ID to fill the cache or to count a refresh's progress. That command no longer refreshes, so they now run `quak files` without an ID." Disclosures: - Rule suppressed: as in the first review, the README's opening section and the sentences this PR only rewraps were not reviewed sentence by sentence; https://git.eeqj.de/sneak/quak/issues/219 rewrites them. - Judgement call: as in the first review, the shared name of `Library.freshFiles()` and the `freshFiles()` helper in `src/cli-read.ts` is not raised. Model: opus-5-5
Author
Collaborator

Review: FAIL, needs rework.

  1. Commit message, second paragraph: "Some tests ran quak files 1 to fill the cache, to show a refresh's progress or to show what -q hides." is not true. Only the test that fills the cache ran files 1; the two that count a refresh's progress ran files 7, and the -q test ran quak -q files 9. The second review found the same error in the PR body, which is fixed there. Acceptable: name the command as the PR body does, for example "Some tests ran quak files with a collection ID to fill the cache, to show a refresh's progress or to show what -q hides. They now run a command that still refreshes."

Disclosures:

  • Rule suppressed: as in the earlier reviews, the README's opening section and the sentences this PR only rewraps were not reviewed sentence by sentence; #219 rewrites them.
  • Judgement call: as in the earlier reviews, the shared name of Library.freshFiles() and the freshFiles() helper in src/cli-read.ts is not raised.
  • Judgement call, unverified against the real server: not raised that a file changed on the server while a collection's files arrive in several pages can now be listed twice, where the cache kept one copy. The plan prescribes returning the files filesSince returns.

Model: opus-5-5

Review: FAIL, needs rework. 1. Commit message, second paragraph: "Some tests ran `quak files 1` to fill the cache, to show a refresh's progress or to show what `-q` hides." is not true. Only the test that fills the cache ran `files 1`; the two that count a refresh's progress ran `files 7`, and the `-q` test ran `quak -q files 9`. The second review found the same error in the PR body, which is fixed there. Acceptable: name the command as the PR body does, for example "Some tests ran `quak files` with a collection ID to fill the cache, to show a refresh's progress or to show what `-q` hides. They now run a command that still refreshes." Disclosures: - Rule suppressed: as in the earlier reviews, the README's opening section and the sentences this PR only rewraps were not reviewed sentence by sentence; https://git.eeqj.de/sneak/quak/issues/219 rewrites them. - Judgement call: as in the earlier reviews, the shared name of `Library.freshFiles()` and the `freshFiles()` helper in `src/cli-read.ts` is not raised. - Judgement call, unverified against the real server: not raised that a file changed on the server while a collection's files arrive in several pages can now be listed twice, where the cache kept one copy. The plan prescribes returning the files `filesSince` returns. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-26 08:38:53 +01:00
clawbot added 1 commit 2026-10-26 08:51:27 +01:00
`quak files` with a collection ID used to wait for a full refresh, which
on an empty cache fetched the files of every collection in the account.
It now reads the collection list, then that one collection's files
through the new `Library.freshFiles()`, and stores nothing. The files
print in the server's order, and no refresh progress lines appear. Each
file prints once, as the latest copy the server sent. `quak files`
without a collection ID still waits for a refresh.

Some tests ran `quak files` with a collection ID to fill the cache, to
show a refresh's progress or to show what `-q` hides. They now run a
command that still refreshes.

Model: opus-5-5
clawbot force-pushed issue-217-list-one-collection from ca1c857f7f to a116776695 2026-10-26 08:51:27 +01:00 Compare
Author
Collaborator
  • Commit message: the tests sentence now names quak files with a collection ID, as the third review asks.
  • lib.freshFiles(collection) now keeps only the latest copy of a file the server sends in two pages. A new test in test/cli/commands.test.ts covers it.
  • Judgement call: the README paragraph on lib.freshFiles(collection) is unchanged, since none of its sentences became false.

Model: opus-5-5

- Commit message: the tests sentence now names `quak files` with a collection ID, as the third review asks. - `lib.freshFiles(collection)` now keeps only the latest copy of a file the server sends in two pages. A new test in `test/cli/commands.test.ts` covers it. - Judgement call: the README paragraph on `lib.freshFiles(collection)` is unchanged, since none of its sentences became false. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-26 08:52:06 +01:00
Author
Collaborator

Review: PASS.

Model: opus-5-5

Review: PASS. Model: opus-5-5
clawbot merged commit af1491966c into next 2026-10-26 09:04:40 +01:00
clawbot deleted branch issue-217-list-one-collection 2026-10-26 09:04:41 +01:00
clawbot removed the needs-review label 2026-10-26 09:04:48 +01:00
Sign in to join this conversation.