pub fn fanout_child_name_for(
base: &str,
policy_ns: &str,
member: Option<(&str, &str)>,
repo: Option<&RepositoryRef>,
) -> StringExpand description
The deterministic child Snapshot name for one (source-member, repository)
cell of a fan-out — the general form behind fanout_child_name.
member:Some((pvc_ns, pvc_name))for a selector-expanded member,Nonefor a policy whose single source needs no per-PVC expansion.repo:Some(ref)for a multi-repository fan-out child,Nonefor the classic single-repo shapes.
The four combinations produce:
| member | repo | name |
|---|---|---|
None | None | <base> — the legacy non-fanned name, byte-identical |
Some | None | <base>-pvc-<pslug>-<h8> — byte-identical to the legacy fanout_child_name |
None | Some | <base>-repo-<rslug>-<h8> |
Some | Some | <base>-pvc-<pslug>-repo-<rslug>-<h8> |
<h8> is FNV-1a over the newline-framed FULL unclipped tuple — base,
then (when present) "<pvc_ns>/<pvc_name>", then (when present) the
normalized repo_key — so clipping any legible
segment never merges two distinct cells, and a policy slug that happens to
contain -repo- (pslug x-repo-y vs pslug x + rslug y) still yields
distinct names because the hash inputs differ. Markers and the tag are
NEVER clipped; when over budget the clip order is base → pslug → rslug.
Always ≤ [MAX_CHILD_NAME] (63).
The legacy hash input for repo: None is exactly the pre-multi-repo
"{base}\n{pvc_ns}/{pvc_name}" — pinned by golden tests.