Skip to content

feat(sandbox): use independent Git clones for sandboxed tasks - #29

Merged
wangzhizhou merged 12 commits into
mainfrom
m4/independent-sandbox-clones
Nov 22, 2026
Merged

wangzhizhou merged 12 commits into
mainfrom
m4/independent-sandbox-clones

Conversation

@wangzhizhou

@wangzhizhou wangzhizhou commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Sandbox-required Orchestrator tasks use independent single-branch Git clones (--no-hardlinks --no-local) instead of linked Git Worktrees.
  • Remove the clone's origin remote, use a non-personal local commit identity, disable hooks at clone creation, and reject shared Git common-dir/object alternates on resume.
  • Persist workspace_mode in the run journal and reject mode changes on resume.
  • Keep the independent clone's private .git writable inside the task sandbox so the Agent can create the commit consumed by Integrator; no stable/shared Git metadata is mounted.
  • During trusted integration, fetch the approved commit from the independent clone into the stable repository before cherry-picking.
  • Preserve linked Git Worktrees for non-sandboxed legacy runs.

Review correction

The initial PR revision mounted .git read-only, which conflicted with the existing Agent-commit/Integrator flow. The launcher now mounts only the independent clone as the writable workspace; its private Git metadata remains task-local and cannot mutate stable refs.

Verification

CI unit tests cover clone metadata independence, workspace reuse, commit import, launcher argv construction, image pinning, and environment shaping. They do not prove OCI kernel enforcement; M4.4.4 still requires a dedicated Linux worker conformance suite.

@wangzhizhou
wangzhizhou merged commit 20f40fa into main Nov 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant