{"record":{"id":"b08794f6d42ee3e9","repo":"OpenBMB/ChatDev","slug":"read-must-be-boolean","errorCode":null,"errorMessage":"read must be boolean","messagePattern":"read must be boolean","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"entity/configs/node/memory.py","lineNumber":464,"sourceCode":"                    parsed.append(AgentExecFlowStage(item))\n                except ValueError as exc:\n                    raise ConfigError(\n                        f\"retrieve_stage entries must be one of {[stage.value for stage in AgentExecFlowStage]}\",\n                        extend_path(path, f\"retrieve_stage[{idx}]\"),\n                    ) from exc\n            stages = parsed\n\n        top_k_value = mapping.get(\"top_k\", 3)\n        if not isinstance(top_k_value, int) or top_k_value <= 0:\n            raise ConfigError(\"top_k must be a positive integer\", extend_path(path, \"top_k\"))\n\n        threshold_value = mapping.get(\"similarity_threshold\", -1.0)\n        if not isinstance(threshold_value, (int, float)):\n            raise ConfigError(\"similarity_threshold must be numeric\", extend_path(path, \"similarity_threshold\"))\n\n        read_value = mapping.get(\"read\", True)\n        if not isinstance(read_value, bool):\n            raise ConfigError(\"read must be boolean\", extend_path(path, \"read\"))\n\n        write_value = mapping.get(\"write\", True)\n        if not isinstance(write_value, bool):\n            raise ConfigError(\"write must be boolean\", extend_path(path, \"write\"))\n\n        return cls(\n            name=name,\n            retrieve_stage=stages,\n            top_k=top_k_value,\n            similarity_threshold=float(threshold_value),\n            read=read_value,\n            write=write_value,\n            path=path,\n        )\n\n    FIELD_SPECS = {\n        \"name\": ConfigFieldSpec(\n            name=\"name\",","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/entity/configs/node/memory.py#L446-L482","documentation":"MemoryRetrieveConfig.from_dict requires 'read' (default True) to be a Python bool. Any other type — string 'true', int 1, etc. — raises this ConfigError with path pointing at 'read'.","triggerScenarios":"Setting read: 'true', read: 1, or read: yes-as-string in the retrieve config mapping. (Note: YAML 1.1 'yes' parses as bool; 'true' quoted parses as string.)","commonSituations":"Env-var or CLI-derived settings injected as strings; JSON produced by tools that stringify booleans; hand-edited configs with quoted booleans.","solutions":["Use an unquoted boolean: read: true / false","Convert string flags with something like value.lower() in ('true','1') before building the mapping","Omit the key to default to true"],"exampleFix":"# before\nread: 'false'\n# after\nread: false","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"def is_bool(v) -> bool:\n    return isinstance(v, bool)","tryCatchPattern":"try:\n    MemoryRetrieveConfig.from_dict(d, path='retrieve')\nexcept ConfigError as e:\n    if 'read must be boolean' in str(e):\n        d['read'] = str(d['read']).lower() in ('true', '1')\n        MemoryRetrieveConfig.from_dict(d, path='retrieve')","preventionTips":["Never quote booleans in configs","Normalize string flags before parsing"],"tags":["config","validation","boolean","memory"],"backgroundTag":"invalid-config-value-type","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}