{"record":{"id":"b74a800076a2d1c1","repo":"OpenBMB/ChatDev","slug":"edge-processor-type-name-already-registered","errorCode":null,"errorMessage":"Edge processor type '{name}' already registered","messagePattern":"Edge processor type '(.+?)' already registered","errorType":"validation","errorClass":"RegistryError","httpStatus":null,"severity":"error","filePath":"runtime/edge/processors/registry.py","lineNumber":40,"sourceCode":"_BUILTINS_LOADED = False\n\n\ndef _ensure_builtins_loaded() -> None:\n    global _BUILTINS_LOADED\n    if not _BUILTINS_LOADED:\n        import_module(\"runtime.edge.processors.builtin_types\")\n        _BUILTINS_LOADED = True\n\n\ndef register_edge_processor(\n    name: str,\n    *,\n    config_cls: Type[\"EdgeProcessorTypeConfig\"],\n    processor_cls: Type[\"EdgePayloadProcessor[Any]\"],\n    summary: str | None = None,\n) -> None:\n    if name in edge_processor_registry.names():\n        raise RegistryError(f\"Edge processor type '{name}' already registered\")\n    entry = EdgeProcessorRegistration(\n        name=name,\n        config_cls=config_cls,\n        processor_cls=processor_cls,\n        summary=summary,\n    )\n    edge_processor_registry.register(name, target=entry)\n    register_edge_processor_schema(name, config_cls=config_cls, summary=summary)\n\n\ndef get_edge_processor_registration(name: str) -> EdgeProcessorRegistration:\n    _ensure_builtins_loaded()\n    entry: RegistryEntry = edge_processor_registry.get(name)\n    registration = entry.load()\n    if not isinstance(registration, EdgeProcessorRegistration):\n        raise RegistryError(f\"Entry '{name}' is not an EdgeProcessorRegistration\")\n    return registration\n","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/runtime/edge/processors/registry.py#L22-L58","documentation":"The edge processor type registry refuses duplicate registration. register_edge_processor raises when the name already exists, ensuring one processor implementation per type name.","triggerScenarios":"Calling register_edge_processor('name', ...) twice, or a plugin registering a processor whose name collides with a builtin or with another plugin's name.","commonSituations":"Double imports of the registering module (two sys.path aliases), notebook re-runs without kernel restart, or unnamespaced names like 'transform' colliding with builtins.","solutions":["Use a namespaced unique name for custom processors","Guard with `if name not in iter_edge_processor_registrations(): ...`","Ensure the plugin module is imported exactly once (fix duplicate package paths)"],"exampleFix":"# before\nregister_edge_processor('transform', config_cls=C, processor_cls=P)\n\n# after\nif 'transform' not in iter_edge_processor_registrations():\n    register_edge_processor('transform', config_cls=C, processor_cls=P)","handlingStrategy":"validation","validationCode":"from runtime.edge.processors.registry import iter_edge_processor_registrations\nif 'myproc' not in iter_edge_processor_registrations():\n    register_edge_processor('myproc', config_cls=C, processor_cls=P)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Namespace plugin names","Guard registrations to be idempotent"],"tags":["registry","duplicate","plugin","edge-processors"],"backgroundTag":"duplicate-registry-registration","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}