fix(flow-debugger): final-review remediation — 2000-row trace pull, shared ExceptionHeader parser, surrogate-safe clip, wording, alarm source, register renumber (I1/I2/M1-M8)
This commit is contained in:
@@ -157,7 +157,11 @@ public sealed class ScriptLogger
|
||||
|
||||
try
|
||||
{
|
||||
_emit("warn", "runtime", $"Log truncated: {n} line(s) dropped past the per-run cap of {_maxLines}", null, null);
|
||||
// Final review M3: worded identically to the central InboundScriptLogger's closing row,
|
||||
// so the two surfaces read the same in the step-log panel (only the option key differs).
|
||||
_emit("warn", "runtime",
|
||||
$"log line cap reached - {n} further log line(s) were not captured " +
|
||||
$"(ScadaBridge:SiteRuntime:MaxLogLinesPerRun = {_maxLines})", null, null);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -432,7 +432,8 @@ internal static class ScriptRunLauncher
|
||||
var state = await compiledScript.RunAsync(globals, cts.Token);
|
||||
|
||||
// Step logs (design D7): close the run's log BEFORE the anchor row, so the closing
|
||||
// "N line(s) dropped" row precedes the ScriptRun in emission order on every path.
|
||||
// "log line cap reached - N further log line(s)…" row precedes the ScriptRun in
|
||||
// emission order on every path.
|
||||
context.Log.FlushDropped();
|
||||
|
||||
// Flow Debugger: the ScriptRun row goes into the collector BEFORE the reply so the
|
||||
@@ -705,6 +706,12 @@ internal static class ScriptRunLauncher
|
||||
timeout,
|
||||
instanceName,
|
||||
logger,
|
||||
// Final review M6: name the source so ScriptRuntimeContext's `_logTarget` derives
|
||||
// the alarm this on-trigger run belongs to ("AlarmActor:Foo" -> "Foo") — without
|
||||
// it every Log.* line from an alarm script was attributed to the INSTANCE, not the
|
||||
// alarm. `scriptName` above is already the "AlarmActor:{alarmName}" source key, so
|
||||
// it is passed as-is (re-prefixing it would leave "AlarmActor:" in the target).
|
||||
sourceScript: scriptName,
|
||||
// ParentExecutionId tag-cascade: the
|
||||
// alarm on-trigger run mints its own fresh ExecutionId (the
|
||||
// ctor's `?? NewGuid()` fallback) and records the firing
|
||||
|
||||
Reference in New Issue
Block a user