Skip to content

Normalize supervisor prediction-mismatch failure naming across active code paths#21

Merged
dfeen87 merged 1 commit intomainfrom
copilot/check-for-consistencies-and-bugs
Apr 11, 2026
Merged

Normalize supervisor prediction-mismatch failure naming across active code paths#21
dfeen87 merged 1 commit intomainfrom
copilot/check-for-consistencies-and-bugs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

This addresses consistency bugs in supervisor failure signaling where prediction-mismatch was spelled differently across active components, creating divergent reason strings and enum semantics. The change aligns naming to a single canonical value to keep logs/metrics/API-facing failure reasons consistent.

  • Failure mode normalization

    • Renamed RedundantSupervisor::FailureMode::MISMATED_PREDICTION to MISMATCHED_PREDICTION in:
      • include/supervisor/redundant_supervisor.hpp
  • Reason string alignment

    • Updated supervisor failure string mapping to match the normalized enum and emitted text in:
      • src/supervisor/supervisor_failure_strings.hpp
    • Ensures mismatch failures emit MISMATCHED_PREDICTION consistently.
  • Scope

    • Limited to active runtime headers/source involved in supervisor failure typing/stringification.
    • Reference-only artifacts were intentionally left unchanged in this patch.
// before
case RedundantSupervisor::FailureMode::MISMATED_PREDICTION:
    return "MISMATED_PREDICTION";

// after
case RedundantSupervisor::FailureMode::MISMATCHED_PREDICTION:
    return "MISMATCHED_PREDICTION";

@dfeen87 dfeen87 marked this pull request as ready for review April 11, 2026 12:37
Copilot AI review requested due to automatic review settings April 11, 2026 12:37
@dfeen87 dfeen87 merged commit eeb9940 into main Apr 11, 2026
2 checks passed
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@dfeen87 dfeen87 deleted the copilot/check-for-consistencies-and-bugs branch April 11, 2026 12:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Normalizes the “prediction mismatch” failure naming to a single canonical spelling so supervisor failure reasons (enum + emitted string) remain consistent across runtime code paths, improving log/metric/API reason stability.

Changes:

  • Renamed RedundantSupervisor::FailureMode::MISMATED_PREDICTION to MISMATCHED_PREDICTION.
  • Updated the supervisor failure-reason string mapping to emit "MISMATCHED_PREDICTION" for that failure mode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
include/supervisor/redundant_supervisor.hpp Renames the FailureMode enum value to the canonical MISMATCHED_PREDICTION.
src/supervisor/supervisor_failure_strings.hpp Updates stringification to match the canonical failure-mode name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

CRITICAL_NO_ROLLBACK,
PRIMARY_CHANNEL_LOCKUP,
MISMATED_PREDICTION
MISMATCHED_PREDICTION
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Renaming an enum constant in a public header is a source-breaking API change for downstream users that may still reference the misspelled name. Consider keeping MISMATED_PREDICTION as a deprecated alias to MISMATCHED_PREDICTION (same underlying value) so existing code continues to compile while the canonical spelling is used for logging/metrics.

Suggested change
MISMATCHED_PREDICTION
MISMATCHED_PREDICTION,
[[deprecated("Use MISMATCHED_PREDICTION")]] MISMATED_PREDICTION =
MISMATCHED_PREDICTION

Copilot uses AI. Check for mistakes.
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.

3 participants