Repository navigation
Fix 25 problems from the log (http, runner, db) - #220
Merged
danielehrhardt merged 3 commits intoOct 21, 2026
Merged
Conversation
A heartbeat (meta scheduler.alive_at) marks when the scheduler last ran. On start and after a wake, each schedule automation whose latest slot (or drawn start in a random window) fell after it runs once now, unless it ran already, is older than 12 h or its next slot comes within 2 h. A late tick for a slot that was caught up is skipped. The stand-in catch-up now also runs window slots whose drawn start passed.
…wake, stop with the scheduler A secondary standing in has no heartbeat of the primary's schedule, so its start catch-up is left to runMissedSince. The wake catch-up waits until croner's late ticks and the device group's wake check came first; a catch-up stops starting runs once the scheduler stops or restarts. A failed catch-up is told like a failed tick. The heartbeat stays out of backups.
…blems-from-the-log-http-runner # Conflicts: # packages/core/src/scheduler/scheduler.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scheduled automations now catch up slots missed while Godmode was off or the Mac slept
The main item is fixed. When Godmode starts again, or the Mac wakes, an automation whose slot fell in the gap runs once. Before, it never ran and nobody was told, which is what happened to the two prospect-reply automations on 2026-10-20 (Godmode down 12:38–14:06Z). The typecheck passes (
pnpm -r typecheck), and the test files I touched and the related ones pass, including the device-groups end-to-end tests.Root cause (
packages/core/src/scheduler/scheduler.ts)How it works now
scheduler.alive_at). Only slots after it count as missed, so slots skipped on purpose while it was running (previous run still going, budget used up) stay skipped.routine <id> caught up its missed <slot> slot (start|wake): run <runId>. Skipped ones log the reason (older than 12 h, or next slot within 2 h). The automation's history says "Caught up: Godmode wasn't running at the scheduled time" (or "...the computer was asleep...").runMissedSince), so it doesn't wrongly re-run slots the primary skipped on purpose.Tests (
packages/core/test/scheduler.test.ts, fixed clock):There is no test yet that drives a real late tick through the per-slot guard; it is checked only through repeated catch-up calls.
First run after the update: the very first start on this build has no heartbeat yet, so it catches nothing up. It works from the second start on.
The other log lines need no code change:
GET /api/calls/:id/audio failed(2026-10-19 09:35Z) was an ElevenLabs timeout. Implement attachments to the expo app #59 (merged an hour later) already logs these at info.sleep 99999background task.Nothing for Daniel to do; it reaches the desktop app the next time he updates Godmode, since shipping is paused.
Task #64 · done by Self-Healer with Godmode Bot