Skip to content

M1.3.1 Mimi State Machine Design & Implementation #207

@LyeZinho

Description

@LyeZinho

Objective

Design and implement the M1.3.1 Mimi State Machine — the orchestrator core lifecycle management component that governs the entire Mimi system lifecycle from receiving user instructions through routing, memory access, task execution, and graceful shutdown.

Requirements

  • Define 10 core states (IDLE, LISTENING, PROCESSING, EXECUTING, RESPONDING, DEGRADED, RECOVERING, FAILED_COMPONENT, CRITICAL_ERROR, SHUTDOWN)
  • Specify state transitions with guard conditions
  • Integrate with message bus (Zenoh/NATS)
  • Implement hybrid execution model (blocking + async callbacks)
  • Ensure Odlaguna watchdog cooperation for timeout management
  • Enable Pandora to filter and track state changes
  • Support selective state persistence to Neo4j

Design Sections

  • SECTION 1: States & Transitions
  • SECTION 2: Guard Conditions & Data Flow
  • SECTION 3: Async Execution & Message Bus Integration
  • SECTION 4: Error Recovery & Resilience Patterns
  • SECTION 5: Pandora Integration & State Persistence
  • SECTION 6: Testing Strategy & Verification

Deliverables

  1. Design document: docs/plans/2026-04-17-M1.3.1-state-machine-design.md
  2. Implementation plan: docs/plans/2026-04-17-M1.3.1-state-machine-implementation.md
  3. Rust implementation: crates/mimi-core/src/orchestrator.rs
  4. Integration tests: crates/mimi-core/tests/state_machine_tests.rs

Blocked By

  • M1.2.6 Message Routing (COMPLETE ✓)

Blocks

  • M1.3.2 Task Queue & Executor
  • M1.3.3 Error Handling & Recovery

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions