Wild repos are unreachable over HTTP: discover is non-recursive #64
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Governance (
b6dcbb7b) implements gitolite-style wild repos —repo agents/[a-z].*withC = @agentsandRW+ = CREATOR— and they work over SSH.They do not work over HTTP.
repos::discover(repos.rs:243) reads exactly one level ofrepos_dirand never recurses, soagents/claude-a.gitis never discovered. The web UI cannot list it, browse it, or serve its collab refs. The same non-recursion meanstools.gitandtoolsstill collide when resolved by final path component.The governance spec calls this a prerequisite; it was left out of the implementation, and the implementer flagged it rather than working around it. So the feature is half-delivered: an agent can be granted a wild repo and push to it, and then nobody can see it in the UI.
Fix is a self-contained rework of discovery and HTTP path resolution: recurse into subdirectories, and resolve repositories by their full path under
repos_dirrather than by the last component.Worth doing before wild repos are used for anything real, because the failure is invisible — the push succeeds and the repo simply never appears.
Migrated from git-collab issue
d0d1bf5ca63c6ba4df198a6fbf24c262f6eb8e67.Original author: a73x dev@a73x.sh.
Close reason: merged in patch
02671b2aConfirmed empirically against a running server, not just by reading
discover.Setup — two valid bare repos on disk, one nested:
Against
git-collab-serverwith thatrepos_dir:So it is not merely a listing omission: the repo is unreachable by any HTTP path. Not browsable, and its collab refs are not served — which matters more than the UI, because it means a clone over HTTP cannot fetch
refs/collab/*from a wild repo at all.Mechanism:
resolve(repos_dir, name)(repos.rs:272) callsdiscover()and matchese.name.discover(repos.rs:243) does a singleread_dirwith no recursion;agents/is a plain directory, not a repo, sorepo_entry_from_pathreturnsNonefor it and its contents are never examined.Over SSH this works because the client names the path explicitly and the session resolves it directly, checks governance, and creates on demand. There is no equivalent path over HTTP.
A first attempt at this reproduction proved nothing and is worth recording so nobody repeats it: the server failed to start on a missing
authorized_keysfield, and the curls hit the sandbox's port forwarder instead, so every path 404'd including/alpha. Check the title on the served page matches your own config before trusting any result.