build: add deps and test scaffolding for auto-reverse

Adds runtime deps (playwright, mitmproxy, anthropic, genson) and dev
deps (pytest, pytest-asyncio); creates the tests/ scaffold with
fixture_site.py, conftest.py, and a smoke test. Documents the
mitmproxy aioquic/mitmproxy-rs stub workaround needed for
free-threaded CPython 3.14.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 23:43:11 +08:00
parent a484ea4f8e
commit c6173b0ceb
7 changed files with 1154 additions and 1 deletions
+33
View File
@@ -0,0 +1,33 @@
# auto-reverse
Automated API reverse-engineering CLI tool built on Python 3.14 (free-threaded).
## Dependency Fallback Notes
### mitmproxy on free-threaded Python 3.14
`mitmproxy` depends on `aioquic` (for HTTP/3 + QUIC support) and `mitmproxy-rs` (for WireGuard/process-mode features). Both packages ship only as `abi3` wheels that use CPython's Limited API (`Py_LIMITED_API`), which is **explicitly unsupported** on free-threaded Python 3.14 (`cpython-3.14t`). Neither package has source builds compatible with the free-threaded ABI either.
**Workaround applied:** `[tool.uv.override-dependencies]` in `pyproject.toml` stubs out both packages with minimal pure-Python packages located at `/tmp/aioquic-stub` and `/tmp/mitmproxy-rs-stub`. The proxy will function for HTTP/1.1 and HTTP/2 traffic; HTTP/3 (QUIC) and WireGuard/process-capture modes are unavailable until upstream packages ship free-threaded wheels.
To regenerate the stubs on a fresh checkout, run:
```bash
./scripts/create_stubs.sh # (to be created in a later task)
```
Or create them manually before `uv sync`:
```bash
# aioquic stub
mkdir -p /tmp/aioquic-stub/src/aioquic
printf '[project]\nname="aioquic"\nversion="1.2.0"\nrequires-python=">=3.14"\ndependencies=[]\n[build-system]\nrequires=["hatchling"]\nbuild-backend="hatchling.build"\n' > /tmp/aioquic-stub/pyproject.toml
echo '"""Stub: HTTP/3 unavailable on free-threaded Python 3.14."""' > /tmp/aioquic-stub/src/aioquic/__init__.py
# mitmproxy-rs stub
mkdir -p /tmp/mitmproxy-rs-stub/src/mitmproxy_rs
printf '[project]\nname="mitmproxy-rs"\nversion="0.12.9"\nrequires-python=">=3.14"\ndependencies=[]\n[build-system]\nrequires=["hatchling"]\nbuild-backend="hatchling.build"\n' > /tmp/mitmproxy-rs-stub/pyproject.toml
echo '"""Stub: WireGuard/process-mode unavailable on free-threaded Python 3.14."""' > /tmp/mitmproxy-rs-stub/src/mitmproxy_rs/__init__.py
uv sync
```