fix: lift calendarScheduler to module scope (multi-register singleton) #8
Reference in New Issue
Block a user
Delete Branch "fix/scheduler-module-singleton"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After PR #7 made the multi-agent handle real, dind-t2 still showed
Calendar scheduler not runningfrom everyharborforge_calendar_*call. The cause:register()runs once per agent (5 agents → 5HarborForge plugin registeredlines per gateway boot) and each creates its ownlet calendarSchedulerbinding, but only one of those closures actually runsstartCalendarScheduler(). The other four register the same tool name with their own null-bound copy ofcalendarScheduler, and the host's router picks one of them most of the time.Lifts the binding to module scope so all five closures share it; makes
startCalendarScheduler()early-return when already initialised so duplicategateway_startcalls don't double-install intervals. Bumps to 0.3.3.🤖 Generated with Claude Code