You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(data-migration): post-review changes for the collections CDC migration
Collapses all changes made in response to review (Nitish, CodeRabbit, and a
deep self-review) into one commit on top of the feature commit, so the
review-response delta reads as a single diff.
Subscriptions / inbox-worker (review fixes, kept):
- Missing-subscription mute/favorite/read now Nak (like roles) instead of a
silent no-op, so a field event that races ahead of member_added redelivers
until the sub lands (extends Nitish's roles observation to the siblings).
- Mute/favorite/role events stamp the source _updatedAt as their high-water
mark, so a redelivered insert snapshot can't out-rank a newer update; a
cleared roles set now propagates.
Transformer correctness (CodeRabbit):
- Degraded insert/replace recovers the doc via a source lookup instead of
poisoning; a combined name+ro update emits both room_renamed and
room_restricted; zero-time guards keep absent source timestamps from
becoming year-0001 high-water values; required config scalars are trimmed
and validated non-empty; SOURCE_DATA read timestamp = max(ls, lr); bare
returns wrapped with context.
Spec-conformance revert (the design spec + CDC_COVERAGE are decision-complete):
- Subscription true-delete is un-actionable -> skip + metric (spec 4.0/4.3,
coverage row 8). Removed the out-of-spec subscription_deleted machinery:
InboxSubscriptionDeleted, SubscriptionDeletedEvent, MemberAddEvent.SubID,
handleSubscriptionDeleted, DeleteSubscriptionByID, and the source-_id
adoption in handleMemberAdded (back to generated UUIDv7).
- Post-seed user updates are NOT propagated (spec 4.1/9, coverage row 15).
Removed the user_status_updated fan-out: publishUserStatus, the statusText
update path, ALL_SITE_IDS config + wiring, and the empty-sites startup
warning. inbox-worker UpdateUserStatus reverted to its base last-write-wins
form (drops the statusUpdatedAt guard, which only supported the fan-out).
This keeps inbox-worker at the single spec-sanctioned change (handleMemberAdded
skip->error) and removes the subscription_deleted membership-lane ordering
hazard at its root. Build, full unit suite, lint, integration-compile, and
gosec all green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012X9qhQT4NwmCHjdndwNtFD
Derived: "has mention" = `userMentions>0 || groupMentions>0`; "muted" = `disableNotifications`;**read timestamp (`lastSeenAt`) = `max(ls, lr)`** (resolved per design D1 — the furthest point consumed by either the scrolled cursor or the explicit mark-read).
0 commit comments