Loading
feat: network capability deactivate command
Summary
- Implement
command.srm.network.capability.deactivateend-to-end: replace the NATS no-op with a real command coordinator and use case. - Resolve the target realization by
service_instance_idorexternal_ref(exactly one live,activematch for the caller'sapp_provider_id); create aDEACTIVATE_CAPABILITYorder withtarget_service_instance_idset to the session holder. - Call
adapter.deactivate_capability, treat already-gone backends as success (ResourceNotFound/ runtime-state probe), terminate the capability instance, and terminate the holder when it was the last live child. - Mirror activate/terminate patterns for accept → status → complete / fail_after_accept, including terminate-style replay of COMPLETED/FAILED orders.
Test plan
- Unit: accept happy paths (
service_instance_id/external_ref), zero/many matches, unsupported & sync-query kinds, non-active / missing refs, replay - Unit: complete success, already-gone paths, non-terminated adapter result, last-live-child holder teardown,
fail_after_accept - Application: coordinator invalid payload →
failed_before_start; accept → status + completed; replay; fail path - API: dependencies wiring + NATS subject bound to deactivate coordinator (not no-op)
-
pytestfor the above + ruff/mypy on touched modules