{"record":{"id":"68fbab78d76b3ff0","repo":"EpicGames/lore","slug":"composite-store-not-supported-as-a-composite-substore","errorCode":null,"errorMessage":"Composite store not supported as a composite substore","messagePattern":"Composite store not supported as a composite substore","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/server.rs","lineNumber":1422,"sourceCode":") -> Result<Arc<dyn ImmutableStore>> {\n    match mode {\n        store_mode::LOCAL => {\n            let local_settings = settings\n                .local\n                .as_ref()\n                .ok_or(anyhow!(\"Missing composite local store settings\"))?;\n\n            configure_local_immutable_store(local_settings).await\n        }\n        store_mode::REMOTE => {\n            let remote_settings = settings\n                .remote\n                .as_ref()\n                .ok_or(anyhow!(\"Missing composite remote store settings\"))?;\n\n            configure_remote_immutable_store(remote_settings)\n        }\n        store_mode::COMPOSITE => Err(anyhow!(\n            \"Composite store not supported as a composite substore\"\n        )),\n        store_mode::REPLICATED => {\n            let replicated_settings = settings\n                .replicated\n                .as_ref()\n                .ok_or(anyhow!(\"Missing composite replicated store settings\"))?;\n\n            configure_replicated_immutable_store(replicated_settings).await\n        }\n        _ => {\n            // All other modes use the plugin system\n            let plugin_config = resolve_plugin_config_with_fallback(\n                &global_settings.plugins,\n                mode,\n                \"immutable_store\",\n            )\n            .unwrap_or_else(|| toml::Value::Table(toml::map::Map::new()));","sourceCodeStart":1404,"sourceCodeEnd":1440,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/server.rs#L1404-L1440","documentation":"Composite stores cannot themselves contain a composite substore; the implementation only supports local, remote, replicated, and plugin-provided modes as children. Requesting mode = \"composite\" for a substore is rejected outright at configuration time.","triggerScenarios":"A composite store's substore list contains an entry with mode = \"composite\"; configure_composite_substore hits the store_mode::COMPOSITE match arm and returns this error unconditionally, before touching any settings.","commonSituations":"Recursive config authoring mistake: nesting a composite block inside another composite's stores list expecting recursive composition; copy-paste of the outer store block into the subs tore list.","solutions":["Flatten the nested composite configuration into a single-level list of local/remote/replicated subs tores","Replace the nested composite substore with one of the supported modes or a plugin-provided store mode","Pre-validate the substore mode list before server startup and reject 'composite' with a clearer message"],"exampleFix":"# before\n[[immutable_store.composite.outer.stores]]\nmode = \"composite\"\n\n# after\n[[immutable_store.composite.outer.stores]]\nmode = \"local\"\n[immutable_store.composite.outer.stores.local]\npath = \"/data/store\"","handlingStrategy":"validation","validationCode":"for store in &composite.stores {\n    if store.mode == \"composite\" {\n        return Err(\"nested composite subs tores are not supported; flatten the configuration\");\n    }\n}","typeGuard":"fn is_nestable_mode(mode: &str) -> bool {\n    matches!(mode, \"local\" | \"remote\" | \"replicated\")\n}","tryCatchPattern":"match configure_composite_substore(&registry, mode, &settings, sub).await {\n    Err(e) if e.to_string().contains(\"not supported as a composite substore\") => {\n        eprintln!(\"flatten nested composite config for '{mode}'\"); std::process::exit(2);\n    }\n    r => r?,\n}","preventionTips":["Document that composition is single-level only","Validate substore modes at config-load time, before server startup","Never copy the outer composite block into its own stores list"],"tags":["configuration","rust","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"074eb0b0d1194c997d7cf28b55519e3e197b3e23","analyzedAt":"2026-09-13T09:00:57.509Z","contentChangedAt":"2026-09-13T09:00:57.509Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}