> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ochrebound.ibrahimsultan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing and QA

> What runs on every push, what runs in Unity, what runs against the live site, and the numeric gates for art and motion.

The project's rule is simple: a claim needs a check. Tests and audits are never loosened to get a pass; the cause gets fixed.

## Where each check runs

| Layer | Where | What it proves |
| :- | :- | :- |
| **Content checks** | GitHub Actions, every push and pull request | Docs, links, media, prose hygiene, `.meta` pairing, player copy, Arabic plates, tier parity |
| **EditMode tests** | Unity, locally (or CI with a Unity licence) | 156 tests in 22 files: Core maths, settings domains, controls, tiers, dyes, relief data, fonts |
| **PlayMode tests** | Unity editor | The live street, stitch frames, player-facing checks, thresholds |
| **Live checks** | A real GPU browser against the production site | The loader sandbox, the gate, rebinding both ways, boot timing, zero console errors |

## On every push

> [tab] Docs and media
>
> ```bash theme={"system"}
> python3 -I tools/qa/docs_media_audit.py
> ```
>
> Every relative link in every Markdown document; showcase image integrity, size, uniqueness and alt text; parity with the media manifest; an em dash budget; banned stock phrases; personal machine paths; and `.meta` pairing for every tracked Unity asset.

> [tab] Player copy
>
> ```bash theme={"system"}
> python3 -I tools/qa/copy_audit.py
> ```
>
> Every player-facing string in C#, scenes and place data, checked for placeholders, stock marketing language, shouting and accidental duplicates.

> [tab] Arabic plates
>
> ```bash theme={"system"}
> python3 -I tools/art/arabic_plates.py --check
> ```
>
> The HarfBuzz and Amiri place plates match their source text.

> [tab] Tier parity
>
> ```bash theme={"system"}
> node tools/web/tier_check.mjs
> ```
>
> 26 machine profiles run through the JavaScript and C# classifiers; both must agree exactly.

## In Unity

```bash theme={"system"}
tools/unity.sh test edit
tools/unity.sh test play
```

> [accordion] EditMode suites
>
> Movement, wall contact, wind and cloth, camera focus, hardware tiers, settings domains and settings, progression, economy invariants, save hardening, Arabic shaping, the atelier, cinema and film catalogue, parity, world stage, controls rebinding (21 tests), stitch husks, the film print, relief data, dyes and font coverage.

> [accordion] PlayMode suites
>
> * `StitchFrameTests`: press-frame timing, husk pages, one impact frame per stitch, scarf on the drawn neck.
> * `LiveStreetTests`: the street end to end. Among its checks:
>   * `EachSettingTouchesOnlyItsOwnDomain`
>   * `RebindingStitchKeyMovesStitchAndUpdatesGlyphs`
>   * `OnlyTheRecessesMoveAndTheWallsStayPut`
> * `PlayerFacingTests` and `ThresholdEndingTests`.

## Numeric gates for art and motion

| Gate | Command | Measures |
| :- | :- | :- |
| Typography | `tools/unity.sh typeaudit` then `type_check.py` | Size floors at 720p and 1080p, hairlines of at least 0.5 px, contrast of 4.5:1 for body and 3:1 for display, glyph coverage, no overlap from 4:3 to 21:9 |
| Dyes | `dye_check.py` | Every dye on every drawing: coverage, ink protection, shading, contrast |
| Motion | `motion_gate.py` | Foot skate, pelvis bounce, duty factor, arm swing, trunk lean, hip pops, jump arcs |
| Borders | `border_clip_audit.py` | No giant or flipbook silhouette cut flat at a frame edge |
| Parallax gaps | `reveal_map.py` | Exposed paint behind each plane across wide aspect ratios |
| Release | `release_check.py` | Developer hooks compiled out of release players |

The whole local suite runs in one go:

```bash theme={"system"}
tools/verify_all.sh --quick   # skip scene setup and the Windows build
tools/verify_all.sh           # everything
```

> [!WARNING]
>
> Browser automation can report a hidden tab as visible. Real tab-switch behaviour (pausing and resuming when you press <kbd>Ctrl</kbd>+<kbd>T</kbd> and come back) is verified in a plain browser over its debugging socket, not in an automated test browser.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.