Overview
Several tag mutation code paths skip cross-device sync propagation even though the sync infrastructure already supports ChangeType::Delete and sync_model. Until these are wired, peers will diverge silently: deleted/unapplied tags remain on other devices; applied tags may never be broadcast.
Raised from PR #3044 (discussion: #3044 (comment)).
Affected locations
1. Tag deletion — core/src/ops/tags/delete/action.rs (line 101)
// TODO(sync): Tag deletion is not synced to other devices.
// The sync infrastructure supports ChangeType::Delete but the tag deletion
// path does not yet call library.sync_model() with it.
Call library.sync_model(..., ChangeType::Delete) after a successful delete_tag and handle / log errors.
2. Tag unapply — core/src/ops/tags/unapply/action.rs (line 110)
// TODO(sync): Tag unapply is not synced to other devices.
// The sync infrastructure supports ChangeType::Delete but tag removal
// does not yet call library.sync_model().
Call library.sync_model(..., ChangeType::Delete) for each removed user_metadata_tag row after the bulk delete and handle / log errors.
3. Tag apply (metadata manager) — core/src/ops/metadata/manager.rs (lines 530, 547, 568)
Three call sites that map the result of apply_semantic_tags silently discard the returned models instead of looking up the actual UUID and calling sync_model:
.map(|_| ()) // TODO: Look up actual UUID and sync models
These should retrieve the inserted / updated user_metadata_tag rows, then call library.sync_model(..., ChangeType::Insert) (or Update) for each.
Acceptance criteria
Overview
Several tag mutation code paths skip cross-device sync propagation even though the sync infrastructure already supports
ChangeType::Deleteandsync_model. Until these are wired, peers will diverge silently: deleted/unapplied tags remain on other devices; applied tags may never be broadcast.Raised from PR #3044 (discussion: #3044 (comment)).
Affected locations
1. Tag deletion —
core/src/ops/tags/delete/action.rs(line 101)Call
library.sync_model(..., ChangeType::Delete)after a successfuldelete_tagand handle / log errors.2. Tag unapply —
core/src/ops/tags/unapply/action.rs(line 110)Call
library.sync_model(..., ChangeType::Delete)for each removeduser_metadata_tagrow after the bulk delete and handle / log errors.3. Tag apply (metadata manager) —
core/src/ops/metadata/manager.rs(lines 530, 547, 568)Three call sites that map the result of
apply_semantic_tagssilently discard the returned models instead of looking up the actual UUID and callingsync_model:These should retrieve the inserted / updated
user_metadata_tagrows, then calllibrary.sync_model(..., ChangeType::Insert)(orUpdate) for each.Acceptance criteria
tags.deletepropagates the deletion to peers viasync_modelwithChangeType::Delete.tags.unapplypropagates removed tag associations to peers viasync_modelwithChangeType::Delete.apply_semantic_tagscall sites inmetadata/manager.rssync inserted/updated rows to peers.TODO(sync)and// TODO: Look up actual UUID and sync modelscomments in the above files are removed and replaced with a reference to this issue (e.g.// tracked in #<issue>) until resolved, then removed entirely on completion.