/pytest-obligation:prove-due-workfrom pytest-obligation
Use pytest-obligation to generate a standardized ObligationContract pytest suite, and add focused fault-injection tests, when Python work could be lost, stuck, or repeated after a commit, worker crash, retry, redelivery, or uncertain API reply. For adoption in a project; not upstream disclosure, gigaverse-backend's internal harness, or ordinary unit-test debugging.
Ships in pytest-obligation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when a user asks why a background task vanished, why a worker repeated an effect, or whether a database-to-queue handoff, webhook, or retry is safe. The primary deliverable is an ObligationContract whose decorator generates standardized pytest tests from real application bindings; use the same fault-injection infrastructure for additional focused tests when the domain needs them. The effect may be a payment, order, receipt, email, file, cache purge, import checkpoint, or downstream message. Work through the local repository; this skill does not call a hosted service.
For an external open-source project that the user wants to probe or report upstream, use probe-upstream-due-work. Before installing this package or applying its contract, check for a repository-owned due-work harness or instructions. In gigaverse-backend, .agents/skills/due-work/SKILL.md and docs/durable-work-conformance-harness.md own the internal implementation and test policy; use those instead of this plugin's package-adoption workflow. Both harnesses now use A–J names, but their bindings and runtime ownership are not interchangeable.
Inventory every production entry point for the same owner, including legacy
retry tasks, webhooks and narrow repairs. Separate producer coverage is not
composition coverage. Bind ObligationContract.admission_overlaps for cumulative
scopes and settlement_interleavings at observation/settlement checkpoints where
another path can commit product state before completing effects. Reuse
lifecycle proofs.
Supply production commands and independent effect observations; never implement
the scope union, settlement decision, or recovery loop in bindings. Verify a
lost-effect regression with unchanged expectations. Document unbound pairs and
checkpoints as outside coverage; A–J pass counts do not cover them implicitly.
Inventory every admitted input field before declaring it immutable. A fixed
owner/provider identity does not freeze the requested effect scope. Bind the
existing convergence and stale-snapshot families when that scope can expand;
do not use identity immutability to decline profile E for the whole operation.
pytest_obligation.ObligationContract; older adopters may use the compatibility namespace. Match documentation to the installed release, and do not silently substitute unreleased source for a published dependency. If installation is authorized, add only the development extras needed for the integration. Use integration boundaries to choose a supported adapter; identify missing boundaries rather than simulating production behavior in the test.[tool.due-work-harness] scan configuration, run due-work-harness sites and due-work-harness in-transaction with the project's environment. A scan result is a handoff candidate, not a bug. If configuration is absent, identify production-packages from the actual import roots before adding it. The scan covers specific Python handoff APIs; MongoDB writes, Prefect bodies, and Kafka offsets require their respective runtime bindings.ObligationContract with truthful dispositions for all ten profiles. G covers gated execution, H harmless replay, I indivisible admission, and J job retry limits; E's convergence families need independent decisions. Use NotAssessed(because=...) for unfinished assessment rather than inventing a claim. Place histories in handoffs= or process_handoffs= and expose a collected @due_work_contract_suite(CONTRACT) class. The decorator generates standardized pytest cases at collection time; do not handwrite copies of those cases. Bind transition, selection, and recovery to production code. A standalone history or focused custom test is useful for a domain-specific risk, but does not replace the contract. For an older installed release, use its matching version of the adoption guide, not the main API. Check current adoption guidance and green-result limits before interpreting results.pytest --due-work-summary, and use --due-work-verify for the completed coverage adoption. On an A–J version, use --due-work-profile-report=profiles.json for executed profile evidence and --due-work-require-assessed when assessment must be complete; XFAILs are not verified guarantees. Record the command, version, relevant environment, passing cases, declared gaps, unassessed profiles, and the specific divergent history. A failing history is a finding only after checking the binding and, for an upstream disclosure, independently reproducing the result against the project's own API.Before treating a contract as evidence, use contract validation. Map each claim to an independent observation and a deliberate bad behavior the observation can distinguish. Run a passing baseline and that regression with unchanged expectations; require the intended failure. Observe per-identity effects and contradictory success/error events where aggregates could hide them. A pinned table, a reached fault, or an unchanged XFAIL alone does not establish coverage. Prefer owned disposable resources; never erase a default localhost database. Count declaration-only rows separately from executed proofs.
RecoveryStep.paged and a product example (make_pending, pending); Due derives the fault seam and obligation owns the proof. Do not add another callback inventory in application tests.resume_recovery only when time must pass before a retry; it may advance eligibility, never perform the recovery transition. A green two-row isolation test does not establish fairness behind a poisoned first page.Explain the concrete lost or repeated effect, the exact failure point, what production recovery did, and the smallest test that demonstrates it. If all executed histories pass, state which boundaries were exercised and which remain outside coverage. Keep static scan candidates, code-reading hypotheses, tested findings, and known gaps distinct.
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub gigaverse-app/pytest-obligation --plugin pytest-obligation