Multi-repo projects: design #3
Loading…
Add table
Add a link
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?
Motivation
Agentbox maps one Git repository to one VM. A real work project I want to use
it for is a folder with five sibling repositories that import each other, plus
a large non-Git data folder:
Launch scripts in the repos find their siblings relative to themselves
(
../repo-b), so the layout has to stay identical inside the VM.sbx create --clonehandles exactly one repository: one private clone, onesandbox-<name>git-daemon remote on the host. Sibling repos need anotherway in and another way back.
Proposed design (to validate)
Manifest at the project root, parsed like the config (KEY=VALUE or a
simple line format, never sourced). Sketch:
Inside the VM: one directory per project, same sibling layout. Each repo is
a private clone whose only remote is
host, pointing at a read-only source.Way in: either read-only workspace mounts (
sbx create ... path:ro, documentedfor additional workspaces), or host-made
git bundles copied in withsbx cp. To find out: can the primary workspace be mounted:ro, or can asandbox be created with no primary workspace and only
:roextras? Withoutclone mode the primary path is bind-mounted read-write, which is exactly
what agentbox avoids today.
Way back:
git bundle createinside the VM,sbx cpto a quarantinedirectory on the host,
git fetchfrom the bundle. That is the same directionand trust level as fetching from the git daemon today, it works for any number
of repos, and it does not depend on sbx's clone mode at all. Side effect: the
"sbx restores
originon every start" problem does not exist without--clone.Open questions
(one code path), or do both stay?
diff,merge,sync,statusaddressed per repo?(
agentbox diff repo-b? all repos by default?)removemust refuse while any repo has unfetched commits.sbx env/sbxenv.yamla usable base for the manifest, or tooexperimental to build on?
Done when
A design section in
docs/ARCHITECTURE.md(ordocs/MULTI_REPO.md) answersthe questions above and is backed by a manual prototype against real sbx.
Implementation: #4 (Multi-repo projects: implementation and tests).
--no-share-skillsis gone #2