docs: Update core documentation with Structural Testing Contract
This commit is contained in:
@@ -99,6 +99,8 @@ uv run gui_2.py --enable-test-hooks # With Hook API on :8999
|
|||||||
uv run pytest tests/ -v
|
uv run pytest tests/ -v
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** See the [Structural Testing Contract](./docs/guide_simulations.md#structural-testing-contract) for rules regarding mock patching, `live_gui` standard usage, and artifact isolation (logs are generated in `tests/logs/` and `tests/artifacts/`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Project Configuration
|
## Project Configuration
|
||||||
|
|||||||
@@ -212,6 +212,12 @@ Before marking any task complete, verify:
|
|||||||
|
|
||||||
## Testing Requirements
|
## 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
|
### Unit Testing
|
||||||
|
|
||||||
- Every module must have corresponding tests.
|
- Every module must have corresponding tests.
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
# Verification & Simulation Framework
|
## Structural Testing Contract
|
||||||
|
|
||||||
|
To maintain the integrity of the test suite and ensure that AI-driven test modifications do not create false positives ("mock-rot"), the following rules apply to all testing within this project:
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Verification & Simulation Framework
|
||||||
|
|
||||||
[Top](../Readme.md) | [Architecture](guide_architecture.md) | [Tools & IPC](guide_tools.md) | [MMA Orchestration](guide_mma.md)
|
[Top](../Readme.md) | [Architecture](guide_architecture.md) | [Tools & IPC](guide_tools.md) | [MMA Orchestration](guide_mma.md)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user