{"record":{"id":"59f0c5f8f05e9339","repo":"koala73/worldmonitor","slug":"no-focal-point-input-feeds-are-available","errorCode":null,"errorMessage":"No focal-point input feeds are available","messagePattern":"No focal-point 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 focal-point analysis tool: every input cache payload was null after readCachesWithFreshness, so no focal-point feed is computable. Carries unavailable_inputs (genuine misses) and failed_inputs (Redis read failures) in the typed fields for dispatch to re-emit in JSON-RPC error.data.","triggerScenarios":"Calling the focal-point analysis tool when all of its input cache keys return null: producer outage, TTL expiry between publish cycles, unseeded environment, or Redis read failures on every input at once.","commonSituations":"Fresh deploy before producers cycle. Upstash eviction or outage. Upstream data pipeline (geopolitical event writers) paused. Wrong Upstash database configured for the MCP edge.","solutions":["Read error.data.failed_inputs — non-empty means fix Redis; empty means wait for/re-run the producer","Verify the focal-point input keys appear fresh on /api/health","Retry once the producer's publish cadence has elapsed","Run the matching seed script if the keys have never been written in this environment"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const health = await fetch('https://<host>/api/health').then(r => r.json());\nif (focalPointInputKeys.some(k => !health?.datasets?.[k]?.fresh)) {\n  defer('focal-point inputs not fresh yet');\n}","typeGuard":"function isSourceUnavailable(e) {\n  return e?.name === 'McpSourceUnavailableError'\n    || (Array.isArray(e?.data?.unavailable_inputs));\n}","tryCatchPattern":"try {\n  await client.callTool(focalPointTool, 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":["Distinguish failed_inputs (retry now) from unavailable_inputs (wait for producer) on every catch","Track producer cadence so scheduled analyses run after publish cycles, not during gaps","Alert on repeated unavailable_inputs — that is a producer/seed regression, not transient"],"tags":["mcp","analysis","redis","data-source","focal-point"],"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"}