Skip to content

Augment path search#238

Draft
steiler wants to merge 10 commits into
mainfrom
augmentPathSearch
Draft

Augment path search#238
steiler wants to merge 10 commits into
mainfrom
augmentPathSearch

Conversation

@steiler
Copy link
Copy Markdown
Collaborator

@steiler steiler commented May 15, 2026

No description provided.

sgang and others added 10 commits March 11, 2026 10:13
…ented`** → augment-only nodes may never hit Badger while `memstore` can resolve them.

addSchemaElem now walks Augmented (persiststore.go)
Choice/case: after recursing e.Dir, it also recurses e.Augmented (same as Schema.Walk).
Normal nodes: after persisting children from e.Dir, it does the same for e.Augmented, so augment-only nodes get Badger keys and protos like the rest of the tree.
- Recurse yang.Entry.Augmented in persiststore.addSchemaElem (including
  choice/case) so Badger seeding matches getChildren/Walk; add augment
  regression test and testdata.
- Add entryChildByName and use it in buildPath for list/container and
  augment-aware choice/case branches; extend findChoiceCase for
  implicit children and cases under choice.Augmented.
- Add bpcc-base/bpcc-aug YANG and TestSchema_BuildPath_AugmentedUnderCase
  plus native leaf-a control path.
ToStrings(..., prefix=false) omits origin, but origin drives the module
hint for unprefixed paths, so identical path strings could cache the
wrong SchemaElem. Add Origin to cacheKey and a regression test with the
TTL cache enabled.
Apply Path.origin as a first-element module hint in memstore, accept
module-name prefixes at the root in FindPossibleModules, and add
parsePathElems plus memstore/persiststore GetSchema parity tests (with
separate compiled schemas so persiststore AddSchema Reset does not
invalidate memstore).
BuildPath used only e.Dir[pe[0]] after module resolution; align with
buildPath/getEntry by using entryChildByName and pathElemLocalName.
Adds a regression test for an augmented-only direct child under a module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant