SUBS-020: submodule-source resolution by parent kind (beagle / git .git / git path) GET landed, POST mirror REOPENED

Now
DONE

be get must pick where to fetch each submodule from based on the kind of the parent source, then validate by gitlink-pin presence and fall back. This formalises and extends the resolution already shipped for beagle parents (see Submodules, submodule-parent-source-fetch); the git-parent branch is split by the .git suffix. REOPENED 2026-06-16: be post/push must MIRROR this send each sub commit to the SAME destination GET would fetch it from (same peer for beagle, parent-relative for git non-.git), so the submodule is tracked on the other end; only a git .git parent pushes the sub to its independent official URL.

Input

Context

Goals

  1. Parent is a beagle repo (be:/keeper:, or file:/ssh: at a .be store): request the sub from the same peer (parent locator + project query); if that fails, fall back to the official .gitmodules URL.
  2. Parent is a git repo, parent URI ends in .git: go straight to the official URI from .gitmodules (no path calculation).
  3. Parent is a git repo, parent URI does NOT end in .git: compute the sub URI by resolving its path relative to the parent URI, try that; if it fails, fall back to the official .gitmodules URL.

Goals POST mirror (REOPENED 2026-06-16)

be post/push routes each recursed sub commit to the SAME destination case 13 above would FETCH it from push and fetch are symmetric so the submodule is tracked on the other end:

  1. Beagle parent push the sub to the same peer (parent locator + ?/<project>), the same shard GET case 1 reads. Expect the sub project tracked at that peer.
  2. Git parent ending .git push the sub to its official .gitmodules URL (independently hosted; git submodules live in their own remote).
  3. Git parent NOT ending .git push the sub to the parent-relative URI (same host, path resolved off the parent), the same address GET case 3 computes. Expect the sub tracked alongside the parent.

Summary (user): send the sub to the same repo as the parent when beagle OR not .git; only a .git git parent pushes the sub to its independent official URL.

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome