Testland
Browse all skills & agents

qa-saga-cqrs

Saga + CQRS + event sourcing test patterns: 5 skills (cqrs-projection-tests, event-sourcing-tests, eventual-consistency-tests, outbox-pattern-test-author, saga-transaction-tests) and 1 agent (saga-critic). Covers ACD-without-isolation saga tests, replay determinism, and projection consistency windows.

Install this plugin

/plugin install qa-saga-cqrs@testland-qa

Part of role bundle: qa-role-backend

qa-saga-cqrs

Distributed-transaction patterns: sagas (replace 2PC across microservices), event sourcing (events as system of record), CQRS (separate write/read models), and the eventual-consistency window that holds them together.

Components

TypeNameDescription
Agentsaga-criticAudits saga orchestrators and event-sourcing write paths for missing compensating transactions, non-idempotent compensations, dual-write without outbox, absent retry policy, and missing optimistic-concurrency guard on event append. Emits BLOCK / PASS verdict.
Skillsaga-transaction-testsOrchestration vs choreography; per-step compensating-action verification; partial-failure matrix; outbox pattern atomicity; saga timeout
Skillevent-sourcing-testsAggregate-replay determinism; snapshot equivalence; event-versioning + upcasting; projection rebuild from event log; replay-mode external-call suppression
Skillcqrs-projection-testsPer-event projection update; eventual-consistency window assertion; multiple projections per stream; zero-downtime swap; idempotency + out-of-order delivery
Skilleventual-consistency-testsConvergence-window assertions; monotonic-read tests; anti-entropy / read-repair; CRDT merge tests (G-Counter, LWW, OR-Set); vector-clock causality
Skilloutbox-pattern-test-authorTests the transactional outbox: atomic write+event, relay at-least-once + dedup + ordering + retry.

Install

/plugin marketplace add testland/qa
/plugin install qa-saga-cqrs@testland-qa

Skills

cqrs-projection-tests

Build CQRS read-model projection tests - write-model + read-model consistency tests, projection-replay determinism, projection-versioning + zero-downtime swap, eventual-consistency-window assertions. Per martinfowler.com CQRS reference.

event-sourcing-tests

Build event-sourcing tests - aggregate root replay determinism (same events ⇒ same state), event-versioning + upcasting, snapshot equivalence (replay-to-N vs snapshot-at-N must agree), projection rebuild from event log, retroactive event correction. Per martinfowler.com EventSourcing reference.

eventual-consistency-tests

Build eventual-consistency tests for distributed infrastructure: multi-region replication convergence windows ("within 5s"), monotonic-read guarantees, anti-entropy self-healing, and CRDT merge semantics (OR-Set, G-Counter, LWW, vector clocks). Distinguishes "eventually" from "never" by asserting bounded convergence. Use when the consistency boundary is a cache cluster, replication topology, or CRDT store, not a CQRS command/query split (use cqrs-projection-tests for read-model lag after a command).

outbox-pattern-test-author

Authors tests for the transactional outbox pattern: atomic DB-write-plus-event-insert in one transaction, relay/poller publishing with at-least-once delivery and consumer deduplication, insertion-order preservation, idempotent consumers, and relay failure/retry. Use when adding outbox infrastructure, changing the relay or poller, or auditing whether dual-write atomicity and at-least-once delivery guarantees hold under failure.

saga-transaction-tests

Build saga transaction tests - orchestration vs choreography variants, per-step compensating-action verification, partial-failure scenarios (Step 3 fails → Steps 1+2 must compensate), idempotency of compensations, outbox pattern for atomic DB-update + message-publish. Per microservices.io/saga; tests guard against ACD-without-Isolation anomalies.