4.8 KiB
Why
The 2026-04-24 testbed wave shipped seven new packages — @suaveplan/testing-integration and six service-fixture plugins (surrealdb, redis, postgres, mailpit, typesense, garage-s3) — plus four new @suaveplan/testing-e2e modules (console-monitor, network-monitor, multi-session, extension-fixture). All of that work currently lives in docs/superpowers/plans/2026-04-24-*.md and the source tree, but none of it is reflected in openspec/specs/. The 2026-04-25 test-suite audit (docs/superpowers/specs/2026-04-25-test-suite-audit.md) flags this as the single highest-leverage spec-coherence gap — every additional plugin compounds the drift.
This change lifts the already-implemented infrastructure into normative OpenSpec contract. It is a spec-coherence change: code is mostly already in place, but the contract that other genesis packages will rely on (ServiceFixture<TConfig>, TestEnvironment lifecycle, env-bridge inject-key namespace, per-plugin error-code prefixes) must be normative before any consumer integrates against it.
The change also collapses the residual ≥ 95 % coverage gate inside openspec/specs/testing/spec.md into the project-wide 100 % rule that openspec/project.md already mandates, and broadens property-based coverage from "the @suaveplan/testing package itself" to "every pure-function @suaveplan/* package".
What Changes
New capabilities (ADDED)
testing-integration—ServiceFixture<TConfig>interface,TestEnvironment(topo-sorted parallel-start / reverse-stop withdependsOn),HealthPoller(interval / timeout / AbortSignal),skipIfUnavailable(),createIntegrationSetup()factory + Vitest global-setup bridge, env-bridge passthrough contract,TestEnvironmentOptions.{ clock, rng, signal }propagation, leak/handle assertion on teardown,markFlaky()+quarantine.json,INTEGRATION.<PLUGIN>.*error-code namespace.testing-integration-surrealdb— SurrealDB v3 fixture (HTTP/health, random password, env-bridgeSURREALDB_URL/SURREALDB_USERNAME/SURREALDB_PASSWORD).testing-integration-redis— Redis 7 fixture (TCPPING,REDIS_URLenv-bridge with full URL parsing).testing-integration-postgres— PostgreSQL 16 fixture (pg_isreadyin-container exec, configurable db/user/password,POSTGRES_URL).testing-integration-mailpit— Mailpit fixture +assertMail()helper (MAILPIT_SMTP_URL/MAILPIT_API_URL, partial-subject + exact-address matching).testing-integration-typesense— Typesense 27 fixture (JSON health{ ok: true }, random API key,TYPESENSE_URL/TYPESENSE_API_KEY).testing-integration-garage-s3— Garage v2 fixture (dual-port 3900/3902, 7-step init sequence, admin-port health, four env vars).
Modified capabilities
testing— flatten coverage gate from≥ 95 %to100 %on every dimension; broaden the property-based coverage requirement to every pure-function@suaveplan/*package; clarify that the deterministicClock/Rng/AbortSignalinjection contract extends to integration fixtures viaTestEnvironmentOptions.testing-e2e— addattachConsoleMonitor,attachNetworkMonitor(withassertNoFailures/assertNoMissingAssets/assertNoMixedContent/assertNoCorsErrors),createMultiSessionFixture,extendTestWithExtension, and a default-deny network-sandbox rule.
Capabilities
New Capabilities
testing-integration(core)testing-integration-surrealdbtesting-integration-redistesting-integration-postgrestesting-integration-mailpittesting-integration-typesensetesting-integration-garage-s3
Modified Capabilities
testing— coverage gate, property-coverage scope, deterministic-injection cross-cut.testing-e2e— console / network / multi-session / extension surface plus network sandbox default.
Impact
- Affected code:
packages/testing/testing-integration/**,packages/testing/testing-integration-{surrealdb,redis,postgres,mailpit,typesense,garage-s3}/**,packages/testing/testing-e2e/src/{console-monitor,network-monitor,multi-session,extension-fixture}/**(already shipped; this change is normative-only). - Affected consumers: every package whose nightly integration suite uses a fixture (today: none on genesis; tomorrow: every
db-*,oauth-client,webhook-client, search/cache consumers). - Inject-key rename: the plans use
__integration_failed__; this change codifies it as__suaveplan_integration_failed__to avoid namespace collisions. - Plan sweep: every literal
95 %indocs/superpowers/plans/2026-04-24-*.mdis replaced with100 %so plans and specs agree. - Pre-publish gate: unchanged in shape —
bunx turbo lint typecheck test --filter=@suaveplan/<pkg>plustest:coverageat flat100 %Istanbul thresholds.