Skip to content

feat(reliability): implement fault tolerance API (#329)#348

Merged
kcenon merged 2 commits into
mainfrom
feature/329-implement-fault-tolerance-api
Jan 8, 2026
Merged

feat(reliability): implement fault tolerance API (#329)#348
kcenon merged 2 commits into
mainfrom
feature/329-implement-fault-tolerance-api

Conversation

@kcenon

@kcenon kcenon commented Jan 8, 2026

Copy link
Copy Markdown
Owner

Summary

Changes

circuit_breaker.h

  • Modify execute() to return result<T> instead of throwing exceptions
  • Add validate() method to circuit_breaker_config
  • Add get_success_rate() method to circuit_breaker_metrics

retry_policy.h

  • Implement retry_executor<T> template class with configurable retry logic
  • Add retry_metrics struct for tracking retry statistics
  • Add factory functions: create_exponential_backoff_config(), create_fixed_delay_config(), create_fibonacci_backoff_config()
  • Add validate() method to retry_config
  • Support custom should_retry predicate

fault_tolerance_manager.h

  • Implement fault_tolerance_manager<T> template class combining circuit breaker and retry
  • Add fault_tolerance_config with enable flags and config options
  • Add fault_tolerance_metrics for operation tracking
  • Implement execute() and execute_with_timeout() methods
  • Add is_healthy() method to check circuit breaker state
  • Implement global registries:
    • global_circuit_breaker_registry()
    • global_retry_executor_registry()
    • global_fault_tolerance_registry()

test_fault_tolerance.cpp

  • Update test assertions to use is_ok()/is_err() instead of bool conversion
  • Enable test in CMakeLists.txt

Documentation

  • Update KNOWN_ISSUES.md to reflect test enablement

Test plan

  • All 27 fault tolerance tests pass
  • Full test suite passes (570/571, 1 pre-existing failure unrelated to this PR)
  • Build succeeds on macOS

Closes

Closes #329

kcenon added 2 commits January 8, 2026 23:17
…ance.cpp (#329)

Implement complete fault tolerance API to enable test_fault_tolerance.cpp:

- circuit_breaker: Add result<T> return type, validate(), get_success_rate()
- retry_policy: Add retry_executor<T>, retry_metrics, factory functions
  (exponential, fixed, fibonacci backoff)
- fault_tolerance_manager: Add template class combining circuit breaker
  and retry, fault_tolerance_config, fault_tolerance_metrics
- Add global registries for circuit breakers, retry executors, and
  fault tolerance managers
- Enable test_fault_tolerance.cpp in CMakeLists.txt
- Update test assertions to use is_ok()/is_err() instead of bool conversion

All 27 fault tolerance tests now pass.
Update disabled tests list and add recently enabled tests section
to track test files that were re-enabled with their corresponding PRs.
@kcenon kcenon merged commit d07b068 into main Jan 8, 2026
21 checks passed
@kcenon kcenon deleted the feature/329-implement-fault-tolerance-api branch January 8, 2026 14:27
kcenon added a commit that referenced this pull request Apr 13, 2026
* feat(reliability): implement fault tolerance API for test_fault_tolerance.cpp (#329)

Implement complete fault tolerance API to enable test_fault_tolerance.cpp:

- circuit_breaker: Add result<T> return type, validate(), get_success_rate()
- retry_policy: Add retry_executor<T>, retry_metrics, factory functions
  (exponential, fixed, fibonacci backoff)
- fault_tolerance_manager: Add template class combining circuit breaker
  and retry, fault_tolerance_config, fault_tolerance_metrics
- Add global registries for circuit breakers, retry executors, and
  fault tolerance managers
- Enable test_fault_tolerance.cpp in CMakeLists.txt
- Update test assertions to use is_ok()/is_err() instead of bool conversion

All 27 fault tolerance tests now pass.

* docs: update KNOWN_ISSUES.md for fault tolerance test enablement

Update disabled tests list and add recently enabled tests section
to track test files that were re-enabled with their corresponding PRs.
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.

[TEST] Implement fault tolerance API for test_fault_tolerance.cpp (ARC-001 Phase 1)

1 participant