Testland
Browse all skills & agents

qa-concurrency

Concurrency + race-condition testing: 6 skills (async-ordering-tests, deadlock-detection-harness, go-race-detector-workflow, jepsen-patterns, mvcc-isolation-tests, race-condition-test-author) and 1 agent (concurrency-critic). Code-level data races, distinct from qa-resilience (infrastructure fault injection).

Install this plugin

/plugin install qa-concurrency@testland-qa
View source

Part of role bundle: qa-role-backend

qa-concurrency

Code-level concurrency + race-condition testing - distinct from qa-resilience (infra fault) and qa-distributed-tracing (observability). Four skills covering in-process data races (with the full Go race-detector + goleak workflow in references), deadlock detection, async ordering, and database isolation levels.

Components

TypeNameDescription
Skillrace-condition-test-authorBuild deterministic interleavings via barriers; ThreadSanitizer (-fsanitize=thread); Go -race + GORACE + goleak workflow in references/go.md; jcstress @JCStressTest + @Actor + @Outcome; Loom virtual-thread stress
Skilldeadlock-detection-harnessLock-order convention; lock-acquire-graph cycle detection (DFS); timed acquires + escalation; TSan detect_deadlocks=1; jstack / gdb thread apply all bt postmortem
Skillasync-ordering-testsMicrotask vs macrotask; deterministic timers (Sinon / Vitest fake); Promise.all vs sequential await; asyncio gather/cancel propagation; Go channel happens-before
Skillmvcc-isolation-testsTwo-connection harness; per-anomaly tests (dirty / non-repeatable / phantom / serialization / write skew); Read Committed → Repeatable Read → Serializable matrix per PostgreSQL; per-DB differences (PG / MySQL / SQL Server / DynamoDB)
Agentconcurrency-criticAdversarial static pass over concurrent code (threads / goroutines / async): unguarded shared mutable state, lock-ordering cycles (deadlock risk), missing happens-before / memory visibility, check-then-act races; emits findings table + BLOCK/PASS verdict

Install

/plugin marketplace add testland/qa
/plugin install qa-concurrency@testland-qa

Skills

async-ordering-tests

Test async ordering - event-loop / queue / channel ordering assertions, JS Promise microtask vs macrotask ordering, Python `asyncio.gather` vs `asyncio.wait_for` semantics, Go goroutine + channel happens-before relationships, async/await re-entrancy. Use deterministic schedulers (sinon fake timers, asyncio test mode) to remove run-to-run variance. Use when a callback fires twice, a later response overwrites an earlier one, or a cancelled parent task leaves a child still running - bugs where completion order, not shared memory, is the defect.

deadlock-detection-harness

Build deadlock-detection harnesses - extract lock-acquire-order graph via instrumentation, run cycle detection (DFS) to spot inconsistent ordering, use lock-acquire timeouts to surface rather than hang, JVM `jstack` / `gdb thread apply all bt` for postmortem analysis. Pair with ThreadSanitizer's `detect_deadlocks=1` for runtime detection. Use when a service that holds two or more locks hangs in production with no crash or error, or before release when lock acquisition order across code paths has never been proven consistent.

mvcc-isolation-tests

Build per-database MVCC isolation-level tests - Read Uncommitted vs Read Committed vs Repeatable Read vs Serializable; verify which anomalies are prevented at each level (dirty read, non-repeatable read, phantom read, serialization anomaly, write skew). Per PostgreSQL transaction isolation docs; analogous patterns for MySQL InnoDB, SQL Server, and DynamoDB. Use when two concurrent transactions can touch the same rows (balance debit, seat booking, stock decrement), or before changing a service's default isolation level.

race-condition-test-author

Build deterministic race-condition tests - identify shared mutable state, drive interleavings via barriers / latches / manual scheduling; use ThreadSanitizer (clang `-fsanitize=thread`) for C/C++ data race detection; run the Go race detector end-to-end (`go test -race`, GORACE tuning, `-count`/`-cpu` stress, goroutine-leak gating with go.uber.org/goleak - references/go.md); use jcstress (`@JCStressTest` + `@Actor` + `@Outcome`) for JVM stress; use Loom virtual-thread interleavings for parallel testing. Use when a defect only reproduces under load on shared in-process state (cache, counter, connection pool, lazy-init singleton), when writing the regression test for a race-condition incident before the fix lands, or when adding `-race` to a Go CI matrix.