Files
suaveplan/openspec/archive/2026-05-26-api-host-testing-kit/tasks.md
2026-05-27 23:29:53 +01:00

1.1 KiB

Tasks

  • 1. Replace STAGE_2_RESERVED sentinel with the populated ./testing surface (createTestHost + helper types).
  • 2. Wire per-slot default adapters (router, auth, tenant, db, secrets, ws-broker, ledger-db, event-bus).
  • 3. Implement installFixturePlugin, fetchAs, waitForEvent, dispose helpers on TestHost.
  • 4. Add 13 unit tests under src/testing/create-test-host/create-test-host.test.ts covering each helper + adapter slot using a hand-rolled router adapter (avoids the api-host ↔ api-router-in-memory dep cycle).
  • 5. Author the companion smoke at e2e/foundation-stack-test-host/ — Bun.serve over a createTestHost(...) boot, Playwright spec covering 8 behaviour groups (plugin install, router resolution, principal seed, tenant seed, secret seed, db round-trip, event emission, livez).
  • 6. Update STATUS.md row for @suaveplan/api-host.
  • 7. Tick 5.6 api-host testing-kit subpath in openspec/changes/api-plugin-foundation/tasks.md.
  • 8. Document the retained conformanceSkip posture in api-host/README.md.