diff --git a/internal/catalogue/declaration.go b/internal/catalogue/declaration.go index c1d98a8..5af2bb8 100644 --- a/internal/catalogue/declaration.go +++ b/internal/catalogue/declaration.go @@ -1101,7 +1101,7 @@ func (r Resolution) contributions(settings SettingsBy, grants []Grant, return nil, fmt.Errorf("%s contributing to %s: %w", m.Module, to, err) } portOfEndpoint(values, endpointPorts(m)) - composeName(values, r.PublicDomain, r.At, reaches, endpointPorts(m), blocks) + composeName(values, r.PublicDomain, servingAt(r, to), reaches, endpointPorts(m), blocks) out[to] = append(out[to], Contribution{From: m.Module, Values: values}) } // Several contributions to one requirement (ADR 0094's sibling for `contributes`): an @@ -1124,7 +1124,7 @@ func (r Resolution) contributions(settings SettingsBy, grants []Grant, return nil, fmt.Errorf("%s contributing %s to %s: %w", m.Module, local, to, err) } portOfEndpoint(values, endpointPorts(m)) - composeName(values, r.PublicDomain, r.At, reaches, endpointPorts(m), blocks) + composeName(values, r.PublicDomain, servingAt(r, to), reaches, endpointPorts(m), blocks) out[to] = append(out[to], Contribution{From: m.Module, Values: values}) } } @@ -1224,6 +1224,24 @@ func composeName(values map[string]any, publicDomain, internalDomain string, rea } } +// servingAt is the private-network name of the node a contribution to `to` arrives at: the +// provider's, when the provision is answered elsewhere, and this machine's own when it is answered +// here or not yet settled. +// +// A route's internal name is composed under it (novox/hq ADR 0151, issue 139). `