Skip to content

S08 - Workspace and Git Round Trip

Purpose: How code gets into the guest and how the agent’s work gets back out, without sharing the host filesystem.

Requirements: FR02-any-repoFR02-any-repo: Any git repositoryWorks in any git repository. to FR05-parallel-sessionsFR05-parallel-sessions: Parallel sessionsSeveral sessions can run at once, in the same project and across projects., SEC02-no-host-fs-shareSEC02-no-host-fs-share: No host filesystem sharingNo host directory is mounted into the guest, read-only or otherwise., SEC03-no-host-execSEC03-no-host-exec: No host code execution via returned workNothing the agent produces executes on the host without an explicit user action; returned changes to files the host may later execute are flagged., SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential., SEC06-repo-writesSEC06-repo-writes: Repository-scoped writesGit pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM., SEC10-auditSEC10-audit: AuditEvery egress decision, approval, and returned change is recorded on the host in a persisted log the guest cannot alter., SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped., NFR01-startupNFR01-startup: StartupGoals: a warm VM reaches the Claude prompt in about 4 s and a suspended VM in about 7 s, and no start takes more than 10 s (p95), excluding first-time project setup and the first boot after a host restart., NFR02-fs-speedNFR02-fs-speed: FilesystemThe workspace is on guest-native storage..

Tests: C08-gitC08-git: GitThe test cases for the git round trip: the transport, the pack scanner and the pre-receive check, git's own limits behind them, and the data scope of what a session gets from the host repository.

Briefs: B21-git-round-tripB21-git-round-trip: Does the git round trip work, and what keeps the guest's pushes on its own branches?Yes, with conditions., B41-git-data-scopeB41-git-data-scope: Which git data may reach the guest, and how far does the host trust its own git?Serve the guest from a host-side export repository holding only the session's branch, scan carried-in files, clean remote URLs, and require a minimum git version., B74-pre-receive-checkB74-pre-receive-check: Can Wraith Box refuse a bad push before any of it reaches the landing repository, and before it uses up the host's memory?Yes, with conditions., B102-git-alloc-limitB102-git-alloc-limit: Can git itself refuse a push that asks for too much memory, so the pack scanner gets simpler?Yes, with conditions.

host: trusted your repository all branches, tags, stash export.git selected refs · written by wb landing.git wb/<session>/* only wb: export update wb land borrows wb-hostd upload-pack, read-only ref filter pack scanner receive-pack, strict fsck pre-receive check guest: untrusted wb-guestd host-guest socket git-remote-wb clone, fetch, push fetch by ID: not in export.git push to main: stops at the ref filter
The git round trip. The guest reaches only wb-hostd, which serves export.git read-only and passes pushes through the ref filter and the pack scanner into landing.git. wb, not wb-hostd, moves refs between your repository and the two repositories. A fetch by ID from your repository has nothing to reach, and a push to main stops at the ref filter.

Code goes into the guest, and the agent’s work comes back out, only as git objects over the host-guest socket. Each project has two repositories of its own on the host, next to the user’s:

Repository Written by Read by
The user’s repository the user, and wb land wb, for the export update and the carry-in
<data>/projects/<id>/export.git wb only the guest, through upload-pack
<data>/projects/<id>/landing.git the guest’s pushes, through receive-pack wb land and wb diff
Page What it covers
S08-01-into-the-guestS08-01-into-the-guest: Into the GuestHow the project's code reaches the guest: the clone, its transport, its remotes, and the uncommitted changes carried in at session start. The clone, the transport, remote URLs, session start and the carry-in scan
S08-02-export-repositoryS08-02-export-repository: Export RepositoryWhich refs and objects the guest can fetch from export.git, and how wb, its one writer, keeps it safe to run git in. Which refs the guest can fetch, and how wb keeps export.git safe to run git in
S08-03-pushesS08-03-pushes: PushesWhere the guest's pushes land, the settings receive-pack runs with, which refs a push may write, and the push at session end. The landing repository, the settings of receive-pack, the ref filter, and session end
S08-04-push-checksS08-04-push-checks: Push ChecksThe checks that bound the memory and work of a push before git unpacks it: git's allocation limit, the pack scanner, and the pre-receive check. The pack scanner, git’s allocation limit and the pre-receive check
S08-05-push-limitsS08-05-push-limits: Push LimitsCleanup after a push that failed, the size cap of landing.git, and the time and memory bounds of the git gateway. Cleanup after a failed push, the landing size cap, and time and memory bounds
S08-06-landing-on-the-hostS08-06-landing-on-the-host: Landing on the HostHow wb land and wb diff bring a session's work into the user's repository, and the checks that keep that fetch from running anything. wb land and wb diff, and the checks before each fetch
S08-07-repository-lifecycleS08-07-repository-lifecycle: Repository LifecycleWhen objects leave export.git and landing.git, and the locks that order that work against fetches and pushes. Discarding sessions, the export lock, and shrinking export.git
S08-08-host-gitS08-08-host-git: Host GitWhich git binary runs on the host, the oldest version Wraith Box accepts, and where that is checked. Which git binary runs on the host, and its minimum version
S08-09-risky-changesS08-09-risky-changes: Flagging Risky ChangesThe changed paths that wb diff and the session summary flag, because the host or CI may run them (SEC03-no-host-exec). The paths wb diff and the session summary flag
S08-10-wslS08-10-wsl: WSLHow the fetches of the git round trip cross between a WSL distribution and the Windows side. The fetches between a WSL distribution and the Windows side

Files copied out of the guest by any means other than git, such as a future wb cp, carry the platform’s downloaded-file marker (S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL.). That is the quarantine attribute on macOS, and Mark of the Web on Windows.

Status: Draft