fix: make sync thread failures visible (watchdog + logfire spans)
local replica silently desynced for 6 days; dashboard showed stale
13,990 while turso had 14,625. sync.zig only used std.debug.print
and zig 0.16 http.Client has no timeout, so a wedged turso call
killed sync forever with no alert.
- sync.incrementalSync now emits a logfire span per run with
new_docs/deleted/since attributes and recordError on failures
- db.zig syncLoop updates a heartbeat atomic before each attempt
- new watchdog thread aborts the process (→ fly restart) if the
heartbeat goes stale for >3x the sync interval
- also instrument the silent drop paths in indexer.zig
(content_hash_dupe, test_domain, bridgy_fed) as tap.dropped
spans so the drop-reason breakdown is queryable in logfire
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>