mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
Three private tiles published to the codeflash workspace: - codeflash-internal-rules: 6 eager rules (code-style, architecture, optimization-patterns, git-conventions, testing-rules, multi-language-handlers) - codeflash-internal-docs: 8 lazy doc pages (domain-types, optimization-pipeline, test-generation-pipeline, context-extraction, aiservice/cf-api endpoints, configuration-thresholds, llm-provider-abstraction) - codeflash-internal-skills: 4 on-demand skills (debug-optimization-failure, add-language-support, add-api-endpoint, debug-test-generation)
968 B
968 B
Testing Rules
Python (aiservice)
- Tests in
tests/by feature:optimizer/,testgen/,testgen_postprocessing/,testgen_instrumentation/,integration/,validators/ @pytest.mark.asynciofor async testspytest.inisetsDJANGO_SETTINGS_MODULE = aiservice.settingsconftest.pyprovidesnormalize_code()helper (AST parse/unparse for quote normalization)- Test factories:
create_optimizer_context(),create_refiner_context() - Run tests:
uv run pytest(all),uv run pytest tests/path/test_file.py::test_name -v(single)
JS/TS (cf-api)
- Tests use dependency injection:
setXxxDependencies()/resetXxxDependencies()
PR Review
- Always comment on: Logic errors, security vulnerabilities, test name typos, breaking changes without migration
- Never comment on: Code style/formatting (linters handle it), "consider" suggestions, performance without profiling data
- Limit to 5-7 high-signal comments per review