feat: replicate thread membership and record merges (#46)
build / test (push) Successful in 3m17s
build / image (push) Successful in 18s

feat: replicate thread membership and record merges (#46)

Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #46.
This commit is contained in:
2026-11-05 09:09:27 +00:00
committed by david
parent 00f277cf76
commit 499cd2be5d
6 changed files with 397 additions and 22 deletions
+7
View File
@@ -26,5 +26,12 @@ func Reconcile(kdb *db.KnoxDB) (int, int, error) {
} else if applied > 0 {
created += applied
}
// Membership last: links resolve against threads, so they need both the
// derived and the replicated threads to exist first.
if applied, err := kdb.ProjectLinks(); err != nil {
return created, linked, fmt.Errorf("project links: %w", err)
} else {
linked += applied
}
return created, linked, nil
}