<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     version="3"
     docName="draft-kosuru-nmop-incident-diagnosis-yang-00"
     category="std"
     ipr="trust200902"
     submissionType="IETF"
     consensus="true">
  <front>
    <title abbrev="Incident Diagnostic Assessments">A YANG Data Model for Network Incident Diagnostic Assessments</title>
    <seriesInfo name="Internet-Draft" value="draft-kosuru-nmop-incident-diagnosis-yang-00"/>
    <author fullname="Gururaj Kosuru" initials="G." surname="Kosuru">
      <address>
        <email>gururaj.kosuru@gmail.com</email>
      </address>
    </author>
    <date year="2026" month="November" day="23"/>
    <area>Operations and Management</area>
    <workgroup>Network Management Operations</workgroup>
    <abstract>
      <t>This document defines a YANG data model for diagnosis-specific assessment records associated with network incidents. The model augments the network incident model with a history of diagnostic assessments that relate evidence to probable-cause hypotheses, record inconclusive or blocked diagnostic outcomes, and capture post-remediation verification observations.</t>
      <t>The model complements rather than replaces generic task interfaces. Generic task lifecycle, planning, confirmation, execution, and task-notification mechanisms are not redefined.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="I-D.ietf-nmop-network-incident-yang"/> defines network incident lifecycle, reporting, diagnosis and resolution operations, probable causes, related events, and incident notifications. Its Appendix A.4 also illustrates a longer-running incident diagnosis task list, but that appendix is an example rather than a standardized diagnosis-task model.</t>
      <t><xref target="I-D.zhao-nmop-nma-nti-yang"/> defines generic task machinery for a Network Management Agent (NMA), including task lifecycle, plan steps, confirmation, result reporting, errors, and notifications. Its result container includes an extensible output-data field intended to carry domain-specific structured information.</t>
      <t>These two models leave a narrower incident-diagnosis problem. During a multi-step investigation, another system may need to understand which observations support or contradict a probable-cause hypothesis, whether the current diagnosis is inconclusive or blocked, what additional information or operation is needed, and whether a post-remediation verification observation indicates that the affected service actually recovered. The incident may also require multiple diagnostic attempts whose earlier evidence and conclusions remain operationally relevant.</t>
      <t>This document defines a small companion YANG module for those diagnosis-specific semantics. It does not define another generic task framework.</t>
    </section>

    <section anchor="conventions">
      <name>Conventions and Terminology</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
      "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",
      "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are
      to be interpreted as described in BCP 14 <xref target="RFC2119"/>
      <xref target="RFC8174"/> when, and only when, they appear in all
      capitals, as shown here.</t>
      <t>The YANG module in this document uses YANG 1.1 as specified
      in <xref target="RFC7950"/> and common YANG data types from
      <xref target="RFC9911"/>. The module follows the authoring and
      review guidelines in <xref target="RFC9907"/>.</t>
    </section>

    <section anchor="definitions">
      <name>Definitions</name>
      <t><strong>Diagnostic Assessment:</strong> A diagnosis-specific record
      associated with one investigation attempt for an incident.  An
      assessment records evidence, hypotheses, disposition, and optional
      verification results without replacing the incident or generic task
      lifecycle.</t>
      <t><strong>Evidence:</strong> An observation or referenced operational
      record considered during diagnosis, together with enough provenance to
      identify its source, resource or service scope, observation time, and
      freshness or availability.</t>
      <t><strong>Hypothesis:</strong> A candidate probable-cause explanation
      considered during an assessment.  A hypothesis can explicitly reference
      evidence that supports it and evidence that conflicts with it.</t>
      <t><strong>Verification:</strong> An assessment of a recovery criterion
      after remediation or another relevant operation.  A verification outcome
      is distinct from the execution success or failure of the task or
      measurement that produced it.</t>
    </section>

    <section anchor="scope">
      <name>Scope and Non-Goals</name>
      <t>The model in this document provides:</t>
      <ul>
        <li><t>diagnosis-specific assessment history associated with an incident;</t></li>
        <li><t>optional correlation of an assessment to an external task;</t></li>
        <li><t>compact evidence records with source, resource, time, and freshness information;</t></li>
        <li><t>probable-cause hypotheses with explicit supporting and conflicting evidence;</t></li>
        <li><t>persistent inconclusive and blocked diagnostic dispositions;</t></li>
        <li><t>post-remediation or other recovery verification outcomes; and</t></li>
        <li><t>preservation of earlier assessments when diagnosis is repeated or superseded.</t></li>
      </ul>
      <t>The model does not define generic task creation, planning, confirmation, execution, cancellation, remediation authorization, rollback, a new incident lifecycle, a new notification transport, agent reasoning algorithms, or a mandatory confidence score.</t>
    </section>

    <section anchor="relationship">
      <name>Relationship to Existing Work</name>
      <section>
        <name>Network Incident Model</name>
        <t>The base incident model already provides a stable incident identifier, incident lifecycle, probable causes, related events, diagnosis and resolution RPCs, and incident notifications. Those mechanisms are reused unchanged.</t>
        <t>The base model can report probable causes and related events, but it does not standardize an assessment-local relationship saying that a particular observation supports or conflicts with a particular hypothesis. It also does not define a persistent diagnostic result for the case where evidence is insufficient or contradictory.</t>
        <t>Appendix A.4 sketches an incident-diagnosis-task list, task state, result, probable causes, probable events, repair advice, and a task notification. This document does not standardize that entire sketch. It narrows the addition to diagnosis-specific assessment information and relies on existing task mechanisms where available.</t>
      </section>
      <section>
        <name>NMA Northbound Task Interface</name>
        <t>The NTI YANG work provides generic task states, plan steps, confirmation, result data, error handling, and task notifications. In particular, the generic output-data field can carry domain-specific structured output.</t>
        <t>The model in this document can be used as such domain-specific output, or exposed as incident operational state. It therefore does not duplicate NTI task states or notifications.</t>
      </section>
      <section>
        <name>Model Boundary</name>
        <t>The incident model owns incident lifecycle. The selected task interface owns generic task execution state. The incident diagnosis model owns diagnosis-specific evidence, hypothesis, blocking, verification, and attempt-history semantics.</t>
        <t>A task may complete a measurement step successfully while the measurement shows that recovery did not occur. The measurement execution outcome and the observed recovery outcome are distinct. Neither a task step nor a diagnostic assessment clears an incident by itself.</t>
      </section>
    </section>

    <section anchor="semantics">
      <name>Diagnostic Assessment Semantics</name>
      <section>
        <name>Assessment History</name>
        <t>An incident can have one or more diagnostic assessments. Multiple assessments can preserve earlier evidence and conclusions when diagnosis is repeated, network state changes, or a later investigation supersedes an earlier one. Implementations are not required to retain assessments indefinitely; retention duration and archival policy are local matters and this model does not define an immutable audit log.</t>
        <t>An assessment can reference a generic task using an opaque task-id, task owner, and task model/interface URI. The referenced task remains authoritative for generic task state.</t>
        <t>The supersedes-assessment-id is an opaque string rather than a leafref. An implementation can age out an older assessment according to local retention policy while retaining a reference to its identifier in a newer assessment.</t>
      </section>
      <section>
        <name>Evidence and Hypotheses</name>
        <t>An evidence record identifies its source class, authoritative source reference when available, affected resource, observation time, collection time, freshness/availability, and a compact summary.</t>
        <t>Each probable-cause hypothesis explicitly references evidence that supports it and evidence that conflicts with it. This distinguishes observations from diagnostic conclusions and makes the basis of the probable-cause assessment inspectable.</t>
      </section>
      <section>
        <name>Inconclusive and Blocked Diagnosis</name>
        <t>Inconclusive means the available evidence is insufficient or contradictory and no probable-cause hypothesis is selected. This is a persistent diagnostic outcome, not necessarily an RPC or task failure.</t>
        <t>Blocked means diagnosis cannot currently proceed. Reasons include missing information, need for another diagnostic operation, required authorization, unavailable data, or unavailable capability. Generic task state remains authoritative in the task interface.</t>
      </section>
      <section>
        <name>Verification</name>
        <t>A verification record identifies a recovery criterion, target, observation window, evidence references, and an observed recovery outcome. A not-recovered outcome means that the criterion was evaluated and was not satisfied. An inconclusive outcome means available evidence was insufficient to determine recovery.</t>
      </section>
    </section>

    <section anchor="gap-mapping">
      <name>Gap Mapping</name>
      <ul>
        <li><t><strong>Incident lifecycle:</strong> provided by
        <xref target="I-D.ietf-nmop-network-incident-yang"/>. This document
        reuses it unchanged.</t></li>
        <li><t><strong>Generic task lifecycle:</strong> provided by NTI and
        illustrated in Appendix A.4 of
        <xref target="I-D.ietf-nmop-network-incident-yang"/>. This document
        does not add generic task state.</t></li>
        <li><t><strong>Probable causes:</strong> the base incident model
        has probable causes and events, but does not explicitly bind
        supporting or conflicting evidence to each hypothesis. This
        document adds those relationships.</t></li>
        <li><t><strong>Evidence provenance:</strong> existing models can
        carry events and task output. This document adds a compact
        diagnosis-specific evidence record with source and freshness
        metadata.</t></li>
        <li><t><strong>Inconclusive diagnosis:</strong> RPC and task
        failures exist, but they do not represent a persistent
        evidence-insufficient or contradictory diagnostic conclusion.
        This document adds an inconclusive disposition.</t></li>
        <li><t><strong>Blocked diagnosis:</strong> generic clarification
        and failure states exist. This document adds a diagnosis-specific
        blocked disposition and reason.</t></li>
        <li><t><strong>Recovery verification:</strong> incident-YANG can
        clear an incident and NTI can report task results. This
        document separates execution success from the observed
        recovery outcome.</t></li>
        <li><t><strong>Repeated diagnosis:</strong> an incident persists
        and multiple tasks can exist. This document adds optional
        incident-side diagnostic assessment history.</t></li>
      </ul>
    </section>

    <section anchor="tree">
      <name>YANG Tree</name>
      <t>The following tree is informative.</t>
      <sourcecode type="yang-tree"><![CDATA[augment /inc:incidents/inc:incident:
  +--ro diagnosis-history
     +--ro assessment* [assessment-id]
        +--ro assessment-id                 string
        +--ro task-correlation
        |  +--ro task-id?                   string
        |  +--ro task-owner?                string
        |  +--ro task-model?                inet:uri
        +--ro started-at?                    yang:date-and-time
        +--ro updated-at?                    yang:date-and-time
        +--ro completed-at?                  yang:date-and-time
        +--ro disposition                    diagnostic-disposition
        +--ro block-reason?                  block-reason
        +--ro block-description?             string
        +--ro supersedes-assessment-id?      string
        +--ro evidence* [evidence-id]
        |  +--ro evidence-id                 string
        |  +--ro source-type                 identityref
        |  +--ro source-reference?           inet:uri
        |  +--ro incident-event-type?        identityref
        |  +--ro incident-event-id?          string
        |  +--ro resource-reference?         string
        |  +--ro observed-at?                yang:date-and-time
        |  +--ro collected-at?               yang:date-and-time
        |  +--ro availability?               evidence-availability
        |  +--ro summary?                    string
        +--ro hypothesis* [hypothesis-id]
        |  +--ro hypothesis-id               string
        |  +--ro cause-name?                 identityref
        |  +--ro cause-description?          string
        |  +--ro resource-reference?         string
        |  +--ro status                      hypothesis-status
        |  +--ro supporting-evidence* -> ../../evidence/evidence-id
        |  +--ro conflicting-evidence* -> ../../evidence/evidence-id
        |  +--ro published-to-incident?      boolean
        +--ro selected-hypothesis-id? -> ../hypothesis/hypothesis-id
        +--ro verification* [verification-id]
        |  +--ro verification-id             string
        |  +--ro task-id?                    string
        |  +--ro criterion                   string
        |  +--ro target?                     string
        |  +--ro observation-window
        |  |  +--ro start?                   yang:date-and-time
        |  |  +--ro end?                     yang:date-and-time
        |  +--ro outcome                     verification-outcome
        |  +--ro evidence-ref* -> ../../evidence/evidence-id
        |  +--ro detail?                     string
        +--ro conclusion?                    string]]></sourcecode>
    </section>

    <section anchor="yang-module">
      <name>YANG Module</name>
      <sourcecode name="ietf-incident-diagnosis@2026-11-17.yang" type="yang"><![CDATA[<CODE BEGINS> file "ietf-incident-diagnosis@2026-11-17.yang"

module ietf-incident-diagnosis {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-incident-diagnosis";
  prefix incdiag;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 9911: Common YANG Data Types, Section 3";
  }

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types, Section 4";
  }

  import ietf-incident {
    prefix inc;
    reference
      "I-D.ietf-nmop-network-incident-yang: A YANG Data Model for
       Network Incident Management.";
  }

  organization
    "Individual submission for discussion in the IETF Network
     Management Operations (NMOP) Working Group";

  contact
    "WG Web:  <https://datatracker.ietf.org/wg/nmop/>
     WG List: <mailto:nmop@ietf.org>

     Author: Gururaj Kosuru
             <mailto:gururaj.kosuru@gmail.com>";

  description
    "This candidate module is an individual proposal for discussion.
     It augments the network incident model with
     diagnosis-specific assessment records.  It relates diagnostic
     evidence to probable-cause hypotheses, records inconclusive or
     blocked assessments, captures post-remediation verification
     outcomes, and preserves history across multiple diagnostic
     attempts.

     Generic task lifecycle, planning, confirmation, execution, and
     notification mechanisms are not redefined by this module.  A
     diagnosis assessment can instead reference a task maintained by
     an external task interface, such as an NMA Northbound Task
     Interface (NTI).

     Copyright (c) 2026 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision 2026-11-17 {
    description
      "Initial revision.";
    reference
      "draft-kosuru-nmop-incident-diagnosis-yang-00";
  }

  identity evidence-source {
    description
      "Base identity for the source class of diagnostic evidence.";
  }

  identity incident-event {
    base evidence-source;
    description
      "Evidence obtained from an event already associated with the
       incident.";
  }

  identity telemetry {
    base evidence-source;
    description
      "Evidence obtained from telemetry or performance data.";
  }

  identity configuration {
    base evidence-source;
    description
      "Evidence obtained from configuration state or change
       history.";
  }

  identity inventory {
    base evidence-source;
    description
      "Evidence obtained from inventory or topology information.";
  }

  identity diagnostic-test {
    base evidence-source;
    description
      "Evidence produced by an explicit diagnostic measurement or
       test.";
  }

  identity external-record {
    base evidence-source;
    description
      "Evidence referenced from another management or operational
       data source.";
  }

  typedef diagnostic-disposition {
    type enumeration {
      enum in-progress {
        description
          "The diagnostic assessment is still being developed.";
      }
      enum probable-cause-supported {
        description
          "Available evidence supports a probable-cause hypothesis.";
      }
      enum inconclusive {
        description
          "The available evidence is insufficient or contradictory,
           and no probable-cause hypothesis is selected.";
      }
      enum blocked {
        description
          "The diagnostic assessment cannot currently continue
           because additional information, authority, capability, or
           an additional operation is required.";
      }
      enum superseded {
        description
          "A later diagnostic assessment has replaced this
           assessment for current decision making.  The record is
           retained as history.";
      }
    }
    description
      "Diagnosis-specific disposition.  This is not a replacement
       for a generic task lifecycle state.";
  }

  typedef block-reason {
    type enumeration {
      enum additional-information {
        description
          "Additional information or clarification is required.";
      }
      enum additional-operation {
        description
          "Another diagnostic or measurement operation is required.";
      }
      enum authorization-required {
        description
          "Continuation requires authorization or confirmation.";
      }
      enum data-unavailable {
        description
          "Required diagnostic data is unavailable.";
      }
      enum capability-unavailable {
        description
          "A required diagnostic capability is unavailable.";
      }
      enum other {
        description
          "The blocking reason is not represented by another value.";
      }
    }
    description
      "Reason that a diagnostic assessment is blocked.";
  }

  typedef evidence-availability {
    type enumeration {
      enum available {
        description
          "The referenced evidence is available and usable.";
      }
      enum stale {
        description
          "The evidence exists but may no longer represent the
           relevant network state.";
      }
      enum unavailable {
        description
          "The evidence could not be obtained or is no longer
           available.";
      }
    }
    description
      "Availability or freshness state of diagnostic evidence.";
  }

  typedef hypothesis-status {
    type enumeration {
      enum candidate {
        description
          "The hypothesis remains under consideration.";
      }
      enum supported {
        description
          "The available evidence supports the hypothesis as a
           probable cause.";
      }
      enum contradicted {
        description
          "One or more observations conflict with the hypothesis.";
      }
      enum rejected {
        description
          "The hypothesis is no longer considered a viable probable
           cause for this assessment.";
      }
    }
    description
      "Status of a probable-cause hypothesis within an assessment.";
  }

  typedef verification-outcome {
    type enumeration {
      enum not-assessed {
        description
          "Recovery has not been assessed.";
      }
      enum recovered {
        description
          "The specified recovery criterion is satisfied.";
      }
      enum partially-recovered {
        description
          "Some, but not all, recovery criteria are satisfied.";
      }
      enum not-recovered {
        description
          "The recovery criterion was evaluated and was not
           satisfied.";
      }
      enum inconclusive {
        description
          "The recovery criterion could not be evaluated with
           sufficient evidence.";
      }
    }
    description
      "Observed recovery outcome.  This is separate from execution
       success or failure of the task or measurement that produced
       the observation.";
  }

  grouping task-correlation {
    description
      "Optional correlation with a task maintained by another task
       interface or task manager.";

    container task-correlation {
      description
        "Reference information for an associated task.";

      leaf task-id {
        type string;
        description
          "Opaque identifier of the associated task.";
      }

      leaf task-owner {
        type string;
        description
          "Logical authority or system that allocates the task-id.
           This value disambiguates task identifiers when multiple
           task managers are used.";
      }

      leaf task-model {
        type inet:uri;
        description
          "Optional URI identifying the task interface or schema used
           to interpret the task reference.";
      }
    }
  }

  grouping diagnostic-assessment {
    description
      "Diagnosis-specific information associated with one diagnostic
       attempt for an incident.";

    leaf assessment-id {
      type string;
      description
        "Identifier of this diagnostic assessment within the
         incident.";
    }

    uses task-correlation;

    leaf started-at {
      type yang:date-and-time;
      description
        "Time at which this diagnostic assessment started.";
    }

    leaf updated-at {
      type yang:date-and-time;
      description
        "Time at which this assessment was most recently updated.  If
       both timestamps are present, updated-at MUST NOT precede
       started-at.";
    }

    leaf completed-at {
      type yang:date-and-time;
      description
        "Time at which this assessment reached a terminal diagnostic
       disposition, if applicable.  When present, completed-at MUST
       NOT precede started-at or updated-at.";
    }

    leaf disposition {
      type diagnostic-disposition;
      mandatory true;
      description
        "Current diagnosis-specific disposition.";
    }

    leaf block-reason {
      when "../disposition = 'blocked'";
      type block-reason;
      mandatory true;
      description
        "Reason that further diagnostic progress is blocked.";
    }

    leaf block-description {
      when "../disposition = 'blocked'";
      type string;
      description
        "Additional detail describing what is needed to continue.";
    }

    leaf supersedes-assessment-id {
      type string;
      description
        "Identifier of an earlier assessment that this assessment
         supersedes.  The value is intentionally not a leafref so
         that it can remain meaningful if the older assessment is
         aged out according to local retention policy.";
    }

    list evidence {
      key "evidence-id";
      description
        "Evidence considered during this diagnostic assessment.";

      leaf evidence-id {
        type string;
        description
          "Identifier of an evidence record within this assessment.";
      }

      leaf source-type {
        type identityref {
          base evidence-source;
        }
        mandatory true;
        description
          "Class of source from which this evidence was obtained.";
      }

      leaf source-reference {
        type inet:uri;
        description
          "Reference to the authoritative source record when one is
           available.  Access control for the referenced source is
           independent of access to this assessment.";
      }

      leaf incident-event-type {
        when "derived-from-or-self(../source-type,
              'incdiag:incident-event')";
        type identityref {
          base inc:event-type;
        }
        description
          "Type of an incident event used as evidence.";
      }

      leaf incident-event-id {
        when "derived-from-or-self(../source-type,
              'incdiag:incident-event')";
        type string;
        description
          "Opaque identifier of an incident event used as evidence.
           It is retained as a string because diagnostic history can
           outlive the event's retention in the incident
           record.  When the event remains present, consumers can
           correlate this value together with incident-event-type to
           the incident's events list.";
      }

      leaf resource-reference {
        type string;
        description
          "Implementation-independent reference or identifier for the
           network resource or service to which the evidence applies.
           A string is used intentionally so that evidence can refer
           to resources outside the local YANG datastore as well as
           resources represented by other YANG modules.";
      }

      leaf observed-at {
        type yang:date-and-time;
        description
          "Time at which the represented condition was observed.";
      }

      leaf collected-at {
        type yang:date-and-time;
        description
          "Time at which the evidence was collected for this
           assessment.  If observed-at and collected-at are both
           present, collected-at SHOULD NOT precede observed-at
           unless source clock skew or equivalent timing uncertainty
           is known.";
      }

      leaf availability {
        type evidence-availability;
        default "available";
        description
          "Availability or freshness state of the evidence.";
      }

      leaf summary {
        type string;
        description
          "Compact description of the observation.  Detailed data is
           expected to remain at the referenced authoritative source
           when possible.";
      }
    }

    list hypothesis {
      key "hypothesis-id";
      description
        "Probable-cause hypotheses considered in this assessment.";

      leaf hypothesis-id {
        type string;
        description
          "Identifier of the hypothesis within this assessment.";
      }

      leaf cause-name {
        type identityref {
          base inc:cause-name;
        }
        description
          "Probable cause identity when an applicable identity is
           defined by the incident model or an extension.";
      }

      leaf cause-description {
        type string;
        description
          "Human-readable description of the hypothesized cause.";
      }

      leaf resource-reference {
        type string;
        description
          "Implementation-independent reference to the resource or
           service to which the hypothesis applies.  The value can
           identify a resource represented outside the local YANG
           datastore.";
      }

      leaf status {
        type hypothesis-status;
        mandatory true;
        description
          "Current status of the hypothesis.";
      }

      leaf-list supporting-evidence {
        type leafref {
          path "../../evidence/evidence-id";
        }
        description
          "Evidence records that support this hypothesis.";
      }

      leaf-list conflicting-evidence {
        type leafref {
          path "../../evidence/evidence-id";
        }
        description
          "Evidence records that conflict with this hypothesis.";
      }

      leaf published-to-incident {
        type boolean;
        default "false";
        description
          "Indicates whether this hypothesis has been reflected in
           the base incident model's probable-causes information.
           This flag does not itself modify the base incident
           record.";
      }
    }

    leaf selected-hypothesis-id {
      when "../disposition = 'probable-cause-supported'";
      type leafref {
        path "../hypothesis/hypothesis-id";
      }
      must "../hypothesis[hypothesis-id = current()]/status = "
         + "'supported'" {
        error-message
          "The selected hypothesis must have status 'supported'.";
        description
          "Ensures that the assessment conclusion references a
           hypothesis whose status is supported.";
      }
      mandatory true;
      description
        "Primary hypothesis selected as the supported probable cause
         for this assessment.  Other hypotheses can remain supported
         when the incident has multiple contributing causes.";
    }

    list verification {
      key "verification-id";
      description
        "Post-remediation or other recovery verification performed in
         the context of this assessment.";

      leaf verification-id {
        type string;
        description
          "Identifier of the verification record.";
      }

      leaf task-id {
        type string;
        description
          "Optional identifier of a task or plan step that performed
           the verification.";
      }

      leaf criterion {
        type string;
        mandatory true;
        description
          "Recovery criterion that was evaluated.";
      }

      leaf target {
        type string;
        description
          "Implementation-independent resource, service, or scope to
           which the criterion applies.  A string is used to permit
           references outside the local YANG datastore.";
      }

      container observation-window {
        description
          "Observation interval used for the verification.";

        leaf start {
          type yang:date-and-time;
          description
            "Start of the observation interval.";
        }

        leaf end {
          type yang:date-and-time;
          description
            "End of the observation interval.  When both start and
             end are present, end MUST NOT precede start.  This
             temporal constraint is stated in prose because direct
             XPath ordering of yang:date-and-time strings is not
             reliable across timezone representations.";
        }
      }

      leaf outcome {
        type verification-outcome;
        mandatory true;
        description
          "Observed recovery outcome.  A not-recovered outcome can be
           produced by a measurement that executed successfully.";
      }

      leaf-list evidence-ref {
        type leafref {
          path "../../evidence/evidence-id";
        }
        description
          "Evidence records supporting the verification outcome.";
      }

      leaf detail {
        type string;
        description
          "Additional explanation of the verification result or its
           limitations.";
      }
    }

    leaf conclusion {
      type string;
      description
        "Compact diagnostic conclusion.  This field does not replace
         structured evidence, hypothesis, or verification records.";
    }
  }

  augment "/inc:incidents/inc:incident" {
    description
      "Adds diagnosis-specific assessment history to a network
       incident without changing the base incident lifecycle.";

    container diagnosis-history {
      config false;
      description
        "History of diagnosis-specific assessments for this
         incident.";

      list assessment {
        key "assessment-id";
        description
          "One diagnosis-specific assessment.  Multiple assessments
           may be retained for repeated or concurrent
           investigations.";
        uses diagnostic-assessment;
      }
    }
  }
}

<CODE ENDS>
]]></sourcecode>
    </section>

    <section anchor="example">
      <name>Example</name>
      <t>The following example is illustrative. A remediation has executed, but verification reports that service has not recovered. The diagnostic assessment is blocked pending additional diagnosis; the base incident is not cleared by this record.</t>
      <sourcecode type="json"><![CDATA[{
  "ietf-incident-diagnosis:diagnosis-history": {
    "assessment": [
      {
        "assessment-id": "diag-2",
        "started-at": "2026-11-23T18:00:00Z",
        "task-correlation": {
          "task-id": "task-2001",
          "task-owner": "controller-a",
          "task-model": "urn:ietf:params:xml:ns:yang:ietf-nma-nti"
        },
        "disposition": "blocked",
        "block-reason": "additional-operation",
        "evidence": [
          {
            "evidence-id": "ev-1",
            "source-type": "ietf-incident-diagnosis:configuration",
            "resource-reference": "uplink-1",
            "observed-at": "2026-11-23T18:02:00Z",
            "summary": "Approved uplink configuration was restored."
          },
          {
            "evidence-id": "ev-2",
            "source-type": "ietf-incident-diagnosis:diagnostic-test",
            "resource-reference": "site-a/access-points",
            "observed-at": "2026-11-23T18:07:00Z",
            "summary": "Affected access points remain unreachable."
          }
        ],
        "hypothesis": [
          {
            "hypothesis-id": "h-1",
            "cause-name": "ietf-incident:service-misconfiguration",
            "status": "contradicted",
            "supporting-evidence": ["ev-1"],
            "conflicting-evidence": ["ev-2"]
          }
        ],
        "verification": [
          {
            "verification-id": "verify-1",
            "criterion": "Affected APs regain connectivity",
            "outcome": "not-recovered",
            "evidence-ref": ["ev-2"]
          }
        ]
      }
    ]
  }
}]]></sourcecode>
    </section>

    <section anchor="operational">
      <name>Operational Considerations</name>
      <t>Implementations should avoid copying large telemetry payloads into the incident record. Source references and compact evidence metadata allow detailed observations to remain at authoritative sources.</t>
      <t>An unavailable or redacted source must not be interpreted as negative evidence. Assessment retention should be chosen to preserve useful diagnostic history while controlling data growth.</t>
      <t>Task correlation is intentionally opaque. Consumers must use the task owner/model to interpret task state and must not assume that task-id values are globally unique.</t>
    </section>

    <section anchor="security">
      <name>Security Considerations</name>
      <t>The module is operational state and defines no writable
      configuration, RPCs, or actions.  The data exposed by the module can
      nevertheless be security-sensitive and SHOULD be protected with the
      authentication, authorization, confidentiality, and integrity mechanisms
      of the management protocol used to retrieve it.</t>
      <t>In particular, <tt>task-correlation/task-id</tt> and
      <tt>task-correlation/task-owner</tt> can reveal the identity of
      diagnostic workflows and management systems.  The
      <tt>source-reference</tt> and <tt>resource-reference</tt> leaves can
      disclose topology, resource identifiers, or links into other operational
      systems.  The <tt>summary</tt>, <tt>cause-description</tt>, and
      <tt>conclusion</tt> leaves can expose operational observations,
      configuration-related information, and diagnostic conclusions.  The
      hypothesis and verification structures can also reveal which failures or
      recovery criteria are being investigated.</t>
      <t>Access-control mechanisms such as the NETCONF Access Control Model
      (NACM) <xref target="RFC8341"/> SHOULD restrict this information to
      authorized users and applications.  A source reference does not grant access to the referenced
      resource; authorization at the referenced system is independent of access
      to this model.  Credentials, secrets, or bearer tokens MUST NOT be
      embedded in evidence summaries or references.</t>
      <t>Historical assessments can reveal how an incident investigation
      evolved over time.  Implementations SHOULD apply local retention and
      access-control policy appropriate to the sensitivity of that history.
      This document does not define tamper-evident logging, immutable retention,
      or cross-domain audit verification.</t>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document requests registration of the URI <tt>urn:ietf:params:xml:ns:yang:ietf-incident-diagnosis</tt> in the IETF XML Registry.</t>
      <t>This document also requests registration of the YANG module <tt>ietf-incident-diagnosis</tt> in the YANG Module Names registry, with prefix <tt>incdiag</tt> and the namespace above.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950">
        <front><title>The YANG 1.1 Data Modeling Language</title><author fullname="M. Bjorklund"/><date year="2016" month="August"/></front>
        <seriesInfo name="RFC" value="7950"/>
      </reference>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front><title>Key words for use in RFCs to Indicate Requirement Levels</title><author fullname="S. Bradner"/><date year="1997" month="March"/></front>
        <seriesInfo name="RFC" value="2119"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front><title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title><author fullname="B. Leiba"/><date year="2017" month="May"/></front>
        <seriesInfo name="RFC" value="8174"/>
      </reference>
      <reference anchor="RFC9911" target="https://www.rfc-editor.org/info/rfc9911">
        <front><title>Common YANG Data Types</title><author fullname="J. Schoenwaelder"/><author fullname="B. Claise"/><date year="2025" month="September"/></front>
        <seriesInfo name="RFC" value="9911"/>
      </reference>
      <reference anchor="I-D.ietf-nmop-network-incident-yang" target="https://datatracker.ietf.org/doc/draft-ietf-nmop-network-incident-yang/20/">
        <front><title>A YANG Data Model for Network Incident Management</title><author fullname="T. Hu"/><author fullname="L. M. Contreras"/><author fullname="Q. Wu"/><author fullname="N. Davis"/><author fullname="C. Feng"/><date year="2026" month="October" day="16"/></front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-nmop-network-incident-yang-20"/>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="I-D.zhao-nmop-nma-nti-yang" target="https://datatracker.ietf.org/doc/draft-zhao-nmop-nma-nti-yang/00/">
        <front><title>Framework and YANG Data Model for the NMA Northbound Task Interface (NTI)</title><author fullname="X. Zhao"/><author fullname="M. Wang"/><author fullname="D. Ceccarelli"/><author fullname="Y. Xu"/><date year="2026" month="November" day="2"/></front>
        <seriesInfo name="Internet-Draft" value="draft-zhao-nmop-nma-nti-yang-00"/>
      </reference>
      <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341">
        <front><title>Network Configuration Access Control Model</title><author fullname="A. Bierman"/><author fullname="M. Bjorklund"/><date year="2018" month="March"/></front>
        <seriesInfo name="RFC" value="8341"/>
      </reference>
      <reference anchor="RFC9907" target="https://www.rfc-editor.org/info/rfc9907">
        <front><title>Guidelines for Authors and Reviewers of Documents Containing YANG Data Models</title><author fullname="K. Watsen"/><date year="2026" month="March"/></front>
        <seriesInfo name="RFC" value="9907"/>
      </reference>
    </references>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>This document was developed from discussion in the NMOP working group. Specific acknowledgements will be added with contributors' consent as the proposal develops.</t>
    </section>
  </back>
</rfc>
