Skip to content

CLI: Update hypeman SDK to 508a8c69feb30aa3e3ce115b4037b564ad9a3cda and add new commands/flags#43

Merged
sjmiller609 merged 5 commits intomainfrom
cli-coverage-update
Mar 23, 2026
Merged

CLI: Update hypeman SDK to 508a8c69feb30aa3e3ce115b4037b564ad9a3cda and add new commands/flags#43
sjmiller609 merged 5 commits intomainfrom
cli-coverage-update

Conversation

@kernel-internal
Copy link
Contributor

@kernel-internal kernel-internal bot commented Mar 23, 2026

This PR updates the Hypeman Go SDK to 508a8c69feb30aa3e3ce115b4037b564ad9a3cda and adds CLI commands/flags for new SDK methods.

SDK Update

  • Updated hypeman-go to 508a8c69feb30aa3e3ce115b4037b564ad9a3cda

Coverage Analysis

This PR was generated by performing a full enumeration of SDK methods and CLI commands.

New Commands

  • hypeman image create for client.Images.New()
  • hypeman update for client.Instances.Update()
  • hypeman stats for client.Instances.Stats()
  • hypeman snapshot create|restore|list|get|delete|fork for snapshot SDK methods
  • hypeman resources reclaim-memory for client.Resources.ReclaimMemory()

New Flags

  • --tag filters/metadata flags across list/create commands (images, volumes, devices, ingresses, builds, run, ps)
  • --snapshot-compression-* on hypeman run and hypeman standby
  • --network-egress-enabled, --network-egress-mode, and --credentials-json on hypeman run

Triggered by: kernel/hypeman-go@508a8c6
Reviewer: @sjmiller609

Made with Cursor


Note

Medium Risk
Medium risk due to broad CLI surface-area expansion and new instance/network/snapshot policy parameters being sent to the API. Most changes are additive but could alter behavior for run, standby, and list filtering if flags are misused or parsed differently.

Overview
Updates github.com/kernel/hypeman-go to a newer commit and wires the CLI to newly available SDK endpoints.

Adds new top-level commands: hypeman snapshot (create/restore/list/get/delete/fork), hypeman stats (instance live stats), and hypeman update egress-credentials (rotate env-backed egress credentials). Adds hypeman resources reclaim-memory to request guest memory reclaim and report the plan/results.

Introduces a shared --tag KEY=VALUE parsing helper and applies it broadly for tagging on create operations and tag-based filtering on list operations (builds, images, volumes, devices, ingresses, instances via ps, and instance creation via run). Extends run with --credentials-json, network egress policy flags, and snapshot compression policy flags; extends standby with snapshot compression options passed through to the API.

Written by Cursor Bugbot for commit f918848. This will update automatically on new commits. Configure here.

…nd add new commands/flags

Bump the CLI to the latest hypeman-go revision and expand command/flag coverage for newly exposed SDK methods, including snapshots, instance stats/update, memory reclaim, and tag/compression options.

Made-with: Cursor
@sjmiller609
Copy link
Contributor

QA summary:

  • Verified image create, image list --tag, image get, and image delete for digest-only images.
  • Verified run with the new --tag, --credentials-json, --network-egress-enabled, --network-egress-mode, and --snapshot-compression-* flags.
  • Verified ps --tag and the --metadata alias both filter correctly.
  • Verified stats returns live instance resource data.
  • Verified update --env succeeds on a running instance.
  • Verified standby --compression-* and restore work.
  • Verified snapshot create, snapshot list, snapshot get, snapshot restore, snapshot delete, and snapshot fork, including compressed snapshots.
  • Verified volume create/list/get/delete with --tag.
  • Verified ingress create/list/get/delete with --tag.
  • Verified resources reclaim-memory --dry-run sends dry_run: true and now returns applied_reclaim_bytes: 0.

@sjmiller609
Copy link
Contributor

renamed to hypeman update egress-credentials <instance> --env KEY=VALUE instead of hypeman update env... which seems like it would update envs, not just the egress envs

@sjmiller609 sjmiller609 merged commit b6783ad into main Mar 23, 2026
4 checks passed
@sjmiller609 sjmiller609 deleted the cli-coverage-update branch March 23, 2026 19:29
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

compression.Algorithm = parsedAlgorithm
}
params.Compression = compression
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compression config logic triplicated across three commands

Low Severity

The compression config building block (SnapshotCompressionConfigParam construction with the Enabled-defaulting-to-true logic, level parsing, and algorithm parsing) is copy-pasted across handleStandby, handleRun, and handleSnapshotCreate. The three copies already diverge in error handling — run.go double-wraps the algorithm error with fmt.Errorf("invalid snapshot compression algorithm: %w", err) while the other two return err directly. A shared helper accepting flag-name prefixes would eliminate the duplication and the inconsistency.

Additional Locations (2)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant