{"record":{"id":"894bb4867b22e85c","repo":"multica-ai/multica","slug":"top-must-be-a-non-negative-integer","errorCode":null,"errorMessage":"--top must be a non-negative integer","messagePattern":"--top must be a non-negative integer","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1781,"sourceCode":"\ttaskContext := inDaemonManagedExecutionContext()\n\tprofile := resolveProfile(cmd)\n\trootOverride, _ := cmd.Flags().GetString(\"workspaces-root\")\n\tbyWorkspace, _ := cmd.Flags().GetBool(\"by-workspace\")\n\tbyTask, _ := cmd.Flags().GetBool(\"by-task\")\n\ttop, _ := cmd.Flags().GetInt(\"top\")\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tallProfiles, _ := cmd.Flags().GetBool(\"all-profiles\")\n\n\tif taskContext {\n\t\tif err := checkTaskDiskUsageScope(profile, rootOverride, allProfiles); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif byWorkspace && byTask {\n\t\treturn fmt.Errorf(\"--by-workspace and --by-task are mutually exclusive\")\n\t}\n\tif top < 0 {\n\t\treturn fmt.Errorf(\"--top must be a non-negative integer\")\n\t}\n\tif allProfiles && rootOverride != \"\" {\n\t\treturn fmt.Errorf(\"--all-profiles and --workspaces-root are mutually exclusive\")\n\t}\n\n\tif allProfiles {\n\t\treturn runDaemonDiskUsageAggregate(cmd, byWorkspace, top, output)\n\t}\n\n\tworkspacesRoot, err := resolveDiskUsageRoot(taskContext, profile, rootOverride)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve workspaces root: %w\", err)\n\t}\n\n\treport, err := daemon.ScanDiskUsage(workspacesRoot, daemon.ArtifactPatternsFromEnv())\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":1763,"sourceCodeEnd":1799,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1763-L1799","documentation":"Error \"--top must be a non-negative integer\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1781 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-negative integer for --top."],"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"}