Summary
Add coordinator API contract tests for orders, quotes, secrets, health, and metrics routes so the public service surface is guarded before mainnet hardening.
Context
- Coordinator currently has service-level tests in
coordinator/test/order-service.test.ts.
- Route handlers under
coordinator/src/server/routes/ expose the API consumed by the frontend/resolvers, but route-level regression coverage is thin.
- Recent observability work added
/metrics; that endpoint should stay valid Prometheus text as handlers evolve.
Scope
- Add Supertest/Vitest route tests against the Express app without starting a real network port.
- Cover success and validation-error paths for order creation/listing, quote responses, secret relay behavior,
/health, and /metrics.
- Keep tests independent of live RPCs and external services.
Acceptance criteria
Pointers
coordinator/src/server/app.ts
coordinator/src/server/routes/health.ts
coordinator/src/server/routes/metrics.ts
coordinator/src/server/routes/orders.ts
coordinator/src/server/routes/quotes.ts
coordinator/src/server/routes/secrets.ts
coordinator/test/order-service.test.ts
Complexity
Medium (API tests + validation edge cases)
Summary
Add coordinator API contract tests for orders, quotes, secrets, health, and metrics routes so the public service surface is guarded before mainnet hardening.
Context
coordinator/test/order-service.test.ts.coordinator/src/server/routes/expose the API consumed by the frontend/resolvers, but route-level regression coverage is thin./metrics; that endpoint should stay valid Prometheus text as handlers evolve.Scope
/health, and/metrics.Acceptance criteria
pnpm --filter @oversync/coordinator testincludes route-level API coverage./healthreturns stable service/version/uptime/timestamp fields./metricsreturns Prometheus content type and includes coordinator metric names.Pointers
coordinator/src/server/app.tscoordinator/src/server/routes/health.tscoordinator/src/server/routes/metrics.tscoordinator/src/server/routes/orders.tscoordinator/src/server/routes/quotes.tscoordinator/src/server/routes/secrets.tscoordinator/test/order-service.test.tsComplexity
Medium (API tests + validation edge cases)