ElkSharp: gateway face overflow redirect, under-node push-first routing, boundary-slot snap
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -181,7 +181,8 @@ internal static class ElkLayoutDiagnostics
|
||||
Console.WriteLine(line);
|
||||
if (!string.IsNullOrWhiteSpace(diagnostics.ProgressLogPath))
|
||||
{
|
||||
File.AppendAllText(diagnostics.ProgressLogPath, line + Environment.NewLine);
|
||||
try { File.AppendAllText(diagnostics.ProgressLogPath, line + Environment.NewLine); }
|
||||
catch { /* best effort */ }
|
||||
}
|
||||
|
||||
WriteSnapshotLocked(diagnostics);
|
||||
@@ -254,9 +255,16 @@ internal static class ElkLayoutDiagnostics
|
||||
Directory.CreateDirectory(snapshotDir);
|
||||
}
|
||||
|
||||
var tempPath = snapshotPath + ".tmp";
|
||||
File.WriteAllText(tempPath, JsonSerializer.Serialize(diagnostics, SnapshotJsonOptions));
|
||||
File.Copy(tempPath, snapshotPath, overwrite: true);
|
||||
File.Delete(tempPath);
|
||||
try
|
||||
{
|
||||
var tempPath = snapshotPath + ".tmp";
|
||||
File.WriteAllText(tempPath, JsonSerializer.Serialize(diagnostics, SnapshotJsonOptions));
|
||||
File.Copy(tempPath, snapshotPath, overwrite: true);
|
||||
try { File.Delete(tempPath); } catch { /* best effort cleanup */ }
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Diagnostics snapshot is best-effort; never crash the layout engine.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user