{"record":{"id":"43da975320392ef7","repo":"RyanCodrai/turbovec","slug":"namespace-must-not-contain-a-windows-drive-re","errorCode":null,"errorMessage":"namespace must not contain ':' (a Windows drive-relative name like 'C:foo' escapes persist_dir); got {namespace!r}. It names a store within persist_dir, not a path.","messagePattern":"namespace must not contain ':' \\(a Windows drive-relative name like 'C:foo' escapes persist_dir\\); got (.+?)\\. It names a store within persist_dir, not a path\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"turbovec-python/python/turbovec/llama_index.py","lineNumber":176,"sourceCode":"    (alphanumerics, dash, underscore, dots, and other non-separator\n    characters); dotted namespaces such as ``v1.2`` map to distinct\n    file pairs and coexist in one ``persist_dir``.\n\n    This is a deliberate divergence from ``SimpleVectorStore``, which does\n    not sanitize its namespace, in the safer direction.\n    \"\"\"\n    if namespace == \"\" or namespace == \".\":\n        raise ValueError(\n            f\"namespace must be a non-empty name, got {namespace!r}\"\n        )\n    if \"/\" in namespace or \"\\\\\" in namespace or os.sep in namespace or \"..\" in namespace:\n        raise ValueError(\n            \"namespace must not contain path separators ('/' or '\\\\\\\\') or \"\n            f\"'..'; got {namespace!r}. It names a store within persist_dir, \"\n            \"not a path.\"\n        )\n    if \":\" in namespace:\n        raise ValueError(\n            \"namespace must not contain ':' (a Windows drive-relative name \"\n            f\"like 'C:foo' escapes persist_dir); got {namespace!r}. It \"\n            \"names a store within persist_dir, not a path.\"\n        )\n    return namespace\n\n\ndef _split_persist_base(persist_path: str | Path) -> Path:\n    \"\"\"Derive the on-disk base from ``persist_path``: the binary index is\n    written to ``{base}.tvim`` and the node side-car to\n    ``{base}.nodes.json`` (extensions *appended* — see ``_with_ext``).\n\n    Only a trailing ``.json`` — the conventional extension the framework\n    hands us via ``{namespace}__vector_store.json`` — is stripped; every\n    other character of the name is kept verbatim, including dots from a\n    dotted namespace. ``v1.2__vector_store.json`` and\n    ``v1.3__vector_store.json`` therefore map to distinct file pairs.\n    (The previous ``with_suffix``-based implementation re-split the stem","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/RyanCodrai/turbovec/blob/ccab9f325e6ce2a270a87daf01ae4e443bcf2d49/turbovec-python/python/turbovec/llama_index.py#L158-L194","documentation":"Raised in _validate_namespace when the namespace contains ':'. On Windows a colon forms a drive-relative name like 'C:foo' that escapes persist_dir without any path separator, bypassing the separator check; such namespaces are rejected rather than silently rewritten.","triggerScenarios":"Thrown at turbovec-python/python/turbovec/llama_index.py:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove ':' from the namespace (e.g. 'C:foo' -> 'C_foo').","Sanitize user-supplied namespace strings before constructing the store.","Catch the ValueError in tooling as part of the namespace path-escape defenses."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ccab9f325e6ce2a270a87daf01ae4e443bcf2d49","analyzedAt":"2026-09-06T08:39:18.516Z","contentChangedAt":"2026-09-06T08:39:18.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}