Labsco
Labsco/Repos/dagster-io/fake-driven-testing
REPO PACKAGE

dagster-io fake-driven-testing

COMMUNITY
2skills
1ready to use

The main skill lays out the whole argument: tests that only assert their own mocks were called are "mock tautology" — true by construction, unable to catch a real bug — and full-stack dependency injection just relocates that same problem rather than solving it. Its fix is a single Gateway-pattern seam: one abstract interface per external system (email, users, audit, and so on), a thin real implementation for production, and a hand-maintained fake with real in-memory semantics that an agent is expected to keep in sync as the interface changes. The companion skill, fdt-refactor-mock-to-fake, targets existing test files that still call unittest.mock.patch or MagicMock and walks the conversion into that same gateway-and-fake pattern, covering both making the source code injectable and rewriting the tests themselves.

This suits a Python codebase already being built substantially by agents, where tests keep drifting into mocks that just restate the implementation, and where someone wants a written standard the agent can be pointed at to convert them — it reads like a house style guide someone pulled out and published, not a pipeline-orchestration feature. Our dependency check marks the refactor skill local_tool and the main teaching skill ready: the guidance itself needs nothing installed beyond the codebase you point it at.

READ THE FULL ANALYSIS

What we could and could not check. Our capture of the README stopped at 12,288 of its 16,920 characters, so this is built from about three-quarters of it. In that portion the word Dagster never appears — the material is general Gateway-pattern and fakes-over-mocks practice illustrated with a notification-service example, not anything about Dagster's own orchestration product.

One name we can't place. The refactor skill's own description calls this "erk's gateway-based fake pattern." Erk does not appear anywhere else in what we captured, and we are not going to guess whether it names an internal tool, a different project, or something else entirely.

1Work with nothing else to set up.