"""Chaos test prompts for sandbox stress testing.

These prompts exercise various sandbox capabilities and edge cases.
They can be used with any sandbox executor (local bwrap, sidecar, etc.).

Extracted from PR #241 (sandbox-sidecar-mvp).
"""

# Subagent load test: spawns multiple parallel workers
SUBAGENT_LOAD = """
Run these commands and report the result:
1. Launch 10 background workers. Each worker should run: for i in $(seq 1 1000); do echo worker-$i >/dev/null; done
2. Wait for all workers and print one line with total workers and elapsed time.
"""

# I/O stress test: heavy filesystem operations
IO_STRESS = """
Use shell tools for a filesystem stress check:
1. mkdir -p /tmp/claude-io-stress
2. Create 200 files of 512KB each.
3. Read all files and compute SHA256 for each file.
4. Print one line with file count and total bytes.
"""

# Timeout test: triggers handler timeout
TIMEOUT_TRIGGER = """
Use shell commands.
1. Print "starting-timeout-test".
2. Run: sleep 180
3. Print "done-timeout-test".
"""

# Simple echo test for basic sandbox verification
BASIC_ECHO = """
Run `echo sandbox-basic-check`.
"""

# Network test: verify outbound connectivity (for LLM API calls)
NETWORK_CHECK = """
Use shell commands to verify network access:
1. Run: curl -s -o /dev/null -w "%{http_code}" https://api.anthropic.com/v1/messages || echo "failed"
2. Print the HTTP status code or "failed".
"""

# Memory pressure test
MEMORY_PRESSURE = """
Use shell commands:
1. Create a 100MB file in memory: dd if=/dev/zero of=/tmp/memtest bs=1M count=100
2. Read it back and compute md5sum.
3. Print the md5sum and elapsed time.
"""

# Process tree test: verify PID namespace isolation
PROCESS_ISOLATION = """
Use shell commands:
1. Print the output of `ps aux` or `ps -ef`.
2. Count total processes visible.
3. Print "process_count=N" where N is the count.
"""

# Filesystem boundary test: verify read-only mounts
FILESYSTEM_BOUNDARY = """
Use shell commands to test filesystem boundaries:
1. Try to write to /usr/bin/test-write-attempt (should fail).
2. Try to write to /tmp/test-write-attempt (should succeed).
3. Print "readonly_enforced=true" if /usr/bin write failed, else "readonly_enforced=false".
"""
