executeDelegation previously created its own context.Background() with a
30-minute timeout internally, so updateDelegationStatus and all DB ops
ignored external cancellation. The test helper runWithTimeout could fire
its 30-second deadline but the goroutine kept running for the full 30
minutes because the cancellation never propagated.
Fix: add ctx context.Context as first parameter to both executeDelegation
and updateDelegationStatus. The caller now provides the context budget —
Delegate() passes c.Request.Context() (5 min idle timeout), and tests pass
context.Background(). This means runWithTimeout's deadline now actually
terminates the goroutine when it fires.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>