Skip to content
Closed
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5595c78
instances: add Initializing state and gate Running on agent/program r…
sjmiller609 Mar 8, 2026
d973033
tests: fix lifecycle flakes for Initializing transition
sjmiller609 Mar 8, 2026
423399b
instances: add Initializing state and gate Running on agent/program r…
sjmiller609 Mar 9, 2026
ffb4e43
skills: add concise initializing-speed optimization playbook
sjmiller609 Mar 9, 2026
fffe995
Update skill
sjmiller609 Mar 9, 2026
9bf231f
instances: throttle boot-marker log scans during state derivation
sjmiller609 Mar 9, 2026
ecfd653
tests: increase manager lifecycle running wait to 20s
sjmiller609 Mar 9, 2026
56cec52
instances: clear boot markers on stop/restore and tighten transitions
sjmiller609 Mar 9, 2026
37f30ad
instances: allow fork target Running while still Initializing
sjmiller609 Mar 9, 2026
3d9c470
instances: preserve boot markers across standby restore
sjmiller609 Mar 9, 2026
aa78f4f
tests: use manager network init in lifecycle integration tests
sjmiller609 Mar 9, 2026
b2c8e2c
network: harden default-network self-heal on allocation
sjmiller609 Mar 9, 2026
e51f91b
ci: install libjpeg8 for qemu tests on linux runners
sjmiller609 Mar 9, 2026
6b8b8a5
ci: support runner-specific jpeg packages for qemu
sjmiller609 Mar 9, 2026
1234c12
instances: harden boot marker hydration and network self-heal
sjmiller609 Mar 9, 2026
bad661d
ci: make linux libjpeg check compatible with runner variants
sjmiller609 Mar 9, 2026
032878c
instances: avoid duplicate boot-marker persistence on fallback lookups
sjmiller609 Mar 9, 2026
695abf1
ci: install distro qemu and verify runtime directly
sjmiller609 Mar 9, 2026
eedd2f9
ci: reinstall qemu when runtime check fails
sjmiller609 Mar 9, 2026
2148d16
tests: skip qemu integration when runtime is unavailable
sjmiller609 Mar 9, 2026
655c284
instances: avoid stale boot markers without guest clock filtering
sjmiller609 Mar 9, 2026
cf6018f
instances: fix marker parsing and readiness edge cases
sjmiller609 Mar 9, 2026
a449e2c
init: keep readiness timeout behavior when no exit channel
sjmiller609 Mar 9, 2026
9462250
Merge remote-tracking branch 'origin/main' into codex/max-speed-initi…
sjmiller609 Mar 10, 2026
777997a
ci: retry apt update in linux dependency install
sjmiller609 Mar 10, 2026
669114f
instances: persist hydrated boot markers on lifecycle return
sjmiller609 Mar 10, 2026
e34ecd0
tests: wait for Running before standby in network lifecycle test
sjmiller609 Mar 10, 2026
7e8436b
tests: harden network lifecycle restore against startup races
sjmiller609 Mar 10, 2026
3e16495
instances: preserve boot start timestamp across restore
sjmiller609 Mar 10, 2026
1c99011
network: retry interrupted bridge address dumps
sjmiller609 Mar 10, 2026
2d4b7c9
instances: harden boot marker log scanning
sjmiller609 Mar 10, 2026
68fec3b
tests: gate exec-agent readiness checks on Running state
sjmiller609 Mar 10, 2026
192f095
instances: fix create flow step numbering comments
sjmiller609 Mar 10, 2026
ae39109
tests: wait for Running in cloud-hypervisor running-fork path
sjmiller609 Mar 10, 2026
c67e45c
Merge remote-tracking branch 'origin/main' into codex/max-speed-initi…
sjmiller609 Mar 10, 2026
32299fc
tests: avoid nil cleanup capture in running-fork test
sjmiller609 Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/instances/fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ func TestForkCloudHypervisorFromRunningNetwork(t *testing.T) {
NetworkEnabled: true,
})
require.NoError(t, err)
t.Cleanup(func() { _ = manager.DeleteInstance(context.Background(), source.Id) })
sourceID := source.Id
t.Cleanup(func() { _ = manager.DeleteInstance(context.Background(), sourceID) })
source, err = waitForInstanceState(ctx, manager, source.Id, StateRunning, 20*time.Second)
require.NoError(t, err)
require.NoError(t, waitForVMReady(ctx, source.SocketPath, 5*time.Second))

assert.NotEmpty(t, source.IP)
Expand All @@ -399,13 +402,20 @@ func TestForkCloudHypervisorFromRunningNetwork(t *testing.T) {
TargetState: StateRunning,
})
require.NoError(t, err)
require.Contains(t, []State{StateInitializing, StateRunning}, forked.State)
forked, err = waitForInstanceState(ctx, manager, forked.Id, StateRunning, 20*time.Second)
require.NoError(t, err)
Copy link

Choose a reason for hiding this comment

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

Forked instance cleanup registered after potential timeout failure

Low Severity

The forked instance's t.Cleanup is registered on line 410, after waitForInstanceState (20s timeout) and two require assertions. If any of those fail, the already-created forked instance leaks. This is inconsistent with the source instance pattern introduced in this same diff, where sourceID is captured and cleanup registered on lines 383–384 before calling waitForInstanceState. The fork's ID is available right after require.NoError on line 404 and the cleanup could be registered there, matching the source pattern.

Additional Locations (1)

Fix in Cursor Fix in Web

require.Equal(t, StateRunning, forked.State)
forkedID := forked.Id
t.Cleanup(func() { _ = manager.DeleteInstance(context.Background(), forkedID) })

// Source should be restored and still reachable by its private IP.
sourceAfterFork, err := manager.GetInstance(ctx, source.Id)
require.NoError(t, err)
if sourceAfterFork.State != StateRunning {
sourceAfterFork, err = waitForInstanceState(ctx, manager, source.Id, StateRunning, 20*time.Second)
require.NoError(t, err)
}
require.Equal(t, StateRunning, sourceAfterFork.State)
require.NotEmpty(t, sourceAfterFork.IP)
assertHostCanReachNginx(t, sourceAfterFork.IP, 80, 60*time.Second)
Expand Down