sync: carry HLC field on ChangeEntry for SyncKit protocol bump
synckit-client now orders conflicts by a hybrid logical clock carried on
ChangeEntry. BB applies remote changes in server order (no client-side conflict
resolution), so the field is populated Default and unread.
Note: BB has a separate pre-existing break against synckit-client HEAD
(references removed TierInfo / get_available_tiers from before v0.8.0); that
migration is tracked separately and is unrelated to this change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 files changed,
+10 insertions,
-1 deletion
| 5620 |
5620 |
|
|
| 5621 |
5621 |
|
[[package]]
|
| 5622 |
5622 |
|
name = "theme-common"
|
| 5623 |
|
- |
version = "0.6.0"
|
|
5623 |
+ |
version = "0.7.0"
|
| 5624 |
5624 |
|
dependencies = [
|
| 5625 |
5625 |
|
"serde",
|
| 5626 |
5626 |
|
"toml 0.8.2",
|
| 345 |
345 |
|
op: ChangeOp::Insert,
|
| 346 |
346 |
|
row_id: format!("{}:ordered", feed_id),
|
| 347 |
347 |
|
timestamp: chrono::Utc::now(),
|
|
348 |
+ |
hlc: Default::default(),
|
| 348 |
349 |
|
data: Some(json!({"feed_id": feed_id, "tag": "ordered"})),
|
| 349 |
350 |
|
},
|
| 350 |
351 |
|
ChangeEntry {
|
| 352 |
353 |
|
op: ChangeOp::Insert,
|
| 353 |
354 |
|
row_id: feed_id.clone(),
|
| 354 |
355 |
|
timestamp: chrono::Utc::now(),
|
|
356 |
+ |
hlc: Default::default(),
|
| 355 |
357 |
|
data: Some(json!({
|
| 356 |
358 |
|
"id": feed_id,
|
| 357 |
359 |
|
"busser_id": "rss",
|
| 412 |
414 |
|
op: ChangeOp::Delete,
|
| 413 |
415 |
|
row_id: feed_id.clone(),
|
| 414 |
416 |
|
timestamp: chrono::Utc::now(),
|
|
417 |
+ |
hlc: Default::default(),
|
| 415 |
418 |
|
data: None,
|
| 416 |
419 |
|
},
|
| 417 |
420 |
|
ChangeEntry {
|
| 419 |
422 |
|
op: ChangeOp::Delete,
|
| 420 |
423 |
|
row_id: format!("{}:doomed", feed_id),
|
| 421 |
424 |
|
timestamp: chrono::Utc::now(),
|
|
425 |
+ |
hlc: Default::default(),
|
| 422 |
426 |
|
data: None,
|
| 423 |
427 |
|
},
|
| 424 |
428 |
|
];
|
| 456 |
460 |
|
op: ChangeOp::Insert,
|
| 457 |
461 |
|
row_id: feed_id.clone(),
|
| 458 |
462 |
|
timestamp: chrono::Utc::now(),
|
|
463 |
+ |
hlc: Default::default(),
|
| 459 |
464 |
|
data: Some(json!({
|
| 460 |
465 |
|
"id": feed_id,
|
| 461 |
466 |
|
"busser_id": "rss",
|
| 513 |
518 |
|
op: ChangeOp::Insert,
|
| 514 |
519 |
|
row_id: new_feed_id.clone(),
|
| 515 |
520 |
|
timestamp: chrono::Utc::now(),
|
|
521 |
+ |
hlc: Default::default(),
|
| 516 |
522 |
|
data: Some(json!({
|
| 517 |
523 |
|
"id": new_feed_id,
|
| 518 |
524 |
|
"busser_id": "hn",
|
| 534 |
540 |
|
op: ChangeOp::Update,
|
| 535 |
541 |
|
row_id: item_id.clone(),
|
| 536 |
542 |
|
timestamp: chrono::Utc::now(),
|
|
543 |
+ |
hlc: Default::default(),
|
| 537 |
544 |
|
data: Some(json!({
|
| 538 |
545 |
|
"id": item_id,
|
| 539 |
546 |
|
"is_read": 1,
|
| 546 |
553 |
|
op: ChangeOp::Delete,
|
| 547 |
554 |
|
row_id: existing_feed_id.clone(),
|
| 548 |
555 |
|
timestamp: chrono::Utc::now(),
|
|
556 |
+ |
hlc: Default::default(),
|
| 549 |
557 |
|
data: None,
|
| 550 |
558 |
|
},
|
| 551 |
559 |
|
];
|
| 68 |
68 |
|
op: change_op,
|
| 69 |
69 |
|
row_id,
|
| 70 |
70 |
|
timestamp: ts,
|
|
71 |
+ |
hlc: Default::default(),
|
| 71 |
72 |
|
data: json_data,
|
| 72 |
73 |
|
})
|
| 73 |
74 |
|
})
|