Snapshot device-phase package states before Clear() on phase transition
so final-status.json contains the complete picture (DeviceSetup + AccountSetup
apps) instead of only the last active phase.
The JSON now uses packageStatesByPhase with phase names as keys instead of
a flat packageStates array.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- IME shutdown handler: new imeShutdown action marks all active apps as
Postponed instead of incorrectly marking them Installed on IME restart
- Final status dump: writes comprehensive final-status.json on enrollment
complete/failed with all app states, signal timestamps, error summary
- Device vs user error counts: GetSummaryData() now reports deviceErrors
and userErrors separately for granular diagnostics
- Periodic debug state snapshot: 60s timer logs [StateSnapshot] to agent
log for stuck enrollment debugging (log-only, no event storage cost)
- All new timers properly stopped at every terminal event path
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Desktop arrival during AccountSetup started Hello wait timer, which
timeout-resolved after 30s and triggered enrollment_complete via
desktop_hello path while ESP was still installing apps.
Three fixes:
- NotifyDesktopArrived: only start Hello timer when ESP is NOT active
- TryEmitEnrollmentComplete: ESP gate now blocks both desktop_arrival
and desktop_hello sources
- OnFinalizingSetupPhaseTriggered: try composite completion after ESP
final exit in case Hello was already resolved
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Multi-signal enrollment completion with 3 independent paths:
- IME pattern (existing), ESP final exit + Hello (composite),
Desktop arrival + Hello (no-ESP/WDP v2)
ESP failure detection: terminal failures emit enrollment_failed immediately,
recoverable failures (ESPProgress_Timeout) get 1-min grace period with
recovery cancellation on ESP phase change.
Agent max lifetime timer (6h default, configurable per-tenant) as safety
net against zombie agents. Desktop arrival detector polls explorer.exe
with WMI owner validation. Enrollment state persistence for crash recovery.
Completion check events with full state machine snapshot for observability.
Backend maintenance interval reduced from daily to every 2 hours.
ConfigVersion 12 → 13.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>