effect-concurrency-testing

Create deterministic Effect tests for fibers, PubSub, and streams.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/front-depiction/claude-setup --skill effect-concurrency-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-concurrency-testing
Source: https://github.com/front-depiction/claude-setup/tree/main/skills/effect-concurrency-testing
Command: npx skills add https://github.com/front-depiction/claude-setup --skill effect-concurrency-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineers validate concurrency primitives in the Effect library by providing ready-to-run test patterns and clear guidance for fiber coordination, PubSub workflows, streams, and interruption scenarios.

Core Features & Use Cases

  • Coordinate fibers and synchronization: patterns using yieldNow, makeLatch, and Deferred to control execution order and readiness.
  • Test PubSub and streams: patterns to publish, subscribe, and observe streams, including changes to SubscriptionRef and streams.
  • Handle time and interruption: tests leveraging time control and fiber interruption to verify robust behavior under delays and cancellations.

Quick Start

Create a test using it.effect and Effect.gen to simulate a simple publisher/subscriber interaction with a latch to ensure order, then run the tests with your standard test runner.

Frequently Asked Questions about effect-concurrency-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Effect concurrency primitives like fibers and latches?

To test Effect concurrency primitives, you use ready-to-run pattern scaffolds leveraging yieldNow, makeLatch, and Deferred to control fiber execution order and ensure deterministic, repeatable test outcomes for concurrent code.

What is the best way to test PubSub workflows and streams in Effect?

Testing PubSub workflows and streams in Effect involves using provided test patterns to publish, subscribe, and observe stream behaviors, including verifying changes to SubscriptionRef for robust integration coverage.

Can I simulate fiber interruption and time control in Effect tests?

Yes, you can simulate fiber interruption and time control in Effect tests by leveraging built-in test primitives to verify robust concurrent behavior under deliberate delays and cancellation scenarios.

Does Effect provide built-in primitives for deterministic concurrency testing?

Yes, Effect provides built-in primitives like yieldNow, Deferred, and makeLatch specifically designed to enable deterministic, repeatable tests for concurrent code by controlling execution readiness and synchronization.

How to coordinate fiber synchronization in Effect unit tests?

To coordinate fiber synchronization in Effect unit tests, apply patterns using makeLatch and Deferred to gate execution readiness, ensuring sequential operations run reliably within your standard test runner.

What are the limitations of testing concurrent Effect code without built-in primitives?

Testing concurrent Effect code without built-in primitives often leads to non-deterministic results, as you lack yieldNow, Deferred, and makeLatch to explicitly control fiber scheduling, time, and interruption states.