Re: [core] implementer feedback on CORE-SID: Re: [mbj4668/pyang] Sid sx structure (PR #839)

Carsten Bormann <> Fri, 24 March 2023 14:24 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9367AC15152F for <>; Fri, 24 Mar 2023 07:24:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ev1p2bBTNJBX for <>; Fri, 24 Mar 2023 07:24:55 -0700 (PDT)
Received: from ( []) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by (Postfix) with ESMTPS id 1C2EFC15152D for <>; Fri, 24 Mar 2023 07:24:52 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 4PjkxY0QYmzDCbw; Fri, 24 Mar 2023 15:24:48 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\))
From: Carsten Bormann <>
In-Reply-To: <>
Date: Fri, 24 Mar 2023 23:24:35 +0900
Cc: Michael Richardson <>,
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <mbj4668/pyang/pull/> <mbj4668/pyang/pull/839/> <2897262.1679232828@dyas> <> <28078.1679313444@localhost> <> <4633.1679579478@localhost> <>
To: Jernej Tuljak <>
X-Mailer: Apple Mail (2.3731.400.51.1.1)
Archived-At: <>
Subject: Re: [core] implementer feedback on CORE-SID: Re: [mbj4668/pyang] Sid sx structure (PR #839)
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 24 Mar 2023 14:24:59 -0000

Hi Jernej,

Thank you for your implementation work — I hope I can look into this some more tomorrow at the hackathon.

> On 24. Mar 2023, at 22:49, Jernej Tuljak <> wrote:
> You are asking if the same SIDs would be assigned to items of the same YANG module, no matter where this plugin is run. I think this is the case - provided that the version of pyang is the same. The only way to know for sure would be to test for this. If this is a problem in my implementation, it is also a problem in the original one.

I think it might help to point out that we have to levels of requirements here:

— absolute MUSTs
— nice to haves.

The MUSTs include that a SID file that is generated with a an existing SID file and an updated module as input does not change the assignments for the existing (putatively stable) inputs.

The nice to haves include that two people running the same command on the same data get the same output, for some range of platform (e.g., Python) versions.  For Python that probably is limited to the range where insertion order preservation was made a language feature.

Another nice to have is that a small change in the input should not generate wildly different output (this is not a cryptographic hash function :-).  Those who want to survive changes with the least disruption can use the above MUST-have feature — even while still in the unstable state.  Some disruption is unavoidable if this is not done — if a new item is inserted at the start of the module, it will be hard to keep all numbers unchanged (unless we use Laurent’s approach — which requires some attention to avoid deltas getting larger than needed).
The idea to group identities separate as they are usually not subject to delta-encoding (data items are) could be generally applicable, though.

Grüße, Carsten