Execution results APP-7350#7
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
APP-7350 Step 9: `dune query results`
One-shot fetch via Acceptance criteria:
Tests:
|
PR SummaryMedium Risk Overview Refactors result rendering used by Written by Cursor Bugbot for commit c9274b4. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Negative flag value wraps to huge unsigned number
- Added individual non-negative validation for limit and offset flags before casting to unsigned types to prevent integer wrapping.
Or push these changes by commenting:
@cursor push db5f18399a
Preview (db5f18399a)
diff --git a/cmd/execution/results.go b/cmd/execution/results.go
--- a/cmd/execution/results.go
+++ b/cmd/execution/results.go
@@ -30,6 +30,13 @@
limit, _ := cmd.Flags().GetInt("limit")
offset, _ := cmd.Flags().GetInt("offset")
+ if limit < 0 {
+ return fmt.Errorf("limit must be non-negative, got %d", limit)
+ }
+ if offset < 0 {
+ return fmt.Errorf("offset must be non-negative, got %d", offset)
+ }
+
opts := models.ResultOptions{}
if limit > 0 || offset > 0 {
opts.Page = &models.ResultPageOption{Comment @cursor review or bugbot run to trigger another review on this PR
| case "QUERY_STATE_CANCELLED": | ||
| return fmt.Errorf("execution was cancelled") | ||
| default: | ||
| return fmt.Errorf("unexpected execution state: %s", resp.State) |
There was a problem hiding this comment.
Known QUERY_STATE_EXPIRED state treated as unexpected
Low Severity
The plan document explicitly lists QUERY_STATE_EXPIRED as a valid API state, but the switch statement has no case for it. It falls through to the default branch, producing the misleading message "unexpected execution state: QUERY_STATE_EXPIRED" — even though it's a known, expected state that deserves a clearer user-facing message.
Add validation to ensure limit and offset flags are non-negative before casting to unsigned types. This prevents negative values from wrapping to large positive numbers (e.g., uint64(-1) = 18446744073709551615). Applied via @cursor push command




Uh oh!
There was an error while loading. Please reload this page.