The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
ci: run the migration data-rewrite check in code quality
Yucheng Zhu6c7dfbd2498a
diff --git a/.github/workflows/test-code-quality.yml b/.github/workflows/test-code-quality.ymlindex 8f62837d29a..d0ac0b6fdee 100644--- a/.github/workflows/test-code-quality.yml+++ b/.github/workflows/test-code-quality.yml@@ -128,6 +128,9 @@ jobs:- name: check_e2e_no_raw_requestsrun: uv run --no-sync python ./tests/code_coverage_tests/check_e2e_no_raw_requests.py+ - name: check_migrations_no_data_rewrites+ run: uv run --no-sync python ./tests/code_coverage_tests/check_migrations_no_data_rewrites.py+- name: memory_testrun: uv run --no-sync python ./tests/code_coverage_tests/memory_test.pydiff --git a/CLAUDE.md b/CLAUDE.mdindex b3383b4a895..4a661f6effe 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -79,6 +79,8 @@ Do not put names of customers or customer company names in code, PR descriptionsCI supply-chain safety: Never pipe a remote script into a shell (`curl ... | bash`, `wget ... | sh`); download the artifact to a file, verify its SHA-256 checksum, then install. Pin every external tool to a specific version with a full URL (not `latest` or `stable`). Verify checksums for all downloaded binaries, using the provider's official `.sha256` / `.sha256sum` sidecar when available. These rules apply to every download in CI+Prisma migrations apply synchronously at proxy boot, before it serves traffic, so a migration must only change schema, never rewrite rows. No `UPDATE`, `DELETE` or `MERGE`, and no `INSERT ... SELECT`: on a spend-log-sized table any of those is minutes of downtime plus a doubled heap that plain autovacuum won't give back. Add the column and let the application populate it, or run the rewrite as an opt-in batched job outside boot. `tests/code_coverage_tests/check_migrations_no_data_rewrites.py` enforces this; when a rewrite is genuinely bounded and has to ship inside the migration, mark the statement `-- data-migration-ok: <what bounds it>`+Follow these coding conventions for new/updated code (a three-line fix in a legacy file shouldn't trigger huge drive-by refactors):- Composition over inheritance