{"record":{"id":"2ce23e5dc98743fc","repo":"HKUDS/nanobot","slug":"channelplugin-management-instance-specs-for-plug","errorCode":null,"errorMessage":"ChannelPlugin.management.instance_specs for '{plugin.name}' must return an iterable","messagePattern":"ChannelPlugin\\.management\\.instance_specs for '(.+?)' must return an iterable","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/contracts.py","lineNumber":342,"sourceCode":"def channel_instance_specs(\n    plugin: ChannelPlugin,\n    section: Any,\n    *,\n    enabled_only: bool = True,\n) -> list[ChannelInstanceSpec]:\n    \"\"\"Expand persisted config through the dependency-free management adapter.\"\"\"\n    factory = plugin.management.instance_specs\n    if factory is None:\n        activation = ChannelActivation.from_config(section)\n        raw_specs: object = (\n            []\n            if enabled_only and not activation.resolve(default=plugin.default_enabled)\n            else [ChannelInstanceSpec(instance_id=\"default\", config=section)]\n        )\n    else:\n        raw_specs = cast(object, factory(section, enabled_only=enabled_only))\n    if not isinstance(raw_specs, Iterable):\n        raise TypeError(\n            f\"ChannelPlugin.management.instance_specs for '{plugin.name}' must return an iterable\"\n        )\n    specs = list(cast(Iterable[object], raw_specs))\n    if not _all_channel_instance_specs(specs):\n        raise TypeError(\n            f\"ChannelPlugin.management.instance_specs for '{plugin.name}' returned an invalid item\"\n        )\n\n    instance_ids: set[str] = set()\n    runtime_names: set[str] = set()\n    for spec in specs:\n        instance_id = cast(object, spec.instance_id)\n        if not isinstance(instance_id, str) or not instance_id.strip():\n            raise ValueError(\n                f\"ChannelPlugin.management.instance_specs for '{plugin.name}' returned an empty instance id\"\n            )\n        if spec.instance_id in instance_ids:\n            raise ValueError(","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/contracts.py#L324-L360","documentation":"Error \"ChannelPlugin.management.instance_specs for '{plugin.name}' must return an iterable\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/contracts.py:342 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}