mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-08 16:56:09 +00:00
* fix(memory-core): add runtime cron service fallback for dreaming reconciliation When the cron service is unavailable during gateway_start (e.g., due to a startup timing race or deferred initialization), the startupCronSource is captured as null and never refreshed. All subsequent runtime reconciliation attempts fail with 'cron service unavailable', even when the cron service is fully operational. This adds a fallback path in the runtime reconciliation that attempts to obtain the cron service from the plugin API runtime when the startup capture was null. This handles the case where the cron service becomes available after the initial startup event. Fixes #67362 * fix(memory-core): hold gateway context for runtime cron resolution The previous attempt tried to access api.runtime.cron which doesn't exist on the PluginRuntime type. The cron service is only accessible through PluginHookGatewayContext.getCron(). This fix stores the gateway context from the gateway_start event and uses it to retry cron resolution at runtime when the initial capture was null. This handles the race condition where the cron service isn't available during gateway_start (250ms deferred init) but is ready later. Also refreshes the startupCron capture when the runtime retry succeeds, so subsequent reconciliation calls resolve immediately. Addresses review feedback on #71694