harbor run -t openthoughts/tasktrove-mix-h4-binary-easy-mix-h4-binary-easy-0468harbor download openthoughts/tasktrove-mix-h4-binary-easy-mix-h4-binary-easy-0468Task: Implement a minimal, self-contained shell-like tokenizer in /app/shlex.py
Goal: Create a pure-Python module named shlex (placed at /app/shlex.py, or as a package under /app/shlex/) that exposes a function split(s, posix=True) with behavior compatible enough for the tests to pass. The function should be importable as a top-level module named shlex and used by the tests as shlex.split(..., posix=...). The implementation must be self-contained (no reliance on the standard library’s shlex module).
Required functionality:
Function signature: def split(s: str, posix: bool = True) -> list[str]
Tokenization rules (shell-like parsing with quotes and escapes):
Behavior on typical inputs:
Error handling:
Constraints:
Placement:
Example behavior expectations for the tests: