{"record":{"id":"10447e9e22608f59","repo":"ruvnet/ruflo","slug":"inbound-rejected-no-sourcenodeid-in-metadata-fro","errorCode":null,"errorMessage":"Inbound rejected: no sourceNodeId in metadata (from ${address})","messagePattern":"Inbound rejected: no sourceNodeId in metadata \\(from (.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts","lineNumber":284,"sourceCode":" * `address` is the wire-level remote (e.g. `192.168.1.42:54321`).\n * `message.metadata.sourceNodeId` is the cryptographic identity claim.\n * The two MAY differ (e.g. behind NAT) — we trust `sourceNodeId` for\n * peer lookup since it's bound to the Ed25519 keypair.\n */\nexport async function dispatchInbound(\n  address: string,\n  message: AgentMessage,\n  deps: InboundDispatchDeps,\n): Promise<InboundDispatchOutcome> {\n  const meta = (message.metadata ?? {}) as Record<string, unknown>;\n  const sourceNodeId = typeof meta.sourceNodeId === 'string' ? meta.sourceNodeId : null;\n\n  if (!sourceNodeId) {\n    await deps.audit.log('message_rejected', {\n      sourceNodeId: undefined,\n      metadata: { address, reason: 'MISSING_METADATA' },\n    });\n    deps.logger.warn(`Inbound rejected: no sourceNodeId in metadata (from ${address})`);\n    return { accepted: false, reason: 'MISSING_METADATA' };\n  }\n\n  const peer = deps.discovery.getPeer(sourceNodeId);\n  if (!peer) {\n    await deps.audit.log('message_rejected', {\n      sourceNodeId,\n      metadata: { address, reason: 'PEER_UNKNOWN' },\n    });\n    deps.logger.warn(`Inbound rejected: ${sourceNodeId} not in discovery (from ${address})`);\n    return { accepted: false, reason: 'PEER_UNKNOWN' };\n  }\n\n  if (peer.state === FederationNodeState.SUSPENDED) {\n    await deps.audit.log('message_rejected', {\n      sourceNodeId,\n      metadata: { address, reason: 'PEER_SUSPENDED' },\n    });","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts#L266-L302","documentation":"Log warning in dispatchInbound: an incoming federation message carries no metadata.sourceNodeId, so its claimed cryptographic identity is absent; the message is audited and rejected with reason MISSING_METADATA.","triggerScenarios":"Thrown at v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts:284 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the sending peer to include sourceNodeId in message metadata; messages without it are rejected."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}