Cursor bug bot fixes - #15
Merged
Merged
Conversation
|
Semgrep found 2 No explicit |
anekkanti
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Updates to address the cursor bot issues flagged in #9
Included the changes for most of the cursor bot comments in this PR since each change is pretty small, but please let me know if it'd be preferable to split this up into individual PRs.
List of comments and how they were addressed:
Comment 1: Wrong parameter passed to promptApplyResource
Resolution: Added
diffoption set with averbose-diffflag and used this flag for the commands.Comment 2: Temp file never deleted in editor function
Resolution: Lines 84-87 in common.go now include a defer statement that calls
os.Removeto clean up the temp file.Comment 3: Edit command may create wrong namespace on name change
Resolution: Changed apply command to call
updateNamespace/createNamespacedirectly instead ofapplyNamespace, and updated all other commands (edit, retention set, lifecycle set) to useupdateNamespacedirectly.
Comment 4: CommonOptions not propagated to CloudOptions in Build
Resolution:
CloudOptionsBuilder.BuildassignsCommonOptionstocloudOptson line 55 of cloud.go.Comment 5: Test validates wrong variable for server config
Resolution: Line 185 in commands_test.go now correctly validates
s.serverinstead ofs.apiKey.Comment 6: Multiple unexported functions are unused dead code
Resolution: All unused functions (aliasNormalizer, timestampToTime, fromApplicationError, encodeMapToPayloads, overrideFlagDisplayType) have been removed from commands.go.
Comment 7: Login dereferences potentially nil ClientConfig pointer
Resolution: Line 22 in commands.login.go now checks loadClientOauthRes.OAuth.Token != nil before dereferencing ClientConfig on line 24.
Comment 8: Build workflow missing Go setup step
Resolution: Both jobs in build.yml now include actions/setup-go@v6 steps (lines 19-24 and 46-51).
Why?
Checklist
Closes
How was this tested:
Note
Medium Risk
Touches namespace create/update flows and prompting behavior, which can affect how changes are applied to real cloud resources, but changes are small and largely correctness/hardening focused.
Overview
CI/workflows: Add explicit
actions/setup-go@v6(viago.mod) to build and test workflows and set minimalcontents: readpermissions.CLI correctness fixes: Introduce a shared
DiffOptions/--verbose-diffoption set and wire it into namespace mutation commands sopromptApplyResourceuses the correct verbose-diff toggle (instead of--auto-confirm). Namespace mutation commands now callcreateNamespacevsupdateNamespacedirectly (and remove the oldapplyNamespacehelper) to avoid accidental namespace creation oneditwhen the spec name changes; retention/lifecycle/edit paths are aligned toupdateNamespace.Hardening/cleanup: Ensure editor temp files are deleted, propagate
CommonOptionsintoCloudOptions, guard against nil OAuth token/config during login, fix an integration test env-var assertion, and remove unused dead-code helpers fromcommands.go.Written by Cursor Bugbot for commit 7178a70. This will update automatically on new commits. Configure here.