Conversation
✱ Stainless preview buildsThis PR will update the ✅ hypeman-go studio · code
✅ hypeman-typescript studio · code
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
hiroTamada
left a comment
There was a problem hiding this comment.
well-designed feature. the single-goroutine event loop with conntrack integration is solid, state machine is correct, restart recovery via persisted runtime is thoughtful, and the periodic snapshot sync provides a good safety net. code is clean, well-tested, and the README is excellent.
one minor nit inline about O(N) iteration per conntrack event — not blocking, just something to revisit if host density grows significantly.
|
a few non-blocking observations from the review:
|
This comment was marked as resolved.
This comment was marked as resolved.
|
Follow-up on Hiro's top-level notes:
|
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.
Reviewed by Cursor Bugbot for commit f9800fe. Configure here.

Summary
lib/autostandbypackageauto_standbypolicy through instance metadata and API surfacesTesting
go test -count=1 ./lib/autostandbygo test -count=1 -run "Test(ValidateUpdateInstanceRequest|CloneStoredMetadataForFork_DeepCopiesReferenceFields)$" ./lib/instancesgo test -count=1 -run "Test(CreateInstance_MapsAutoStandbyPolicy|UpdateInstance_MapsAutoStandbyPatch)$" ./cmd/api/apigo test -run "^$" ./cmd/apisudo -n env PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH HYPEMAN_RUN_AUTO_STANDBY_E2E=1 go test -count=1 -run ^TestAutoStandbyCloudHypervisorActiveInboundTCP$ ./lib/instancesondeft-kernel-devIntegration test coverage
The default-skipped Linux integration test exercised a real Cloud Hypervisor VM with networking enabled and a real conntrack-backed auto-standby controller.
It verified that:
Runningwhile that inbound TCP connection remains openStandbyNote
Medium Risk
Introduces a new background controller that can transition VMs to
Standbybased on host conntrack state and persists new per-instance metadata, which could affect instance lifecycle behavior if misconfigured. Risk is mitigated by being opt-in via anauto_standbypolicy and having validation plus tests, but it touches core instance create/update paths and process startup.Overview
Adds an opt-in auto-standby feature that monitors host-side IPv4 TCP conntrack activity and automatically places eligible Linux VMs into
Standbyafter a configured idle timeout.Exposes the per-instance
auto_standbypolicy through the instance create/update APIs (with validation and OAPI mapping), persists controller-owned runtime timestamps inmetadata.json, and adds a new per-instanceGetAutoStandbyStatusdiagnostic endpoint.Wires the new
autostandby.Controllerinto the API process lifecycle (Wire provider + startup goroutine), and includes unit tests plus a default-skipped Linux E2E test that verifies host→guest TCP activity prevents standby until connections close.Reviewed by Cursor Bugbot for commit 896ee1a. Bugbot is set up for automated code reviews on this repo. Configure here.