{"record":{"id":"6a9530f9a605fb59","repo":"JuliusBrussee/caveman","slug":"open-recovery-store-q-w","errorCode":null,"errorMessage":"open recovery store %q: %w","messagePattern":"open recovery store %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shrink/shrink.go","lineNumber":70,"sourceCode":"func resolveStore(opts []Option) (*ccr.Store, func() error, error) {\n\tvar cfg config\n\tfor _, o := range opts {\n\t\to(&cfg)\n\t}\n\tif cfg.store != nil {\n\t\treturn cfg.store, func() error { return nil }, nil\n\t}\n\tpath := cfg.path\n\tif path == \"\" {\n\t\tp, err := defaultCCRPath()\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tpath = p\n\t}\n\ts, err := ccr.Open(path)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"open recovery store %q: %w\", path, err)\n\t}\n\treturn s, s.Close, nil\n}\n\n// defaultCCRPath resolves the durable shared recovery store path, mirroring the\n// engine CLI, MCP server, and proxy: CAVEMAN_CCR_DB, else CAVEMAN_HOME/ccr.db,\n// else ~/.caveman/ccr.db. It creates the parent directory so the first shrink on a\n// machine succeeds.\nfunc defaultCCRPath() (string, error) {\n\tif p := os.Getenv(\"CAVEMAN_CCR_DB\"); p != \"\" {\n\t\treturn p, nil\n\t}\n\thome := os.Getenv(\"CAVEMAN_HOME\")\n\tif home == \"\" {\n\t\th, err := os.UserHomeDir()\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolve home directory: %w\", err)\n\t\t}","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shrink/shrink.go#L52-L88","documentation":"Error \"open recovery store %q: %w\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shrink/shrink.go:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix opening the recovery store (path/permissions) and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}