Problem
In ensureENIs (platform/volcengine/eni.go) result = append(result, ...) happens after sleepCtx(ctx, attachPropagationDelay), so a cancel inside that window returns a result that omits the ENI just attached; ProvisionNetwork (provision.go:41-43) then discards result entirely on error.
Scenario: SIGTERM during init lands in the propagation wait. Up to seven ENIs are attached to the instance, runInit never reaches state.Save, and the seed pool.json has an empty eniIDs. A later teardown sees len(eniIDs) == 0 and falls back to listENIs(instanceID), which is every non-primary ENI on the instance, including any the operator attached for an unrelated purpose.
The round PR fixes the sibling problem (the orphan delete on a detached context and stopping the create loop on cancel); this one changes what init persists on failure and is therefore a decision.
Proposal
Append to result immediately after a successful attach, before the propagation sleep, and have ProvisionNetwork persist whatever ensureENIs returns even on error.
Acceptance
A cancel during the propagation wait leaves pool.json listing every ENI that was attached, and the following teardown detaches exactly those.
Found in the 2026-09-21 whole-repo review round (branch review/whole-repo-2026-09-21). Filed as a behaviour question for the owner; no code change is included in the round PR.
Problem
In
ensureENIs(platform/volcengine/eni.go)result = append(result, ...)happens aftersleepCtx(ctx, attachPropagationDelay), so a cancel inside that window returns a result that omits the ENI just attached;ProvisionNetwork(provision.go:41-43) then discardsresultentirely on error.Scenario: SIGTERM during
initlands in the propagation wait. Up to seven ENIs are attached to the instance,runInitnever reachesstate.Save, and the seedpool.jsonhas an emptyeniIDs. A laterteardownseeslen(eniIDs) == 0and falls back tolistENIs(instanceID), which is every non-primary ENI on the instance, including any the operator attached for an unrelated purpose.The round PR fixes the sibling problem (the orphan delete on a detached context and stopping the create loop on cancel); this one changes what
initpersists on failure and is therefore a decision.Proposal
Append to
resultimmediately after a successful attach, before the propagation sleep, and haveProvisionNetworkpersist whateverensureENIsreturns even on error.Acceptance
A cancel during the propagation wait leaves
pool.jsonlisting every ENI that was attached, and the followingteardowndetaches exactly those.Found in the 2026-09-21 whole-repo review round (branch
review/whole-repo-2026-09-21). Filed as a behaviour question for the owner; no code change is included in the round PR.