feat(phase976): guild mesh production track module map + line audit

Catalog 22 guild-mesh platform modules with phase/role metadata and
100-line budget audit with two documented exceptions. Non-breaking;
no runtime mesh behavior change.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-05 04:06:00 -04:00
co-authored by Cursor
parent efece2d872
commit 33382ed17d
2 changed files with 97 additions and 0 deletions
+7
View File
@@ -185,6 +185,13 @@ Application facade: one `PearcordPlatform` class that wires identity, database,
| `guild-mesh-stability-ipc-contract.js` | Mesh stability IPC request/response type registry and response builders |
| `guild-mesh-stability-log-filter-keys.js` | Dev-log mesh-stability filter id, message key registry, and matcher |
| `guild-mesh-agentctl-matcher-keys.js` | Agentctl mesh stability matcher key registry and evaluators |
| `guild-mesh-production-track-module-map.js` | Production track module map registry + 100-line audit |
**Phase 976 (v0.8.943):** Guild mesh production track module map doc + line audit (non-breaking). Bundle: `npm run test:ci-phase976`.
### Guild mesh production track module index (Phases 956976)
22 focused `guild-mesh-*` modules on the production hardening track (phases 956980). Canonical map + line audit: `guild-mesh-production-track-module-map.js`. Track phase range: `guild-mesh-production-track-index.js`. Line budget: 100 lines (two documented exceptions — replication diagnostics keys, multi-guild stats build). See [PRODUCTION_MESH.md](../../docs/PRODUCTION_MESH.md#guild-mesh-production-track-module-map).
**Phase 975 (v0.8.942):** Guild mesh agentctl matcher registry extract + stability matchers (non-breaking). Bundle: `npm run test:ci-phase975`.
+90
View File
@@ -0,0 +1,90 @@
'use strict'
const GUILD_MESH_MODULE_LINE_BUDGET = 100
const guildMeshProductionTrackModuleMap = [
{ file: 'guild-mesh-stability-stats-build.js', phase: 956, role: 'Mesh stability stats snapshot + 29 field keys' },
{ file: 'guild-mesh-production-track-index.js', phase: 956, role: 'Production hardening track phases 956980' },
{ file: 'guild-mesh-gossip-outbox-stats-build.js', phase: 957, role: 'Gossip outbox stats + lane alert thresholds' },
{ file: 'guild-mesh-bandwidth-stats-build.js', phase: 958, role: 'Bandwidth window snapshot + cap key pairs' },
{ file: 'guild-mesh-peer-quality-snapshot.js', phase: 959, role: 'Peer quality ranked rows + view field keys' },
{ file: 'guild-mesh-replication-diagnostics-keys.js', phase: 960, role: 'Replication diagnostics export registry + snapshot' },
{ file: 'guild-mesh-topic-pool-snapshot.js', phase: 961, role: 'Topic pool snapshot for stability + replication' },
{ file: 'guild-mesh-sparse-ack-stats-build.js', phase: 962, role: 'Sparse ACK cursor stats + diagnostics slices' },
{ file: 'guild-mesh-member-page-stats-build.js', phase: 963, role: 'Member page stats + roster sync progress' },
{ file: 'guild-mesh-partition-heal-stats-build.js', phase: 964, role: 'Partition heal stats + diagnostics embed' },
{ file: 'guild-mesh-sync-health-stats-build.js', phase: 965, role: 'Sync health rail stats + diagnostics slice' },
{ file: 'guild-mesh-offline-recovery-stats-build.js', phase: 966, role: 'Offline recovery stats + mesh auto-heal slice' },
{ file: 'guild-mesh-churn-stats-build.js', phase: 967, role: 'Churn peer join/leave + push-peer-slot payloads' },
{ file: 'guild-mesh-multi-guild-stats-build.js', phase: 968, role: 'Multi-guild diagnostics + federation aggregate' },
{ file: 'guild-mesh-production-soak-harness.js', phase: 969, role: 'Production soak harness field keys + envelope' },
{ file: 'guild-mesh-stability-validate-e2e.js', phase: 970, role: 'Stability stats field key + builder validate e2e' },
{ file: 'guild-mesh-diagnostics-export-keys.js', phase: 971, role: 'Guild sync diagnostics export envelope' },
{ file: 'guild-mesh-view-stability-fields.js', phase: 972, role: 'View meshStabilityStats field picker' },
{ file: 'guild-mesh-stability-ipc-contract.js', phase: 973, role: 'Mesh stability IPC request/response contract' },
{ file: 'guild-mesh-stability-log-filter-keys.js', phase: 974, role: 'Dev-log mesh-stability filter matcher' },
{ file: 'guild-mesh-agentctl-matcher-keys.js', phase: 975, role: 'Agentctl mesh stability matcher registry' },
{ file: 'guild-mesh-production-track-module-map.js', phase: 976, role: 'Production track module map + line audit' }
]
const guildMeshModuleLineAuditExceptions = [
'guild-mesh-replication-diagnostics-keys.js',
'guild-mesh-multi-guild-stats-build.js'
]
function listGuildMeshProductionTrackModuleMap () {
return guildMeshProductionTrackModuleMap.map((e) => ({ ...e }))
}
function listGuildMeshModuleLineAuditExceptions () {
return guildMeshModuleLineAuditExceptions.slice()
}
function countModuleLines (src) {
return String(src || '').split('\n').length
}
function runGuildMeshModuleLineAudit (readFileSync, platformDir) {
const modules = []
const overBudget = []
for (const entry of guildMeshProductionTrackModuleMap) {
const filePath = `${platformDir}/${entry.file}`
const src = readFileSync(filePath, 'utf8')
const lines = countModuleLines(src)
const row = { ...entry, lines, withinBudget: lines <= GUILD_MESH_MODULE_LINE_BUDGET }
modules.push(row)
if (!row.withinBudget && !guildMeshModuleLineAuditExceptions.includes(entry.file)) {
overBudget.push(row)
}
}
const exceptionRows = modules.filter((m) => guildMeshModuleLineAuditExceptions.includes(m.file))
return {
lineBudget: GUILD_MESH_MODULE_LINE_BUDGET,
moduleCount: modules.length,
withinBudgetCount: modules.filter((m) => m.withinBudget).length,
exceptionCount: exceptionRows.length,
overBudget,
modules
}
}
function buildGuildMeshModuleMapSnapshot () {
return {
lineBudget: GUILD_MESH_MODULE_LINE_BUDGET,
moduleCount: guildMeshProductionTrackModuleMap.length,
phases: [...new Set(guildMeshProductionTrackModuleMap.map((e) => e.phase))].sort((a, b) => a - b),
files: guildMeshProductionTrackModuleMap.map((e) => e.file),
exceptions: guildMeshModuleLineAuditExceptions.slice()
}
}
module.exports = {
GUILD_MESH_MODULE_LINE_BUDGET,
guildMeshProductionTrackModuleMap,
guildMeshModuleLineAuditExceptions,
listGuildMeshProductionTrackModuleMap,
listGuildMeshModuleLineAuditExceptions,
countModuleLines,
runGuildMeshModuleLineAudit,
buildGuildMeshModuleMapSnapshot
}