diff --git a/docs/proposals/device-identity.md b/docs/proposals/device-identity.md index e97de87..907349d 100644 --- a/docs/proposals/device-identity.md +++ b/docs/proposals/device-identity.md @@ -148,6 +148,40 @@ first, each when no bay has reported through it for a full inventory cycle. **`cmmid.txt` survives phase 3 regardless**, as the CMM backup-set path key. It is not on the deletion list; only its identity use is. +### PXE and GE-Enforce prefer it too, not just the collector + +Phase 3 is not only "the collector reads a registry value". All three writers +and readers move together: + +| Component | Change | +|---|---| +| PXE / imaging | writes `DeviceId` at enrollment instead of (or as well as) the file | +| GE-Enforce | resolves device identity registry-first, mirroring how it already resolves the machine number | +| collector | reads the registry ahead of the file | + +**GE-Enforce already made this exact decision for the machine number, and wrote +down why.** `Install-FromManifest.ps1` resolves `TargetMachineNumbers` gating +from the eDNC registry BEFORE `C:\Enrollment\machine-number.txt`, because: + +> the imaging-time `machine-number.txt` is written ONCE by `startnet.cmd` at the +> PXE menu and is NOT updated on reassignment, so it goes stale. + +**`asset-id.txt` inherits that defect exactly.** It is written once at imaging +and nothing updates it when a device is swapped, moved between bays, or +replaced. The bay then reports an identity that was true on imaging day, and the +collector - which now trusts that value FIRST, ahead of every other source - +adopts the wrong device with no warning, because the value still resolves. + +That makes phase 3 a correctness fix rather than a tidy-up. A file that only +imaging writes cannot be the top of a resolution order for something that +changes during a PC's life. + +It also implies a reassignment path, the way `Set-MachineNumber` / +`Update-MachineNumber` exist for the bay number: something that rewrites +`DeviceId` when a device is swapped, and migrates any per-device state with it. +Without that, phase 3 moves the staleness from a file to a registry value rather +than curing it. + ### Doing phase 3 early is cheaper than doing it late If the registry read lands before imaging is changed, phase 2 can write the