← Back to Pull requests

wip: add ADR-040 — External Remediations (EF / ERR) coordination #1282

Closed
unknown closed this pull request without merging on May 20, 2026 07:32 UTC
View on GitHub
unknown unknown commented on May 13, 2026 20:27 UTC
Author

Summary

Adds ADR-040: External Remediations (EF / ERR), defining the API and reconciler design for coordinating node ownership between NVSentinel and external remediation systems (CSP-side repair, RMA workflows, hardware swaps, operator-driven maintenance).

Two new CRDs in the existing nvsentinel.nvidia.com/v1alpha1 API group:

  • ExternalRemediationRequest (ERR) — exit door from NVSentinel ownership. Created by fault-remediation (when triage hits the CUSTOM action from ADR-036) or by the ExternalFault reconciler. Applies a release taint to the node carrying its own name in the value; external system reads it, does work, writes a terminal completion condition back.

  • ExternalFault (EF) — entry door for external systems declaring "I need to take this node." Triggers the standard pipeline (quarantine → drain → fault-remediation), which produces the ERR.
  • Both spec types are the existing datamodels.HealthEvent (reused by reference in the proto — no schema duplication). Coordination state lives in status.conditions, following the Unknown/True/False terminal-state convention already established by RebootNode/GPUReset/TerminateNode.

    CRDs are generated proto-driven via the existing protoc-gen-crd plugin (same plugin already used for HealthEventResource). Reconcilers + a small metav1.Condition adapter live alongside the existing maintenance reconcilers in janitor/. A validating admission webhook (modelled on the existing janitor_webhook.go) rejects malformed EFs at admission.

    Design highlights

  • Single coordination surface — one entry point (EF), one exit point (ERR). The same protocol works for automated orchestrators and human operators.

  • HealthEvent-driven — same proto already produced by every health-monitor and consumed by every downstream stage.

  • No timeouts, no NVSentinel assumptions about external behaviour — ExternalRemediationComplete can stay Unknown indefinitely; observability surfaces the wait.

  • Asymmetric handling of ExternalRemediationComplete=False — for NVSentinel-detected ERRs, taint comes off and existing health-monitors re-detect persistent faults. For EF-owned ERRs, the EF reconciler does NOT emit a healthy event (NVSentinel can't verify the external fault is gone); fault-quarantine taint stays on, the EF goes terminal, and the external system can create a new EF as the explicit retry path.

  • Reuses fault-remediation's existing equivalence-group + latestFaultRemediationState machinery for "single active ERR per node" — no bespoke dedup code.

  • Release taint value carries the owning ERR name as the operator's discovery path (no extra Node labels or annotations).

  • Cross-kind supersedence between ERR and RebootNode/GPUReset declared via existing supersedingEquivalenceGroups config — no new code.
  • Refs: #1276

    🤖 Generated with Claude Code

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

    Summary by CodeRabbit

    Documentation
    Added ADR describing an external remediations protocol for coordinated node handoff between systems, including message/condition semantics, reconciliation behaviors, admission validation and safety checks, integration with existing remediation flows, operator discovery and RBAC guidance, observability considerations (metrics, events, tracing, alerts), failure modes, alternatives, and detailed example workflows.

    <!-- review_stack_entry_start -->

    ![Review Change Stack](https://app.coderabbit.ai/change-stack/NVIDIA/NVSentinel/pull/1282?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

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

    Diff: 488 lines (+366 / -122) across 6 files Reviewer: jtschelling Review duration: 9304m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 488 lines diff across 6 files
    0.47
    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.370
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1282"
    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: 47.4% (MEDIUM) · Higher = larger blast radius
    47.4%
    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: 18.7% · Safe to merge
    18.7%