fix: trace gated automation bootstrap

This commit is contained in:
codex
2026-08-03 16:41:15 +03:00
parent 544b329077
commit 8a1735408a
2 changed files with 4 additions and 0 deletions
@@ -21,6 +21,7 @@ public sealed class EntryPoint : IExtensionApplication
{ {
automationQueued = true; automationQueued = true;
FirstLimitedApplyAutomationBootstrap.Prepare(); FirstLimitedApplyAutomationBootstrap.Prepare();
RuntimeDiagnostics.Write("AutomationBootstrapPrepared", resultStatus: "Gated");
} }
catch (System.Exception exception) catch (System.Exception exception)
{ {
@@ -39,6 +39,7 @@ internal static class FirstLimitedApplyAutomationBootstrap
if (state != BootstrapState.Created) return; if (state != BootstrapState.Created) return;
state = BootstrapState.Prepared; state = BootstrapState.Prepared;
AcadApplication.Idle += OnIdle; AcadApplication.Idle += OnIdle;
RuntimeDiagnostics.Write("AutomationBootstrapSubscribed", resultStatus: "Prepared");
} }
// Public test command is intentionally side-effect free with respect to Plant APIs. // Public test command is intentionally side-effect free with respect to Plant APIs.
@@ -52,6 +53,7 @@ internal static class FirstLimitedApplyAutomationBootstrap
try try
{ {
idleCallbackCount++; idleCallbackCount++;
RuntimeDiagnostics.Write("AutomationBootstrapIdle", resultStatus: state.ToString());
// The script engine can consume the custom command after NETLOAD. The // The script engine can consume the custom command after NETLOAD. The
// first idle is therefore the explicit post-NETLOAD arming point. // first idle is therefore the explicit post-NETLOAD arming point.
if (state == BootstrapState.Prepared) { observedIdle = true; state = BootstrapState.Armed; } if (state == BootstrapState.Prepared) { observedIdle = true; state = BootstrapState.Armed; }
@@ -59,6 +61,7 @@ internal static class FirstLimitedApplyAutomationBootstrap
state = BootstrapState.Starting; state = BootstrapState.Starting;
AcadApplication.Idle -= OnIdle; AcadApplication.Idle -= OnIdle;
coordinatorStartCount++; coordinatorStartCount++;
RuntimeDiagnostics.Write("AutomationCoordinatorStarting", resultStatus: "FirstPostStartupIdle");
new FirstLimitedApplyAutomationCoordinator().Start(); new FirstLimitedApplyAutomationCoordinator().Start();
} }
catch (System.Exception exception) catch (System.Exception exception)