CLI: Update hypeman SDK to 1f34cf2541 and add new flags#41
CLI: Update hypeman SDK to 1f34cf2541 and add new flags#41kernel-internal[bot] wants to merge 3 commits intomainfrom
Conversation
Update hypeman-go dependency from v0.11.0 to v0.11.1. A full enumeration of SDK methods and CLI commands was performed. No coverage gaps were found - all SDK methods have corresponding CLI commands and all param fields have corresponding flags. Co-authored-by: Cursor <cursoragent@cursor.com>
…s to ps - Updated hypeman-go to v0.12.0 (40bbd485e7a89cd21ae08554502e9dedf4999efc) - Added --state flag to `hypeman ps` for server-side state filtering - Added --metadata flag to `hypeman ps` for metadata key-value filtering - Updated Instances.List calls to pass InstanceListParams (new required param) Made-with: Cursor
| var filtered []hypeman.Instance | ||
| for _, inst := range *instances { | ||
| if showAll || inst.State == "Running" { | ||
| if showAll || stateFilter != "" || inst.State == "Running" { |
There was a problem hiding this comment.
Metadata filter results silently dropped by client-side filtering
High Severity
When --metadata is used without --state or --all, the server correctly filters by metadata, but the client-side filter at line 82 still only keeps instances where inst.State == "Running". This silently drops non-running instances that matched the metadata filter. The condition checks stateFilter != "" to bypass client-side filtering but doesn't account for the --metadata server-side filter being active. The comment on line 79 ("only when no server-side filter is active") confirms the intent, but metadata isn't included in the check.
Additional Locations (1)
…o build Update hypeman-go SDK from v0.12.0 to v0.13.0 (1f34cf2541337d9ec4a39f74581bba9cdcb1ec1b). Add missing CLI flags for BuildNewParams fields: - --cpus: Number of vCPUs for builder VM - --memory: Memory limit for builder VM in MB Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| var filtered []hypeman.Instance | ||
| for _, inst := range *instances { | ||
| if showAll || inst.State == "Running" { | ||
| if showAll || stateFilter != "" || inst.State == "Running" { |
There was a problem hiding this comment.
Misleading empty-result message when using --state filter
Medium Severity
When a user passes --state Stopped (or any non-Running state) and no instances match, the empty-results block at line 97 checks !showAll and prints "No running instances. Use -a to show all.". This message is incorrect and confusing — the user explicitly filtered by a specific state, so the message about "running instances" and suggesting -a doesn't apply. The condition needs to account for stateFilter being set.
| } | ||
| } | ||
| params.Metadata = metadata | ||
| } |
There was a problem hiding this comment.
Malformed metadata flags silently set empty map on params
Low Severity
If all --metadata values are malformed (missing =), the loop skips every entry but params.Metadata is still set to an empty map[string]string{}. An empty map may serialize differently than an omitted/nil field in the API request, potentially causing unexpected server-side behavior. The user also gets no feedback that their filter was invalid and silently ignored.


This PR updates the Hypeman Go SDK to 1f34cf2541337d9ec4a39f74581bba9cdcb1ec1b and adds CLI commands/flags for new SDK methods.
SDK Update
Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands.
New Flags
--cpusonhypeman buildforBuildNewParams.CPUs--memoryonhypeman buildforBuildNewParams.MemoryMBTriggered by: kernel/hypeman-go@1f34cf2
Reviewer: @stainless-app[bot]
Note
Medium Risk
Moderate risk due to the
hypeman-goSDK bump and updated API signatures/params affecting instance listing and build creation behavior. Main functional impact is new server-side filtering and resource parameterization, which could change defaults or output if params are mis-specified.Overview
Updates
github.com/kernel/hypeman-gotov0.13.0and adjusts CLI call sites to the newInstances.List(ctx, InstanceListParams)signature.Extends
hypeman pswith--stateand repeatable--metadata KEY=VALUEto request server-side filtered instance lists, and tweaks the client-side default filtering logic accordingly.Extends
hypeman buildwith optional--cpusand--memoryflags, wiring them intoBuildNewParams(CPUs,MemoryMB) when explicitly set.Written by Cursor Bugbot for commit f66ded9. This will update automatically on new commits. Configure here.