Phase 890: registry split + delivery receipt responder helper (v0.8.857)

Non-breaking refactor — split gossip-rpc-registry into entries/lookup/validate
modules; buildGuildRpcTargetedDeliveryReceiptResponse() shared by audit/digest
responders; platform-search-rpc-pull-mixin for search mesh config pulls. test:ci-phase890
passes (46/50, cutover deferred).
This commit is contained in:
Raven Scott
2026-06-04 18:58:22 -04:00
parent 1569cd0d74
commit 3232f68421
10 changed files with 220 additions and 169 deletions
@@ -1,20 +1,19 @@
'use strict'
const {
assertGuildRpcTargetResponder,
buildGuildRpcDeliveryResponseEnvelope,
buildGuildRpcTargetedDeliveryReceiptResponse,
markRpcResponse
} = require('../../../gossip-rpc-pull')
/** Audit export archive protomux-rpc responders (Phase 885 extract). */
const platformAuditArchiveRpcRespondersMixin = {
async _buildAuditExportArchiveResponsePayload (payload) {
if (!payload?.archiveId) return null
if (!assertGuildRpcTargetResponder(payload, this)) return null
await this._initDeliveryReceipts(payload.guildId)
const row = await this.deliveryReceipts.getAuditExportArchive(payload.archiveId)
if (!row?.entries?.length) return null
return buildGuildRpcDeliveryResponseEnvelope(row, this, payload)
return buildGuildRpcTargetedDeliveryReceiptResponse(this, payload, {
resourceIdKey: 'archiveId',
fetchRow: (platform, p) =>
platform.deliveryReceipts.getAuditExportArchive(p.archiveId),
validateRow: (row) => Boolean(row?.entries?.length)
})
},
async _handleAuditExportArchiveRequestRpc (payload) {
@@ -1,20 +1,19 @@
'use strict'
const {
assertGuildRpcTargetResponder,
buildGuildRpcDeliveryResponseEnvelope,
buildGuildRpcTargetedDeliveryReceiptResponse,
markRpcResponse
} = require('../../../gossip-rpc-pull')
/** Automation digest snapshot protomux-rpc responders (Phase 885 extract). */
const platformAutomationDigestSnapshotRpcRespondersMixin = {
async _buildAutomationDigestExportSnapshotResponsePayload (payload) {
if (!payload?.snapshotId) return null
if (!assertGuildRpcTargetResponder(payload, this)) return null
await this._initDeliveryReceipts(payload.guildId)
const row = await this.deliveryReceipts.getAutomationDigestExportSnapshot(payload.snapshotId)
if (!row?.body?.length) return null
return buildGuildRpcDeliveryResponseEnvelope(row, this, payload)
return buildGuildRpcTargetedDeliveryReceiptResponse(this, payload, {
resourceIdKey: 'snapshotId',
fetchRow: (platform, p) =>
platform.deliveryReceipts.getAutomationDigestExportSnapshot(p.snapshotId),
validateRow: (row) => Boolean(row?.body?.length)
})
},
async _handleAutomationDigestExportSnapshotRequestRpc (payload) {