Revert "fix(inbound,security): bound the sync prefix of inbound scripts by the method timeout; persist a role refresh done on a passive request (INB-1, SEC-1, WP7 task 7.6)"

This reverts commit f7d3c69071.
This commit is contained in:
Joseph Doherty
2026-12-03 10:01:01 -05:00
parent f7d3c69071
commit 6019335ba9
6 changed files with 7 additions and 84 deletions
@@ -625,15 +625,7 @@ public class InboundScriptExecutor
_scriptHandlers[method.Name] = cached; // last-write-wins; concurrent first-callers race benignly
}
// Start the handler OFF the request thread (INB-1). Script.RunAsync runs the script
// synchronously up to its first incomplete await, so invoking the handler inline would
// hold the request thread with no deadline for any script that does CPU work or a
// blocking call before its first await (TimeoutSeconds and client disconnect both
// ignored, no TIMEOUT, abandoned-execution count stuck at 0). Running it on the pool
// lets WaitAsync bound the WHOLE run; a non-cooperative script is then abandoned and
// counted exactly like one that blocks after an await.
var handler = cached.Handler;
handlerTask = Task.Run(() => handler(context), cts.Token);
handlerTask = cached.Handler(context);
var result = await handlerTask.WaitAsync(cts.Token);
var resultJson = result != null