{"record":{"id":"1faee69af8bbf6c2","repo":"multica-ai/multica","slug":"s-q-cannot-stat-source-s-w","errorCode":null,"errorMessage":"%s %q: cannot stat source %s: %w","messagePattern":"(.+?) %q: cannot stat source (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_home.go","lineNumber":924,"sourceCode":"func syncCodexReferencedFile(codexHome, sharedHome, key, configValue string) error {\n\treferencedPath := strings.TrimSpace(configValue)\n\tif referencedPath == \"\" {\n\t\treturn nil\n\t}\n\n\tsrc, err := resolveCodexConfigPath(referencedPath, sharedHome, key)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := os.Stat(src)\n\tif os.IsNotExist(err) {\n\t\treturn fmt.Errorf(\"%s %q resolved to missing file %s: %w\", key, referencedPath, src, err)\n\t}\n\tif err != nil {\n\t\t// Not a confident absence — a permission or IO failure must not be\n\t\t// reported as \"the file isn't there\", which sends operators looking for\n\t\t// the wrong problem.\n\t\treturn fmt.Errorf(\"%s %q: cannot stat source %s: %w\", key, referencedPath, src, err)\n\t}\n\n\tif filepath.IsAbs(referencedPath) || strings.HasPrefix(referencedPath, \"~\") {\n\t\treturn nil\n\t}\n\tif !info.Mode().IsRegular() {\n\t\treturn fmt.Errorf(\"%s %q resolved to %s, which is not a regular file\", key, referencedPath, src)\n\t}\n\tcleanReferencedPath := filepath.Clean(referencedPath)\n\tif !filepath.IsLocal(cleanReferencedPath) {\n\t\treturn fmt.Errorf(\"%s %q must be a local relative path or an absolute path\", key, referencedPath)\n\t}\n\treturn materialiseInCodexHome(codexHome, cleanReferencedPath, src, key)\n}\n\n// openVerifiedCodexHomeRoot opens codexHome as a confinement root and only\n// returns it once the opened directory is proven to still BE codexHome.\n//","sourceCodeStart":906,"sourceCodeEnd":942,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_home.go#L906-L942","documentation":"Error \"%s %q: cannot stat source %s: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/codex_home.go:924 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the source file exists and is accessible."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}