Change feed: the /shared root entries (why: access) carry no item id #1074

Closed
opened 2026-11-02 12:11:11 +00:00 by Cordy · 3 comments
Owner

Since #1056 (v0.6.386), change-feed write and move entries carry the public item id (id), and WebDAV answers cairn:item-id. The root entries #1063 (v0.6.383) adds for shares gained, lost or renamed (why: "access") carry no id, because the shared-view diff works on roots, not item records. This is documented in change-feed.md.

A sync client that keys on the item id therefore treats a gained share root as an unknown item, and cannot match a renamed root to its earlier entry by id.

Proposal.

  • Give why: access write and move entries the public id of the root item: sharedview keeps the root's item id in its snapshot, and the diff reads it.
  • delete entries stay without an id, as for every delete.
  • Measure the cost of reading the root's record per changed root.

Refs. #1056 spec §15 point 5 (follow-up once both ship), #1063.

Since #1056 (v0.6.386), change-feed `write` and `move` entries carry the public item id (`id`), and WebDAV answers `cairn:item-id`. The root entries #1063 (v0.6.383) adds for shares gained, lost or renamed (`why: "access"`) carry no `id`, because the shared-view diff works on roots, not item records. This is documented in change-feed.md. A sync client that keys on the item id therefore treats a gained share root as an unknown item, and cannot match a renamed root to its earlier entry by id. **Proposal.** - Give `why: access` `write` and `move` entries the public id of the root item: `sharedview` keeps the root's item id in its snapshot, and the diff reads it. - `delete` entries stay without an id, as for every delete. - Measure the cost of reading the root's record per changed root. **Refs.** #1056 spec §15 point 5 (follow-up once both ship), #1063.
Author
Owner

Research done (research-1074.md).

Where the gap is: only the why: access entries lack the id. Journal entries shown at /shared paths already keep it.

Cost of the id

  • Personal roots: free. The item guard already verified the id in that poll.
  • Space roots: one read of the parent folder's records, and only on polls that report a root change.

No new privacy exposure: recipients already get the same public id over WebDAV cairn:item-id, and there is no lookup by id. Nextcloud, oCIS, Google, Box and Graph remoteItem.id all give recipients the item's own id.

Recommendation

  • Add the id when the entry is sent, not in the snapshot or digest. That means no cursor expiry, no state, and nothing new for #742.
  • For space roots, read the live id and not the stamped one.
  • If the id cannot be read, send the entry without it and log a WARN.
  • Deletes and the made-up owner and space folders keep no id.
  • Document that one id can appear at several paths.

No UI. Decisions follow.

**Research done** (`research-1074.md`). **Where the gap is:** only the `why: access` entries lack the id. Journal entries shown at `/shared` paths already keep it. **Cost of the id** - **Personal roots:** free. The item guard already verified the id in that poll. - **Space roots:** one read of the parent folder's records, and only on polls that report a root change. **No new privacy exposure:** recipients already get the same public id over WebDAV `cairn:item-id`, and there is no lookup by id. Nextcloud, oCIS, Google, Box and Graph `remoteItem.id` all give recipients the item's own id. **Recommendation** - Add the id when the entry is sent, not in the snapshot or digest. That means no cursor expiry, no state, and nothing new for #742. - For space roots, read the live id and not the stamped one. - If the id cannot be read, send the entry without it and log a WARN. - Deletes and the made-up owner and space folders keep no id. - Document that one id can appear at several paths. No UI. Decisions follow.
Author
Owner

Decisions (Nikola, 2026-11-02): all recommendations approved.

  • The item id is added to why: access root entries when they are sent; the snapshot and digest stay unchanged.
  • Space roots carry the live id, not the stamped one.
  • If the id can't be read, the entry is sent without it and a WARN is logged.
  • Deletes and the made-up owner and space folders carry no id.
  • The docs will say that one id can appear at several paths.

There is no UI, so this goes straight to spec and build.

**Decisions (Nikola, 2026-11-02): all recommendations approved.** - The item id is added to `why: access` root entries when they are sent; the snapshot and digest stay unchanged. - Space roots carry the live id, not the stamped one. - If the id can't be read, the entry is sent without it and a WARN is logged. - Deletes and the made-up owner and space folders carry no id. - The docs will say that one id can appear at several paths. There is no UI, so this goes straight to spec and build.
Cordy closed this issue 2026-11-02 22:39:37 +00:00
Author
Owner

Shipped in v0.6.389 (PR #1079, tag v0.6.389). Both dogfoods run it: pods ready, no restarts, no new WARN/ERROR lines.

The change feed's /shared root entries (why: access: appear, vanish, rejoin) now carry the item's stable itemId, verified against the owner's record. Clients can tell a re-share of the same item from a new item with the same name. Live check on #1005.

Shipped in **v0.6.389** (PR #1079, tag v0.6.389). Both dogfoods run it: pods ready, no restarts, no new WARN/ERROR lines. The change feed's `/shared` root entries (`why: access`: appear, vanish, rejoin) now carry the item's stable `itemId`, verified against the owner's record. Clients can tell a re-share of the same item from a new item with the same name. Live check on #1005.
Sign in to join this conversation.
No labels
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: Cordy/Cairn#1074
No description provided.