Skip to content

Commit c3cc97b

Browse files
nickmeinholdclaude
andcommitted
chore: address review suggestions — docs, comments, test annotation
- Fix ASCII art alignment in CRDT_SYNC_ARCHITECTURE.md (box borders) - Add star-topology assumption comment on purgeTombstones - Document internal import rationale in retry_test.dart Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5f2e8cc commit c3cc97b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

docs/CRDT_SYNC_ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ The key insight: **Engram's knowledge graph operations are overwhelmingly additi
1515
│ Device A (phone) │
1616
│ ┌───────────┐ ┌────────────────────────────┐ │
1717
│ │ Drift/SQL │←→│ CRDT merge layer (HLC) │──┼──┐
18-
│ │ (local) │ │ custom CRDT layer (HLC+LWW) │ │ │
18+
│ │ (local) │ │ custom HLC+LWW │ │ │
1919
│ └───────────┘ └────────────────────────────┘ │ │
2020
└─────────────────────────────────────────────────┘ │
2121
│ background sync
2222
┌─────────────────────────────────────────────────┐ │
2323
│ Device B (laptop) │ │
2424
│ ┌───────────┐ ┌────────────────────────────┐ │ │
2525
│ │ Drift/SQL │←→│ CRDT merge layer (HLC) │──┼──┤
26-
│ │ (local) │ │ custom CRDT layer (HLC+LWW) │ │ │
26+
│ │ (local) │ │ custom HLC+LWW │ │ │
2727
│ └───────────┘ └────────────────────────────┘ │ │
2828
└─────────────────────────────────────────────────┘ │
2929

lib/src/providers/crdt_sync_provider.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ class CrdtSyncNotifier extends Notifier<CrdtSyncState> {
151151
ref.invalidate(knowledgeGraphProvider);
152152

153153
// Purge tombstones and sync_log entries we've already consumed.
154+
// Safe in star topology (Firestore hub). P2P sync would need
155+
// per-peer tombstone tracking — see CRDT_SYNC_ARCHITECTURE.md.
154156
// Wrapped in try/catch so cleanup failure doesn't fail the sync.
155157
if (highestPullHlc.isNotEmpty) {
156158
try {

test/services/retry_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import 'dart:io';
22

33
import 'package:anthropic_sdk_dart/anthropic_sdk_dart.dart';
4+
// HttpMethod is not publicly exported by anthropic_sdk_dart but is required
5+
// to construct AnthropicClientException in tests. Track upstream issue.
46
import 'package:anthropic_sdk_dart/src/generated/client.dart' show HttpMethod;
57
import 'package:engram/src/services/elevenlabs_client.dart';
68
import 'package:engram/src/services/retry.dart';

0 commit comments

Comments
 (0)