# Test-only code leaves production modules

Seven Promise facades, two counters and four fixture files that only tests used are gone from production modules, and a test keeps new ones out.

- **No facade for tests.** The cron jobs and the RevenueCat verification each carried a Promise wrapper that no production code called (`runPendingAudits`, `runPendingAuthCleanup`, `runPendingUploads`, `runWebhookJobs`, `runPendingPush`, `runPendingBilling`, `verifyRevenueCat`). They are deleted, with the standalone webhook round that only served one of them. Tests run the job's Effect with `runJob` from `packages/api/src/testing/run-job.ts`. See [Testing](/docs/development/testing#test-only-code-lives-under-testing).
- **Fixtures and counters moved out.** The provider sample payloads are now `packages/api/src/testing/billing-fixture-{stripe,polar,pagarme,revenuecat}.ts`. The request scope no longer exports a create counter: its tests count calls of the factory they bind.
- **A test holds the line.** `scripts/test-only-exports.test.mjs` fails an export that only tests reference. The 46 that remain are listed with a reason, and the list may only shrink. `scripts/effect-run-sites.test.mjs` pins the three modules that may call `Effect.run*`, which turns "one `run*` per entry point" from a review rule into a test. See [Enforcement](/docs/development/enforcement).
- **ADR text corrected.** [ADR-0010](/docs/adr/0010-procedures-run-one-effect-program) named two `Effect.runPromiseExit` sites; `sendEmail` in `packages/email` is the third, and [ADR-0005](/docs/adr/0005-effect-boundary) now says a facade exists only where production code outside Effect calls it.
