<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC7950 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC6991 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml">
<!ENTITY RFC7951 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7951.xml">
<!ENTITY RFC8343 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8343.xml">
<!ENTITY RFC8407 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml">
<!ENTITY RFC8641 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8641.xml">
<!ENTITY RFC8911 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8911.xml">
<!ENTITY RFC8912 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8912.xml">
<!ENTITY RFC9256 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9256.xml">
<!ENTITY I-D.ietf-rtgwg-qos-model SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-rtgwg-qos-model.xml">
<!ENTITY I-D.dikshit-nmop-telemetry-identifier-scoping SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.dikshit-nmop-telemetry-identifier-scoping.xml">
<!ENTITY RFC3688 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC6020 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml">
]>
<rfc submissionType="IETF" docName="draft-dikshit-netmod-comparability-scope-extension-05" category="std" ipr="trust200902">
	<!-- Generated by id2xml 1.6.0 on 2026-11-23T08:06:08Z -->
	<?rfc strict="yes"?>
	<?rfc compact="yes"?>
	<?rfc subcompact="no"?>
	<?rfc symrefs="yes"?>
	<?rfc sortrefs="no"?>
	<?rfc text-list-symbols="*o+-"?>
	<?rfc toc="yes"?>
	<front>
	<title abbrev="A YANG Extension for Declaring the Compa">A YANG Extension for Declaring the Comparability Scope of Operational State</title>
	<author initials="S." surname="Dikshit" fullname="Saumya Dikshit">
	<organization>Hewlett Packard Enterprise</organization>
	<address><postal>
	<street>Mahadevpura</street>
	<city>Bangalore</city>
	<region>Karnataka</region>
	<code>560 048</code>
	<country>India</country>
	</postal>
	<email>saumya.dikshit@hpe.com</email>
	</address>
	</author>

	<date year="2026" month="November" day="23"/>
	<abstract><t>
   A value exported from a YANG data tree is often unique only
   within its parent, for example an entry numbered 0 under two
   different parents. Once the value is exported without the
   parent's key, a collector cannot tell whether two such values
   refer to the same thing, and no collector-side normalization can
   recover the missing key. YANG (RFC 7950) has no way to state this
   dependency in the schema. This document defines a YANG extension
   statement, "csc:comparability-scope", a four-level scope lattice,
   a compatibility rule, and an export rule, so that the key needed
   to compare a value travels with it, and a schema-aware tool can
   detect an invalid comparison before any data is exported.</t>

	</abstract>
	</front>

	<middle>
	<section title="Introduction" anchor="sect-1">	<t>
   YANG [RFC7950] lets a module author state a value's type, range, and units. It has no construct to state the value's comparability: which other readings of the value, from other subtrees or other nodes, it can be meaningfully compared, summed, or differenced against. Today this is left to description prose, if it is stated at all.</t>
	<t>
   This document does not propose a new telemetry export mechanism.
   It proposes one small, reusable YANG statement that a module can
   attach to any leaf or leaf-list representing a measured or
   identifying value, declaring the scope over which that value is
   unique and comparable.</t>

	</section>

	<section title="The Problem in One Picture" anchor="sect-2"><t>
   Consider a list of parents, each holding a list of children whose
   key restarts at 0 under every parent. This is common and valid
   YANG. Figure 1 shows what happens when only the child subtree is
   exported.</t>

	<figure><artwork><![CDATA[
       One device
       +-------------------------------+
       |  parent "A"                   |
       |     +-- child  id=0  value=7  |
       |  parent "B"                   |
       |     +-- child  id=0  value=9  |
       +-------------------------------+
                      |
                      |  export the child only
                      |  (flat list, filtered YANG-Push,
                      |   database row, ...)
                      v
       Collector receives:
          { "id": 0, "value": 7 }
          { "id": 0, "value": 9 }
]]></artwork>
	</figure>
	<t><list style="empty" hangIndent="7">
	<t><list style="hanging"><t hangText="Same child, or two different ones?">
	It cannot tell.
	<vspace blankLines="0"/>
	</t>

	</list>
	</t>

	</list>
	</t>

	<t><list style="hanging" hangIndent="7"><t>
          Figure 1: The parent key is lost on export</t>

	</list>
	</t>

	<t>
   The parent key is what made "id=0" unique. Nothing in the schema
   says so, nothing requires the parent key to be exported with the
   child, and nothing lets a tool catch the omission before a
   collector merges, sums, or overwrites the two readings.</t>

	<t>
   Figure 2 shows the same export after the extension defined in
   <xref target="sect-4"/> is applied to the "id" leaf.</t>

	<figure><artwork><![CDATA[
       Schema (declared once):
          leaf id {
            csc:comparability-scope "domain-local";
            csc:domain-id-ref "../../name";   // the parent key
          }
]]></artwork>
	</figure>
	<figure><artwork><![CDATA[
       Collector receives:
          { "parent": "A", "id": 0, "value": 7 }
          { "parent": "B", "id": 0, "value": 9 }
]]></artwork>
	</figure>
	<t><list style="empty" hangIndent="7">
	<t><list style="hanging" hangIndent="25"><t hangText="Different parent">
	-&gt;  never merged.
	<vspace blankLines="0"/>
	</t>

	</list>
	</t>

	</list>
	</t>

	<t><list style="hanging" hangIndent="7"><t>
          Figure 2: The scope key travels with the value</t>

	</list>
	</t>

	<t>
   Appendix A shows the same pattern in a deployed protocol: the
   candidate paths of a Segment Routing Policy <xref target="RFC9256"/>.</t>

	<section title="Why Collector-Side Normalization Does Not Help" anchor="sect-2.1"><t>
   Mediation between a device model and a canonical model (the
   classic EMS-to-NMS transformation) fixes representation: names,
   units, and structure. It cannot add a key that was never
   exported. In Figure 1 both records are already normalized; what
   is missing is not a format but a fact.</t>

	<t>
   A collector that reads the full tree from one live device can
   sometimes rebuild the parent context itself, but only if the
   module nests the child under its parent and the export keeps
   that nesting. A flat list, a subscription filtered down to the
   child leaf, or a stored record does not.</t>

	</section>

	<section title="Beyond a Single Device" anchor="sect-2.2"><t>
   Figure 1 needs only one device. The same pattern appears across
   devices under one controller, and across domains under separate
   administration, which is why <xref target="sect-3"/> defines four scope levels
   rather than one.</t>

		<t>
   [I-D.dikshit-nmop-telemetry-identifier-scoping] records six independent instances of this pattern across five working groups, each currently addressed by its own prose. That document proposes textual requirements for exported identifiers in non-YANG formats. This document takes the complementary step for YANG-modeled data: it lets the schema state the requirement once, in a machine-checkable form.</t>
	</section>

	</section>

	<section title="Terminology and the Scope Lattice" anchor="sect-3"><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>
   This document defines a total order over four comparability
   scopes, written narrowest to widest:</t>

	<figure><artwork><![CDATA[
   narrowest                                          widest
   node-local < domain-local < controller-scoped < global
       |             |                |               |
    one node    one stated      one controller    everywhere
                domain or       or orchestrator
                parent

          Figure 3: The scope lattice
]]></artwork>
	</figure>
	<t>
   node-local: the value is comparable only to other values read from
   the same originating node. A node-local value read from two
   different nodes carries no defined relationship.</t>

	<t>
   domain-local: the value is comparable to values within a single
   stated domain or parent context (for example an enclosing list
   entry, an IGP area, a VRF, or a BGP Route Distinguisher's scope),
   identified by a companion leaf named by domain-id-ref, but not
   beyond that context.</t>

	<t>
   controller-scoped: the value is comparable across every node
   managed by a single controller or orchestration system, for as
   long as that controller's assignment record for the value is
   retained, and not beyond a change of controller.</t>

	<t>
   global: the value is comparable across every node and every
   domain, independent of controller or administrative boundary, for
   the lifetime the defining module states.</t>

	<t>
   A scope to the left of "&lt;" is strictly narrower than one to the
   right, meaning fewer pairs of readings are guaranteed comparable.</t>

	</section>

		<section title="The comparability-scope Extension" anchor="sect-4"><t>
   This document defines, using the YANG language
   <xref target="RFC7950"/>, the module ietf-comparability-scope, which
   provides two extension statements.  The comparability-scope
   statement declares, for a leaf or leaf-list, the scope within which
   two readings of that value are comparable, using the four-value
   lattice of <xref target="sect-3"/>.  The domain-id-ref statement is
   a sibling that names, by a relative XPath expression, the leaf
   identifying the domain when the scope is domain-local.</t>

	<t>
   The domain-id-ref XPath is evaluated with the annotated leaf or
   leaf-list as the context node.  More than one domain-id-ref
   statement may be attached to form a compound domain key, in which
   case two readings share a domain only when every referenced leaf
   resolves to an equal value.</t>

	<t>
   Widening the declared scope of an existing leaf, for example from
   node-local to domain-local, is a non-backward-compatible change and
   is handled per the module update rules of <xref target="RFC8407"/>.</t>

	<figure><artwork><![CDATA[
<CODE BEGINS> file "ietf-comparability-scope@2026-11-23.yang"

module ietf-comparability-scope {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-comparability-scope";
  prefix csc;

  organization
    "IETF NETMOD (Network Modeling) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/netmod/>
     WG List:  <mailto:netmod@ietf.org>

     Author:   Saumya Dikshit
               <mailto:saumya.dikshit@hpe.com>";
  description
    "This module defines two YANG extension statements,
     'comparability-scope' and 'domain-id-ref', that let a module
     author declare the scope over which a measured, counted, or
     identifying value is unique and comparable to other readings
     of the same value.

     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
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.";

  revision 2026-11-23 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A YANG Extension for Declaring the Comparability
       Scope of Operational State";
  }

  extension comparability-scope {
    argument scope-value;
    description
      "Attached to a leaf or leaf-list representing a measured,
       counted, or identifying value, this statement declares the
       scope within which two readings of that value are
       comparable (summed, differenced, or averaged).

       The 'scope-value' argument must be one of 'node-local',
       'domain-local', 'controller-scoped', or 'global', ordered
       from narrowest to widest.

       When 'scope-value' is 'domain-local', at least one
       'domain-id-ref' statement must be present on the same leaf
       or leaf-list to identify the domain within which the value
       is unique.

       Widening the declared scope of an existing leaf, for example
       from 'node-local' to 'domain-local', is a
       non-backward-compatible change and is handled per the module
       update rules of RFC 8407.";
  }

  extension domain-id-ref {
    argument domain-xpath;
    description
      "A sibling statement of 'comparability-scope' on the same
       leaf or leaf-list.  Its 'domain-xpath' argument is a
       relative XPath expression, evaluated with the annotated leaf
       or leaf-list as the context node, that resolves to the leaf
       identifying the domain within which the annotated value is
       unique.

       More than one 'domain-id-ref' statement may be present; the
       set of referenced leaves then forms a compound domain key,
       and two readings are in the same domain only when every
       referenced leaf resolves to an equal value.";
  }
}

<CODE ENDS>
]]></artwork>
	</figure>

	<t>
   A module author attaches the statements to a leaf exactly as they
   would attach "units" or "status".  Using the structure of Figure 1:</t>

	<figure><artwork><![CDATA[
  list parent {
    key name;
    leaf name { type string; }
    list child {
      key id;
      leaf id {
        type uint32;
        csc:comparability-scope "domain-local";
        csc:domain-id-ref "../../name";
        description
          "Unique only within the enclosing parent.";
      }
      leaf value { type uint64; }
    }
  }
]]></artwork>
	</figure>

	</section>
	<section title="The Compatibility Rule" anchor="sect-5"><t>
   A tool or receiver comparing (summing, differencing, or
   averaging) two readings of a value from two different subtree
   instances:</t>

	<t><list style="numbers"><t>When operating in strict validation mode, MUST reject the
       comparison if either reading lacks a comparability-scope
       statement and the comparison spans more than one node, one
       controller, or one domain, as applicable.  In default mode, a
       tool SHOULD flag such comparisons as having unverified
       comparability rather than rejecting legacy unannotated modules
       outright.</t>

	<t>MUST reject the comparison if both readings are domain-local
       and the tuple of values resolved by their domain-id-ref
       statement(s) differs.</t>

	<t>MAY accept a comparison across two different scope values
       only if the narrower scope is also satisfied by the context
       of the read (for example, a domain-local reading and a
       controller-scoped reading MAY be compared only within the
       domain the domain-local reading names).</t>

	<t>MUST reject a comparison of two node-local readings from
       different nodes.</t>

	</list>
	</t>

	<t>
   This is a static check: it needs no run-time state beyond what
   the schema and the domain-id-ref leaf already carry, so it can be
   enforced by a validator rather than discovered as an operational
   incident.</t>

	</section>

	<section title="The Export Rule: The Key Travels with the Value" anchor="sect-6"><t>
   The compatibility rule in <xref target="sect-5"/> only works if the leaf named
   by domain-id-ref reaches the receiver. This document therefore
   proposes the following rule; whether it is normative or advisory
   is an open question for the working group.</t>

	<t>
   When a leaf carrying comparability-scope "domain-local" is
   included in exported data, for example in a YANG-Push <xref target="RFC8641"/>
   update, a filtered retrieval, or a flattened export, the leaf
   named by its domain-id-ref SHOULD be included in the same
   exported data. A publisher or tool that builds a subscription
   filter selecting a domain-local leaf SHOULD add the referenced
   leaf to the filter automatically.</t>

	</section>

	<section title="Further Observations" anchor="sect-7"><section title="Measurement-Method Scope in draft-ietf-rtgwg-qos-model" anchor="sect-7.1">	<t>
   [I-D.ietf-rtgwg-qos-model] Section 4.4 defines a "classified-rate" leaf, typed as gauge64 with units bits-per-second and described as "Rate of average data flow through a classifier." The averaging window and computation method are left to the implementation, as is usual for gauge64 [RFC6991]. Two implementations may use different windows, for example one second and five minutes, and produce values that look comparable but are not.</t>
	<t>
   This observation has the same shape as Section 2: a value is
   exported with no machine-checkable statement of when it may be
   compared to another reading. It is, however, about measurement
   method rather than administrative or topological scope, which is
   what the lattice in <xref target="sect-3"/> expresses. This document does not
   extend the lattice to cover it, and records it as a candidate for
   a separate extension or future revision.</t>

	</section>

	<section title="Known Limitations of domain-id-ref" anchor="sect-7.2"><t>
   First, the compatibility rule establishes that two domain-local
   readings are incomparable if their domain-id-ref values differ,
   but it cannot establish that a domain-id-ref value is unique
   across every context in which it is used. If the referenced
   identifier comes from a namespace that is not collision-free
   across the boundaries in scope, for example a private Autonomous
   System Number reused by two independently operated networks
   sharing one collector, two unrelated domains could be wrongly
   treated as comparable. Module authors SHOULD reference an
   identifier that is unique across every boundary the comparison is
   expected to span.</t>

	<t>
   Second, domain-id-ref is a pure equality test. It cannot express
   that two different values refer, over time, to the same domain,
   for example after an Autonomous System renumbering or merger.
   Domain identity succession is not addressed by this document and
   is a candidate for future work.</t>

		<t>
   Third, widening a value's declared scope, for example from node-local to domain-local, changes which comparisons are valid. Under the general rule in [RFC8407] such a change is not backward-compatible. A future revision will state this explicitly in the extension definition in Section 4.</t>
	<t>
   Finally, a module author can point domain-id-ref at an identifier
   that already exists for an operational reason (for example a BGP
   neighbor's Autonomous System Number, which the protocol cannot
   work without), or introduce a new leaf whose only purpose is to
   identify the domain. The former is RECOMMENDED where available:
   an error in it is caught by the protocol that depends on it. A
   single-purpose identifier has no such independent check, and an
   operator error in it may persist unnoticed. If one is used, the
   module SHOULD document that its correctness depends entirely on
   operator configuration.</t>

	</section>

	</section>

	<section title="Relationship to Existing Work" anchor="sect-8"><t>
   <xref target="RFC8343"/> defines a mandatory "discontinuity-time" leaf because a
   plain counter64 does not say whether it has been reset. That leaf
   answers one narrow, temporal case of the question this document
   generalizes: when is a reading comparable to another reading. It
   was not intended to cover the administrative or topological cases
   in <xref target="sect-2"/>, nor the averaging-window case in <xref target="sect-7.1"/>. This
   document proposes doing once, in the language, what RFC 8343 did
   by hand for one counter family.</t>

	<t>
   <xref target="RFC8911"/> and <xref target="RFC8912"/> address the analogous question one layer
   up, for a metric's name, method, and applicability, through a
   registry. This document addresses value-level comparability as a
   YANG extension rather than a registry, because the property being
   declared, a scope over a data-tree instance, is a schema-level
   fact and is naturally stated where the value is defined.</t>

	<t>
   [I-D.dikshit-nmop-telemetry-identifier-scoping] and this document
   are complementary: the former gives textual requirements for
   identifiers exported in non-YANG formats (IPFIX Information
   Elements, BMP TLVs), and this document gives YANG-modeled data a
   language-level way to carry the same answer.</t>

	</section>

	<section title="Tooling Implications" anchor="sect-9"><t>
   Because the compatibility rule is static, it can be checked
   without executing the comparison. A pyang or yanglint plugin can
   inspect two subtrees named in an aggregation expression (for
   example in a dashboard configuration, or in a YANG-Push filter
   combining two subscriptions) and reject the combination at
   configuration time. The same plugin can check the export rule in
   <xref target="sect-6"/> against a subscription filter. This document does not
   specify such a plugin; a reference implementation tested against
   existing WG modules, including the example in Appendix A, is
   future work.  At schema compile time, a validator can also verify
   that any domain-local leaf carries at least one domain-id-ref
   statement and that each relative XPath resolves to a valid leaf in
   the schema tree.</t>

	<t>
   Enforcement does not need a bespoke algorithm. An implementation
   MAY partition readings by their domain-id-ref value before any
   aggregation, treating it as an ordinary grouping key, so that
   readings in different partitions are never combined. This is the
   grouped aggregation already supported by most collection and
   storage systems.</t>

	</section>

	<section title="IANA Considerations" anchor="sect-10"><t>
   This document registers a URI in the "IETF XML Registry"
   <xref target="RFC3688"/>:</t>

	<figure><artwork><![CDATA[
URI: urn:ietf:params:xml:ns:yang:ietf-comparability-scope
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
]]></artwork>
	</figure>

	<t>
   This document registers a YANG module in the "YANG Module Names"
   registry <xref target="RFC6020"/>:</t>

	<figure><artwork><![CDATA[
Name: ietf-comparability-scope
Namespace: urn:ietf:params:xml:ns:yang:ietf-comparability-scope
Prefix: csc
Reference: RFC XXXX
]]></artwork>
	</figure>

	</section>

	<section title="Security Considerations" anchor="sect-11">	<t>
   A misdeclared comparability-scope value does not by itself create a protocol vulnerability, but it can cause a monitoring or automated-remediation system to aggregate incomparable values and act on the wrong result. As telemetry increasingly drives closed-loop automation, an incorrectly widened scope (for example, a node-local value declared domain-local) becomes a data-integrity concern with an impact beyond the originating node. Implementations SHOULD treat a comparability-scope statement as subject to the same integrity protections as the rest of the schema, and MUST NOT allow it to be widened by any entity other than the module's author.</t>
	</section>

	</middle>

	<back>
	<references title="Normative References">
	&RFC2119;
	&RFC7950;
	&RFC8174;
	&RFC3688;
	&RFC6020;
	</references>
	<references title="Informative References">
	&I-D.ietf-rtgwg-qos-model;
	&I-D.dikshit-nmop-telemetry-identifier-scoping;
	&RFC6991;
	&RFC7951;
	&RFC8343;
	&RFC8407;
	&RFC8641;
	&RFC8911;
	&RFC8912;
	&RFC9256;
	</references>
	<section title="Worked Example: SR Policy Candidate Paths (RFC 9256)" anchor="sect-a"><section title="The Observation" anchor="sect-a.1"><t>
   <xref target="RFC9256"/> identifies a candidate path of an SR Policy by the
   tuple &lt;Protocol-Origin, Originator, Discriminator&gt;. For a
   candidate path provisioned by configuration, Section 2.5 gives
   the Discriminator a default value of 0, and Section 2.4 gives the
   Originator (an &lt;ASN, node-address&gt; pair) a default of 0 for both
   parts. Two unrelated configured candidate paths can therefore
   carry the identical tuple.</t>

		<t>
   Section 2.6 states that this tuple identifies a candidate path only "in the context of a single SR Policy", and that an SR Policy is itself identified by &lt;Headend, Color, Endpoint&gt;. This is exactly the parent/child pattern of Figure 1: the SR Policy is the parent, and the candidate-path tuple is the child key. One headend serving two SR Policies is enough to produce two identical tuples on a single device.</t>
	</section>

	<section title="Applying the Extension" anchor="sect-a.2"><t>
   The annotation follows <xref target="sect-4"/>, with domain-id-ref pointing at
   the enclosing SR Policy's key:</t>

	<figure><artwork><![CDATA[
  leaf discriminator {
    type uint32;
    csc:comparability-scope "domain-local";
    csc:domain-id-ref "../../sr-policy-key";
    description
      "Discriminator of this candidate path, per RFC 9256
       Section 2.5. Comparable only within the same enclosing
       SR Policy.";
  }
]]></artwork>
	</figure>
	<t>
   No new counter, no new export mechanism, and no change to the
   Discriminator's encoding in RFC 9256 is required; the change is
   confined to the exporting module's schema.</t>

	</section>

	<section title="Instance Data, Before and After" anchor="sect-a.3"><t>
   Using the JSON encoding of <xref target="RFC7951"/>, a module exporting
   per-candidate-path state without the parent key carries:</t>

	<figure><artwork><![CDATA[
{
  "example-sr-policy-state:candidate-paths": [
    { "protocol-origin": 20, "originator": 0,
      "discriminator": 0 },
    { "protocol-origin": 20, "originator": 0,
      "discriminator": 0 }
  ]
}
]]></artwork>
	</figure>
	<t>
   One entry belongs to an SR Policy with Color 100 and Endpoint P,
   the other to an unrelated SR Policy with Color 200 and Endpoint
   Q. The two entries are byte-identical.</t>

	<t>
   With the extension applied and the export rule of <xref target="sect-6"/>
   followed, the same entries are:</t>

	<figure><artwork><![CDATA[
{
  "example-sr-policy-state:candidate-paths": [
    { "sr-policy-key": "HeadendA,Color100,EndpointP",
      "protocol-origin": 20, "originator": 0,
      "discriminator": 0 },
    { "sr-policy-key": "HeadendB,Color200,EndpointQ",
      "protocol-origin": 20, "originator": 0,
      "discriminator": 0 }
  ]
}
]]></artwork>
	</figure>
	<t>
   The comparability-scope and domain-id-ref statements are schema
   facts, declared once and never repeated in instance data. A tool
   that has loaded the module sees that the two sr-policy-key values
   differ and, by rule 2 of <xref target="sect-5"/>, does not treat the two
   discriminator readings as the same candidate path.</t>

	</section>

	</section>

	<section title="Changes Between Revisions" anchor="sect-b"><t>
   From -04 to -05:</t>

	<t><list style="symbols"><t>Supplied the complete ietf-comparability-scope YANG module in
      <xref target="sect-4"/> and updated <xref target="sect-10"/> with
      the IANA URI and module registrations.</t>

	<t>Formally defined domain-id-ref as a sibling extension to
      comparability-scope, specified the annotated leaf as its XPath
      context node, and added support for multiple domain-id-ref
      statements for compound keys.</t>

	<t>Moved the RFC 8407 non-backward-compatibility rule for scope
      widening into <xref target="sect-4"/> and the YANG extension
      description.</t>

	<t>Clarified strict versus default handling of unannotated legacy
      leaves in <xref target="sect-5"/> Rule 1.</t>

	</list>
	</t>

	<t>
   From -03 to -04 (restructuring for readability; the mechanism is
   unchanged except for the new <xref target="sect-6"/>):</t>

	<t><list style="symbols"><t>Replaced the domain-specific example in <xref target="sect-2"/> with a short,
      abstract parent/child example and two figures. Moved the
      SR Policy (RFC 9256) example, previously Sections 2, 6.1 and
      6.3, to Appendix A.</t>

	<t>Added <xref target="sect-2.1"/>, explaining why collector-side
      normalization (EMS-to-NMS mediation) does not recover a key
      that was never exported, and <xref target="sect-2.2"/> on scope beyond a
      single device.</t>

	<t>Added <xref target="sect-6"/>, an export rule proposing that the leaf named
      by domain-id-ref be exported together with the value it
      scopes, including in filtered YANG-Push subscriptions. Its
      normative strength is an open question for the WG.</t>

	<t>Added a figure for the scope lattice in <xref target="sect-3"/>, and an
      abstract YANG example in <xref target="sect-4"/>.</t>

	<t>Shortened the Abstract and Introduction; moved the
      measurement-method observation and domain-id-ref limitations
      under <xref target="sect-7"/>. No technical change to the lattice or the
      compatibility rule.</t>

	</list>
	</t>

	<t>
   From -02 to -03:</t>

	<t><list style="symbols"><t>Added a worked before-and-after example of published instance
      data (now Appendix A.3).</t>

	<t>Added limitations of domain-id-ref: identifier uniqueness and
      domain identity succession (now <xref target="sect-7.2"/>).</t>

	<t>Added a note on the forward compatibility of the
      comparability-scope argument value, with reference to
      <xref target="RFC8407"/>.</t>

	<t>Added guidance preferring an existing, operationally
      load-bearing identifier for domain-id-ref.</t>

	<t>Added a note that the compatibility rule can be enforced as a
      grouped aggregation on the domain-id-ref value.</t>

	</list>
	</t>

	</section>

	</back>

	</rfc>
	
