{"record":{"id":"11127de37783f2ad","repo":"koala73/worldmonitor","slug":"no-hotspot-escalation-input-feeds-are-available","errorCode":null,"errorMessage":"No hotspot-escalation input feeds are available","messagePattern":"No hotspot-escalation input feeds are available","errorType":"exception","errorClass":"McpSourceUnavailableError","httpStatus":null,"severity":"error","filePath":"api/mcp/registry/analysis-tools.ts","lineNumber":181,"sourceCode":"      stale: evaluated.stale || unavailableInputs.length > 0,\n      unavailable_inputs: unavailableInputs,\n      failed_inputs: failedInputs,\n    },\n  };\n}\n\nconst ANALYSIS_CACHE_STATUS_PROPERTIES = {\n  unavailable_inputs: {\n    type: 'array',\n    items: { type: 'string' },\n    description: 'Required cache keys that were missing or unreadable; their contribution is not treated as quiet.',\n  },\n  failed_inputs: {\n    type: 'array',\n    items: { type: 'string' },\n    description: 'Subset of unavailable_inputs whose Redis read failed rather than returning a genuine miss.',\n  },\n} as const;\n\ntype AnalysisFreshness = Awaited<ReturnType<typeof readCachesWithFreshness>>['freshness'];\n\nfunction requireAnyInput(\n  payloads: unknown[],\n  freshness: AnalysisFreshness,\n  message: string,\n): void {\n  if (payloads.every((value) => value === null)) {\n    throw new McpSourceUnavailableError(\n      message,\n      freshness.unavailable_inputs,\n      freshness.failed_inputs,\n    );\n  }\n}\n\nfunction resolveLimit(raw: unknown, fallback: number): number {","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/koala73/worldmonitor/blob/7d06c8633d256c18e38133030bc3613976a96ec9/api/mcp/registry/analysis-tools.ts#L163-L199","documentation":"McpSourceUnavailableError thrown by requireAnyInput (api/mcp/registry/analysis-tools.ts:173) for the hotspot-escalation analysis tool: all of its input feeds read null, so escalation analysis cannot run. The typed fields carry unavailable_inputs (cache misses) and failed_inputs (Redis read errors) for faithful downstream reporting via dispatch.","triggerScenarios":"Calling the hotspot-escalation tool when every input cache key returns null — producer pipelines for its inputs are down, keys expired or were evicted, seeds never ran, or Redis reads failed across the board.","commonSituations":"Upstream intelligence producer outage. Fresh deploy pre-seed. Upstash degradation window. Keys evicted under memory pressure between producer cycles.","solutions":["Classify via error.data: failed_inputs → Redis health; unavailable_inputs → producer/seed state","Confirm the hotspot-escalation input keys on /api/health","Retry after the next producer publish window","Run the corresponding seeds or restart the producer if keys are absent"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const health = await fetch('https://<host>/api/health').then(r => r.json());\nif (hotspotInputKeys.some(k => !health?.datasets?.[k])) defer('hotspot inputs unseeded');","typeGuard":"function isSourceUnavailable(e) {\n  return e?.name === 'McpSourceUnavailableError' || Array.isArray(e?.data?.unavailable_inputs);\n}","tryCatchPattern":"try {\n  await client.callTool('get_hotspot_escalation', args);\n} catch (e) {\n  if (isSourceUnavailable(e)) {\n    return e.data?.failed_inputs?.length ? retryWithBackoff(call, 3) : retryAfter(producerCadence);\n  }\n  throw e;\n}","preventionTips":["Pre-check hotspot input freshness for scheduled monitoring jobs","Alert on consecutive source-unavailable failures — producer regression signal","Keep a fallback alerting path that does not depend on the same Redis instance"],"tags":["mcp","analysis","redis","data-source","hotspot"],"backgroundTag":"data-source-unavailable","analyzedSha":"7d06c8633d256c18e38133030bc3613976a96ec9","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}