3 ms·
This test creates a 10 GiB sandbox, then writes 20 GiB of data into the workspace. It shows that large workspace data is not constrained by the root disk size.
by theaniketmaurya 3mo ago
This test creates a 10 GiB sandbox, then writes 20 GiB of data into the workspace. It shows that large workspace data is not constrained by the root disk size.
1. Create a new sandbox with 10gb root storage:
`celesto computer create --template coding-agent --disk-size-mb 10240`
2. Write 20 GiB under user home dir:
```
celesto computer run einstein "python3 - <<'PY'
from pathlib import Path
import hashlib
import os
target_dir = Path('/home/ohm/storage-proof')
target_dir.mkdir(parents=True, exist_ok=True)
target = target_dir / 'twenty-gib.bin'
with target.open('wb') as f:
for gib in range(20):
for block_index in range(1024):
seed = f'{gib}:{block_index}'.encode()
block = hashlib.sha256(seed).digest() * 32768
f.write(block)
f.flush()
os.fsync(f.fileno())
print(f'wrote {gib + 1} GiB', flush=True)
print('final size bytes:', target.stat().st_size)
PY"
```
3. Verify the file is larger than the 10 GiB root disk:
`celesto computer run einstein "du -h /home/ohm/storage-proof/twenty-gib.bin && df -h / /home/ohm"`