Repository navigation
DDM OS Reminder (5.4.0b1)
Pre-release
Pre-release
25-Nov-2026
- 🆕
Resources/diagnoseReminderState.zsh(1.7.0) names--no-redactionoutput files by the Mac's serial number instead of its computer name, because the serial number is unique and is the stable key for an MDM inventory lookup (Issue #176)- The suggested report filename becomes
ddm-os-reminder-<rdnn>-<serial-number>-unredacted-<YYYY-MM-DD-HHMMSS>.md; with--rdnn, the saved fact sheet becomes/Library/Management/<rdnn>/ddm-os-reminder-<rdnn>-<serial-number>-unredacted-<YYYY-MM-DD-HHMMSS>-fact-sheet.md. - With
--rdnn, the serial number comes from this Mac (IOPlatformSerialNumber); otherwise from a labeledSerial Number:client-log line. When no serial number is known, the computer name is used as before; when neither is known, the filename has no identity token. - The serial number still identifies the Mac. Keep unredacted reports and saved fact sheets out of public issues.
- Redacted output, the identity rows, and the save rules (mode
0600, no directory creation, exit73) are unchanged.
- The suggested report filename becomes
- 🆕 A new or changed DDM declaration that arrived between
DailyReminderTimesslots went unseen until the next slot, so a deadline that fell before that slot got no pre-deadline threshold reminder and, on a compliant Mac that received its first declaration, no reminder at all (Issue #180)dor-starter.zshnow fingerprints the activeDeclarationsin/var/db/softwareupdate/SoftwareUpdateDDMStatePersistence.plist(one PlistBuddy read; sortedTargetOSVersion|<TargetLocalDateTime digits>pairs, the same signaturedor.zshuses for corroboration, hashed withmd5). Zero active declarations is a valid fingerprint, so a first declaration counts as a change.- When
NextScheduledReminderis in the future, a console user is logged in, no post-boot re-evaluation is pending, and the fingerprint differs from the new runtime-onlydor-state.plistkeyLastDeclarationFingerprint, the starter logs[NOTICE] DDM declaration change detected; re-evaluating deadline (NextScheduledReminder: …).and launchesdor.zshwithDOR_LAUNCH_REASON=declarationChange. - That run follows the post-boot re-evaluation rules: while an update is required, it shows a dialog only when a threshold, aggressive, or Force reminder is due (or the stored schedule has come due), and otherwise moves
NextScheduledReminderearlier, never later. It logsDeclaration-change re-evaluation: …lines andNo reminder shown: declaration-change re-evaluation found no reminder due. Post-boot log text is unchanged. - Every starter launch records
LastDeclarationFingerprintafter the DarkWake check. An unreadable or unrecognized persistence plist leaves the stored value unchanged, and a missing stored value is seeded by the next launch instead of counting as a change. If the write fails, a declaration-change launch logs[ERROR] Unable to update DDM declaration fingerprint state; not launching main script.so it cannot relaunch on every heartbeat; other launches log[WARNING] … launching main script anyway. NextScheduledReminder=FALSEand a livedor.pidstill exit before the check.AllandScriptredeployments keep the fingerprint and clearNextScheduledReminder, so the first heartbeat after upgrading launches and seeds it;Uninstallremoves it.- Known risk (pending verification): if
softwareupdatedwrites the persistence plist before the matchinginstall.logdeclaration line, the declaration-change run can still resolve the previous declaration and record the new fingerprint, so the change waits for the nextDailyReminderTimesslot. Resources/diagnoseReminderState.zsh(1.8.0) reportsLastDeclarationFingerprint, recognizes the new starter and runtime lines, and describes the declaration-change exception in its starter rule.- No changes to preference keys, defaults, the LaunchDaemon label, path, or 60-second interval; run
zsh assemble.zshbefore deploying.
- 🆕 DDM Emergency Fallback Parameter 6 accepts a deadline without a timezone and reads it in each Mac's local time, the same way Apple's DDM
EnforcedInstallDateis read; a deadline copied from a declaration withZappended was silently shifted by the Mac's UTC offset, and nothing warned when it was already past or later went stale (Issue #182)- Parameter 6 now accepts
YYYY-MM-DDTHH:MM:SS(each Mac's local time; recommended),YYYY-MM-DDTHH:MM:SSZ(UTC), or±HH:MM. The value is stored verbatim indor-fallback-declaration.plist, so each Mac resolves a zone-less deadline in its own time zone on every run. A local time inside a spring-forward gap moves forward one hour, as macOS does for Apple's local deadlines. - Deployment logs
[INFO] DDM Emergency Fallback deadline has no timezone; each Mac reads it in its own local time (this Mac: UTC<offset>).for a zone-less deadline. When the deadline is already past, it still writes the plist and logs[WARNING] DDM Emergency Fallback deadline '<Parameter 6>' is already in the past (<local time> on this Mac); if selected, it starts in past-deadline mode.followed by aNext step:line. - When a confirmed DDM declaration supersedes a configured fallback, runtime logs
[WARNING] DDM Emergency Fallback is stale: macOS <fallback version> by <fallback deadline> vs DDM-enforced macOS <version> by <deadline>; …when the fallback names any other macOS version or a deadline that resolves to a different time, and[WARNING] DDM Emergency Fallback would be ignored if needed: <reason>when the fallback plist is invalid. A matching fallback keeps the[NOTICE]precedence line. The resolver outcome never changes. - Zone-less timestamps, including DDM declaration deadlines, are now range-checked before parsing, because
date -jfsilently rolled impossible values forward (2026-02-30became2026-03-02). An impossible declaration deadline now ends the run with[FATAL ERROR] Unable to parse DDM-enforced requirement deadline: <deadline> (not a valid calendar date and time)instead of using the rolled-forward date. - Malformed Parameter 6 values log the new accepted forms in
Next step:and remove the plist with reasonmalformed deadline rejected; the runtime rejection readsdeadline '<value>' is invalid(no longer… or lacks a timezone). Resources/diagnoseReminderState.zsh(1.9.0) accepts zone-less fallback deadlines and reportswould reject: deadline is invalidfor impossible ones.- No changes to preference keys, defaults, the LaunchDaemon label, path, or Parameter numbering; run
zsh assemble.zshbefore deploying.
- Parameter 6 now accepts
- 🆕 An interaction with the previous update's reminder no longer delays the initial outside-display-window reminder for a new DDM declaration by up to
OutsideDisplayWindowPeriodicReminderDays(default:28) days (Issue #192)- On every launch path (
scheduled, due,postBoot, anddeclarationChange),dor-starter.zshcompares the active-declaration fingerprint withLastDeclarationFingerprintjust before recording it. When the stored value is not empty and differs, it first writes the new runtime-onlydor-state.plistkeyLastDeclarationChangeDetected(YYYY-MM-DD:HH:MM:SS). Launches other thandeclarationChangelog[NOTICE] DDM declaration change recorded at <time> (LastDeclarationChangeDetected). - If that write fails, the starter leaves
LastDeclarationFingerprintunchanged so the next heartbeat retries. A declaration-change launch logs[ERROR] Unable to record DDM declaration change time; not launching main script.; other launches log[WARNING] Unable to record DDM declaration change time; launching main script anyway. - When the deadline is beyond
DaysBeforeDeadlineDisplayReminder,dor.zshignores the most recent interaction (Return Code0,2,3,4, or10) when it was logged beforeLastDeclarationChangeDetected, logs[NOTICE] Ignoring reminder interaction from <interaction time>, before the current DDM declaration was detected (<change time>); displaying initial reminder dialog, and shows the initial reminder. An interaction in the same second as the change time still counts. The restart-related interaction exclusion runs first, unchanged. - An unparseable or future
LastDeclarationChangeDetectedlogs[WARNING] Invalid LastDeclarationChangeDetected '<value>'; using all reminder interaction history.or[WARNING] LastDeclarationChangeDetected '<value>' is in the future; using all reminder interaction history.and applies no cutoff. - Quiet-period suppression still uses the most recent interaction from the whole client log. The
declarationChangerun stays reschedule-only, so the initial reminder appears at the next baseline slot. Manual and demo runs read the key but never write it. - The fingerprint covers every active declaration, so a moved deadline for the same version, an added or removed declaration, and all declarations clearing after an install also reset the window. A DDM Emergency Fallback (Parameter 6) does not change the fingerprint. Macs without
LastDeclarationChangeDetectedkeep the previous behavior until their first fingerprint change after upgrading. Resources/diagnoseReminderState.zsh(1.10.0) reportsLastDeclarationChangeDetected, recognizes the new runtime line, adds a note when the lastReturn Codepredates the change time, and describes the change time in its starter rule.- No changes to preference keys, defaults, the LaunchDaemon label, path, or 60-second interval.
AllandScriptredeployments keep the new key;Uninstallremoves it. Runzsh assemble.zshbefore deploying.
- On every launch path (
- Fixed: a reminder run that started while macOS rewrote
/Library/Managed Preferences/<rdnn>.dorm.plistat login could store PlistBuddy'sFile Doesn't Exist, Will Create: <path>text as a preference value, or silently mix managed values with script-defined defaults (Issue #177)dor.zshnow reads each managed and local preference key with one PlistBuddy call and keeps the value only when the read succeeds. A missing or unreadable plist is no longer treated as "key not set".- When a preference plist disappears, becomes unreadable, or changes (inode, modification time, or size) during the load, the run logs
[WARNING] Preference plist changed or became unreadable during load; waiting up to 10 seconds and reloading once., waits until the plist exists, passesplutil -lint, and is unchanged across two checks 1 second apart, then reloads all preferences once from a clean state. - If the reload still cannot read the plist, or the managed plist is gone, the run logs a second
[WARNING]naming the outcome and continues with local preferences and script-defined defaults. Resources/reminderDialogPreferenceTest.zshuses the same single-read rule; it does not wait or reload.- No changes to preference keys, defaults, or precedence; run
zsh assemble.zshbefore deploying. - Not covered: a managed plist that is already missing when the load starts and stays missing (the run uses local preferences and defaults, as before), and the language check in
normalizeDialogLanguageCode, which still reads the plist after the load. The starter's login timing is addressed in the next entry.
- Fixed:
dor-starter.zshcould launch the once-per-boot post-boot re-evaluation in the middle of login, before macOS finished rewriting/Library/Managed Preferences, because it read the console user from/dev/consoleownership, which changes 2 to 8 seconds beforescutilreports the user (Issue #177)- The starter now reads the console user from
scutil(State:/Users/ConsoleUser), the same sourcedor.zshuses, and still ignoresloginwindow,_mbsetupuser, androot. - The post-boot re-evaluation now waits for the same console user on two heartbeats (about one minute). The first heartbeat records
<kern.boottime epoch>:<user>in the new runtime-onlydor-state.plistkeyPostBootConsoleUserSeen, logs[NOTICE] Console user '<user>' detected after boot; deferring post-boot re-evaluation one heartbeat so login can settle., and exits. The next heartbeat with the same user launches as before. - The key is written only after the DarkWake check passes. Due, empty, and invalid schedules still launch on the first heartbeat, with no extra delay.
Resources/diagnoseReminderState.zshreportsPostBootConsoleUserSeenwith the otherdor-state.plistkeys and, unless--no-redactionis used, redacts the user name in that value and in the new[NOTICE]line.
- The starter now reads the console user from
- Fixed: a
dor.pidleft behind by a crash, power loss, orSIGKILLcould suppress every reminder after a reboot with no log line, because the stale PID could belong to an unrelated process- The starter and
dor.zshnow treatdor.pidas active only when it was written after the current boot (kern.boottime) and its PID runs the deployeddor.zsh. Otherwise they log[WARNING] Removing stale PID file '<path>' (<reason>).with the reason (for example,written before the current boot,PID <pid> is not running, orPID <pid> is not '<path>'), remove it, and continue.
- The starter and
- Fixed: if
dor-state.plistdisappeared between the starter's state check and its read, PlistBuddy'sFile Doesn't Exist, Will Create: <path>text became theNextScheduledRemindervalue, and the starter logged[WARNING] Invalid NextScheduledReminder 'File Doesn't Exist, Will Create: …'; launching main script now.- Scheduler state reads in
dor-starter.zshanddor.zshnow keep PlistBuddy output only when the read succeeds. A missing key or plist reads as empty, which still lets the starter launch. - No changes to preference keys, defaults, the LaunchDaemon label, path, or 60-second interval; run
zsh assemble.zshbefore deploying.
- Scheduler state reads in
- Fixed: after a Mac installed a DDM-enforced macOS update and the MDM moved to a newer declaration, the old declaration lines stayed in
/var/log/install.log, and every run logged[WARNING] Ignoring N install.log DDM declaration(s) absent from softwareupdate DDM state; latest: …, which raised the run's warning count and cluttered warning-based triage (Issue #178)- When the installed macOS version is valid and is at or above every ignored declaration's target version, the line is now
[NOTICE] Ignoring N install.log DDM declaration(s) absent from softwareupdate DDM state; macOS <installed version> already meets them; latest: …. - The line stays
[WARNING], with the same text as before, when any ignored declaration targets a newer macOS version, when the installed or target version is missing or invalid, or when only some ignored declarations are met. - No changes to resolver status, candidate selection, DDM Emergency Fallback eligibility, scheduling, or the Extension Attributes; run
zsh assemble.zshbefore deploying.
- When the installed macOS version is valid and is at or above every ignored declaration's target version, the line is now
- Fixed:
dor-starter.zshanddor.zshtreated a failed scheduler state write as a success, because PlistBuddy printsError Opening Destination: <path> [Operation not permitted]and still exits0when it cannot savedor-state.plist(for example, when the file has theuchgflag).- Both state-write helpers now read the key back after
SetorAddand report a failure when the stored value does not match: the starter logs[ERROR] Unable to save scheduler state key '<key>' in '<path>'.anddor.zshlogs the same text at[WARNING]. - The existing failure paths now take effect as documented: a
declarationChangelaunch that cannot recordLastDeclarationChangeDetectedlogs[ERROR]and does not launch, anddor.zshlogsUnable to update NextScheduledReminder; leaving daemon scheduler state unchanged.instead of a falseScheduled next daemon reminderline. - Behavior change: while
dor-state.plistcannot be written, the starter no longer launchesdor.zsh; every heartbeat logs[ERROR] Unable to update scheduler trigger state; not launching main script.Before this fix, it launched with no error. - No changes to preference keys, defaults, the LaunchDaemon label, path, or 60-second interval; run
zsh assemble.zshbefore deploying.
- Both state-write helpers now read the key back after
- Docs: clarify that the post-boot re-evaluation moves
NextScheduledReminderearlier, never later, only while an update is still required; a compliant or suppressed post-boot run takes its normal outcome, such as the next baseline slot (Issue #179) - Docs: clarify that
OutsideDisplayWindowPeriodicReminderDaysrepeats follow an initial reminder, which appears at the next scheduled run, however distant the deadline, when the client log has no recorded interaction (Return Code0,2,3,4, or10); interaction history spans the whole client log, so a recent interaction from an earlier update could delay the first reminder for a new declaration (fixed by Issue #192);0disables only the repeats (Issue #185) - Tests: new
Tests/pre-release suite run as root on a test Mac from a ZIP download orgit clone:sudo zsh Tests/runTests.zshruns the hermetic unit tier (syntax, versions, assembly, timestamps, preferences, resolver, fallback, starter, runtime state, helpers);--integrationalso deploys the throwaway RDNNcom.example.dortestinScriptmode only and never touches the production daemon;--release <ver>checks everyscriptVersionand the CHANGELOG heading, and--prerelease <ver>does the same for a beta such as5.4.0b1; results logs are named/var/tmp/dor-tests-<serial>-<timestamp>.log(seeTests/README.md)