Launchd Identity And Status
Goal#
Make scheduled macOS jobs launch through the codealmanac console command and
show whether launchd has actually run each job successfully.
Scope#
- Generate branded
ProgramArgumentsfor sync, Garden, and update. - Read launchd's state, run count, PID, and last exit code.
- Show those facts in
codealmanac automation status. - Reinstall the three local jobs and verify them.
Out Of Scope#
- A signed macOS app bundle or icon in System Settings.
- A non-macOS scheduler.
- Exact last-run timestamps, which launchd does not expose in job status.
Design#
AutomationJobFactory continues to own known CodeAlmanac task commands. The
launchd adapter continues to own plist and launchctl details. Scheduler facts
cross that boundary as typed status fields; the CLI only renders them.
The service-layer reference describes a service layer as the entry point for a
use case; scheduler parsing therefore stays out of CLI dispatch. See
docs/reference/cosmic-python/chapter_04_service_layer.md.
Files#
src/codealmanac/services/automation/{jobs,models,requests}.pysrc/codealmanac/integrations/automation/scheduler/launchd.pysrc/codealmanac/cli/render/automation.pytests/test_automation_service.pyalmanac/guides/setup-local-automation.md
Tests#
- Job commands begin with the CodeAlmanac executable.
- launchd status parsing tolerates running, idle, failed, and missing jobs.
- Human and JSON status include run health.
uv run pytestanduv run ruff check .pass.