chore: remainder — backend test infra, agent config, docker, i18n, frontend ui
- Backend: alembic env, config manager/models, dependencies, translate plugin - Backend tests: async_sync_regression, integration tests, git services, test_agent - Docker: docker-compose.yml updates - Agent: qa-tester.md update, semantics-testing SKILL.md update - Frontend: TopNavbar, sidebarNavigation, FeaturesSettings, FeatureGate - i18n: assistant.json en/ru locale updates - New: frontend/src/lib/components/agent/ directory
This commit is contained in:
@@ -38,6 +38,12 @@ To prevent overwhelming Semantic Graph, test files operate under relaxed complex
|
||||
2. **Root Binding (`BINDS_TO`):** Do NOT map the internal call graph of a test file. Instead, anchor the entire test suite to the production module using: `@RELATION BINDS_TO -> [TargetModule]`.
|
||||
3. **Complexity 1 for Helpers:** Small test utilities (e.g., `_setup_mock`, `_build_payload`) are **C1**. They require ONLY the anchor pair. No `@BRIEF` or `@RELATION` allowed.
|
||||
4. **Complexity 2 for Tests:** Actual test functions (e.g., `test_unauthorized_access`) are **C2**. They require anchor + `@BRIEF`. Do not add `@PRE`/`@POST` to individual test functions.
|
||||
5. **Maximum test file size:** A single test file MUST NOT exceed **600 lines**. Beyond this threshold:
|
||||
- Split into multiple test files by domain (e.g., `test_auth_flow.py`, `test_auth_ws.py` instead of `test_auth.py`).
|
||||
- Extract shared fixtures into a `conftest.py` in the same directory.
|
||||
- Each test class tests ONE production contract — if a file has more than 3 test classes, split by class.
|
||||
- **Exception:** Integration test files using Testcontainers may be up to **800 lines** due to longer setup/teardown.
|
||||
- **RATIONALE:** Files >600 lines degrade the model's sliding-window attention — the bottom of the file is compressed before the top is applied, leading to duplicate tests and orphan contracts.
|
||||
|
||||
## III. TRACEABILITY & TEST CONTRACTS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user