Skip to content

feat(omnibase_infra): add circuit breaker event emission [OMN-5293] - #873

Merged
jonahgabriel merged 2 commits into
mainfrom
jonahgabriel/omn-5293-t29-circuit-breaker-dashboard
Mar 17, 2026
Merged

jonahgabriel merged 2 commits into
mainfrom
jonahgabriel/omn-5293-t29-circuit-breaker-dashboard

Conversation

@jonahgabriel

Copy link
Copy Markdown
Collaborator

Summary

  • Adds SUFFIX_CIRCUIT_BREAKER_STATE topic constant (onex.evt.omnibase-infra.circuit-breaker.v1)
  • Creates ModelCircuitBreakerStateEvent Pydantic model with service_name, state, previous_state, failure_count, threshold, timestamp
  • Creates CircuitBreakerEventPublisher that publishes state-transition events for CLOSED→OPEN, OPEN→HALF_OPEN, HALF_OPEN→CLOSED transitions
  • Registers topic in ALL_OMNIBASE_INFRA_TOPIC_SPECS (3 partitions, 7-day retention)
  • Adds parity gate allowlist entry and pattern exemption for service_name field
  • Regenerates enum_omnibase_infra_topic.py

Test plan

  • 8 unit tests added: all state transitions, bus error swallowing, correlation ID threading, topic format validation
  • All pre-commit hooks pass
  • uv run pytest tests/unit/services/test_circuit_breaker_event_publisher.py — 8/8 passed

- Add SUFFIX_CIRCUIT_BREAKER_STATE topic constant (onex.evt.omnibase-infra.circuit-breaker.v1)
- Create ModelCircuitBreakerStateEvent with state, previous_state, failure_count, threshold fields
- Create CircuitBreakerEventPublisher that emits state-transition events (CLOSED/OPEN/HALF_OPEN)
- Register topic in ALL_OMNIBASE_INFRA_TOPIC_SPECS and allowlist parity gate
- Add validation_exemptions.yaml exemption for service_name field
- Regenerate topic enums (enum_omnibase_infra_topic.py)
- Add 8 unit tests covering all transitions, bus error swallowing, and topic format
…nit__ [OMN-5293]

Adds CircuitBreakerEventPublisher to the services module public API so
callers can import it from the standard services path without needing to
reference the implementation module directly.
@jonahgabriel
jonahgabriel added this pull request to the merge queue Mar 17, 2026
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jonahgabriel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 10 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0d97e71b-ba77-41c4-9599-bf372e8f25f9

📥 Commits

Reviewing files that changed from the base of the PR and between b4c0aae and e719188.

⛔ Files ignored due to path filters (1)
  • src/omnibase_infra/enums/generated/enum_omnibase_infra_topic.py is excluded by !**/generated/**
📒 Files selected for processing (10)
  • scripts/check_contract_topic_parity.py
  • src/omnibase_infra/event_bus/topic_constants.py
  • src/omnibase_infra/models/resilience/__init__.py
  • src/omnibase_infra/models/resilience/model_circuit_breaker_state_event.py
  • src/omnibase_infra/services/__init__.py
  • src/omnibase_infra/services/service_circuit_breaker_event_publisher.py
  • src/omnibase_infra/topics/__init__.py
  • src/omnibase_infra/topics/platform_topic_suffixes.py
  • src/omnibase_infra/validation/validation_exemptions.yaml
  • tests/unit/services/test_circuit_breaker_event_publisher.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonahgabriel/omn-5293-t29-circuit-breaker-dashboard
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Merged via the queue into main with commit e18f943 Mar 17, 2026
31 checks passed
@jonahgabriel
jonahgabriel deleted the jonahgabriel/omn-5293-t29-circuit-breaker-dashboard branch March 17, 2026 19:03
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