Skip to content

Commit 49237e7

Browse files
kstenerudclaude
andcommitted
Fix: Tart smoketest failure due to incorrect exchange_dir path
The smoketest was using /yoloai/files for Tart VMs, but /yoloai is read-only in macOS VMs. Updated BackendSpec.exchange_dir() to return the correct VirtioFS mount path: /Volumes/My Shared Files/yoloai/files/ All smoketests now passing (8/8). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f95d828 commit 49237e7

File tree

2 files changed

+48
-39
lines changed

2 files changed

+48
-39
lines changed

docs/dev/tart-regression.md

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
1-
# Tart (mac-vm) Regression Investigation
1+
# Tart (mac-vm) Smoketest Bug - RESOLVED
22

33
## Status
44

5-
**Tart VMs are currently broken** - agents receive prompts but don't execute commands.
5+
**FIXED** - The issue was a bug in the smoketest, not in Tart itself.
6+
7+
## Root Cause
8+
9+
The smoketest's `BackendSpec.exchange_dir()` method returned `/yoloai/files` for all non-Seatbelt backends, but this path doesn't work for Tart VMs:
10+
- `/yoloai` is a read-only filesystem in Tart VMs
11+
- The correct path for Tart VMs is `/Volumes/My Shared Files/yoloai/files/` (VirtioFS mount point)
12+
13+
## Fix
14+
15+
Updated `scripts/smoke_test.py` line 56-60 to special-case Tart VMs:
16+
17+
```python
18+
def exchange_dir(self, sandbox_name: str) -> str:
19+
"""Return the exchange dir path as seen from inside the sandbox."""
20+
if self.is_seatbelt:
21+
return str(Path.home() / ".yoloai" / "sandboxes" / sandbox_name / "files")
22+
if self.is_vm and self.os == "mac": # Tart VMs
23+
return "/Volumes/My Shared Files/yoloai/files"
24+
return "/yoloai/files"
25+
```
626

727
## Timeline
828

@@ -79,32 +99,24 @@ All expected mounts are present in instance.json:
7999
- Pattern suggests Claude Code receives prompt, thinks about it, but doesn't execute
80100
- Cannot see actual Claude Code UI output to confirm authentication status
81101

82-
## Possible Root Causes
83-
84-
### Theory 1: VirtioFS Mount Timing Issue
85-
The VirtioFS mount may not be fully initialized when sandbox-setup.py runs, causing:
86-
- Files created early in boot process not syncing correctly
87-
- Pipe-pane failing to create agent.log
88-
- Agent commands succeeding but files not appearing on host
89-
90-
### Theory 2: Environment Variable Propagation
91-
Despite export being in the command string, the token may not reach Claude Code due to:
92-
- Shell initialization order in Tart VM
93-
- Different shell behavior (bash vs zsh)
94-
- Environment variable scope issues with `exec`
95-
96-
### Theory 3: Working Directory Issues
97-
The escaped path `^stmp^stest-seatbelt-fixture` might cause:
98-
- `cd` command failing silently
99-
- Agent starting in wrong directory
100-
- File creation happening in unexpected location
101-
102-
### Theory 4: Architectural Regression
103-
Recent changes that could have broken Tart:
104-
- Backend refactoring (sandbox-setup.py ABC pattern)
105-
- Secret export mechanism (added in this PR)
106-
- Mount handling changes
107-
- tmux setup changes
102+
## Investigation Notes
103+
104+
During investigation, several theories were explored but ultimately disproven:
105+
106+
### ❌ Theory 1: VirtioFS Mount Timing Issue
107+
The VirtioFS mount was fully initialized and working correctly.
108+
109+
### ❌ Theory 2: Environment Variable Propagation
110+
Secrets were correctly loaded and exported.
111+
112+
### ❌ Theory 3: Working Directory Issues
113+
The working directory was correct.
114+
115+
### ❌ Theory 4: Architectural Regression
116+
No actual regression in Tart backend code - the issue was in the test itself.
117+
118+
### ✅ Actual Cause: Wrong File Path in Test
119+
The smoketest was using `/yoloai/files` which is read-only in Tart VMs. The correct path is `/Volumes/My Shared Files/yoloai/files/` (the VirtioFS mount point for the yoloai shared directory).
108120

109121
## Debugging Limitations
110122

@@ -128,13 +140,9 @@ Without SSH access to Tart VMs:
128140
- sandbox-setup.py backend refactoring
129141
- Secret handling changes
130142

131-
## Workaround
143+
## Resolution
132144

133-
None currently. Tart VMs are non-functional for automated workflows.
134-
Users can:
135-
- Use Seatbelt backend instead (lightweight macOS sandboxing - works)
136-
- Use Docker/Podman backends (work)
137-
- Manually attach and interact with Tart VMs (slow, no automation)
145+
Fixed in commit [hash to be filled]. All smoketests now passing.
138146

139147
## Related Files
140148

@@ -146,10 +154,9 @@ Users can:
146154
## Test Command
147155

148156
```bash
149-
# Quick test to reproduce
150-
yoloai new --backend tart --agent claude test-tart /tmp/test:copy \
151-
--prompt "echo test > output.txt && touch /yoloai/files/done" --yes
157+
# Smoketest now passes
158+
make smoketest SMOKE_ARGS="--backend mac-vm"
152159

153-
# Wait 30s, then check
154-
yoloai files test-tart ls # Should show 'done' but doesn't
160+
# Or full smoketest
161+
make smoketest-full
155162
```

scripts/smoke_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def exchange_dir(self, sandbox_name: str) -> str:
5757
"""Return the exchange dir path as seen from inside the sandbox."""
5858
if self.is_seatbelt:
5959
return str(Path.home() / ".yoloai" / "sandboxes" / sandbox_name / "files")
60+
if self.is_vm and self.os == "mac": # Tart VMs
61+
return "/Volumes/My Shared Files/yoloai/files"
6062
return "/yoloai/files"
6163

6264
def sentinel_timeout(self) -> int:

0 commit comments

Comments
 (0)