| … | … | @@ -1138,6 +1138,9 @@ export class DidPeerRouter { |
| 1138 | 1138 | fronts, |
| 1139 | 1139 | denied, |
| 1140 | 1140 | staleFrontMs: this._staleFrontMs, |
| 1141 | // did -> ms timestamp of the last firehose append seen from any co-owner: the liveness signal the | |
| 1142 | // refresh timer already uses, now visible to an operator (the gateway's metrics). | |
| 1143 | lastAppendAt: Object.fromEntries(this._lastAppend), | |
| 1141 | 1144 | relay: this.relay ? { sources: this.relay.sourceCount ? this.relay.sourceCount() : null } : null |
| 1142 | 1145 | } |
| 1143 | 1146 | } |
| … | … | @@ -1,6 +1,6 @@ |
| 1 | 1 | { |
| 2 | 2 | "name": "atproto-did-peer", |
| 3 | "version": "0.2.12", | |
| 3 | "version": "0.2.13", | |
| 4 | 4 | "description": "Keyless, direction-free P2P reader/seeder for an atproto DID's repo+firehose Hypercores: announce-push discovery + event-driven head reconciliation + a keyless read surface. The shared primitive beneath atproto-bridge, atproto-relay and favela (extracted from atproto-bridge did-peer.js).", |
| 5 | 5 | "type": "module", |
| 6 | 6 | "main": "index.js", |
| … | … | @@ -143,6 +143,9 @@ assert(!!forkRow, 'the rival is still FRONTED (it is tracked, not ignored)') |
| 143 | 143 | assert(forkRow.rev > canonRevs[3], 'the rival really does carry the higher rev') |
| 144 | 144 | assert(forkRow.forkRejected > 0, 'diagnose NAMES the rejection (forkRejected > 0) — an operator can see the disagreement') |
| 145 | 145 | assert(diag.fronts.find((f) => f.served).rev === canonRevs[3], 'diagnose reports the authoritative front as the served one') |
| 146 | // The gateway's metrics show how long ago each DID's firehose last advanced — the 'is this peer alive' | |
| 147 | // signal. It existed (_lastAppend) and nothing could read it. | |
| 148 | assert(typeof diag.lastAppendAt[DID] === 'number' && diag.lastAppendAt[DID] > 0, 'diagnose reports when the DID\'s firehose last appended') | |
| 146 | 149 | |
| 147 | 150 | // 3. The gate is not a permanent lock-out: with the whole canonical line gone (the rebuild case — a peer |
| 148 | 151 | // that rebuilt its cores comes back on a new line), the surviving line is served. |