pushes on tangled sites.wisp.place/zzstoatzz.io/punch
fun tangled
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

drain: fall back committerDid → ownerDid → repoDid

some knots (notably knot.pdsls.dev) emit refUpdate events with
committerDid: "" — their pushes were silently dropped by the indexer.
falling back to ownerDid / repoDid credits the repo owner, which is
the best attribution we can get when the committer is blank. catches
juliet.paris and the other knot.pdsls.dev residents.

cursor for knot.pdsls.dev has been reset so next cron tick re-drains
from 0 with the new rule.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

+12 -4
+5 -2
worker/src/drain.ts
··· 80 80 } 81 81 82 82 if (msg.nsid === "sh.tangled.git.refUpdate") { 83 - const did = msg.event.committerDid; 84 - if (did) { 83 + // some knots (knot.pdsls.dev) emit committerDid as an empty string. 84 + // fall back to ownerDid → repoDid so those pushes still get credited. 85 + const ev = msg.event; 86 + const did = (ev.committerDid || ev.ownerDid || ev.repoDid || "").trim(); 87 + if (did.startsWith("did:")) { 85 88 result.pushCounts[did] = (result.pushCounts[did] ?? 0) + 1; 86 89 result.refUpdates++; 87 90 }
+7 -2
worker/src/types.ts
··· 26 26 tried: boolean; 27 27 } 28 28 29 - // knot /events message (from core/knotserver/events.go) 29 + // knot /events message (from core/knotserver/events.go). 30 + // self-hosted knots are inconsistent about committerDid — some emit "" (empty 31 + // string). fall back to ownerDid or repoDid in that case so pushes on those 32 + // knots still get credited to someone sensible. 30 33 export interface RefUpdateEvent { 31 - readonly committerDid: string; 34 + readonly committerDid?: string; 35 + readonly ownerDid?: string; 36 + readonly repoDid?: string; 32 37 } 33 38 34 39 export interface KnotMessage {