@agfpd/iapeer 0.2.92 → 0.2.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/daemon/main.ts +18 -0
package/package.json
CHANGED
package/src/daemon/main.ts
CHANGED
|
@@ -237,6 +237,24 @@ export function makeComposerQueueRouteDeps(cfg: LifecycleConfig, env: NodeJS.Pro
|
|
|
237
237
|
return
|
|
238
238
|
}
|
|
239
239
|
const sender = resolveCallerIdentity({ personality: 'iapeer', runtime: self.runtime }, index)
|
|
240
|
+
// SELF-NOTIFY GUARD: the failure outlet sends FROM the foundation peer (iapeer). When the QUEUED
|
|
241
|
+
// sender IS the foundation peer on the same runtime (e.g. iapeer itself queued a cross-runtime send to
|
|
242
|
+
// its codex twin and that queue later failed), this notify would be iapeer→iapeer — a genuine
|
|
243
|
+
// self-send the address-based router correctly refuses with 'cannot send to self', logging ok=false
|
|
244
|
+
// and tripping monitoring alarms. The notification is moot anyway (the sender IS the one being
|
|
245
|
+
// notified about its own send). Skip it and log a benign skip instead of attempting a self-send.
|
|
246
|
+
if (`${job.caller.runtime}-${job.caller.personality}` === sender.address) {
|
|
247
|
+
appendDeliveryEvent(cfg.eventLogDir, {
|
|
248
|
+
ev: 'composer-queue-failed-notify',
|
|
249
|
+
caller: sender.address,
|
|
250
|
+
to: job.caller.personality,
|
|
251
|
+
rt: job.caller.runtime,
|
|
252
|
+
ok: 'true',
|
|
253
|
+
err: 'skipped self-notify (queued sender is the foundation peer itself)',
|
|
254
|
+
topic: job.topic ?? 'delivery-failed',
|
|
255
|
+
})
|
|
256
|
+
return
|
|
257
|
+
}
|
|
240
258
|
const result = await routeSend(
|
|
241
259
|
sender,
|
|
242
260
|
{
|