Skip to content

#72: Lean execution layer: adopt sandcastle's high-level sandbox lifecycle#73

Merged
lsfera merged 1 commit into
mainfrom
agent/issue-72
Jun 28, 2026
Merged

#72: Lean execution layer: adopt sandcastle's high-level sandbox lifecycle#73
lsfera merged 1 commit into
mainfrom
agent/issue-72

Conversation

@lsfera

@lsfera lsfera commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Closes #72

Implemented autonomously by the AFK orchestrator in an isolated, git-isolated sandbox.

Commits: 45f412f

Switch SandboxRunner from run() to createSandbox + await using +
hooks.onSandboxReady + promptFile/promptArgs so the library owns
worktree creation and deterministic teardown instead of the adapter.

- SandboxRunner.runIssue uses `await using sandbox = await createSandbox()`
  then `sandbox.run()` with promptFile/promptArgs; scope-bound disposal
  replaces bespoke try/finally teardown
- buildAgentInput extended to accept IssueInput; returns the full config
  for both createSandbox() and sandbox.run() (agent, imageName, network,
  copyToWorktree, onSandboxReady, promptFile, promptArgs)
- In-sandbox setup (opencode.json relocation) moves to hooks.onSandboxReady
- Agent prompts move to prompt-claude.md / prompt-local.md templates with
  {{ISSUE_NUMBER}}/{{ISSUE_TITLE}}/{{ISSUE_BODY}} substitution via promptArgs
- buildPrompt/buildLocalPrompt string builders removed
- 6 new unit tests covering promptFile, promptArgs, and network forwarding
- ADR-0019 records the two asymmetries that stay imperative (MTU creation,
  socat host override) and their relation to ADR-0006/0013 and #71
@lsfera lsfera enabled auto-merge (squash) June 28, 2026 15:58
@lsfera lsfera disabled auto-merge June 28, 2026 15:58
@lsfera lsfera merged commit 738db31 into main Jun 28, 2026
3 checks passed
@lsfera lsfera deleted the agent/issue-72 branch June 28, 2026 16:16
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.

Lean execution layer: adopt sandcastle's high-level sandbox lifecycle

1 participant