Skip to content

OpenCode installer: restart active systemd services after upgrade #832

Description

@agent-p1p

Problem

On Linux, rerunning install-opencode-marmot.sh overwrites the binaries and service units, runs systemctl --user daemon-reload, then calls systemctl --user enable --now. enable --now starts an inactive unit but does not restart an already-active one.

An existing wn-opencode/wn-agent process therefore keeps running the old executable and old environment after an apparent successful upgrade. This is visible in #830 because a rerun writes the new idle/total timeout environment while the active harness can continue using the old 300-second behavior until manual restart or reboot. The macOS path already bootouts and bootstraps its LaunchAgent.

Expected behavior

After installing/updating and reloading units, restart active systemd user services (while preserving the explicit no-start options). Add an installer test that distinguishes a fresh enable/start from an active-service upgrade.

Scope note

Found while reviewing #830. The upgrade lifecycle bug predates that PR and affects all installer-delivered changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LOWagent-okThis marks an issue ok to be worked on autonomously by PipbugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions