feat(inbound-api): executor threads the trace flag; endpoint honours ApiMethod.TraceAllCalls

Flow Debugger (design 2026-09-05 §5.2): InboundScriptExecutor.ExecuteAsync gains a trailing
trace parameter that builds the script's Route helper WithTrace(trace); the inbound endpoint
passes method.TraceAllCalls so a flagged integration method is traced on every real call.

Claude-Session: https://claude.ai/code/session_01GSLkkHKz9JrAtmJjmQK3cP
This commit is contained in:
Joseph Doherty
2026-09-05 23:59:08 -04:00
parent 3f582a278c
commit 981deed0fd
3 changed files with 39 additions and 3 deletions
@@ -330,7 +330,10 @@ public class InboundScriptExecutor
// Deliberate ordering: this optional parameter trails the CancellationToken
// because it was appended additively for non-breaking contract evolution.
// Every call site passes it by named argument (parentExecutionId:).
Guid? parentExecutionId = null)
Guid? parentExecutionId = null,
// Flow Debugger (design 2026-09-05 §5.2): trace the routed site runs this method makes.
// Additive; the endpoint passes ApiMethod.TraceAllCalls, the Flow Debugger passes true.
bool trace = false)
{
// Keep the timeout source and the request-abort source
// separable. A single linked CTS makes a genuine client disconnect
@@ -396,7 +399,8 @@ public class InboundScriptExecutor
parameters,
route.WithDeadline(cts.Token)
.WithRequestAborted(cancellationToken)
.WithParentExecutionId(parentExecutionId),
.WithParentExecutionId(parentExecutionId)
.WithTrace(trace),
dbHelper,
cts.Token);