mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-15 16:08:18 +00:00
A call that starts a tasks progress handle gets the background wall-clock budget (60 s, renewed on report), but its Wasm fuel stayed at the per-call foreground budget, so long background work trapped with OutOfFuel. Background calls now get fuel scaled by background/timeout, refilled when tasks.begin, task.report and task.is-cancelled return (fuel is only reloaded by compiled code across host calls); every new call is re-armed with the normal budget, and OutOfFuel reports the budget that was active. Co-authored-by: dengliu <5108773+dengliu@users.noreply.github.com>