Skip to content

DDM OS Reminder (5.4.0b1)

Pre-release
Pre-release

Choose a tag to compare

@dan-snelson dan-snelson released this 25 Nov 22:01
· 0 commits to main since this release
v5.4.0b1
26f10c9

25-Nov-2026

  • 🆕 Resources/diagnoseReminderState.zsh (1.7.0) names --no-redaction output 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 labeled Serial 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, exit 73) are unchanged.
  • 🆕 A new or changed DDM declaration that arrived between DailyReminderTimes slots 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.zsh now fingerprints the active Declarations in /var/db/softwareupdate/SoftwareUpdateDDMStatePersistence.plist (one PlistBuddy read; sorted TargetOSVersion|<TargetLocalDateTime digits> pairs, the same signature dor.zsh uses for corroboration, hashed with md5). Zero active declarations is a valid fingerprint, so a first declaration counts as a change.
    • When NextScheduledReminder is in the future, a console user is logged in, no post-boot re-evaluation is pending, and the fingerprint differs from the new runtime-only dor-state.plist key LastDeclarationFingerprint, the starter logs [NOTICE] DDM declaration change detected; re-evaluating deadline (NextScheduledReminder: …). and launches dor.zsh with DOR_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 NextScheduledReminder earlier, never later. It logs Declaration-change re-evaluation: … lines and No reminder shown: declaration-change re-evaluation found no reminder due. Post-boot log text is unchanged.
    • Every starter launch records LastDeclarationFingerprint after 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 = FALSE and a live dor.pid still exit before the check. All and Script redeployments keep the fingerprint and clear NextScheduledReminder, so the first heartbeat after upgrading launches and seeds it; Uninstall removes it.
    • Known risk (pending verification): if softwareupdated writes the persistence plist before the matching install.log declaration line, the declaration-change run can still resolve the previous declaration and record the new fingerprint, so the change waits for the next DailyReminderTimes slot.
    • Resources/diagnoseReminderState.zsh (1.8.0) reports LastDeclarationFingerprint, 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.zsh before 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 EnforcedInstallDate is read; a deadline copied from a declaration with Z appended 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 in dor-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 a Next 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 -jf silently rolled impossible values forward (2026-02-30 became 2026-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 reason malformed deadline rejected; the runtime rejection reads deadline '<value>' is invalid (no longer … or lacks a timezone).
    • Resources/diagnoseReminderState.zsh (1.9.0) accepts zone-less fallback deadlines and reports would reject: deadline is invalid for impossible ones.
    • No changes to preference keys, defaults, the LaunchDaemon label, path, or Parameter numbering; run zsh assemble.zsh before deploying.
  • 🆕 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, and declarationChange), dor-starter.zsh compares the active-declaration fingerprint with LastDeclarationFingerprint just before recording it. When the stored value is not empty and differs, it first writes the new runtime-only dor-state.plist key LastDeclarationChangeDetected (YYYY-MM-DD:HH:MM:SS). Launches other than declarationChange log [NOTICE] DDM declaration change recorded at <time> (LastDeclarationChangeDetected).
    • If that write fails, the starter leaves LastDeclarationFingerprint unchanged 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.zsh ignores the most recent interaction (Return Code 0, 2, 3, 4, or 10) when it was logged before LastDeclarationChangeDetected, 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 LastDeclarationChangeDetected logs [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 declarationChange run 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 LastDeclarationChangeDetected keep the previous behavior until their first fingerprint change after upgrading.
    • Resources/diagnoseReminderState.zsh (1.10.0) reports LastDeclarationChangeDetected, recognizes the new runtime line, adds a note when the last Return Code predates 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. All and Script redeployments keep the new key; Uninstall removes it. Run zsh assemble.zsh before deploying.
  • Fixed: a reminder run that started while macOS rewrote /Library/Managed Preferences/<rdnn>.dorm.plist at login could store PlistBuddy's File Doesn't Exist, Will Create: <path> text as a preference value, or silently mix managed values with script-defined defaults (Issue #177)
    • dor.zsh now 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, passes plutil -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.zsh uses the same single-read rule; it does not wait or reload.
    • No changes to preference keys, defaults, or precedence; run zsh assemble.zsh before 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.zsh could 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/console ownership, which changes 2 to 8 seconds before scutil reports the user (Issue #177)
    • The starter now reads the console user from scutil (State:/Users/ConsoleUser), the same source dor.zsh uses, and still ignores loginwindow, _mbsetupuser, and root.
    • 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-only dor-state.plist key PostBootConsoleUserSeen, 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.zsh reports PostBootConsoleUserSeen with the other dor-state.plist keys and, unless --no-redaction is used, redacts the user name in that value and in the new [NOTICE] line.
  • Fixed: a dor.pid left behind by a crash, power loss, or SIGKILL could suppress every reminder after a reboot with no log line, because the stale PID could belong to an unrelated process
    • The starter and dor.zsh now treat dor.pid as active only when it was written after the current boot (kern.boottime) and its PID runs the deployed dor.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, or PID <pid> is not '<path>'), remove it, and continue.
  • Fixed: if dor-state.plist disappeared between the starter's state check and its read, PlistBuddy's File Doesn't Exist, Will Create: <path> text became the NextScheduledReminder value, and the starter logged [WARNING] Invalid NextScheduledReminder 'File Doesn't Exist, Will Create: …'; launching main script now.
    • Scheduler state reads in dor-starter.zsh and dor.zsh now 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.zsh before deploying.
  • 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.zsh before deploying.
  • Fixed: dor-starter.zsh and dor.zsh treated a failed scheduler state write as a success, because PlistBuddy prints Error Opening Destination: <path> [Operation not permitted] and still exits 0 when it cannot save dor-state.plist (for example, when the file has the uchg flag).
    • Both state-write helpers now read the key back after Set or Add and report a failure when the stored value does not match: the starter logs [ERROR] Unable to save scheduler state key '<key>' in '<path>'. and dor.zsh logs the same text at [WARNING].
    • The existing failure paths now take effect as documented: a declarationChange launch that cannot record LastDeclarationChangeDetected logs [ERROR] and does not launch, and dor.zsh logs Unable to update NextScheduledReminder; leaving daemon scheduler state unchanged. instead of a false Scheduled next daemon reminder line.
    • Behavior change: while dor-state.plist cannot be written, the starter no longer launches dor.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.zsh before deploying.
  • Docs: clarify that the post-boot re-evaluation moves NextScheduledReminder earlier, 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 OutsideDisplayWindowPeriodicReminderDays repeats follow an initial reminder, which appears at the next scheduled run, however distant the deadline, when the client log has no recorded interaction (Return Code 0, 2, 3, 4, or 10); 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); 0 disables only the repeats (Issue #185)
  • Tests: new Tests/ pre-release suite run as root on a test Mac from a ZIP download or git clone: sudo zsh Tests/runTests.zsh runs the hermetic unit tier (syntax, versions, assembly, timestamps, preferences, resolver, fallback, starter, runtime state, helpers); --integration also deploys the throwaway RDNN com.example.dortest in Script mode only and never touches the production daemon; --release <ver> checks every scriptVersion and the CHANGELOG heading, and --prerelease <ver> does the same for a beta such as 5.4.0b1; results logs are named /var/tmp/dor-tests-<serial>-<timestamp>.log (see Tests/README.md)