-
Notifications
You must be signed in to change notification settings - Fork 0
Add graceful degradation when dependent services are unavailable #57
Copy link
Copy link
Open
Labels
architectureCross-service architectural design or reviewCross-service architectural design or reviewcomplexity:largeLarge scope: 200+ lines, multiple filesLarge scope: 200+ lines, multiple filesenhancementNew feature or requestNew feature or requestneeds-testsArea needs dedicated test coverageArea needs dedicated test coveragetriagedIssue has been triaged, ready for planning or implementationIssue has been triaged, ready for planning or implementation
Milestone
Metadata
Metadata
Assignees
Labels
architectureCross-service architectural design or reviewCross-service architectural design or reviewcomplexity:largeLarge scope: 200+ lines, multiple filesLarge scope: 200+ lines, multiple filesenhancementNew feature or requestNew feature or requestneeds-testsArea needs dedicated test coverageArea needs dedicated test coveragetriagedIssue has been triaged, ready for planning or implementationIssue has been triaged, ready for planning or implementation
Context
agentd services communicate via HTTP REST calls (e.g., ask → notify, orchestrator → wrap). Currently, if a downstream service is unavailable, requests fail with connection errors. There's no retry logic, circuit breaking, or graceful fallback behavior in the service layer.
Proposal
Implement resilient inter-service communication with retries, circuit breakers, and fallback behavior.
Acceptance Criteria
notification_client.rs,client.rsin wrap/orchestrator)/healthreturns{ "status": "degraded", "dependencies": { "notify": "unavailable" } })Relevant Files
crates/ask/src/notification_client.rs— calls notify servicecrates/orchestrator/src/manager.rs— calls wrap servicecrates/cli/src/client.rs— calls all servicescrates/notify/src/client.rs— HTTP client basecrates/wrap/src/client.rs— HTTP client baseNotes
towermiddleware for retry/circuit-breaker on the client sidecrates/baml/src/client.rs) — use as reference patternDependencies
Benefits from: #49 (shared HTTP client would be the natural place to add retry/circuit-breaker logic, avoiding duplication across service clients)
Related: #17 (API authentication), #7 (integration tests for cross-service communication)