mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 06:32:17 +00:00
The schedule_create tool, its sibling schedule_list and schedule_delete, and the matching /api/schedules HTTP routes were all writing to a shared-memory key that no executor ever read. Jobs registered that way silently never fired. Route all three tools and all /api/schedules endpoints through the real cron scheduler in openfang-kernel. Add a one-shot idempotent migration at kernel startup that imports legacy __openfang_schedules entries into the cron scheduler and clears the old key. Tests: - Unit tests for sanitize_schedule_name and sanitize_cron_job_name - Tool wrapper tests using a fake KernelHandle that verify schedule_create/list/delete route into cron_create/list/cancel - Migration tests cover the happy path, idempotency via the marker key, and skipping entries whose target agent is not in the registry Quality gates: cargo check + test + clippy -D warnings + fmt clean on openfang-kernel, openfang-runtime, openfang-api. Made-with: Cursor