Oliver Kieselbach 877523594f v2 single-rail 5.10: enforce single-rail — internalize emitters + shrink baseline to 2 callers
Plan §5.10 — final PR of the single-rail refactor. Rail B is gone; Invariant 1
(single caller set) + Invariant 2 (compile-time enforcement) are now active.

Classes internalized:
- TelemetryEventEmitter (public sealed → internal sealed; Emit → internal)
- EventTimelineEmitter (public sealed → internal sealed)
- BackPressureEventObserver (public sealed → internal sealed)
Consumers of these three live in the same Telemetry.Events namespace (plus
InternalsVisibleTo for the test assembly). Any future attempt to construct or
reference them from outside the assembly becomes a compile error — the
single-rail invariant is now load-bearing on the type system, not review.

EnrollmentOrchestrator scrubbed:
- Deleted the `public TelemetryEventEmitter EventEmitter` property (no external
  consumer after PR #1–#9).
- Deleted the `BuildTelemetryEventSink()` Action<EnrollmentEvent> factory
  (last caller removed in step 14 of Start, where it wired collectors; those
  now post via ISignalIngressSink exclusively).
- Dropped the `_eventEmitter` field — the emitter is built as a local in Start
  and handed to EventTimelineEmitter + BackPressureEventObserver inline. After
  Start returns, nothing in the orchestrator references it. Architecture
  baseline test shrinks by one as a direct consequence.

IComponentFactory cleanup:
- Removed `Action<EnrollmentEvent> onEnrollmentEvent` parameter from
  CreateCollectorHosts (interface + DefaultComponentFactory + call-site in
  EnrollmentOrchestrator.Start).
- DefaultComponentFactory.ImeLogHost constructor drops the now-dead
  onEnrollmentEvent parameter (declared but never used — relic from the
  pre-migration wire).
- ICollectorHost + IComponentFactory doc comments updated to reflect the new
  "post-via-ingress" contract.

Gather-rule internals (GatherRuleExecutor, GatherRuleContext, CommandCollector,
LogParserCollector) keep their internal Action<EnrollmentEvent> signature —
they are the orthogonal standalone CLI mode (plan §9), not a kernel path; the
session-mode GatherRuleExecutorHost already bridges the Action to an
InformationalEventPost in PR #6.

Architecture baseline test:
- `TelemetryEventEmitterCallersBaselineTests` promoted from transitional
  baseline (3 dependents) to strict enforcement: exactly the two permitted
  callers EventTimelineEmitter + BackPressureEventObserver. A third entry now
  fails the build — the review signal for any reintroduced bypass is loud.
- Dropped the `Current_baseline_is_a_superset_of_the_PR10_permitted_callers`
  sanity test (redundant once the enforcement set IS the permitted set).

Test fixtures updated:
- EnrollmentOrchestratorEventBridgeTests rewritten — the "Action<EnrollmentEvent>
  bridge" contract the old tests exercised is gone, so the tests covering it
  (Emit-from-host-reaches-transport, emitter-exception-does-not-propagate etc.)
  were removed. Remaining coverage: Start without factory, Start with factory
  spawns + starts hosts, factory receives ingress + clock, Stop stops + disposes
  hosts.
- EnrollmentOrchestratorWhiteGlovePatternTests fake factory updated to the
  new IComponentFactory signature.
- EnrollmentOrchestratorTests + EnrollmentOrchestratorOnIngressReadyTests:
  removed the `sut.EventEmitter` / `orchestrator.EventEmitter` assertions —
  the property no longer exists.

Verification: dotnet build AutopilotMonitor.sln clean; V2.Core test suite
559 / 559 green (down from 562 — 3 obsolete bridge tests removed, 0 new
failures); DecisionCore 108 / 108 green.

Soll-Zustand per plan §8 now holds in code:
- Single-rail Emission: exactly 2 callers of TelemetryEventEmitter.Emit.
- Compile-time enforcement: emitter class + method are internal; any bypass
  attempt breaks the build instead of slipping through review.
- No Action<EnrollmentEvent> parameter on ICollectorHost / IComponentFactory.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 16:35:14 +02:00
2026-04-22 19:36:19 +02:00
2026-04-22 19:36:19 +02:00
2026-03-17 18:24:01 +01:00
2026-03-26 07:02:33 +01:00
2026-04-04 19:17:01 +02:00

Autopilot Monitor

Advanced monitoring and troubleshooting solution for Windows Autopilot deployments. Gain full visibility into every enrollment session with a detailed event timeline, fleet health dashboards, and session reporting. Define custom analysis rules to automatically detect issues and gather rules to collect targeted evidence. Retrieve diagnostics packages on demand, configure agent settings like auto-reboot behavior and automatic timezone adjustment — all managed centrally from the web dashboard.

Private Preview

Autopilot Monitor is currently running as a Private Preview. Visit autopilotmonitor.com to request access and learn more.

Overview

Autopilot Monitor provides real-time tracking, intelligent diagnostics, and automated troubleshooting for Windows Autopilot enrollment processes. It consists of:

  • Bootstrap Script — PowerShell script deployed via Intune that starts monitoring early in the enrollment process
  • Monitoring Agent — Lightweight .NET application that collects telemetry and evidence during enrollment
  • Backend API — Azure Functions-based ingestion and processing pipeline
  • Web Dashboard — Next.js application for real-time monitoring and fleet analytics

Architecture

For detailed information about the system architecture, components, and data flow, see Architecture Documentation.

Documentation

Full documentation is available at autopilotmonitor.com/docs

License

This project uses a split licensing model:

  • MIT License — Agent (src/Agent/) and Shared library (src/Shared/) — unrestricted use on end-user devices
  • AGPL-3.0 — Backend (src/Backend/), Web Dashboard (src/Web/), and MCP Server (src/McpServer/) — server-side components remain open source

See LICENSE for full details.

S
Description
Windows Autopilot & Intune enrollment monitoring: live session timelines, fleet health, diagnostics, and an MCP server for AI-assisted troubleshooting.
Readme AGPL-3.0 60 MiB
Languages
C# 72.7%
TypeScript 25.7%
PowerShell 1%
JavaScript 0.5%