Skip to content

feature: verified macOS install and launchd service lifecycle #944

Open

Description

@huang195

Feature Description

The install path is the first thing anyone touches and the easiest place to lose a user. macOS
is its own code path — launchd, plist rendering, launchctl bootstrap — and it is verified ad
hoc today on whatever machine the author had.

Proposed Solution

  • Fresh install via curl | sh on a machine that has never run Cortex, arm64 and amd64
  • Upgrade over an older install: service restarted, config preserved
  • agentop uninstall leaves no launchd registration and no modified agent settings;
    ~/.cortex stays unless --purge, which deletes it too
  • Re-running install is idempotent
  • Service survives logout/login and a crash
  • agentop service status | start | stop | restart accurate in every state
  • stop and restart leave no proxy holding the ports, so the next start binds first
    time. Since Fix: Make a local Cortex restart quick and clean #1320 a local install closes on SIGTERM instead of draining for 15s, and
    the supervisor kills a stuck proxy after 3s, inside launchd's 5s ExitTimeOut
  • Plist rendering safe for $HOME and --config paths containing XML metacharacters

Additional Context

Part of the Cortex v0.9.0 release. Gates exit criterion 1 (install works cold). Automated by
the macOS release smoke test.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions