feat: M1 determinism fixes for gossip

Refs #1

- F1: canonical fingerprints (git identity by remote URL, log by
  basename, obsidian by relative vault path) so identical facts get
  identical ids across machines
- F2: node_id (persisted in settings) + Hybrid Logical Clock in all
  observation "when" columns; removed time.Now() fact-time fallbacks
- F3: stable TF-IDF tie-break sort (score desc, term asc)
- F4: observations carry (node_id, hcl) locator; dedup ordered by hcl
This commit is contained in:
2026-08-29 03:51:02 -07:00
parent f5766aa6d8
commit 2c0f8fa257
9 changed files with 162 additions and 30 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ func (l *LogIngester) Ingest(path string) (*IngestResult, error) {
}
base := filepath.Base(path)
fp := Fingerprint([]byte(path))
fp := Fingerprint([]byte("log:" + base))
title := fmt.Sprintf("Log %s (%d lines)", base, totalLines)
createdAt := ""
if fi, err := os.Stat(path); err == nil {
@@ -99,7 +99,7 @@ func (l *LogIngester) Ingest(path string) (*IngestResult, error) {
return &IngestResult{
Fingerprint: fp,
SourceID: l.SourceID(),
SourcePath: path,
SourcePath: base,
ContentType: ".log",
Title: title,
Summary: summary,