diff --git a/Plant3D2026/P_Rec_Annot/src/PRecAnnot.Plant3D2026/FirstLimitedApplyAutomation.cs b/Plant3D2026/P_Rec_Annot/src/PRecAnnot.Plant3D2026/FirstLimitedApplyAutomation.cs index 28b4200..4f25871 100644 --- a/Plant3D2026/P_Rec_Annot/src/PRecAnnot.Plant3D2026/FirstLimitedApplyAutomation.cs +++ b/Plant3D2026/P_Rec_Annot/src/PRecAnnot.Plant3D2026/FirstLimitedApplyAutomation.cs @@ -45,7 +45,13 @@ internal static class FirstLimitedApplyAutomationBootstrap // Public test command is intentionally side-effect free with respect to Plant APIs. internal static void Arm() { - if (state is BootstrapState.Prepared) state = BootstrapState.Armed; + if (state is BootstrapState.Prepared) + { + // The command itself is the post-NETLOAD barrier. The next Idle + // callback, not this command callback, is allowed to start work. + observedIdle = true; + state = BootstrapState.Armed; + } } private static void OnIdle(object? sender, EventArgs args) diff --git a/Plant3D2026/P_Rec_Annot/tests/PRecAnnot.Core.Tests/FoundationTests.cs b/Plant3D2026/P_Rec_Annot/tests/PRecAnnot.Core.Tests/FoundationTests.cs index b358f5a..333c565 100644 --- a/Plant3D2026/P_Rec_Annot/tests/PRecAnnot.Core.Tests/FoundationTests.cs +++ b/Plant3D2026/P_Rec_Annot/tests/PRecAnnot.Core.Tests/FoundationTests.cs @@ -70,6 +70,7 @@ public sealed class FoundationTests Assert.DoesNotContain("PlantProject.LoadProject", bootstrap); Assert.DoesNotContain("MdiActiveDocument", bootstrap); Assert.Contains("AcadApplication.Idle += OnIdle", bootstrap); + Assert.Contains("observedIdle = true", bootstrap); Assert.Contains("coordinatorStartCount++", bootstrap); }