feat(site-runtime): route handlers forward Trace and return child ExecutionId + trace events
Flow Debugger (design 2026-09-05 §5.2/§5.4): RouteInboundApiCall passes Trace on the ScriptCallRequest and maps ScriptCallResult.ExecutionId/TraceEvents onto RouteToCallResponse; RouteInboundApiSetAttributes passes Trace on SetStaticAttributeCommand. Claude-Session: https://claude.ai/code/session_01GSLkkHKz9JrAtmJjmQK3cP
This commit is contained in:
@@ -2873,7 +2873,9 @@ public class DeploymentManagerActor : ReceiveActor, IWithTimers
|
||||
// execution can record its spawner.
|
||||
var scriptCall = new ScriptCallRequest(
|
||||
request.ScriptName, request.Parameters, 0, request.CorrelationId,
|
||||
ParentExecutionId: request.ParentExecutionId);
|
||||
ParentExecutionId: request.ParentExecutionId,
|
||||
// Flow Debugger (design 2026-09-05 §5.2): the trace flag rides beside the parent id.
|
||||
Trace: request.Trace);
|
||||
var sender = Sender;
|
||||
instanceActor.Ask<ScriptCallResult>(scriptCall, TimeSpan.FromSeconds(30))
|
||||
.ContinueWith(t =>
|
||||
@@ -2894,7 +2896,11 @@ public class DeploymentManagerActor : ReceiveActor, IWithTimers
|
||||
// the inbound side (which JsonSerializer-serializes it for the
|
||||
// HTTP body / ReturnDefinition validation).
|
||||
NormalizeRoutedReturnValue(result.ReturnValue),
|
||||
result.ErrorMessage, DateTimeOffset.UtcNow);
|
||||
result.ErrorMessage, DateTimeOffset.UtcNow,
|
||||
// Flow Debugger (design §5.4): the site run's id and, for a traced
|
||||
// run, its ScriptTrace events — returned inline so a Live run is
|
||||
// instant. Null from an untraced run.
|
||||
result.ExecutionId, result.TraceEvents);
|
||||
}
|
||||
return new RouteToCallResponse(
|
||||
request.CorrelationId, false, null,
|
||||
@@ -3101,7 +3107,9 @@ public class DeploymentManagerActor : ReceiveActor, IWithTimers
|
||||
// carried on the request as ParentExecutionId. Stamping it
|
||||
// here lets an alarm this write trips chain its on-trigger
|
||||
// script run under the inbound execution.
|
||||
SourceExecutionId: request.ParentExecutionId),
|
||||
SourceExecutionId: request.ParentExecutionId,
|
||||
// Flow Debugger (design §5.3): a traced routed write arms the echo stamp.
|
||||
Trace: request.Trace),
|
||||
TimeSpan.FromSeconds(30)))
|
||||
.ToArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user