Repository navigation
feat(OMN-11268): runner health models and state enum — add __all__ and OOM_KILLED emoji - #1671
Conversation
…ealth models ModelRunnerHealthAlert.to_slack_message now maps OOM_KILLED state to a skull emoji (previously fell through to the default ❌). Add explicit __all__ to ModelRunnerHealthAlert and ModelRunnerHealthSnapshot.
📝 WalkthroughWalkthroughThis PR adds public API declarations and integration tests for the runner health models. The alert model now maps OOM_KILLED state to a skull emoji, both model modules explicitly export their primary classes, and a comprehensive integration test suite validates the full public API surface. ChangesRunner Health Model Public API and Integration Testing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
… API Four integration tests verify package exports, enum member coverage, to_slack_message state coverage, and snapshot model_dump roundtrip.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/integration/observability/test_runner_health_models_integration.py`:
- Around line 31-38: The test's required set (variable `required`) is missing
the "OOM_KILLED" member declared in `EnumRunnerHealthState`; update the
`required` set in the test
(tests/integration/observability/test_runner_health_models_integration.py) to
include the string "OOM_KILLED" so the test verifies all seven enum members are
present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0cf7159e-0eb4-46b1-acff-f8ac96b9df0d
📒 Files selected for processing (3)
src/omnibase_infra/observability/runner_health/model_runner_health_alert.pysrc/omnibase_infra/observability/runner_health/model_runner_health_snapshot.pytests/integration/observability/test_runner_health_models_integration.py
|



Evidence-Ticket: OMN-11268
Evidence-Source: 1b771764c82d78214eb7689a63e21a76993199e6
Summary
Closes OMN-11268.
The
ModelRunnerStatus,ModelRunnerHealthSnapshot,ModelRunnerHealthAlert, andEnumRunnerHealthStatemodels were already implemented in main (OMN-6075, OMN-6049). This PR adds missing polish items:__all__declarations onModelRunnerHealthSnapshotandModelRunnerHealthAlertOOM_KILLEDemoji mapping inModelRunnerHealthAlert.to_slack_message()Acceptance criteria
ModelRunnerStatusfrozen with 7 fieldsEnumRunnerHealthStatehas HEALTHY, GITHUB_OFFLINE, DOCKER_UNHEALTHY, OOM_KILLED, CRASH_LOOPING, STALE_REGISTRATION, MISSINGModelRunnerHealthSnapshotfrozen with all required fieldsModelRunnerHealthAlert.to_slack_message()covers all degraded statesdod_evidence
ticket: OMN-11268
tests_passed: 7 unit + 4 integration (all PASS)
pre_commit: all hooks passed
occ_contract: onex_change_control PR #1176