{"record":{"id":"3ca6476738876cef","repo":"multica-ai/multica","slug":"disk-usage-workspaces-root-is-required","errorCode":null,"errorMessage":"disk-usage: workspaces root is required","messagePattern":"disk-usage: workspaces root is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/diskusage.go","lineNumber":158,"sourceCode":"// ScanDiskUsage walks workspacesRoot and returns the disk-usage report. The\n// walk is read-only, never follows symlinks, and counts only regular files.\n// artifactPatterns is filtered through the basename-only check used by\n// cleanTaskArtifacts, and exact daemon-managed artifact paths are included, so\n// the reported \"artifact\" footprint matches the bytes the GC would actually\n// reclaim. A .git subtree counts toward the total but never toward that\n// artifact footprint — see taskSize. Missing roots return an empty report\n// (not an error) — a daemon that's never run yet has no directory to walk.\n//\n// The scan is purely local. ParentStatus is left empty; callers that want the\n// STATUS column populated run ResolveParentStatuses afterwards.\nfunc ScanDiskUsage(workspacesRoot string, artifactPatterns []string) (DiskUsageReport, error) {\n\treport := DiskUsageReport{\n\t\tWorkspacesRoot:   workspacesRoot,\n\t\tGeneratedAt:      time.Now().UTC(),\n\t\tArtifactPatterns: nil,\n\t}\n\tif workspacesRoot == \"\" {\n\t\treturn report, fmt.Errorf(\"disk-usage: workspaces root is required\")\n\t}\n\n\tmatcher := newArtifactMatcher(artifactPatterns, execenv.ManagedReclaimableArtifactSubpaths())\n\treport.ArtifactPatterns = sortedKeys(matcher.basenames)\n\treport.ManagedArtifactSubpaths = matcher.managedSubpaths()\n\n\twsEntries, err := os.ReadDir(workspacesRoot)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn report, nil\n\t\t}\n\t\treturn report, fmt.Errorf(\"disk-usage: read workspaces root: %w\", err)\n\t}\n\n\twsAgg := map[string]*WorkspaceDiskUsage{}\n\n\tfor _, wsEntry := range wsEntries {\n\t\tif !wsEntry.IsDir() {","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/diskusage.go#L140-L176","documentation":"Error \"disk-usage: workspaces root is required\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/diskusage.go:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the workspaces root before running disk-usage."],"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"}