SynaWeave-ce

πŸ“œ Testing

🧩 Purpose

This document defines the test taxonomy, quality-gate rules, coverage expectations, evaluation boundaries, and verification responsibilities for the entire platform.

This file is the source of truth for:

This file does not define:

Those belong in:

Use docs/templates/tests/verification-plan.md when a reusable verification packet is needed outside inline planning sections.

🧭 Testing thesis

Testing is part of the product, not a cleanup step.

Every deliverable in this repo must be:

No deliverable may close with β€œtests later” debt.

The platform’s baseline tools are locked as:

πŸ”„ Verification mapping

Changes in this repository must update the matching test or verification layers.

πŸ“¦ Root testing taxonomy

All top-level testing folders are mandatory.

testing/
  unit/
  component/
  integration/
  contract/
  ui/
  e2e/
  security/
  performance/
  accessibility/
  evals/

Each folder has a distinct role. If a test does not clearly belong to one of these folders, the test design is probably wrong.

βœ… testing/unit

🧩 Purpose

Fast, isolated verification of pure logic and small behavior units.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

🧩 testing/component

🧩 Purpose

Verification of UI primitives and feature-level UI pieces in isolation from full browser journeys.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

πŸ”— testing/integration

🧩 Purpose

Verification that multiple internal pieces work together correctly without requiring a full end-to-end user journey.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

🧾 testing/contract

🧩 Purpose

Verification that public contracts, serialized payloads, and cross-surface interfaces remain stable and correct.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

🌐 testing/ui

🧩 Purpose

Verification of user-visible application behavior in browser contexts without necessarily testing the entire full-stack journey.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

🧭 testing/e2e

🧩 Purpose

Verification of real user journeys that cross multiple boundaries.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

πŸ” testing/security

🧩 Purpose

Verification of security-sensitive behavior, secret boundaries, auth boundaries, and abuse-prone flows.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

πŸ”’ Repository security integrations

This layer works alongside:

⚑ testing/performance

🧩 Purpose

Verification of performance baselines, latency regressions, and timing-sensitive behavior at a smoke-test level.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

β™Ώ testing/accessibility

🧩 Purpose

Verification of accessibility expectations through automated checks and stable accessibility-oriented assertions.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

πŸ€– testing/evals

🧩 Purpose

Verification of AI-, retrieval-, ranking-, and model-related behavior through repeatable evaluation rather than ad hoc judgment.

🎯 Responsibilities

🚫 Non-responsibilities

πŸ› οΈ Approved tools

πŸ“ Rules

πŸ› οΈ Approved testing tools by layer

βœ… Core mapping

🚫 Tooling rule

No new testing framework should be introduced without:

πŸ“ Coverage expectations

Coverage is defined by owned scope, not by vanity percentages alone.

βœ… General rule

Every deliverable must leave the code it introduces or materially changes fully covered at the appropriate layers.

πŸ“¦ Package and module coverage expectations

🌐 User-path coverage expectations

Any new user-visible capability must usually have:

πŸ€– AI-path coverage expectations

Any AI-related capability must usually have:

🚦 Quality-gate rules

Testing is part of merge policy.

🚦 Required merge-gate categories

πŸ“ Rules

πŸ”„ Change-to-test mapping

This section defines what must be updated when specific types of changes occur.

✏️ UI primitive change

Must update:

πŸ”— Public API change

Must update:

🧱 Adapter contract change

Must update:

πŸ” Auth or permission change

Must update:

πŸ“₯ Ingestion or preprocessing change

Must update:

πŸ“Ž Retrieval change

Must update:

πŸ“ˆ Ranking or model-scoring change

Must update:

🧠 Prompt change

Must update:

βš™οΈ Config or secret-boundary change

Must update:

πŸ§ͺ Evaluation policy

Evaluations are part of the testing system, not a separate optional workflow.

πŸ§ͺ Eval requirements

πŸ“ Minimum Sprint 1 eval expectations

Sprint 1 must have:

πŸ“Š Test artifacts and retention

Testing produces first-class artifacts.

πŸ“Š Artifact examples

πŸ“ Rules

πŸ‘€ Relationship to observability

Testing and observability are linked but not identical.

πŸ‘€ Testing proves

πŸ‘€ Observability shows

πŸ“ Rule

If a workflow is important enough to observe in production, it is usually important enough to test before production.

This is especially true for:

πŸ” Security and privacy testing rule

No test may:

Security-sensitive fixtures must be synthetic or safely provisioned.

βœ… Testing-level definition of done

A change is not fully tested unless all of the following are true:

πŸ“œ Relationship to other root docs

This file works with:

This file should stay focused on test taxonomy, quality gates, and evaluation rules.