collectionsSince({ sinceTime }) returns live decrypted collections, a deleted list of tombstoned collection ids, and a cursor (the max updationTime seen, tombstones included, falling back to the input when the
response is empty).
filesSince({ collectionID, collectionKey, sinceTime }) paginates the diff
from the given cursor and returns the same shape for files.
listCollections/listFiles are now thin wrappers that enumerate from sinceTime 0 and drop deletions, so existing callers and their tests are
unchanged.
Tombstone return shape (the design decision the issue left open)
Live records and deleted ids are kept in separate fields rather than returning a
minimal EnteFile/Collection for a tombstone. A tombstone has no key or
metadata to decrypt, so a hollow record would either lie about its fields or
fail strict tsc. A bare id list is honest and type-clean.
Non-advancing server (issue 7)
The old listFiles loop trusted hasMore and advanced its cursor only from
rows it saw, so a page that reported more while its max updationTime did not
exceed the cursor looped forever. filesSince now throws a clear error in that
case; the wrapper inherits the fix. Covered by a test, alongside cursor
threading (page then empty diff) and tombstone surfacing.
Model: opus-4-8
Implements https://git.eeqj.de/sneak/quak/issues/38 and closes
https://git.eeqj.de/sneak/quak/issues/7.
## What changed
Two new `Client` methods for the cache refresh:
- `collectionsSince({ sinceTime })` returns live decrypted collections, a
`deleted` list of tombstoned collection ids, and a `cursor` (the max
`updationTime` seen, tombstones included, falling back to the input when the
response is empty).
- `filesSince({ collectionID, collectionKey, sinceTime })` paginates the diff
from the given cursor and returns the same shape for files.
`listCollections`/`listFiles` are now thin wrappers that enumerate from
`sinceTime` 0 and drop deletions, so existing callers and their tests are
unchanged.
## Tombstone return shape (the design decision the issue left open)
Live records and deleted ids are kept in separate fields rather than returning a
minimal `EnteFile`/`Collection` for a tombstone. A tombstone has no key or
metadata to decrypt, so a hollow record would either lie about its fields or
fail strict tsc. A bare id list is honest and type-clean.
## Non-advancing server (issue 7)
The old `listFiles` loop trusted `hasMore` and advanced its cursor only from
rows it saw, so a page that reported more while its max `updationTime` did not
exceed the cursor looped forever. `filesSince` now throws a clear error in that
case; the wrapper inherits the fix. Covered by a test, alongside cursor
threading (page then empty diff) and tombstone surfacing.
Model: opus-4-8
Add collectionsSince/filesSince on Client: they take a starting cursor,
decrypt live records, surface tombstoned ids in a separate `deleted`
list, and return the max updationTime seen as the cursor to resume from.
A tombstone has no key or metadata to decrypt, so it is a bare id rather
than a hollowed-out record that strict tsc would reject.
filesSince paginates the diff from the given cursor and, when the server
reports hasMore but the page's max updationTime does not exceed the
cursor it was fetched with, throws instead of looping forever.
listCollections/listFiles become thin wrappers that enumerate from
sinceTime 0 and drop deletions, so existing callers and tests are
unaffected.
Closes#7.
Model: opus-4-8
PASS — collectionsSince/filesSince take a starting cursor, surface tombstoned ids in a separate deleted list, return the resumable max-updationTime cursor (tombstones included), and filesSince throws instead of looping when the server reports hasMore without advancing (#7); listCollections/listFiles are unaffected thin wrappers, the tombstone shape is a type-clean bare id, tests are meaningful (mutation-checked), and make check is green against current next.
Model: opus-4-8
PASS — `collectionsSince`/`filesSince` take a starting cursor, surface tombstoned ids in a separate `deleted` list, return the resumable max-`updationTime` cursor (tombstones included), and `filesSince` throws instead of looping when the server reports `hasMore` without advancing (https://git.eeqj.de/sneak/quak/issues/7); `listCollections`/`listFiles` are unaffected thin wrappers, the tombstone shape is a type-clean bare id, tests are meaningful (mutation-checked), and `make check` is green against current `next`.
Model: opus-4-8
clawbot
merged commit 42a6c17d49 into next2026-09-22 12:37:11 +02:00
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.
Implements #38 and closes
#7.
What changed
Two new
Clientmethods for the cache refresh:collectionsSince({ sinceTime })returns live decrypted collections, adeletedlist of tombstoned collection ids, and acursor(the maxupdationTimeseen, tombstones included, falling back to the input when theresponse is empty).
filesSince({ collectionID, collectionKey, sinceTime })paginates the difffrom the given cursor and returns the same shape for files.
listCollections/listFilesare now thin wrappers that enumerate fromsinceTime0 and drop deletions, so existing callers and their tests areunchanged.
Tombstone return shape (the design decision the issue left open)
Live records and deleted ids are kept in separate fields rather than returning a
minimal
EnteFile/Collectionfor a tombstone. A tombstone has no key ormetadata to decrypt, so a hollow record would either lie about its fields or
fail strict tsc. A bare id list is honest and type-clean.
Non-advancing server (issue 7)
The old
listFilesloop trustedhasMoreand advanced its cursor only fromrows it saw, so a page that reported more while its max
updationTimedid notexceed the cursor looped forever.
filesSincenow throws a clear error in thatcase; the wrapper inherits the fix. Covered by a test, alongside cursor
threading (page then empty diff) and tombstone surfacing.
Model: opus-4-8
PASS —
collectionsSince/filesSincetake a starting cursor, surface tombstoned ids in a separatedeletedlist, return the resumable max-updationTimecursor (tombstones included), andfilesSincethrows instead of looping when the server reportshasMorewithout advancing (#7);listCollections/listFilesare unaffected thin wrappers, the tombstone shape is a type-clean bare id, tests are meaningful (mutation-checked), andmake checkis green against currentnext.Model: opus-4-8