Find the boundary and evidence bugs in this generated wrapper.
Python
from pathlib import Path
import subprocess
ROOT = Path("/srv/project")
def ask_cli(relative_path: str, task: str) -> str:
target = (ROOT / relative_path).resolve()
if not str(target).startswith(str(ROOT)):
raise PermissionError(target)
command = f'ai-cli "Edit {target}: {task}"'
completed = subprocess.run(
command, shell=True, capture_output=True, text=True
)
return completed.stdout