{"record":{"id":"e916cca2a2530832","repo":"multica-ai/multica","slug":"create-temp-workspaces-root-marker-w","errorCode":null,"errorMessage":"create temp workspaces root marker: %w","messagePattern":"create temp workspaces root marker: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/context.go","lineNumber":97,"sourceCode":"\tif err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {\n\t\treturn fmt.Errorf(\"create workspaces root marker dir: %w\", err)\n\t}\n\tif err := writeWorkspacesRootMarkerAtomic(path, data); err != nil {\n\t\treturn fmt.Errorf(\"write workspaces root marker: %w\", err)\n\t}\n\treturn nil\n}\n\n// writeWorkspacesRootMarkerAtomic writes data to path via a same-directory temp\n// file plus a rename, so a concurrent reader observes either the old file or the\n// complete new one — never a partial write. Mirrors the daemon-id / CLI-config\n// write idiom (see writeDaemonIDFile). Perm is 0644 because the CLI's upward\n// walk must be able to read the marker from a subprocess that may run under a\n// different uid; the payload is non-secret.\nfunc writeWorkspacesRootMarkerAtomic(path string, data []byte) error {\n\ttmp, err := os.CreateTemp(filepath.Dir(path), \".daemon_task_context-*.json.tmp\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"create temp workspaces root marker: %w\", err)\n\t}\n\ttmpPath := tmp.Name()\n\tif _, err := tmp.Write(data); err != nil {\n\t\ttmp.Close()\n\t\tos.Remove(tmpPath)\n\t\treturn fmt.Errorf(\"write temp workspaces root marker: %w\", err)\n\t}\n\tif err := tmp.Close(); err != nil {\n\t\tos.Remove(tmpPath)\n\t\treturn fmt.Errorf(\"close temp workspaces root marker: %w\", err)\n\t}\n\tif err := os.Chmod(tmpPath, 0o644); err != nil {\n\t\tos.Remove(tmpPath)\n\t\treturn fmt.Errorf(\"chmod temp workspaces root marker: %w\", err)\n\t}\n\tif err := os.Rename(tmpPath, path); err != nil {\n\t\tos.Remove(tmpPath)\n\t\treturn fmt.Errorf(\"rename workspaces root marker: %w\", err)","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/context.go#L79-L115","documentation":"Error \"create temp workspaces root marker: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/context.go:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and permissions for the temp directory."],"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-15T22:17:37.221Z"}