mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
- Add assertSingleProvider() helper in quotaPools.ts: queries provider_connections with DISTINCT provider WHERE id IN (...), throws if >1 provider detected. - Call guard early in createPool (when connectionIds.length > 1) and updatePool (when input.connectionIds.length > 1), before any DB writes. - Add lockedProvider useMemo in PoolWizard.tsx: derived from first selected connection; availableConnections filtered to same provider once locked. - Show wizardSingleProviderNote i18n hint in step 1 when lockedProvider is set. - Add wizardSingleProviderNote to en.json + pt-BR.json (parity). - New test: tests/unit/quota-pool-single-provider.test.ts (4 cases). - Update tests/unit/quota-multiprovider.test.ts: all D2 tests now use two same-provider connections (both PROVIDER_A/openrouter) — the tests were exercising connection-plumbing (scope, enforce membership, combo fan-out), not mixed-provider behavior per se; updated to remain valid under Task 3 rule.