{"record":{"id":"5d1cf914986821bf","repo":"multica-ai/multica","slug":"recent-must-be-a-positive-integer","errorCode":null,"errorMessage":"--recent must be a positive integer","messagePattern":"--recent must be a positive integer","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":1823,"sourceCode":"\tsummary, _ := cmd.Flags().GetBool(\"summary\")\n\tfull, _ := cmd.Flags().GetBool(\"full\")\n\t// Flags().Changed distinguishes \"user did not pass --recent\" from\n\t// \"user explicitly passed --recent 0\" (or a negative value). The\n\t// GetInt zero-value collapses both cases, which would otherwise\n\t// cause us to silently drop an invalid value and fall back to the\n\t// default unparameterized list — exactly the drift Elon flagged in\n\t// the PR #2787 second review. --tail follows the same pattern, and\n\t// also keeps \"--tail 0\" (root-only) distinguishable from \"no --tail\".\n\trecentSet := cmd.Flags().Changed(\"recent\")\n\ttailSet := cmd.Flags().Changed(\"tail\")\n\tbefore, _ := cmd.Flags().GetString(\"before\")\n\tbeforeID, _ := cmd.Flags().GetString(\"before-id\")\n\n\t// Mirror the server-side combination rules client-side so the user gets\n\t// a clear local error instead of a 400 round-trip. These match the\n\t// validation in handler.ListComments (server/internal/handler/comment.go).\n\tif recentSet && recent <= 0 {\n\t\treturn fmt.Errorf(\"--recent must be a positive integer\")\n\t}\n\tif tailSet && tail < 0 {\n\t\treturn fmt.Errorf(\"--tail must be a non-negative integer (0 returns just the thread root)\")\n\t}\n\tif thread != \"\" && recentSet {\n\t\treturn fmt.Errorf(\"--thread and --recent are mutually exclusive\")\n\t}\n\tif rootsOnly && thread != \"\" {\n\t\treturn fmt.Errorf(\"--roots-only and --thread are mutually exclusive\")\n\t}\n\tif rootsOnly && recentSet {\n\t\treturn fmt.Errorf(\"--roots-only and --recent are mutually exclusive\")\n\t}\n\tif rootsOnly && tailSet {\n\t\treturn fmt.Errorf(\"--roots-only and --tail are mutually exclusive\")\n\t}\n\tif rootsOnly && before != \"\" {\n\t\treturn fmt.Errorf(\"--roots-only does not support --before / --before-id\")","sourceCodeStart":1805,"sourceCodeEnd":1841,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L1805-L1841","documentation":"Error \"--recent must be a positive integer\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:1823 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a positive integer for --recent."],"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"}