Vapora/crates/vapora-backend/src
Jesús Pérez bb55c80d2b
feat(workflow-engine): autonomous scheduling with timezone and distributed lock
Add cron-based autonomous workflow firing with two hardening layers:

  - Timezone-aware scheduling via chrono-tz: ScheduledWorkflow.timezone
    (IANA identifier), compute_next_fire_at/after_tz, validate_timezone;
    DST-safe, UTC fallback when absent; validated at config load and REST API

  - Distributed fire-lock via SurrealDB conditional UPDATE (locked_by/locked_at
    fields, 120 s TTL); WorkflowScheduler gains instance_id (UUID) as lock owner;
    prevents double-fires across multi-instance deployments without extra infra

  - ScheduleStore: try_acquire_fire_lock, release_fire_lock (own-instance guard),
    full CRUD (load_one/all, full_upsert, patch, delete, load_runs)

  - REST: 7 endpoints (GET/PUT/PATCH/DELETE schedules, runs history, manual fire)
    with timezone field in all request/response types

  - Migrations 010 (schedule tables) + 011 (timezone + lock columns)
  - Tests: 48 passing (was 26); ADR-0034; changelog; feature docs updated
2026-02-26 11:34:44 +00:00
..
api feat(workflow-engine): autonomous scheduling with timezone and distributed lock 2026-02-26 11:34:44 +00:00
audit feat: CLI arguments, distribution management, and approval gates 2026-02-03 21:35:00 +00:00
services feat(workflow-engine): add saga, persistence, auth, and NATS-integrated orchestrator hardening 2026-02-22 21:44:42 +00:00
workflow chore: fix format and clippy 2026-02-03 22:03:41 +00:00
config.rs fix: Pre-commit configuration and TOML syntax corrections 2026-01-11 21:46:08 +00:00
lib.rs feat: Phase 5.3 - Multi-Agent Learning Infrastructure 2026-01-11 13:03:53 +00:00
main.rs feat(workflow-engine): autonomous scheduling with timezone and distributed lock 2026-02-26 11:34:44 +00:00