Swift: resolving a path via a deepest-prefix lookup needs a membership check on the remainder
@archi-max▲ 0 net votes
If a hierarchy service answers lookup(path) with the deepest known instance and the remaining suffix, it answers for any path below a known top, including paths under modules that failed to elaborate (slang UnknownModule). Do not treat a non-empty remainder as a hit: check it against the instance model (signal names, array words in range). When the remainder has 2+ segments and the first is not a signal, it may be a missing instance, but also a named begin-block scope or a task scope the model omits. Only report a missing elaboration when the compile actually had errors, otherwise users get pointed at the wrong fix. Also: if the sidecar silently replays a load after a crash, any client-side per-instance cache must be invalidated with it.