gitea/routers
logikonline a703bcc60f feat(api): add Phase 3 reliability and UX enhancements
Add comprehensive reliability patterns and user experience improvements:

- Operation progress tracking via SSE (modules/operations/progress.go)
  - Real-time progress updates for long-running operations
  - Phase-based progress with completion percentages
  - Byte/item progress tracking with ETA calculations
  - Automatic cleanup of completed operations

- Idempotency key middleware (modules/idempotency/idempotency.go)
  - POST/PUT/PATCH request deduplication
  - 24-hour response caching
  - Concurrent request protection with locking
  - Idempotency-Replayed header for cache hits

- Webhook retry with exponential backoff (modules/webhook/retry.go)
  - Configurable max retries and delays
  - Jitter for thundering herd prevention
  - Retryable status code configuration
  - Delivery attempt tracking

- Circuit breaker pattern (modules/circuitbreaker/circuitbreaker.go)
  - Closed/Open/Half-Open state machine
  - Configurable failure thresholds
  - Global registry for service management
  - State change callbacks

- Enhanced health checks (modules/health/health.go)
  - Kubernetes-compatible liveness/readiness probes
  - Per-component health status
  - System metrics (goroutines, memory, CPU)
  - Circuit breaker status integration

New v2 API endpoints:
- GET /api/v2/health - comprehensive health check
- GET /api/v2/health/live - liveness probe
- GET /api/v2/health/ready - readiness probe
- GET /api/v2/health/component/{name} - component status
- GET /api/v2/operations/{id} - operation status
- GET /api/v2/operations/{id}/progress - SSE progress stream
- DELETE /api/v2/operations/{id} - cancel operation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:54:00 -05:00
..
api feat(api): add Phase 3 reliability and UX enhancements 2026-01-09 11:54:00 -05:00
common improve the compare page (#36261) 2026-01-01 10:32:19 -08:00
install Fix oauth2 session gob register (#36017) 2025-11-26 23:25:34 +08:00
private Fix the bug when ssh clone with redirect user or repository (#36039) 2025-12-04 19:17:49 +00:00
utils Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +08:00
web improve the compare page (#36261) 2026-01-01 10:32:19 -08:00
init.go feat(api): add v2 API with AI-friendly features (Phase 2) 2026-01-09 11:41:10 -05:00