diff --git a/src/ZB.MOM.WW.ScadaBridge.ManagementService/FlowDebug/FlowDebugRunner.cs b/src/ZB.MOM.WW.ScadaBridge.ManagementService/FlowDebug/FlowDebugRunner.cs index 4b6952d6..1d964416 100644 --- a/src/ZB.MOM.WW.ScadaBridge.ManagementService/FlowDebug/FlowDebugRunner.cs +++ b/src/ZB.MOM.WW.ScadaBridge.ManagementService/FlowDebug/FlowDebugRunner.cs @@ -152,7 +152,9 @@ public sealed class FlowDebugRunner // only known once the script runs. So the operator's scope is pushed into the // RouteHelper and enforced at route time, before any site traffic. var scope = await ResolvePermittedSiteIdentifiersAsync(sp, user, ct).ConfigureAwait(false); - var route = sp.GetRequiredService().WithTraceSink(collector.Add).WithSiteScope(scope); + var route = sp.GetRequiredService().WithTraceSink(evt => collector.Add(evt, lowPriority: FlowStepProjector.IsLogLine(evt))).WithSiteScope(scope); + // Step-logs D7: a ScriptLog row rides the collector's low-priority lane so the step rows + // emitted at run end are never crowded out of the inline copy (Replay stays complete). var executor = sp.GetRequiredService(); InboundScriptResult result; @@ -358,7 +360,7 @@ public sealed class FlowDebugRunner { try { - collector.Add(e); + collector.Add(e, lowPriority: FlowStepProjector.IsLogLine(e)); } catch (Exception ex) {