Skip to content

Commit 9e8ded9

Browse files
committed
docs: sync CLAUDE.md with main (mypy, coverage, human-facing docs pointer)
1 parent fbed398 commit 9e8ded9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
```bash
44
docker compose up --build # Start all services (API :8000, Web :5173, Postgres :5432)
5-
make lint # Ruff check + format (API), ESLint (Web)
5+
make lint # Ruff check + format + mypy (API), ESLint (Web)
66
make test # pytest (API), vitest (Web)
77
make migrate # Alembic upgrade head
8+
make typecheck # mypy (API only)
89
```
910

1011
## Architecture
@@ -73,6 +74,7 @@ Skills are pluggable Claude Code agent definitions in `skills/`. See `skills/SKI
7374

7475
- Python: ruff with `line-length = 120`, target Python 3.12
7576
- Lint rules: E, F, I, N, UP, B, A, SIM, TCH
77+
- mypy: non-strict with pydantic plugin, per-module overrides for third-party lib typing issues (see `pyproject.toml`)
7678
- `asyncio_mode = "auto"` in pytest — no need for `@pytest.mark.asyncio`
7779

7880
## Testing
@@ -97,6 +99,7 @@ Key additions for production: `ENVIRONMENT=production`, `ADMIN_PASSWORD`, `CORS_
9799

98100
## Gotchas
99101

102+
- **CI coverage threshold**: `--cov-fail-under=70` (current coverage ~75%). Raising to 80% requires covering `admin/views.py`, `main.py` lifespan, and more router branches.
100103
- **Entrypoint parallel I/O**: clone, metadata (`gh pr view --json`), and diff (`gh pr diff`) run as background jobs with `wait`. The `-R` flag lets `gh` hit the API without a local `.git` dir. `set -e` does NOT propagate from background jobs — each `wait $pid` needs explicit `|| exit 1`. The claude-runner image includes `jq` for parsing the combined metadata JSON.
101104
- Always run `make lint` before pushing — ruff + eslint must pass
102105
- **Shiki in tests**: any test rendering session components must mock `./shiki` (highlighter, SHIKI_THEME, SUPPORTED_LANGS) to avoid loading real TextMate grammars in jsdom
@@ -129,3 +132,4 @@ Key additions for production: `ENVIRONMENT=production`, `ADMIN_PASSWORD`, `CORS_
129132
- **Post-results to PR**: after session completion, the API can post score card as a PR comment — opt-in per installation via `post_results_to_pr` boolean; extraction and formatting in `container/pr_comment.py`, triggered in `_event_stream()` after `mark_completed()`
130133
- **Coolify deployment**: TLS terminates at the Coolify reverse proxy, not in nginx. Nginx serves the SPA with security headers but no HTTPS config. SSE `X-Accel-Buffering: no` header is set by the API, not nginx.
131134
- **Non-root API container**: production Dockerfile uses `appuser`. Port 8000 > 1024 so no privilege needed. Docker socket mount still grants Docker access regardless of USER.
135+
- **Human-facing docs**: `README.md`, `CONTRIBUTING.md`, `docs/self-hosting.md`, `docs/architecture.md`, `docs/creating-skills.md` -- keep in sync with CLAUDE.md when architecture changes. CLAUDE.md is for AI agents; those docs are for human self-hosters and contributors.

0 commit comments

Comments
 (0)