← Back to Pull requests

feat(nvhv): add nvhv-health-monitor scaffold #2553

Closed
unknown closed this pull request without merging on Nov 30, 2026 08:28 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 07:27 UTC
Author

Issue: https://github.com/NVIDIA/NVSentinel/issues/2554

Summary

Adds the nvhv-health-monitor module for ADR-076, with the proto and a poll loop. It calls NVHV's VerdictService/Evaluate over loopback gRPC every poll interval and logs the verdict. It doesn't publish events yet, and nothing wires it into the root build, CI or the chart; those come in follow-up PRs.

Changes

1. health-monitors/nvhv-health-monitor/: new Go module (own go.mod/go.sum, go 1.27.3) and Makefile using the shared make/.mk.
2. pkg/nvhvclient/: gRPC reflection client. It fetches NVHV's schema, binds only the fields the monitor reads, and fails with ErrIncompatibleSchema if one is missing or has another type (including xid_from/xid_to in a real oneof, and a non-string string_value). It caches the schema and re-reads it after a failed call. Errors are wrapped with context.
3. pkg/verdict/: plain Go types for the verdict and the request.
4. pkg/poller/: runs Evaluate at --poll-interval with a per-call timeout that may not exceed the interval, and asks for a request before each poll.
5. The request carries an optional Xid window (xid_from, xid_to] so a caller can read each Xid line once.
6. internal/mocknvhv/: a mock NVHV server for tests. It serves a small schema over reflection.
7. main.go: flags (--nvhv-address, --poll-interval, --request-timeout, --node-name); logs each verdict.

Testing

Tested on a AWS GB200 cluster, using a build that includes this client and poller

  • Schema over reflection: NVHV ran as a sidecar and the monitor called it on loopback every 15 s. NVHV served Evaluate in every 15sec poll, no poll failed, and the schema was read.

  • Xid window: an Xid line was injected into NVHV's journal only (a stand-in journalctl inside the NVHV container, nothing on the node). It appeared in the verdict of the one poll whose window covered it (overall severity CRITICAL), and not in the following polls, as the window moved on.
  • 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 -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Summary

    New Features
    Added an NVHV health monitor that periodically retrieves node health verdicts, including check results and severity levels.
    The monitor validates its node name and polling settings, and stops cleanly when interrupted or terminated.
    Verdict retrieval discovers the service schema and checks compatibility before decoding results.
    Added rule evaluation that selects matching rule sets by priority and reports evaluation errors.
    Bug Fixes
    Node-condition cleanup now reports retrieval and patch failures, skips deleted nodes, and returns a failure status when any worker fails.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 438 lines (+328 / -110) across 5 files Reviewer: KaivalyaMDabhadkar Review duration: 5821m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 438 lines diff across 5 files
    0.45
    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.364
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2553"
    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: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    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: 17.9% · Safe to merge
    17.9%