← Back to Pull requests

feat(nic-health-monitor): add portStateHoldDown so short port blips are not reported #1996

Closed
unknown closed this pull request without merging on Oct 12, 2026 15:44 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 13:00 UTC
Author

Summary

Closes #1993.

A port that drops for a few seconds and recovers is reported fatal at once, so a short fabric blip can cordon a node. This adds portStateHoldDown (chart value, TOML [stateCheck] portStateHoldDown), a duration a port must stay unhealthy before InfiniBandStateCheck or EthernetStateCheck reports it.

  • Off by default. "0s" keeps today's behaviour.

  • How a port is held. Until the hold-down elapses, the port is presented with its last reported snapshot and counted active on its card, so neither its port event nor its card homogeneity event changes. Say if you'd rather keep the card event immediate.

  • Blips. A port that recovers before it is reported publishes nothing and increments nic_health_monitor_port_state_blips_total{node,check,device,port}.

  • What is not held. Recovery, first-seen ports, and escalation of a port already reported unhealthy all go through at once.

  • Edge cases. The hold start is kept outside the Prepare/Commit transaction, so a discarded publication neither restarts a hold nor drops a due event. A poll where the port's device was unreadable or missing does not count as a recovery. The hold is not persisted, so a restart restarts it; the held port is persisted as last reported, so the outage is still reported after the restarted hold.

  • Docs. The configuration doc describes the setting and adds the link_downed note requested on the issue.
  • Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing


  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • Checklist


  • Self-review completed

  • Documentation updated (if needed)

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

    Summary by CodeRabbit

    New Features
    Added an optional hold period before unhealthy Ethernet and InfiniBand port states are reported. Recovery remains immediate, and ports that recover during the hold are not reported as unhealthy.
    Added a metric to track ports that recover before the hold period expires.
    Documentation
    * Documented the hold-period setting, its default of off, its effects on port and card events, and that in-progress holds restart after a service restart.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 337 lines (+252 / -85) across 4 files Reviewer: KaivalyaMDabhadkar Review duration: 5924m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 337 lines diff across 4 files
    0.42
    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.348
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1996"
    general weight: 0.35
    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: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    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: 16.7% · Safe to merge
    16.7%