Conversation
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ hypeman-typescript studio · code · diff
✅ hypeman-openapi studio · code · diff
✅ hypeman-go studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
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 789a08c. Configure here.
| import "sync" | ||
|
|
||
| // LifecycleEventAction identifies which instance lifecycle action occurred. | ||
| type LifecycleEventAction string |
There was a problem hiding this comment.
I thought we already have a lifecycle subscription system, checking

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 automatically transition running instances to
Standbybased on host conntrack state, plus new persisted metadata fields and API surfaces; incorrect classification or lifecycle wiring could cause unexpected standby behavior.Overview
Adds Linux-only auto-standby driven by host IPv4 TCP conntrack: a new
lib/autostandbycontroller tracks inbound connections via snapshots + netlink events, persists idle/runtime timestamps, and triggersStandbyInstanceafter the configured idle timeout (with metrics/tracing).Extends instance metadata and lifecycle plumbing to support this: instances now persist an
auto_standbypolicy and controller-ownedauto_standby_runtime, emit global lifecycle events, and allowUpdateInstanceto modifyauto_standbywithout requiring a running instance (env updates keep prior constraints).Exposes the feature through the API by mapping
auto_standbyon create/update/list/get, addingGetAutoStandbyStatusfor per-instance diagnostics, wiring the controller via Wire, and starting it incmd/apiwhen available; includes unit tests plus a default-skipped Linux E2E test using real conntrack and Cloud Hypervisor.Reviewed by Cursor Bugbot for commit 789a08c. Bugbot is set up for automated code reviews on this repo. Configure here.