The connections/providers split (2cdaf61, on PR #284) added a new workspace_providers resource and restructured connections, but the new surface has no dedicated tests yet. The existing suites pass but don't exercise it.
Provider CRUD handler (crates/nvisy-server/src/handler/providers.rs)
- create / read / update / delete / list / verify — happy paths and authz (
ManageProviders vs ViewProviders).
- Update rejects a provider-change (
provider_id mismatch → 400) and preserves provider_type.
verify_provider maps a build error vs. a credential rejection to the right ConnectionVerification.
- Name-uniqueness (per-workspace) and the provider vs. connection namespaces are independent.
Provider queries (crates/nvisy-postgres/src/query/workspace_provider.rs)
find_provider_by_type returns the most-recent active provider of a kind, excludes disabled/soft-deleted, and applies the (updated_at desc, id desc) tiebreaker deterministically.
- Update/delete are scoped to live rows (
deleted_at IS NULL) — a concurrent delete is not overwritten. Mirror the same coverage for the connection update/delete (the same fix landed there).
cursor_list_workspace_providers pagination + provider filter.
Events / activity
- Provider create/update/delete emit
provider.{created,updated,deleted} webhook + activity events with the correct ProviderRef/ProviderActivityParams, and do not emit notifications (matching connection CRUD).
Split invariants
chat resolves the workspace LLM via find_provider_by_type(ProviderType::Llm) and errors cleanly when none is configured.
- Connections are transfer-only:
ConnectionConfig has no inference variant; connection_type drives supports_schedule.
Notes
The connections/providers split (
2cdaf61, on PR #284) added a newworkspace_providersresource and restructured connections, but the new surface has no dedicated tests yet. The existing suites pass but don't exercise it.Provider CRUD handler (
crates/nvisy-server/src/handler/providers.rs)ManageProvidersvsViewProviders).provider_idmismatch → 400) and preservesprovider_type.verify_providermaps a build error vs. a credential rejection to the rightConnectionVerification.Provider queries (
crates/nvisy-postgres/src/query/workspace_provider.rs)find_provider_by_typereturns the most-recent active provider of a kind, excludes disabled/soft-deleted, and applies the(updated_at desc, id desc)tiebreaker deterministically.deleted_at IS NULL) — a concurrent delete is not overwritten. Mirror the same coverage for the connection update/delete (the same fix landed there).cursor_list_workspace_providerspagination + provider filter.Events / activity
provider.{created,updated,deleted}webhook + activity events with the correctProviderRef/ProviderActivityParams, and do not emit notifications (matching connection CRUD).Split invariants
chatresolves the workspace LLM viafind_provider_by_type(ProviderType::Llm)and errors cleanly when none is configured.ConnectionConfighas no inference variant;connection_typedrivessupports_schedule.Notes
create_test_server*helpers (require live Postgres + NATS).