The one place this resolution rule should live -- see ADR 0028. Every
caller that needs "who owns this variable" (the docs Catalog/ownership
matrix/security review, and, as of ADR 0028, the usage report's
variable-level ownership findings) must go through this, not
variable.owner or contract.owner alone, so two call sites can never
again disagree about who owns a variable the way docs.ts and
usage-report.ts once did.
Structurally typed (not pinned to DiscoveredContract/DiscoveredVariable)
so the same one resolution rule also serves ContractModelContract/
ContractModelVariable (contract-model.ts) -- both shapes carry the same
field, and this rule must never have two independent implementations.
A variable's owner, falling back to its contract's default when the variable itself doesn't set one.