Expand description
Durable engine journal for restart-safe command/event logging.
This module provides persistent storage for engine commands and their resulting events, enabling:
- Restart-safe ACK: API responses only after DB commit
- Idempotency: duplicate request_id returns cached response
- Auditability: full command + event trace queryable
- Future replay: schema supports snapshot + replay recovery
Structs§
- Engine
Journal Writer - Durable engine journal writer
- InMemory
Journal Writer - In-memory journal writer for testing. Exercises real idempotency logic without requiring a database.
- Journal
Append Result - Result of appending a transition to the journal
- Journal
Command Summary - Journal
Event Record - Journal
Full Record
Enums§
- Engine
Journal Error - Error type for engine journal operations
- Event
Persistence Mode - Event persistence mode for journal writes. Controls the latency/durability tradeoff.
Traits§
- Journal
Writer - Trait for journal writers (enables mock implementations for testing)
Functions§
- ensure_
no_ 🔒fill_ events - get_
critical_ 🔒event_ types - Get the set of critical event types that are always persisted in Full mode. These events are needed for the outbox publisher to replay state correctly. Configured via ENGINE_JOURNAL_CRITICAL_EVENT_TYPES env var. Default: “L2Update” (essential for cache state rebuild)
- is_
critical_ 🔒event_ type - Check if an event type is critical and should always be persisted in Full mode
Type Aliases§
- Shared
Engine Journal Writer - Thread-safe wrapper for journal writers (trait object for mock support)