Epic: Centralize ES Command Emission #159

Open
opened 2026-03-15 23:08:35 +00:00 by freemo · 0 comments
Owner

Background and Context

ES commands are currently emitted inline in 8+ methods across Manager, GameObject, and StorageMachine, each with duplicated guard-check-rescue boilerplate. Some methods in both Manager and StorageMachine emit ES commands for the same operation, creating a double-emission risk. This Epic extracts all ES emission into a single EventSourceService class with unified configuration checking, retry logic, logging, and error handling.

This is distinct from the EventSourcingMiddleware (issue #110) which is a future ActionPipeline middleware. The EventSourceService is a standalone service that can be used now and later wrapped as middleware when the pipeline is ready.

Demonstrable Outcome

All ES command emission flows through EventSourceService. No inline Sequent.command_service.execute_commands calls remain. Double-emission is prevented.

Acceptance Criteria

  • EventSourceService class handles all ES emission
  • Zero inline Sequent calls in Manager/GameObject/StorageMachine
  • Unified logging, retry, and error handling
  • Write-mode-aware behavior (respects es_write_mode)
## Background and Context ES commands are currently emitted inline in 8+ methods across `Manager`, `GameObject`, and `StorageMachine`, each with duplicated guard-check-rescue boilerplate. Some methods in both Manager and StorageMachine emit ES commands for the same operation, creating a double-emission risk. This Epic extracts all ES emission into a single `EventSourceService` class with unified configuration checking, retry logic, logging, and error handling. This is distinct from the `EventSourcingMiddleware` (issue #110) which is a future ActionPipeline middleware. The `EventSourceService` is a standalone service that can be used now and later wrapped as middleware when the pipeline is ready. ## Demonstrable Outcome All ES command emission flows through `EventSourceService`. No inline `Sequent.command_service.execute_commands` calls remain. Double-emission is prevented. ## Acceptance Criteria - `EventSourceService` class handles all ES emission - Zero inline Sequent calls in Manager/GameObject/StorageMachine - Unified logging, retry, and error handling - Write-mode-aware behavior (respects `es_write_mode`)
freemo added this to the v1.0.0 milestone 2026-03-15 23:19:42 +00:00
freemo self-assigned this 2026-03-16 01:26:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#159
No description provided.