feat(schema): set LeafSchema/LeafListSchema.Sensitive from sdcio-ext:sensitive#244
Open
steiler wants to merge 1 commit into
Open
feat(schema): set LeafSchema/LeafListSchema.Sensitive from sdcio-ext:sensitive#244steiler wants to merge 1 commit into
steiler wants to merge 1 commit into
Conversation
…sensitive Reads e.Exts from the goyang Entry and sets the Sensitive field on LeafSchema (field 22) and LeafListSchema (field 24) when the sdcio-ext:sensitive extension is present — either annotated directly on the leaf or propagated via deviate add/replace in a device-profile overlay. Depends on: - sdcio/goyang PR#4 (ApplyDeviate Exts propagation fix) - sdcio/sdc-protos PR#123 (sensitive fields + SchemaElem.IsSensitive) go.mod: pin both deps to specific pre-merge commits; replace with tagged releases once the PRs are merged. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isSensitiveEntry(e *yang.Entry) boolhelper that checkse.Extsfor thesdcio-ext:sensitivekeywordSensitive: trueonLeafSchema(field 22) andLeafListSchema(field 24) when the extension is present — whether annotated directly on the leaf or propagated viadeviate add/deviate replacein a device-profile overlay YANG filego.modto pre-merge commits of the two dependency PRs so CI and collaborators can build without local checkoutsDepends on
fix(ApplyDeviate): replace Exts on deviate replace, not appendfeat(sensitive): schema.Path + LeafSchema.sensitive + SchemaElem.IsSensitiveReplace the pseudo-version pins in
go.modwith tagged releases once those PRs are merged.Test plan
TestIsSensitiveEntry— unit tests for the detection helper (nil, empty, unrelated, matching, mixed exts)TestLeafSchema_SensitiveFlag— integration test: loads YANG fixture, verifiesLeafSchema.Sensitivefor direct annotation, plain leaf, anddeviate addcase (exercises goyang fix end-to-end)TestLeafListSchema_SensitiveFlag— verifiesLeafListSchema.Sensitivefor direct annotationMade with Cursor