d3f70b18a4c26e91f0d5aa47c8e13954

Persist the real thread ts on post

A post row has an empty anchor by construction. Writing that empty value back is how a second thread appears. Persist the ts the adapter returned. If there is no ts, do not PATCH.

Hovhannes Mkhitaryan · 15 Sep 2026, 18:30 · +18 −6

agent/python/notion.py+18−6
@@ agent/python/notion.py
-client.write_anchor(w.page_id, w.anchor, trails.get(w.id, ""))
+ts, permalink = posts.get(w.id, ("", ""))
+if not ts: continue # leave empty, retry next run
+client.write_anchor(w.page_id, ts, permalink)