{"record":{"id":"f2005c6f91e89db8","repo":"EpicGames/lore","slug":"failed-to-create-store","errorCode":null,"errorMessage":"Failed to create store","messagePattern":"Failed to create store","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/quic/stream_handler.rs","lineNumber":1090,"sourceCode":"    impl StreamHandlerFactory for SingleServiceFactory {\n        fn supported_protocols(&self) -> Vec<String> {\n            self.service_store.get_supported_services()\n        }\n\n        fn get_stream_handler_builder(\n            &self,\n            protocol: &str,\n        ) -> Option<(&&'static str, &StreamDataHandlerBuilder)> {\n            self.service_store.get_stream_builder(protocol)\n        }\n    }\n\n    #[tokio::test]\n    async fn test_command() {\n        let repository = random::<Context>();\n\n        let (immutable_store, mutable_store, execution) =\n            test_store_create().await.expect(\"Failed to create store\");\n        lore_spawn!(LORE_CONTEXT.scope(execution.clone(), async move {\n            let mut harness = serve_and_connect(\n                Box::new(TestHandlerFactory::new(\n                    immutable_store,\n                    mutable_store.clone(),\n                )),\n                TEST_PROTOCOL,\n            )\n            .await;\n\n            let token = \"some-token\";\n            let token_bytes = token.as_bytes();\n\n            let header = CommandHeader::new(\n                Command::Authorize as QuicOpCode,\n                random::<u32>(),\n                size_of::<Context>() + token_bytes.len(),\n            );","sourceCodeStart":1072,"sourceCodeEnd":1108,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/quic/stream_handler.rs#L1072-L1108","documentation":"This is a `.expect(\"Failed to create store\")` panic in the `test_command` QUIC integration test when the shared `test_store_create()` helper fails to build the immutable store, mutable store, and execution context. The helper initializes a temporary repository-backed store inside the LORE_CONTEXT runtime scope; any StoreError from setup (temp dir creation, store initialization, state serialization) aborts the test with this message.","triggerScenarios":"`test_store_create().await.expect(...)` returns Err — e.g. the temp repository directory cannot be created/written, the ExecutionContext or store backends fail to initialize, or the tokio runtime context (LORE_CONTEXT) is not set up as the helper expects.","commonSituations":"Running tests in a sandboxed CI without writable temp space; disk-full or permission-restricted TMPDIR; a regression in store initialization code that the 160+ tests sharing this helper immediately expose; running the test outside the expected async runtime setup.","solutions":["Check the underlying StoreError source in the panic message to identify which setup step failed","Verify TMPDIR is writable and has free space in the test environment","Run `cargo test -p lore-server test_command -- --nocapture` to see the full error chain","Fix the store/execution initialization regression in lore-server/src/store/mod.rs test_store_create"],"exampleFix":"// before\nlet (immutable_store, mutable_store, execution) =\n    test_store_create().await.expect(\"Failed to create store\");\n// after\nlet (immutable_store, mutable_store, execution) = test_store_create()\n    .await\n    .unwrap_or_else(|e| panic!(\"test store setup failed: {e:?}\"));","handlingStrategy":"try-catch","validationCode":"// Rust: assert setup succeeds with context instead of bare expect\nlet stores = test_store_create().await.unwrap_or_else(|e|\n    panic!(\"test store setup failed: {e:?}\"));","typeGuard":null,"tryCatchPattern":"match test_store_create().await {\n    Ok((i, m, e)) => (i, m, e),\n    Err(err) => panic!(\"store setup failed: {err:?}\"),\n}","preventionTips":["Keep test store setup in one shared, well-tested helper","Ensure CI runners have writable temp dirs and adequate disk space","Log the full error chain in setup helpers, not just a static expect message"],"tags":["rust","test-setup","store-initialization","panic"],"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"}