Skip to content

Event sourcing y recuperación

Documentación en español de Event sourcing y recuperación, alineada con el monorepo y la guía inglesa.

Entrada rápida

[event 1] → SHA256("") → hash_1
[event 2] → SHA256(hash_1 | type | id | timestamp | payload) → hash_2
[event 3] → SHA256(hash_2 | type | id | timestamp | payload) → hash_3
typescript
interface RecoveryResult {
  scanned: number;      // Total zombie runs found
  recovered: number;   // Successfully resumed
  aborted: number;      // Aborted with compensation
  skipped: number;      // Already handled by another process
  details: RecoveryDetail[];
}
MetricDegradedUnhealthy
WAL write latency (p95)50ms200ms
WAL file size100MB500MB
Event backlog ratio100010000
Hash chain integrityAny break
ComponentRole
RunLedgerSource of truth for run states
LeaseManagerFencing tokens for exclusive ownership
CheckpointStoreSQLite-backed checkpoint persistence
DeadLetterQueueRecords recovered/aborted runs
MessageBusPublishes recovery events for subscribers
CompensationBridgeTriggers rollback for aborted runs

Notas

  • CLI monorepo: cliEntry.ts · tras build: commander
  • Métricas: 25 proveedores · 5 topologías · 18 tools · 6700+ tests
  • Firmas API exactas: monorepo / API overview

Relacionado

MIT — Hecho para orquestación multi-agente.