{"record":{"id":"3005c1ab459edca3","repo":"mvanhorn/last30days-skill","slug":"engine-create-s-w","errorCode":null,"errorMessage":"engine: create %s: %w","messagePattern":"engine: create (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp/internal/engine/extract.go","lineNumber":137,"sourceCode":"\t\tif d.IsDir() {\n\t\t\treturn os.MkdirAll(target, 0o755)\n\t\t}\n\t\treturn copyEmbeddedFile(src, path, target)\n\t})\n}\n\nfunc copyEmbeddedFile(src fs.FS, srcPath, dst string) error {\n\tin, err := src.Open(srcPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"engine: open %s: %w\", srcPath, err)\n\t}\n\tdefer func() { _ = in.Close() }()\n\tif err := os.MkdirAll(filepath.Dir(dst), 0o755); err != nil {\n\t\treturn fmt.Errorf(\"engine: ensure parent of %s: %w\", dst, err)\n\t}\n\tout, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"engine: create %s: %w\", dst, err)\n\t}\n\tdefer func() { _ = out.Close() }()\n\tif _, err := io.Copy(out, in); err != nil {\n\t\treturn fmt.Errorf(\"engine: write %s: %w\", dst, err)\n\t}\n\treturn nil\n}\n\n// onceRegistry serializes first-call extraction per cache directory so the\n// rename in ensureLocked happens exactly once across goroutines.\nvar (\n\tonceMu       sync.Mutex\n\tonceRegistry = map[string]*sync.Once{}\n)\n\nfunc getOnce(cacheDir string) *sync.Once {\n\tonceMu.Lock()\n\tdefer onceMu.Unlock()","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/mvanhorn/last30days-skill/blob/c7460f6114449ddfe6ea3fc2f23c3d910c0e740c/mcp/internal/engine/extract.go#L119-L155","documentation":"Error \"engine: create %s: %w\" thrown in mvanhorn/last30days-skill.","triggerScenarios":"Fires when the engine cannot create a payload file in the cache directory, typically from permission errors, a full disk, or a path collision with an existing non-file entry.","commonSituations":"See trigger scenarios.","solutions":["Check write permissions on the cache directory and free disk space if needed.","Remove any conflicting non-writable file at the named path and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c7460f6114449ddfe6ea3fc2f23c3d910c0e740c","analyzedAt":"2026-08-15T03:34:49.540Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}