feat: MarkerInfo OR-Set facade + deleteDocument + delete-event visibility#21
Merged
Conversation
peat-bot
approved these changes
Jul 6, 2026
peat-bot
left a comment
There was a problem hiding this comment.
Peat QA Review (SHA: a2073da)
No findings.
Scope check — pure Dart facade + example wiring; no changes to native surface, FFI encode/decode paths, rust/Cargo.toml (still peat-ffi = "=0.2.10"), or platform build scripts. MarkerInfo, putMarker, getMarkers, and deleteDocument were already present in the generated lib/src/generated/peat_ffi.dart (native symbols uniffi_ffibuffer_peat_ffi_fn_method_peatnode_{put_marker,get_markers,delete_document} all resolve), so bindingsContractVersion=30 remains valid — the facade methods added in lib/src/peat_node.dart are thin pass-throughs. Public API export (lib/peat_flutter.dart) correctly adds MarkerInfo.
Behavioral notes verified:
- Marker soft-delete is a
putMarkerwithdeleted:true— CRDT-safe tombstone as ADR-035 requires (peat-mesh does not yet propagateChangeEvent::Removed). - Hard-delete events (
ChangeType.delete,raw==null) now render with(deleted)preview + red pill; upsert path unchanged and still content-hash-deduped. - Test coverage:
marker_info_test.dart(JSON round-trip, copyWith with nullable sentinel, equality, soft-delete filtering) anddelete_event_test.dart(ChangeType codec + delete/upsert distinction + remote-origin preservation) are pure-Dart and require no native lib; native round-trip is validated by the existingnative-linux-arm64CI job andjust check-bindings. - No security primitive, protocol/schema, cross-platform build, or FFI memory-safety surface touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2 (MarkerInfo OR-Set) and #3 (Delete operation).
putMarker(MarkerInfo),markersgetter, and genericdeleteDocument(collection, docId)onPeatFlutterNode;MarkerInfoadded to public API exportsdeleted: true), live refresh on change eventsChangeType.deletewithraw == null) now surface with a(deleted)preview and red pill, instead of being silently discardedmarker_info_test.dart(12 tests — JSON round-trip, copyWith, equality, soft-delete filtering) anddelete_event_test.dart(5 tests — ChangeType codec, delete vs upsert distinction, remote delete origin)Test plan
flutter test— all 23 tests pass (12 marker + 5 delete + 6 existing)dart analyze— no errors (info-only pre-existing deprecation warnings)