← Back to Pull requests

feat(fault-remediation): record the selected remediation action on the event #2341

Closed
unknown closed this pull request without merging on Nov 11, 2026 05:10 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 22:57 UTC
Author

Summary

fault-remediation now records the action it selects for an event in the event's remediationDecision status field. The action is the event's recommended action, or customRecommendedAction for a CUSTOM event, which is the name used to look up maintenance.actions.

  • The decision is written after the checks that skip an event (NONE, no entry in maintenance.actions, already remediated, already resolved), and before the existing CR check, the log collector and the maintenance CR. An event covered by an existing CR still gets its own record.

  • Later passes over the same event, such as requeues while the log collector runs or behind an in-progress CR, do not rewrite it.

  • If the write fails, the pass returns the error: no CR is created and the event is retried. Failures are counted under the record_decision_error processing error label.
  • Fixes #2207

    Type of Change


  • ✨ New feature
  • Component(s) Affected


  • Fault Management
  • Testing


  • Tests pass locally

  • No breaking changes (or documented)
  • Unit tests cover a built-in action, a custom action, an existing record that is not rewritten, and a failed write that stops remediation. The envtest flow test asserts the record for an event that creates a CR and for one covered by it. TestNewCRsAreCreatedAfterFaultsAreRemediated now checks that the event records RESTART_VM (MongoDB only), and it passes on a local kind cluster.

    Checklist


  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Health events now record the selected remediation action before log collection or maintenance-request handling, including for events already covered by a request. Custom events record their custom recommended action. Events without a matching action remain unrecorded, and existing decisions are preserved.
    Documentation
    Updated remediation guidance and the health-event lifecycle reference to explain when decisions are recorded and which action is used.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 279 lines (+209 / -70) across 3 files Reviewer: cbumb Review duration: 6133m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 279 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.337
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2341"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%