Skip to content

Conversation

@adriangudas
Copy link

A few minor cleanup/fixes:

  • Fix DRY in the child circuit breaker class implementation by using a common module
  • Add an expectation for mark_success to improve classic test coverage
  • Use a setter method style for adaptive_circuit_breaker_selector
  • Use a class instead of a method for the ExperimentFlags in the demo

Note: This PR introduces a stylistic change to make adaptive_circuit_breaker_selector to be a setter method, so we'll have to change the way we call it from

Semian::DualCircuitBreaker.adaptive_circuit_breaker_selector(value)

to

Semian::DualCircuitBreaker.adaptive_circuit_breaker_selector = value

..and make sure that is effectively socialized with our team before merging.

Add an expectation for mark_success to improve classic test coverage
Use a setter method style for adaptive_circuit_breaker_selector
Use a class instead of a method for the ExperimentFlags in the demo
end

def self.adaptive_circuit_breaker_selector(selector) # rubocop:disable Style/ClassMethodsDefinitions
def self.adaptive_circuit_breaker_selector=(selector) # rubocop:disable Style/ClassMethodsDefinitions
Copy link
Author

@adriangudas adriangudas Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this doesn't have to change. Or I can at least add the old method side-by-side so there's backwards compatibility.

@adriangudas
Copy link
Author

Actually, thinking of removing the code updates here (maybe the experiment / test updates are ok). I'm realizing now that we're better off considering our code frozen since it's in working state.

@adriangudas adriangudas marked this pull request as draft December 21, 2025 18:41
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.

1 participant