{"record":{"id":"0981dc526ad68456","repo":"HKUDS/nanobot","slug":"channelplugin-management-instance-specs-for-plug-0981dc","errorCode":null,"errorMessage":"ChannelPlugin.management.instance_specs for '{plugin.name}' returned an invalid item","messagePattern":"ChannelPlugin\\.management\\.instance_specs for '(.+?)' returned an invalid item","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/contracts.py","lineNumber":347,"sourceCode":") -> 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(\n                f\"ChannelPlugin.management.instance_specs for '{plugin.name}' returned duplicate instance id \"\n                f\"'{spec.instance_id}'\"\n            )\n        runtime_name = channel_runtime_name(plugin, spec.instance_id)\n        if runtime_name in runtime_names:","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/contracts.py#L329-L365","documentation":"Error \"ChannelPlugin.management.instance_specs for '{plugin.name}' returned an invalid item\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/contracts.py:347 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"}