Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Linux: `com.lifeos.modelsync` (a core service) never installs: `InstallModelSync.ts` only knows launchctl

Open selinium opened this issue 1 month ago • 1 comments

Version: v8.761.0; same on main as of 2026-10-28. Debian 12 container, systemd --user with linger, bun 1.3.9.

What happens: InstallAll --yes (and Services.ts install --only com.lifeos.modelsync) reports the service as failed, and the only text shown is ⚠️ (Bun v1.3.9 (Linux x64)). Running the installer directly shows the cause:

error: Executable not found in $PATH: "launchctl"
      at sh (LIFEOS/TOOLS/InstallModelSync.ts:23:20)

Why it matters: model sync is the one scheduled service in Services.ts that is not optIn, so on Linux the daily lineup and price refresh, the cross-vendor lane bumps and the carrier re-probe never run, and nothing says so after install. ModelSync.ts --daily itself works fine on Linux; only the installer is missing a branch.

Suggested fix: give InstallModelSync.ts the same process.platform === "linux" → SystemdUser path the other installers use (oneshot service plus a timer at 05:10, matching the plist's StartCalendarInterval). It would also help if Services.ts install printed the first line of the error, not just the Bun banner, because the banner alone looks like a runtime crash.

Seven other installers are also launchd-only (AgentJobs, BunkerMonitor, Coach, OrphanReaper, PegWatch, VelocitySync, and MessagesSync, which is reasonably Mac-only). They are opt-in, so they hurt less, but they fail the same way if a Linux user turns them on.

Locally we are carrying a hand-written unit and timer that run ModelSync.ts --daily at 05:10. Its first run exited 0. (If #2356 lands as a default PATH in SystemdUser.ts, this unit will want it too.)

selinium avatar Oct 28 '26 16:10 selinium

[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

Thanks @selinium, confirmed: InstallModelSync.ts only knew launchctl, and the error line printed was the Bun banner, which hid the real failure.

Fixed in source. On Linux the installer now writes a systemd user service and a timer at 05:10 daily, following the InstallDerivedSync pattern. The macOS path is unchanged; we ran old and new side by side with a fake launchctl and got identical output. Services.ts now prints the first line that isn't a Bun banner. We can't run systemd here, so the Linux branch is covered by tests with shimmed systemctl; a report from a real Linux box would be welcome. The other launchd-only installers you listed are opt-in and still macOS-only for now. This lands in the next release.

danielmiessler avatar Oct 29 '26 05:10 danielmiessler