{"record":{"id":"8095cf861aa2d47b","repo":"EpicGames/lore","slug":"failed-to-create-stores","errorCode":null,"errorMessage":"Failed to create stores","messagePattern":"Failed to create stores","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/quic/storage_service_v4.rs","lineNumber":539,"sourceCode":"            immutable_store.clone(),\n            mutable_store,\n            Arc::new(UserAgentFilter::default()),\n        )\n    }\n\n    fn make_header(cmd: u8) -> CommandHeader {\n        CommandHeader {\n            cmd,\n            ..CommandHeader::default()\n        }\n    }\n\n    #[tokio::test]\n    async fn parse_client_identify_opcode_returns_variant() {\n        use lore_transport::quic::storage_service::Command;\n        // The stores are unused by parse_request_bytes, so a minimal service suffices.\n        let (immutable_store, mutable_store, _exec) =\n            test_store_create().await.expect(\"Failed to create stores\");\n        let service = make_service(immutable_store, mutable_store);\n\n        let header = make_header(Command::ClientIdentify as u8);\n        let payload = Bytes::from(\"my-client/1.0\");\n\n        let parsed = service\n            .parse_request_bytes(&header, payload)\n            .expect(\"parsing a ClientIdentify request must succeed\");\n\n        assert!(\n            matches!(parsed, ParsedStorageRequestV4::ClientIdentify(_)),\n            \"expected ClientIdentify variant, got {parsed:?}\"\n        );\n    }\n\n    #[tokio::test]\n    async fn parse_client_identify_stores_value() {\n        use lore_transport::quic::storage_service::Command;","sourceCodeStart":521,"sourceCodeEnd":557,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/quic/storage_service_v4.rs#L521-L557","documentation":"A Rust test panic from `.expect(\"Failed to create stores\")` on `test_store_create()` in `parse_client_identify_opcode_returns_variant` (lore-server/src/quic/storage_service_v4.rs:539). The shared helper `test_store_create` (which builds an immutable store, a mutable store, and an ExecutionContext via `lore_storage::local` backends under a LORE_CONTEXT scope) returned a `lore_storage::StoreError`, so the test cannot construct the StorageServiceV4 fixture. The stores are only needed to instantiate the service; the parse itself doesn't use them.","triggerScenarios":"Calling `test_store_create().await` in a `#[tokio::test]` and the local store backend fails to initialize — e.g. temp-directory creation/permission failure, `lore_storage::local::immutable_store::create` erroring, or `setup_test_execution()`/LORE_CONTEXT scope misconfigured.","commonSituations":"Happens on machines/CI where the test temp root is read-only or full, when environment variables the local store backend relies on are unset, or after a change to the store-creation helper's signature or the local backend's init requirements.","solutions":["Surface the real StoreError: `.unwrap_or_else(|e| panic!(\"Failed to create stores: {e:?}\"))` and rerun to see whether it is an IO/permission/path error.","Check the test environment: ensure the temp directory used by `lore_storage::local` exists, is writable, and any required env vars/config are set.","Verify `test_store_create` (lore-server/src/store/mod.rs:232) and `setup_test_execution` still match the current `lore_storage::local` create APIs; update the helper if the backend changed.","Rerun with a clean build/target dir to rule out stale test state from a previous run."],"exampleFix":"// before\nlet (immutable_store, mutable_store, _exec) =\n    test_store_create().await.expect(\"Failed to create stores\");\n// after\nlet (immutable_store, mutable_store, _exec) = test_store_create()\n    .await\n    .unwrap_or_else(|e| panic!(\"Failed to create stores: {e:?}\"));","handlingStrategy":"retry","validationCode":"// Pre-flight: verify the temp root the local stores use is writable\nlet dir = std::env::temp_dir();\nassert!(dir.exists() && !dir.metadata().unwrap().permissions().readonly(),\n        \"temp dir must exist and be writable for store fixtures\");","typeGuard":null,"tryCatchPattern":"let (immutable, mutable, exec) = test_store_create()\n    .await\n    .unwrap_or_else(|e| panic!(\"Failed to create stores: {e:?}\"));","preventionTips":["Use unique tempfile-based directories per test to avoid parallel-run collisions.","Keep test_store_create in sync with lore_storage::local create APIs.","Check CI runners provide a writable, non-full temp filesystem."],"tags":["rust","test-panic","storage","test-fixture","store-creation"],"backgroundTag":"module-init-failed","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"}