testing_philosophy.md

Purpose

This document defines what must be tested, why it must be tested, and what failure means.

Testing is not primarily for “bugs.”
Testing is for truth preservation.

If a system teaches something false, hides causality, violates constraints, or breaks determinism, the build must fail.


Authority

Testing enforces the authority chain:

accord/design/data/engine/

Testing must enforce design/accord_constraints.md, design/simulation_laws.md, and design/realism_constraints.md.


Testing Principles

  1. Correctness outranks convenience
    Convenient falsehood is still falsehood.

  2. Determinism is mandatory
    Nondeterministic outcomes are treated as defects unless explicitly modeled and bounded.

  3. Constraints are law
    Any violation of realism constraints or conservation is a hard failure.

  4. Explanations must match causes
    If the system explains an outcome, the explanation must match the causal trace.

  5. Regression is unacceptable
    Once a truth is encoded and tested, it cannot silently change.


Test Categories

Unit Tests

Validate small deterministic rules.

Examples:


Property-Based Tests

Verify invariants across wide input spaces.

Examples:


Simulation Replay Tests

Prove determinism.

Method:


Data Validation Tests

Ensure data is lawful.

Fail the build if:


Integration Tests

Verify domain interactions.

Examples:


Explanation Correctness Tests

Ensure explanations match reality.

Requirements:


Performance Tests

Ensure low-power viability.

Rules:


Always-Test Requirements

Determinism

Conservation

Time Cost

Failure Cases


Test Artifacts

Golden Replays

Canonical seed + action logs for reference scenarios. Treated as constitutional fixtures.

Examples:

Scenario Packs

Curated small scenarios representing common real-world conditions. Used for regression and demonstration.


Failure Policy

A test failure means:

Response:

Silent changes are forbidden.


Balance Policy

Balance is evaluated only after correctness.

Rules:

Any tuning must:


Collaboration Stance

Open collaboration increases the need for strong tests.

Tests replace trust by making violations unmergeable.


Minimal Required Suite

Must run on every change:

Recommended: