{"record":{"id":"3148c53f1ae4cadc","repo":"JuliusBrussee/caveman","slug":"open-ccr-w","errorCode":null,"errorMessage":"open ccr: %w","messagePattern":"open ccr: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mem/store.go","lineNumber":136,"sourceCode":"\t\treturn nil, fmt.Errorf(\"open memories db: %w\", err)\n\t}\n\tdb.SetMaxOpenConns(1)\n\tdb.SetMaxIdleConns(1)\n\t// The cold-start migration is multi-statement DDL; under a fan-out of fresh\n\t// processes it can outlast a single busy_timeout, so retry it on SQLITE_BUSY\n\t// (runtime writes rely on busy_timeout alone). Both steps are idempotent.\n\tif err := ccr.RetryOnBusy(func() error { _, e := db.Exec(memSchema); return e }); err != nil {\n\t\t_ = db.Close()\n\t\treturn nil, fmt.Errorf(\"migrate memories db: %w\", err)\n\t}\n\tif err := ccr.RetryOnBusy(func() error { return migrateMemorySchema(db) }); err != nil {\n\t\t_ = db.Close()\n\t\treturn nil, fmt.Errorf(\"migrate memories db: %w\", err)\n\t}\n\tstore, err := ccr.Open(ccrPath)\n\tif err != nil {\n\t\t_ = db.Close()\n\t\treturn nil, fmt.Errorf(\"open ccr: %w\", err)\n\t}\n\treturn &Store{db: db, eng: engine.New(store, nil), ccr: store}, nil\n}\n\n// Close releases the databases.\nfunc (s *Store) Close() error {\n\terr := s.db.Close()\n\tif cerr := s.ccr.Close(); cerr != nil && err == nil {\n\t\terr = cerr\n\t}\n\treturn err\n}\n\n// Memory is one stored memory.\ntype Memory struct {\n\tID           string  `json:\"id\"`\n\tText         string  `json:\"text\"`\n\tCreatedAt    string  `json:\"created_at\"`","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/mem/store.go#L118-L154","documentation":"Error \"open ccr: %w\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at mem/store.go:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix opening the ccr store 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"}