Phase 918: export mesh scope list aliases + diagnostics payload scope + validate pull scope (v0.8.885)

Non-breaking refactor — exportMeshFetchRegistryScopeListAliases centralizes
public scope list aliases; buildExportMeshFetchRegistryDiagnosticsPayloadFromScope()
extracts diagnostics payload builder; buildExportMeshFetchRegistryLookupBindExports()
factory deduplicates bind exports; validate uses listExportMeshPullConfigKeysFromScope()
and drops registry import. Default gossip v1 unchanged; fleet v2 cutover still deferred.

Verification: test:ci-phase918, boot gate, pearcord.log scan.
This commit is contained in:
Raven Scott
2026-06-04 20:48:39 -04:00
parent 08a6f7846c
commit 5f652c894b
7 changed files with 49 additions and 17 deletions
+2
View File
@@ -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 918 (v0.8.885):** Export mesh scope list aliases + diagnostics payload scope + validate pull scope. Bundle: `npm run test:ci-phase918`.
**Phase 917 (v0.8.884):** Export mesh entry name lookup map + pull config scope list. Bundle: `npm run test:ci-phase917`.
**Phase 916 (v0.8.883):** Export mesh entry scope clone + entry lookup map builder + registry config scope. Bundle: `npm run test:ci-phase916`.
+11 -3
View File
@@ -14,8 +14,8 @@ const {
listExportMeshFetchNamedMixinRegistryNames
} = require('./gossip-rpc-export-mesh-registry-named')
/** Build export mesh registry diagnostics snapshot from scope (Phase 914). */
function buildExportMeshFetchRegistryDiagnosticsSnapshot () {
/** Build export mesh registry diagnostics payload from scope (Phase 918). */
function buildExportMeshFetchRegistryDiagnosticsPayloadFromScope () {
const { keys } = getExportMeshFetchRegistryScope()
return buildExportMeshFetchRegistryDiagnosticsPayload({
registryKeys: keys,
@@ -27,4 +27,12 @@ function buildExportMeshFetchRegistryDiagnosticsSnapshot () {
})
}
module.exports = { buildExportMeshFetchRegistryDiagnosticsSnapshot }
/** Build export mesh registry diagnostics snapshot from scope (Phase 914). */
function buildExportMeshFetchRegistryDiagnosticsSnapshot () {
return buildExportMeshFetchRegistryDiagnosticsPayloadFromScope()
}
module.exports = {
buildExportMeshFetchRegistryDiagnosticsPayloadFromScope,
buildExportMeshFetchRegistryDiagnosticsSnapshot
}
+11 -2
View File
@@ -4,12 +4,21 @@ const { lookupExportMeshFetchRegistryEntryFromScope } = require('./gossip-rpc-ex
const { buildExportMeshFetchRegistryEntryLookups } = require('./gossip-rpc-export-mesh-registry-lookup-entry')
const { buildExportMeshFetchRegistryEntryNameLookupMap } = require('./gossip-rpc-export-mesh-registry-lookup-map')
/** Build export mesh registry lookup bind exports (Phase 918). */
function buildExportMeshFetchRegistryLookupBindExports () {
const entryLookups = buildExportMeshFetchRegistryEntryLookups(
lookupExportMeshFetchRegistryEntryFromScope,
buildExportMeshFetchRegistryEntryNameLookupMap()
)
module.exports = {
return {
lookupExportMeshFetchRegistryEntry: lookupExportMeshFetchRegistryEntryFromScope,
...entryLookups
}
}
const bindExports = buildExportMeshFetchRegistryLookupBindExports()
module.exports = {
buildExportMeshFetchRegistryLookupBindExports,
...bindExports
}
+2 -4
View File
@@ -1,16 +1,14 @@
'use strict'
const { listExportMeshFetchRegistryKeys } = require('./gossip-rpc-export-mesh-registry-lists')
const { exportMeshFetchRegistryScopeListAliases } = require('./gossip-rpc-export-mesh-registry-scope-lists-aliases')
const lookupName = require('./gossip-rpc-export-mesh-registry-lookup-name')
const scopeLists = require('./gossip-rpc-export-mesh-registry-scope-lists')
const lookupBind = require('./gossip-rpc-export-mesh-registry-lookup-bind')
const { buildExportMeshFetchRegistryDiagnosticsSnapshot } = require('./gossip-rpc-export-mesh-registry-diagnostics')
module.exports = {
listExportMeshFetchRegistryKeys,
listExportMeshFetchMixinMethods: scopeLists.listExportMeshFetchMixinMethodsFromScope,
listExportMeshFetchWaitersKeys: scopeLists.listExportMeshFetchWaitersKeysFromScope,
buildExportMeshFetchRegistrySnapshot: scopeLists.buildExportMeshFetchRegistrySnapshotFromScope,
...exportMeshFetchRegistryScopeListAliases,
buildExportMeshFetchRegistryDiagnosticsSnapshot,
...lookupName,
...lookupBind
@@ -0,0 +1,13 @@
'use strict'
const scopeLists = require('./gossip-rpc-export-mesh-registry-scope-lists')
/** Public export names mapped to scope list helpers (Phase 918). */
const exportMeshFetchRegistryScopeListAliases = {
listExportMeshFetchMixinMethods: scopeLists.listExportMeshFetchMixinMethodsFromScope,
listExportMeshFetchWaitersKeys: scopeLists.listExportMeshFetchWaitersKeysFromScope,
buildExportMeshFetchRegistrySnapshot: scopeLists.buildExportMeshFetchRegistrySnapshotFromScope,
listExportMeshPullConfigKeys: scopeLists.listExportMeshPullConfigKeysFromScope
}
module.exports = { exportMeshFetchRegistryScopeListAliases }
+4 -4
View File
@@ -1,17 +1,17 @@
'use strict'
const { gossipRpcPullConfigs } = require('./gossip-rpc-pull-config')
const { listExportMeshPullConfigKeys } = require('./gossip-rpc-export-mesh-registry')
const { getExportMeshFetchRegistryScope } = require('./gossip-rpc-export-mesh-registry-scope')
const {
listExportMeshFetchMixinMethodsFromScope,
listExportMeshFetchWaitersKeysFromScope
listExportMeshFetchWaitersKeysFromScope,
listExportMeshPullConfigKeysFromScope
} = require('./gossip-rpc-export-mesh-registry-scope-lists')
const { exportMeshFetchNamedMixinMap, listExportMeshFetchNamedMixinRegistryNames } = require('./gossip-rpc-export-mesh-registry-named')
const { exportMeshFetchRegistryStringFields } = require('./gossip-rpc-export-mesh-registry-validate-fields')
const { assertUniqueExportMeshRegistryValue } = require('./gossip-rpc-export-mesh-registry-validate-unique')
/** Validate export mesh fetch registry alignment with gossip RPC pull configs (Phase 901915). */
/** Validate export mesh fetch registry alignment with gossip RPC pull configs (Phase 901918). */
function validateExportMeshFetchRegistryAlignment () {
const { registry, keys } = getExportMeshFetchRegistryScope()
const pullConfigKeys = Object.keys(gossipRpcPullConfigs)
@@ -39,7 +39,7 @@ function validateExportMeshFetchRegistryAlignment () {
assertUniqueExportMeshRegistryValue(waitersKeys, entry.waitersKey, 'waitersKey')
}
for (const pullConfigKey of listExportMeshPullConfigKeys()) {
for (const pullConfigKey of listExportMeshPullConfigKeysFromScope()) {
if (!keys.some((name) => registry[name].pullConfigKey === pullConfigKey)) {
throw new Error(`export mesh registry missing pull config entry: ${pullConfigKey}`)
}
+2
View File
@@ -18,6 +18,7 @@ const meshRegistryLookupMap = require('./gossip-rpc-export-mesh-registry-lookup-
const meshRegistryLookupName = require('./gossip-rpc-export-mesh-registry-lookup-name')
const meshRegistryScope = require('./gossip-rpc-export-mesh-registry-scope')
const meshRegistryScopeLists = require('./gossip-rpc-export-mesh-registry-scope-lists')
const meshRegistryScopeListsAliases = require('./gossip-rpc-export-mesh-registry-scope-lists-aliases')
const meshRegistryDiagnostics = require('./gossip-rpc-export-mesh-registry-diagnostics')
const meshRegistryLists = require('./gossip-rpc-export-mesh-registry-lists')
const meshRegistryNamed = require('./gossip-rpc-export-mesh-registry-named')
@@ -49,6 +50,7 @@ module.exports = {
...meshRegistryLookupName,
...meshRegistryScope,
...meshRegistryScopeLists,
...meshRegistryScopeListsAliases,
...meshRegistryDiagnostics,
...meshRegistryLists,
...meshRegistryNamed,