YAML / anchor / alias / merge

Separate YAML anchors, aliases and merge expansion

Separate the reuse source from the expanded result, then review merge precedence, unsupported syntax and circular references. User input is never parsed; use synthetic cases only.

Five review axes

Separate the reuse source, references and merged values to reduce configuration migration mistakes.

anchor → alias → merge precedence → expanded result
AxisReview
anchorRecord the reusable definition and its scope.
aliasCheck which anchor a reference points to.
mergeMake map precedence and overwrites explicit.
unsupportedDo not treat unsupported syntax as successful.
cycleNever claim a circular reference is expanded.

Safe review order

  1. Record the anchor reuse source.
  2. Verify the alias target.
  3. Check merge precedence and the expanded result.
  4. Reject unsupported or circular cases before real settings.

This page never parses user input or real data. Change real settings only through the existing process after note approval.

Six synthetic cases

caseresult
anchor-basicAnchor definition
alias-reuseAlias reuse
merge-overrideMerge precedence
unsupported-yamlUnsupported
circular-aliasCircular reference
nested-scopeNested scope