Received shares: follow their change feed, list them in parallel, mark their packages unavailable (FOX-164) #11

Merged
HoroTW merged 4 commits from hakalya/naomi-shared-sync into main 2026-10-24 07:23:20 +00:00 AGit
Collaborator

Ports the received-share changes made on Naomi (shareID routing for listings, download/batch by item_id, nested phone verification, status --refresh) and fixes what they left: received-share changes were only seen by the complete scan (private feed only) -> the feed position now also follows each shared Drive zone (zones/lookup + changes/zone), an old position causes one complete scan; listing received folders costs seconds per folder -> up to --jobs listing requests run side by side (Naomi full scan 13926 s -> 720 s); download/batch package URLs answer HTTP 500 -> own packages (also shared ones) keep download/by_id, received packages are 'unavailable' and asked again only on a new version or a complete scan instead of 3 attempts per pass. 220 tests OK. Deployed on Naomi at 6b26be1. Generated with Claude Code (https://claude.com/claude-code)

Ports the received-share changes made on Naomi (shareID routing for listings, download/batch by item_id, nested phone verification, status --refresh) and fixes what they left: received-share changes were only seen by the complete scan (private feed only) -> the feed position now also follows each shared Drive zone (zones/lookup + changes/zone), an old position causes one complete scan; listing received folders costs seconds per folder -> up to --jobs listing requests run side by side (Naomi full scan 13926 s -> 720 s); download/batch package URLs answer HTTP 500 -> own packages (also shared ones) keep download/by_id, received packages are 'unavailable' and asked again only on a new version or a complete scan instead of 3 attempts per pass. 220 tests OK. Deployed on Naomi at 6b26be1. Generated with Claude Code (https://claude.com/claude-code)
Taken unchanged from the runtime tree on naomi (auth, cli, drive, mirror,
their tests and the read-only live tool), based on c8c0ed3:

- auth: verification options nested under phoneNumberVerification
- cli: status --refresh renews the web session once from the stored token
- drive: listings of received shares send the item's shareID, which the
  service requires (HTTP 400 without it); files in received shares are
  fetched through download/batch by item_id (download/by_id answers 404)
- mirror: item_id and share_id are kept in the index and restored

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on a real account that mostly holds folders other accounts share
with it (FOX-164):

- Changes in a received share are in the other account's zone, read through
  the shared database; the private feed never names them, so they were only
  seen by the complete scan (every 6 h by default, 3.9 h long). The feed
  position now also covers each shared Drive zone (zones/lookup gives its
  position, changes/zone its records). An index whose position predates
  this is compared in full once.
- Listing a received folder costs the service seconds per folder (20 in one
  request took 86 s, over the 30 s limit), but requests are answered side
  by side: the scan now keeps up to --jobs listing requests under way.
- Received documents have no download/by_id (HTTP 404); download/batch is
  used for them, learned per share owner. The archive URL of a package in a
  download/batch ticket answers HTTP 500 for every package, so packages of
  this account (also shared ones) keep download/by_id, and one in a received
  share is recorded as 'unavailable': asked again with a new version and in
  each complete scan, not three times in every pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HoroTW merged commit 3f630fd28e into main 2026-10-24 07:23:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
HoroTW/icloud-drive-linux!11
No description provided.