feat(flow-debugger): carry site-side trace truncation on the route reply (ScadaBridge#54)
ScriptCallResult and RouteToCallResponse gain trailing Truncated/LogsTruncated, filled from the site FlowTraceCollector after Complete(); RouteToCallResponseDto fields 8/9 carry them (sitecommand regen). FlowDebugRunner ORs them into FlowDebugRunResult on the script entry, and on the method entry through a new optional truncation sink on RouteHelper.WithTraceSink (carried through every With* clone). Previously a site run whose collector dropped rows came back as a silently short list. Older sites send false. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -2649,7 +2649,10 @@ public static class SiteCommandDtoMapper
|
||||
ErrorMessage = OrEmpty(response.ErrorMessage),
|
||||
Timestamp = Ts(response.Timestamp),
|
||||
// Flow Debugger (design 2026-09-05 §5.4): additive fields 6/7.
|
||||
ChildExecutionId = GuidToWire(response.ChildExecutionId)
|
||||
ChildExecutionId = GuidToWire(response.ChildExecutionId),
|
||||
// Gitea #54: additive fields 8/9 — the site collector's truncation flags.
|
||||
Truncated = response.Truncated,
|
||||
LogsTruncated = response.LogsTruncated
|
||||
};
|
||||
if (response.TraceEvents is { Count: > 0 } traceEvents)
|
||||
{
|
||||
@@ -2677,7 +2680,9 @@ public static class SiteCommandDtoMapper
|
||||
GuidFromWire(dto.ChildExecutionId),
|
||||
// An untraced run — or an older site that never sets the field — sends no
|
||||
// events, which maps to null so the UI can label the lane "site not traced".
|
||||
dto.TraceEvents.Count == 0 ? null : dto.TraceEvents.Select(AuditEventDtoMapper.FromDto).ToList());
|
||||
dto.TraceEvents.Count == 0 ? null : dto.TraceEvents.Select(AuditEventDtoMapper.FromDto).ToList(),
|
||||
dto.Truncated,
|
||||
dto.LogsTruncated);
|
||||
}
|
||||
|
||||
/// <summary>Projects a <see cref="RouteToGetAttributesResponse"/> onto the wire.</summary>
|
||||
|
||||
Reference in New Issue
Block a user