$npx skillfedfor your agent

yield-injections

yield-injections provides test-only infrastructure for injecting cooperative yields and synthetic failures into resumable state machines. Use it to test state-machine re-entry safety, interleaving behavior, and abandonment cleanup by marking yield points and controlling when they fire. Includes fixed injectors for unit tests and simulator support for randomized deterministic coverage.

yield-injections enables testing of resumable state machines by injecting controlled yield and failure boundaries at specific points.

AI-generated summary based on this skill's SKILL.md

23,479 1,211 MITupdated by tursodatabase

Decision gist · record as of 2026-07-28

yield-injections enables testing of resumable state machines by injecting controlled yield and failure boundaries at specific points. yield-injections provides test-only infrastructure for injecting cooperative yields and synthetic failures into resumable state machines. Use it to test state-machine re-entry safety, interleaving behavior, and abandonment cleanup by marking yield points and controlling when they fire. Includes fixed injectors for unit tests and simulator support for randomized deterministic coverage.

manual: git clone https://github.com/tursodatabase/turso → cp -r turso/.claude/skills/yield-injections ~/.claude/skills/yield-injections
.claude/skills/yield-injections/SKILL.md · version 4b8a28ea

Use it when

  • yield-injections ensures resumable state machine boundaries are safe and re-entrant by providing controlled yield and failure injection.
  • Yes.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

tursodatabase/turso/yield-injections · repository language: Rust

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is yield-injections and what does it test?

yield-injections provides test-only infrastructure for injecting cooperative yields and synthetic failures into resumable state machines. It lets you mark yield points, control when they fire, and verify state-machine re-entry safety, interleaving behavior, and abandonment cleanup. The skill includes fixed injectors for unit tests and simulator support for randomized deterministic coverage.

How do resumable state machine boundaries stay safe and re-entrant?

yield-injections ensures resumable state machine boundaries are safe and re-entrant by providing controlled yield and failure injection points. You can test that state machines correctly handle mid-yield drops, verify cleanup behavior when statements abandon, and confirm that re-entry after a yield doesn't corrupt state or violate invariants.

Can yield-injections run deterministic interleaving tests?

Yes. yield-injections supports deterministic concurrent interleaving tests with reproducible seeds. This lets you simulate lock contention and out-of-order completion scenarios in a controlled, repeatable way, ensuring your concurrent code behaves correctly across different execution orders.

What happens when statements drop mid-yield in yield-injections?

yield-injections verifies cleanup and abandonment behavior when statements drop mid-yield. It lets you inject failure points at yield checkpoints to test that resources are properly released, state is rolled back correctly, and no dangling references or leaked cursors remain after an abandoned statement.

Does yield-injections support synthetic failure injection?

Yes. yield-injections includes YieldInjector and FailureInjector components for synthetic failure injection into state machines. You can inject transition yields using macros, mark checkpoint yield points, and control cursor yield injection to test how your code handles failures at specific interleaving moments.

What license does yield-injections use?

yield-injections is released under the MIT license, allowing free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Yield Injection Guide

Yield injection is test-only infrastructure for forcing cooperative-yield or failure boundaries in resumable state machines. The implementation currently lives under core/mvcc/, but the mechanism is not MVCC semantics.

Key Files

  • core/mvcc/yield_points.rs: injector traits and macros.
  • core/mvcc/yield_hooks.rs: YieldPointMarker, YieldContext, ProvidesYieldContext.
  • core/connection.rs: per-connection injector slots and yield_instance_id_counter.
  • core/mvcc/database/mod.rs: commit points and commit cleanup.
  • core/mvcc/database/checkpoint_state_machine.rs: checkpoint points.
  • core/mvcc/cursor.rs: cursor points.
  • core/mvcc/database/tests.rs: fixed test injectors

(truncated - see the full file via the links below)

File tree — 1 file
.claude/skills/yield-injections/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Test state machines with controlled yield and failure injection points”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

mvcc
by tursodatabase · tursodatabase/turso

This skill documents Turso's experimental Multi-Version Concurrency Control system, which allows readers and writers to operate simultaneously without blocking through row-level snapshot isolation. It covers enabling MVCC via pragma, the versioning model tracking begin/end timestamps, and the architecture built on lock-free data structures. The guide also details checkpointing behavior, current limitations like garbage collection and recovery gaps, and testing patterns for MVCC-enabled code.

MITfor claude-codeupdated Jul 2026
★ 23,479repo stars
turso-db
by tursodatabase · tursodatabase/agent-skills

Turso is a Rust-based, in-process SQL database that runs SQLite-compatible queries in Node.js, browsers, React Native, and edge functions. It includes vector similarity search, full-text search powered by Tantivy, change tracking, encryption, and remote sync capabilities. This skill covers SDK setup, CLI usage, and recipes for all supported languages and platforms.

MITupdated Jul 2026
★ 21repo stars
code-quality
by tursodatabase · tursodatabase/turso

code-quality establishes standards for writing reliable database code in Rust, prioritizing data integrity over silent failures. It covers error handling discipline, exhaustive pattern matching, and invariant checking to prevent corruption. The guide emphasizes crashing on invalid state rather than continuing in undefined conditions, and avoiding premature abstractions or workarounds.

MITfor claude-codeupdated Jul 2026
★ 23,479repo stars
memory-benchmark
by tursodatabase · tursodatabase/turso

memory-benchmark measures heap allocations and process memory for SQL workloads under different journal modes. It includes dhat-based allocation tracking, stack-usage analysis via the stack-report binary, and six built-in workload profiles (insert-heavy, read-heavy, mixed, scan-heavy, series-blob, update-churn) for regression detection and performance tuning.

MITfor claude-codeupdated Jul 2026
★ 23,479repo stars
debugging
by tursodatabase · tursodatabase/turso

This guide walks through Turso's debugging toolkit for tracking down database problems. Compare bytecode between SQLite and Turso to pinpoint code generation bugs versus VM issues, enable trace logging for core components, run stress tests with ThreadSanitizer to catch threading problems, and use deterministic simulation with seeds to reproduce elusive bugs. Corruption debugging tools help diagnose WAL and integrity failures.

MITfor claude-codeupdated Jul 2026
★ 23,479repo stars
cdc
by tursodatabase · tursodatabase/turso

CDC is Turso's change data capture system that records INSERT, UPDATE, and DELETE operations at the bytecode translation layer. Changes are written to a dedicated CDC table and consumed by the sync engine to replicate local modifications remotely. The system supports two schema versions and operates per-connection via PRAGMA configuration.

MITfor claude-codeupdated Jul 2026
★ 23,479repo stars

More skills storage-format (MIT) · transaction-correctness (MIT)

Tags
test-infrastructurefailure-simulationconcurrency-testingstate-machine-safetydeterministic-schedulingresumable-executioninterleaving-controlchaos-engineering