refactor
This commit is contained in:
@@ -9,6 +9,14 @@ description: Core protocol for Test Constraints, External Ontology, Graph Noise
|
||||
# @RELATION: DEPENDS_ON -> [Std:Semantics:Core]
|
||||
# @INVARIANT: Test modules must trace back to production @INVARIANT tags without flooding the Semantic Graph with orphan nodes.
|
||||
|
||||
## Core Mandate
|
||||
- Tests are born strictly from the contract. Bare code without a contract is blind.
|
||||
- Verify `@POST`, `@UX_STATE`, `@TEST_EDGE`, and every `@TEST_INVARIANT -> VERIFIED_BY`.
|
||||
- **Orthogonal Testing:** You MUST validate code through independent, non-intersecting semantic projections (e.g., Data Integrity, UX State Machine, Security/Permissions, Fault Tolerance). You must ensure that satisfying a data contract in Projection A does not silently violate an invariant in Projection B.
|
||||
- **Anti-Tautology Rule (No Logic Mirrors):** You are FORBIDDEN from writing tautological tests. Never duplicate the production algorithm inside the test to dynamically compute an `expected_result`. Use deterministic, hardcoded `@TEST_FIXTURE` data. A test that mirrors the implementation proves nothing.
|
||||
- **SUT Mocking Ban:** Never mock the System Under Test (SUT). You may mock external boundaries (`[EXT:...]` or DB drivers), but you MUST NOT mock the local `[DEF]` node you are actively verifying.
|
||||
- If the contract is violated, or an upstream `@REJECTED` ADR path is reachable, the test MUST fail.
|
||||
|
||||
## 0. QA RATIONALE (LLM PHYSICS IN TESTING)
|
||||
You are an Agentic QA Engineer. Your primary failure modes are:
|
||||
1. **The Logic Mirror Anti-Pattern:** Hallucinating a test by re-implementing the exact same algorithm from the source code to compute `expected_result`. This creates a tautology (a test that always passes but proves nothing).
|
||||
|
||||
Reference in New Issue
Block a user