Phase 904: export mesh row helper extract + platform mixin builder (v0.8.871)
Non-breaking refactor — gossip-rpc-export-mesh-row-audit.js and gossip-rpc-export-mesh-row-digest.js extract getLocalRow/tryRpc/ingestRpc from registry entries; buildPlatformExportMeshFetchMixins() consolidates platform mixin construction; platform-export-mesh-fetch-mixin.js reduced to single builder call. Default gossip v1 unchanged; fleet v2 cutover still deferred. Verification: test:ci-phase904, pear run boot, pearcord.log scan.
This commit is contained in:
@@ -92,6 +92,8 @@ Application facade: one `PearcordPlatform` class that wires identity, database,
|
||||
|
||||
**Phase 822 (v0.8.789):** Triple-peer topology via `guild-mesh-topology` + `getMeshStabilityStats`. Bundle: `npm run test:ci-phase822`.
|
||||
|
||||
**Phase 904 (v0.8.871):** Export mesh row helper extract + platform mixin builder. Bundle: `npm run test:ci-phase904`.
|
||||
|
||||
**Phase 903 (v0.8.870):** Export mesh format helper extract + mixin method registry. Bundle: `npm run test:ci-phase903`.
|
||||
|
||||
**Phase 902 (v0.8.869):** Export mesh view snapshot + mixin pick helper + RPC import consolidation. Bundle: `npm run test:ci-phase902`.
|
||||
|
||||
@@ -68,10 +68,27 @@ function pickGuildExportMeshFetchMixinMethods (entry, mixin) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Build consolidated + named platform export mesh fetch mixins (Phase 904). */
|
||||
function buildPlatformExportMeshFetchMixins (registry) {
|
||||
const platformExportMeshFetchMixin = buildGuildExportMeshFetchMixinsFromRegistry(registry)
|
||||
return {
|
||||
platformExportMeshFetchMixin,
|
||||
platformAuditExportMeshFetchMixin: pickGuildExportMeshFetchMixinMethods(
|
||||
registry.auditExportArchive,
|
||||
platformExportMeshFetchMixin
|
||||
),
|
||||
platformAutomationDigestMeshFetchMixin: pickGuildExportMeshFetchMixinMethods(
|
||||
registry.automationDigestSnapshot,
|
||||
platformExportMeshFetchMixin
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
buildGuildExportMeshFetchMixin,
|
||||
buildGuildExportMeshFetchMixinsFromRegistry,
|
||||
pickGuildExportMeshFetchMixinMethods,
|
||||
buildPlatformExportMeshFetchMixins,
|
||||
buildGuildExportMeshGossipRequestBase,
|
||||
buildGuildExportMeshGossipWaitCallback
|
||||
}
|
||||
|
||||
@@ -8,8 +8,13 @@ const {
|
||||
formatAuditExportArchiveMeshGossipResult,
|
||||
sendAuditExportArchiveMeshGossipRequest
|
||||
} = require('./gossip-rpc-export-mesh-format-audit')
|
||||
const {
|
||||
getAuditExportArchiveMeshLocalRow,
|
||||
tryFetchAuditExportArchiveMeshRpc,
|
||||
ingestAuditExportArchiveMeshRpc
|
||||
} = require('./gossip-rpc-export-mesh-row-audit')
|
||||
|
||||
/** Audit export archive mesh fetch registry entry (Phase 901–903). */
|
||||
/** Audit export archive mesh fetch registry entry (Phase 901–904). */
|
||||
const auditExportArchiveMeshFetchEntry = {
|
||||
pullConfigKey: 'auditExportArchive',
|
||||
resolveWaiterMethod: '_resolveAuditArchiveFetchWaiter',
|
||||
@@ -22,9 +27,9 @@ const auditExportArchiveMeshFetchEntry = {
|
||||
validateLocal: isValidAuditExportArchiveMeshRow,
|
||||
waiterMode: 'append',
|
||||
timeoutErrorMessage: 'audit archive fetch timed out',
|
||||
getLocalRow: (platform, archiveId) => platform.deliveryReceipts.getAuditExportArchive(archiveId),
|
||||
tryRpc: (platform, archiveId, opts) => platform._tryFetchAuditExportArchiveFromMeshRpc(archiveId, opts),
|
||||
ingestRpc: (platform, rpc) => platform.deliveryReceipts.ingestAuditExportArchive(rpc),
|
||||
getLocalRow: getAuditExportArchiveMeshLocalRow,
|
||||
tryRpc: tryFetchAuditExportArchiveMeshRpc,
|
||||
ingestRpc: ingestAuditExportArchiveMeshRpc,
|
||||
formatLocalHit: formatAuditExportArchiveMeshLocalHit,
|
||||
formatRpcHit: formatAuditExportArchiveMeshRpcHit,
|
||||
formatGossipResult: formatAuditExportArchiveMeshGossipResult,
|
||||
|
||||
@@ -8,8 +8,13 @@ const {
|
||||
formatAutomationDigestSnapshotMeshGossipResult,
|
||||
sendAutomationDigestSnapshotMeshGossipRequest
|
||||
} = require('./gossip-rpc-export-mesh-format-digest')
|
||||
const {
|
||||
getAutomationDigestSnapshotMeshLocalRow,
|
||||
tryFetchAutomationDigestSnapshotMeshRpc,
|
||||
ingestAutomationDigestSnapshotMeshRpc
|
||||
} = require('./gossip-rpc-export-mesh-row-digest')
|
||||
|
||||
/** Automation digest snapshot mesh fetch registry entry (Phase 901–903). */
|
||||
/** Automation digest snapshot mesh fetch registry entry (Phase 901–904). */
|
||||
const automationDigestSnapshotMeshFetchEntry = {
|
||||
pullConfigKey: 'automationDigestSnapshot',
|
||||
resolveWaiterMethod: '_resolveAutomationDigestSnapshotFetchWaiter',
|
||||
@@ -22,11 +27,9 @@ const automationDigestSnapshotMeshFetchEntry = {
|
||||
validateLocal: isValidAutomationDigestSnapshotMeshRow,
|
||||
waiterMode: 'replace',
|
||||
timeoutErrorMessage: 'automation digest snapshot fetch timed out',
|
||||
getLocalRow: (platform, snapshotId) =>
|
||||
platform.deliveryReceipts.getAutomationDigestExportSnapshot(snapshotId),
|
||||
tryRpc: (platform, snapshotId, opts) =>
|
||||
platform._tryFetchAutomationDigestSnapshotFromMeshRpc(snapshotId, opts),
|
||||
ingestRpc: (platform, rpc) => platform.deliveryReceipts.ingestAutomationDigestExportSnapshot(rpc),
|
||||
getLocalRow: getAutomationDigestSnapshotMeshLocalRow,
|
||||
tryRpc: tryFetchAutomationDigestSnapshotMeshRpc,
|
||||
ingestRpc: ingestAutomationDigestSnapshotMeshRpc,
|
||||
formatLocalHit: formatAutomationDigestSnapshotMeshLocalHit,
|
||||
formatRpcHit: formatAutomationDigestSnapshotMeshRpcHit,
|
||||
formatGossipResult: formatAutomationDigestSnapshotMeshGossipResult,
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
function getAuditExportArchiveMeshLocalRow (platform, archiveId) {
|
||||
return platform.deliveryReceipts.getAuditExportArchive(archiveId)
|
||||
}
|
||||
|
||||
function tryFetchAuditExportArchiveMeshRpc (platform, archiveId, opts) {
|
||||
return platform._tryFetchAuditExportArchiveFromMeshRpc(archiveId, opts)
|
||||
}
|
||||
|
||||
function ingestAuditExportArchiveMeshRpc (platform, rpc) {
|
||||
return platform.deliveryReceipts.ingestAuditExportArchive(rpc)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getAuditExportArchiveMeshLocalRow,
|
||||
tryFetchAuditExportArchiveMeshRpc,
|
||||
ingestAuditExportArchiveMeshRpc
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
function getAutomationDigestSnapshotMeshLocalRow (platform, snapshotId) {
|
||||
return platform.deliveryReceipts.getAutomationDigestExportSnapshot(snapshotId)
|
||||
}
|
||||
|
||||
function tryFetchAutomationDigestSnapshotMeshRpc (platform, snapshotId, opts) {
|
||||
return platform._tryFetchAutomationDigestSnapshotFromMeshRpc(snapshotId, opts)
|
||||
}
|
||||
|
||||
function ingestAutomationDigestSnapshotMeshRpc (platform, rpc) {
|
||||
return platform.deliveryReceipts.ingestAutomationDigestExportSnapshot(rpc)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getAutomationDigestSnapshotMeshLocalRow,
|
||||
tryFetchAutomationDigestSnapshotMeshRpc,
|
||||
ingestAutomationDigestSnapshotMeshRpc
|
||||
}
|
||||
@@ -14,6 +14,8 @@ const meshRegistryLookup = require('./gossip-rpc-export-mesh-registry-lookup')
|
||||
const meshRegistryValidate = require('./gossip-rpc-export-mesh-registry-validate')
|
||||
const meshFormatAudit = require('./gossip-rpc-export-mesh-format-audit')
|
||||
const meshFormatDigest = require('./gossip-rpc-export-mesh-format-digest')
|
||||
const meshRowAudit = require('./gossip-rpc-export-mesh-row-audit')
|
||||
const meshRowDigest = require('./gossip-rpc-export-mesh-row-digest')
|
||||
|
||||
module.exports = {
|
||||
...attempt,
|
||||
@@ -28,5 +30,7 @@ module.exports = {
|
||||
...meshRegistryLookup,
|
||||
...meshRegistryValidate,
|
||||
...meshFormatAudit,
|
||||
...meshFormatDigest
|
||||
...meshFormatDigest,
|
||||
...meshRowAudit,
|
||||
...meshRowDigest
|
||||
}
|
||||
|
||||
@@ -1,24 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const {
|
||||
buildGuildExportMeshFetchMixinsFromRegistry,
|
||||
pickGuildExportMeshFetchMixinMethods
|
||||
} = require('../../../gossip-rpc-export-mesh-bind')
|
||||
const { buildPlatformExportMeshFetchMixins } = require('../../../gossip-rpc-export-mesh-bind')
|
||||
const { exportMeshFetchRegistry } = require('../../../gossip-rpc-export-mesh-registry')
|
||||
|
||||
/** Consolidated export mesh fetch mixins from registry entries (Phase 900–902). */
|
||||
const platformExportMeshFetchMixin = buildGuildExportMeshFetchMixinsFromRegistry(exportMeshFetchRegistry)
|
||||
const platformAuditExportMeshFetchMixin = pickGuildExportMeshFetchMixinMethods(
|
||||
exportMeshFetchRegistry.auditExportArchive,
|
||||
platformExportMeshFetchMixin
|
||||
)
|
||||
const platformAutomationDigestMeshFetchMixin = pickGuildExportMeshFetchMixinMethods(
|
||||
exportMeshFetchRegistry.automationDigestSnapshot,
|
||||
platformExportMeshFetchMixin
|
||||
)
|
||||
|
||||
module.exports = {
|
||||
platformExportMeshFetchMixin,
|
||||
platformAuditExportMeshFetchMixin,
|
||||
platformAutomationDigestMeshFetchMixin
|
||||
}
|
||||
/** Consolidated export mesh fetch mixins from registry entries (Phase 900–904). */
|
||||
module.exports = buildPlatformExportMeshFetchMixins(exportMeshFetchRegistry)
|
||||
|
||||
Reference in New Issue
Block a user