e2e-regression-async-generators

Guides end-to-end regression testing of async generator copy logic with full-consumption assertions.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/ragappv3 --skill e2e-regression-async-generators-zaxbyhub
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: e2e-regression-async-generators
Source: https://github.com/ZaxbyHub/ragappv3/tree/main/.opencode/skills/generated/e2e-regression-async-generators
Command: npx skills add https://github.com/ZaxbyHub/ragappv3 --skill e2e-regression-async-generators-zaxbyhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unit tests of private helper methods often miss integration bugs in async generator copy logic because they hand-simulate the copy step instead of exercising the real production path. This Skill enforces end-to-end regression tests that consume the full generator and assert actual emitted values. ## Core Features & Use Cases - Full Generator Consumption: Requires driving the real production async generator (e.g., RAGEngine.query) to completion rather than short-circuiting after the first yield. - Value-Level Assertions: Mandates asserting specific payload values, not just key presence, so broken copy logic actually fails the test. - Forbidden Shortcut Detection: Lists anti-patterns such as hand-simulating copies in private-helper unit tests. - Use Case: When modifying the done-chunk copy logic in a RAG streaming pipeline, write a regression test modeled on test_prompt_ab_variants.py::TestDoneMsgABKeysE2E that consumes the entire generator and verifies the copied value matches the production-resolved source. ## Quick Start Write an end-to-end regression test that calls engine.query, consumes the full async generator, and asserts the done chunk contains the exact copied values from the production path.

Frequently Asked Questions about e2e-regression-async-generators

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

FAQPage Schema
How do I test async generator copy logic end-to-end?▼

Drive the real production entry point such as engine.query and consume the entire async generator output. Assert specific values on the emitted payload, verifying the copied value matches what the production path resolved, so the test fails if the copy logic breaks.

Why do unit tests of private methods miss async generator bugs?▼

Unit tests of private helpers hand-simulate the copy step and assert the same assignment, so they pass even when the real integration path never performs the copy. Only consuming the full production generator exposes these integration bugs.

Should I assert key presence or values in streaming tests?▼

Assert specific values, not just key presence. Key presence checks pass even when the copied value is wrong or stale, while value correctness is the actual contract for copy logic in done chunks.

When is it acceptable to stop consuming an async generator early?▼

Only when the test explicitly targets an early-stage behavior. For regression tests of copy logic in terminal chunks like the done message, the generator must be consumed to completion or the assertion never executes.

What are the limitations of regression tests for async generators?▼

They verify behavior at the integration level but do not pinpoint which internal step failed, so debugging still requires tracing the production path. They also depend on a runnable production entry point, which may need fixtures or mocked external services.