pub fn resolve_length(scope: &Scope, path: &VarPath) -> Result<i64, String>Expand description
${#path} length semantics over the shared path resolver. An unset BARE
root is length 0 (bash parity for ${#unset}); an unset root under a
SUBSCRIPTED path is loud, consistent with bare ${nope[k]} — a typo’d name
in while [[ ${#queue[items]} -gt 0 ]] must not silently count 0 forever
(2026-07-03 review finding). Missing key, out-of-bounds index, and shape
errors stay loud. The resolver borrows the tree — no whole-root clone.