-
Notifications
You must be signed in to change notification settings - Fork 92
Development Guide
Wuthrich Julien edited this page Aug 22, 2026
·
1 revision
Start with CONTRIBUTING.md and CLAUDE.md (the hard rules, kept short on purpose). Each folder's README is the reference for that area.
make install # uv sync --all-packages --all-extras + pnpm install
make infra-up # clickhouse, postgres, redis, minio
make migrate # ClickHouse DDL runner + Alembic
make seed # default project + ingest key tracely_dev_key
make backend # FastAPI :8000 (OpenAPI at /docs) ┐
make workers # Celery ├ three terminals
make frontend # next dev — `cd frontend && pnpm dev -p 3001` to match Docker
make demo # populate traces, clusters, cases, gatesuv run pytest -q backend/tests sdk/tests # what CI runs
uv run pytest -q backend/tests/test_x.py::test_y -x
uv run ruff check . && uv run ruff format .
cd frontend && pnpm test # vitest; pnpm build = tsc + lintmake test only runs backend/tests — run sdk/tests too. One SDK test needs the backend package on the path (CI installs both).
-
No SQL in
api/routers/. ClickHouse reads go throughinfrastructure/clickhouse/async_reader.py(API) ortrace_reader.py(workers); Postgres throughinfrastructure/db/repositories.py. -
Every LLM call goes through
infrastructure/llm/provider.py, insideprovider.use_project_key(project_id), withllm_enabled()checked inside the wrap. The in-app assistant is the one sanctioneduse_server_key()exception. -
Everything is scoped by
project_id, resolved from the credential byapi/auth. Agents (MCP, assistant) reach data only through the routers. -
Writes are idempotent — deterministic ids +
ReplacingMergeTree. Anything sampled must be deterministic per(trace_id, score_name). -
One verdict policy, implemented twice (Python
domain/evaluation/verdict.pyand SQL inasync_reader). Change both. -
Internal runs are never evaluated and never counted (
internal_kind). -
Frontend: never add an
env:block tonext.config.mjs— keys must not reach the browser. -
New backend env var →
config.pyand thex-app-envanchor indocker-compose.yml.
- Postgres:
cd backend && uv run alembic revision -m "…"/uv run alembic upgrade head. Never stamp alembic ahead of the deployed image. - ClickHouse: add
NNN_name.up.sqlinbackend/tracely/infrastructure/clickhouse/ddl/, applied bypython -m tracely.infrastructure.clickhouse.migrations. - Dependencies: regenerate
uv.lock— CI runsuv sync --frozen.
- The Celery worker does not hot-reload:
docker compose restart workerafter touching worker / eval / failure-intel / otel-mapping code. - Celery runs
--pool=solo --concurrency=1locally on purpose (numba / UMAP / HDBSCAN are fork-fragile). Consequence: gate turns are ingested inline, never enqueued, or the worker deadlocks on itself. - OTLP span ids are base64; hex silently yields an id nothing can look up.
- OTLP arrives in three message conventions; normalize in
otel/messages.py, not in the renderers. -
SKIPscores are dropped before the conversation roll-up, or an all-skipped run would report PASS.
Tag sdk-vX.Y.Z → the publish-sdk workflow publishes tracely-ai to PyPI via trusted publishing. Bump sdk/pyproject.toml and demo/ first. Details: sdk/README.md § Releasing.
Tracely — trace-native CI/CD for AI agents · MIT · Contributing · Security · Found a mistake on this page? Edit it, or open an issue.