docs: Update core documentation with Structural Testing Contract

This commit is contained in:
2026-03-03 01:13:03 -05:00
parent 14ac9830f0
commit 6b2270f811
3 changed files with 19 additions and 1 deletions

View File

@@ -212,6 +212,12 @@ Before marking any task complete, verify:
## Testing Requirements
### Structural Testing Contract
1. **Ban on Arbitrary Core Mocking:** Tier 3 workers are strictly forbidden from using `unittest.mock.patch` to bypass or stub core infrastructure (e.g., event queues, `ai_client` internals, threading primitives) unless explicitly authorized by the Tier 2 Tech Lead for a specific boundary test.
2. **`live_gui` Standard:** All integration and end-to-end testing must utilize the `live_gui` fixture to interact with a real instance of the application via the Hook API. Bypassing the hook server to directly mutate GUI state in tests is prohibited.
3. **Artifact Isolation:** All test-generated artifacts (logs, temporary workspaces, mock outputs) MUST be written to the `tests/artifacts/` or `tests/logs/` directories. These directories are git-ignored to prevent repository pollution.
### Unit Testing
- Every module must have corresponding tests.