Skip to main content

Module dedupe

Module dedupe 

Source
Expand description

Local deterministic dedupe by canonical URL.

Algorithm:

  1. Group by canonical_url.
  2. Within each group, pick the canonical record (oldest created_at, ties broken by lowest id).
  3. Report all conflicts: same canonical URL but differing title / tags / collection.

Per SPEC.md §Feature 5, the CLI exposes --dry-run (default) and --apply. Apply is gated on an explicit token at the CLI layer. This crate provides the algorithm; the CLI provides the gate.

Structs§

ConflictRecord
A single conflict record. Two bookmarks share canonical_url but disagree on a field.
DedupeReport
Full dedupe report.

Functions§

dedupe
Run the dedupe algorithm.