Follow-up from hardening the brain self-shutdown guard during the dev-loop skill migration (lane ade/chat-20260610-133027-f73c8097, commit 7114d941e).
Gap: #549 (Guard ADE brain against self-shutdown from managed sessions) added the self-mutation guard only to the macOS launchd backend (apps/ade-cli/src/serviceManager/installLaunchd.ts). The other two service backends have no equivalent guard:
apps/ade-cli/src/serviceManager/installSystemd.ts
apps/ade-cli/src/serviceManager/installWindows.ts
So on Linux/Windows a command running inside the brain can still brain stop / brain restart and tear down its own active ADE sessions — exactly what #549 prevents on macOS.
Scope:
- Apply the same
isCurrentProcessDescendantOfPid + ADE_ALLOW_RUNTIME_SERVICE_SELF_MUTATION=1 escape-hatch check to the systemd and Windows install/uninstall paths.
- Set the typed
selfMutationBlocked discriminator on those results too (added to the launchd path in commit 7114d941e) so cli.ts detection stays backend-agnostic.
- Mirror the launchd refuse/allow tests in
serviceManager/common.test.ts for systemd + Windows.
Found while self-reviewing #549; not blocking the migration work.
ADE branch: https://ade-app.dev/open?type=branch&repo=arul28%2FADE&branch=ade%2Fchat-20260610-133027-f73c8097
Follow-up from hardening the brain self-shutdown guard during the dev-loop skill migration (lane
ade/chat-20260610-133027-f73c8097, commit7114d941e).Gap: #549 (Guard ADE brain against self-shutdown from managed sessions) added the self-mutation guard only to the macOS launchd backend (
apps/ade-cli/src/serviceManager/installLaunchd.ts). The other two service backends have no equivalent guard:apps/ade-cli/src/serviceManager/installSystemd.tsapps/ade-cli/src/serviceManager/installWindows.tsSo on Linux/Windows a command running inside the brain can still
brain stop/brain restartand tear down its own active ADE sessions — exactly what #549 prevents on macOS.Scope:
isCurrentProcessDescendantOfPid+ADE_ALLOW_RUNTIME_SERVICE_SELF_MUTATION=1escape-hatch check to the systemd and Windows install/uninstall paths.selfMutationBlockeddiscriminator on those results too (added to the launchd path in commit7114d941e) socli.tsdetection stays backend-agnostic.serviceManager/common.test.tsfor systemd + Windows.Found while self-reviewing #549; not blocking the migration work.
ADE branch: https://ade-app.dev/open?type=branch&repo=arul28%2FADE&branch=ade%2Fchat-20260610-133027-f73c8097