{"record":{"id":"f6ad5b38ac86e745","repo":"multica-ai/multica","slug":"s-q-resolved-to-s-which-is-not-a-regular-file","errorCode":null,"errorMessage":"%s %q resolved to %s, which is not a regular file","messagePattern":"(.+?) %q resolved to (.+?), which is not a regular file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_home.go","lineNumber":931,"sourceCode":"\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//\n// Checking the path first and opening it second is not enough: os.OpenRoot\n// resolves the path it is given, so a directory swapped for a link to somewhere\n// else between the check and the open yields a root that is happily confined —\n// to the wrong tree. Every subsequent root-scoped write would then land outside\n// the task home without ever \"escaping\" its root.\n//\n// That window is not hypothetical here. Task homes are reused, and on Windows","sourceCodeStart":913,"sourceCodeEnd":949,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_home.go#L913-L949","documentation":"Error \"%s %q resolved to %s, which is not a regular file\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/codex_home.go:931 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the reference at a regular file, not a directory or special file."],"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"}