Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

v6.0.0: shipped cron job assistant-heartbeat references missing module Assistant/checks/heartbeat.ts — healthz permanently degraded on fresh install

Open badosanjos opened this issue 5 months ago • 2 comments

Summary

On a fresh v6.0.0 install the shipped cron job assistant-heartbeat fails permanently: the module it runs does not exist in the payload.

Observed

{"level":"error","msg":"assistant-heartbeat failed","error":"Error: Script exited 1: error: Module not found \"Assistant/checks/heartbeat.ts\"\n","failures":3}

After 3 consecutive failures the scheduler skips it, and /healthz reports status: "degraded" forever on an otherwise healthy fresh install (job assistant-heartbeat: 3 consecutive failures).

Environment

Ubuntu 24.04, LifeOS v6.0.0, Pulse via manage.sh (systemd).

Expected

Either ship PULSE/Assistant/checks/heartbeat.ts or don't register the job by default; a missing optional module shouldn't keep health permanently degraded on day one.

badosanjos avatar Jul 03 '26 04:07 badosanjos

Confirming on a fresh 6.0.5 install (macOS): same root cause, and the job that trips the degraded state first is the every-minute assistant-tasks (* * * * *), not assistant-heartbeat. After 3 consecutive failures the scheduler parks it and /healthz reports status: degraded with reasons: ["job assistant-tasks: 3 consecutive failures"] permanently.

The startup half is also present: pulse.ts logs Assistant module not available — Cannot find module ./Assistant/module from pulse.ts because the PULSE/Assistant/ directory is not in the 6.0.5 payload, which is the import-warning side tracked in #1419. So both halves are the same missing-Assistant/-directory cause; which of the four assistant-* jobs surfaces first is the only variation.

catchingknives avatar Jul 05 '26 16:07 catchingknives

Thanks — and agreed on the principle: a missing optional module should never leave /healthz permanently degraded on day one. Root cause confirmed: the Assistant module is private and stripped from the release payload, while the shipped PULSE.toml still registers the job.

Fixed in the development source at the class level: the cron scheduler now preflights every script job at startup and disables any whose referenced script file isn't present on the install — one clear warning, no repeated failures, no degraded health. That covers this job and any future payload/config drift of the same shape. Ships with the next release. Closing as integrated.

danielmiessler avatar Jul 09 '26 23:07 danielmiessler