feat(observability,encoding,network,pubsub): expand support category modules
Hyper-P2P Module Tests / unit-all (push) Has been cancelled

- stats-exporter: snapshot history, compare, filter
- health-probe: unhealthyPeers, averageRtt, pruneStale
- schema-validator: assertValid, validateBatch, maxLength rules
- compact-codec-bridge: encodeBatch, listCodecs
- discovery-health: topPeers, pruneStale, averageRtt
- peer-bootstrap-store: removeBootstrap, findByHint
- retained-messages: retainBatch, totalRetained, channelCount
- ci: restore flat-repo production test workflow

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:18:17 -04:00
co-authored by Cursor
parent 3e1c353ade
commit cd048cb8c8
8 changed files with 249 additions and 28 deletions
@@ -41,6 +41,23 @@ class HyperP2PPeerBootstrapStore extends EventEmitter {
return [...this._bootstraps.values()]
}
removeBootstrap (peerId) {
const ok = this._bootstraps.delete(peerId)
if (ok) {
this._gossip({ type: 'bootstrap-remove', peerId, at: Date.now() })
this.emit('remove', { peerId })
}
return ok
}
findByHint (key, value) {
return this.allBootstraps().filter((e) => e.hints && e.hints[key] === value)
}
bootstrapCount () {
return this._bootstraps.size
}
_gossip (data) {
if (!this._peerMsgs) return
gossipSend(this, data)
@@ -48,6 +65,10 @@ class HyperP2PPeerBootstrapStore extends EventEmitter {
}
_onGossip (data, peerInfo) {
if (data.type === 'bootstrap-remove' && data.peerId) {
this._bootstraps.delete(data.peerId)
return
}
if (!data || data.type !== 'bootstrap-add' || !data.peerId) return
this._stats.gossipIn++
const from = data.from || (peerInfo && peerInfo.publicKey