Skip to content

feat(#504): add provider failover incident history#572

Open
coredevdave-cmd wants to merge 1 commit into
edehvictor:mainfrom
coredevdave-cmd:feature/504-failover-incident-history
Open

feat(#504): add provider failover incident history#572
coredevdave-cmd wants to merge 1 commit into
edehvictor:mainfrom
coredevdave-cmd:feature/504-failover-incident-history

Conversation

@coredevdave-cmd
Copy link
Copy Markdown

@coredevdave-cmd coredevdave-cmd commented May 27, 2026

closes #504

Summary

Implements issue #504: Provider Failover Incident History.

Changes

Server

  • server/src/services/failoverIncidentHistoryService.ts — in-memory store for failover incidents with recordIncident(), resolveIncident(), and getHistory(); auto-classifies trigger type (stale_data / outage / degraded) from reasons
  • server/src/routes/transparency.ts — three new endpoints:
    • GET /api/transparency/failover-history — returns incident list, newest first; optional ?protocolId filter
    • POST /api/transparency/failover-history — record a new incident
    • POST /api/transparency/failover-history/:protocolId/resolve — mark open incident as resolved, sets recoveredAt and durationMs

Client

  • client/src/pages/transparency/TransparencyDashboard.tsx — new "Provider Failover Incident History" panel showing active/recovered status, trigger type, outage duration, and reasons

Tests

  • server/src/services/__tests__/failoverIncidentHistoryService.test.ts — covers incident creation, recovery, empty history, and filtering
  • client/src/pages/transparency/TransparencyDashboard.test.tsx — covers empty state, active incident, and recovered incident with duration

Acceptance Criteria

  • Record failover incident summaries in memory
  • Expose a safe incident history endpoint
  • Render incident history in transparency UI
  • Tests for incident creation, recovery, and empty history

- Add failoverIncidentHistoryService with in-memory store for recording,
  resolving, and querying failover incidents (stale data, outage, degraded)
- Add GET/POST /api/transparency/failover-history and
  POST /api/transparency/failover-history/:protocolId/resolve endpoints
- Render incident history panel in TransparencyDashboard with active/
  recovered status, trigger type, duration, and reasons
- Add server-side tests for incident creation, recovery, and empty history
- Add client-side tests for the incident history panel rendering
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@coredevdave-cmd is attempting to deploy a commit to the Edeh Victor's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@coredevdave-cmd Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Provider Failover Incident History

1 participant