# Tessera dashboard: Checks

Every candidate goes through these checks in order, cheapest first, and stops at the first failure. Counts are across all 9 candidates.

| Gate | Passed | Rejected | Not run |
| --- | --- | --- | --- |
| Patch precheck | 9 | 0 | 0 |
| Shape precheck | 8 | 1 | 0 |
| Test hygiene precheck | 8 | 0 | 1 |
| Interface precheck | 8 | 0 | 1 |
| G1 Applies cleanly | 8 | 0 | 1 |
| Base fail ratio | 8 | 0 | 1 |
| G5 Every requirement tested | 7 | 1 | 1 |
| G2 Fail-to-pass | 7 | 0 | 2 |
| G3 No regressions | 7 | 0 | 2 |
| G4 Same result every time | 7 | 0 | 2 |
| G6 Mutation testing | 7 | 0 | 2 |
| Harbor official checks | 6 | 1 | 2 |
| N1 Not already in Click | 6 | 0 | 3 |
| G7 Blind solve | 5 | 1 | 3 |

## Each gate

### Patch precheck

- What it proves: The task is in scope, real, safe and shaped right, before any Docker run
- How it checks: Rejects plans for exploit or malware work. Rejects solutions with no executable lines under `src/`. Enforces the batch rules early. Bans unreliable test patterns (network calls via `requests`/`socket`, `time.sleep`, `isatty`, `list(set(...))`). Rejects tests that use private names only the solution adds. Runs the feature tests on unchanged Click: at least `0.80` must fail and there must be at least `5` fail-to-pass tests; below `0.50` the task is rejected at once with no repair, because the feature probably already exists.

### Shape precheck

- What it proves: The task is in scope, real, safe and shaped right, before any Docker run
- How it checks: Rejects plans for exploit or malware work. Rejects solutions with no executable lines under `src/`. Enforces the batch rules early. Bans unreliable test patterns (network calls via `requests`/`socket`, `time.sleep`, `isatty`, `list(set(...))`). Rejects tests that use private names only the solution adds. Runs the feature tests on unchanged Click: at least `0.80` must fail and there must be at least `5` fail-to-pass tests; below `0.50` the task is rejected at once with no repair, because the feature probably already exists.

### Test hygiene precheck

- What it proves: The task is in scope, real, safe and shaped right, before any Docker run
- How it checks: Rejects plans for exploit or malware work. Rejects solutions with no executable lines under `src/`. Enforces the batch rules early. Bans unreliable test patterns (network calls via `requests`/`socket`, `time.sleep`, `isatty`, `list(set(...))`). Rejects tests that use private names only the solution adds. Runs the feature tests on unchanged Click: at least `0.80` must fail and there must be at least `5` fail-to-pass tests; below `0.50` the task is rejected at once with no repair, because the feature probably already exists.

### Interface precheck

- What it proves: The task is in scope, real, safe and shaped right, before any Docker run
- How it checks: Rejects plans for exploit or malware work. Rejects solutions with no executable lines under `src/`. Enforces the batch rules early. Bans unreliable test patterns (network calls via `requests`/`socket`, `time.sleep`, `isatty`, `list(set(...))`). Rejects tests that use private names only the solution adds. Runs the feature tests on unchanged Click: at least `0.80` must fail and there must be at least `5` fail-to-pass tests; below `0.50` the task is rejected at once with no repair, because the feature probably already exists.

### G1 Applies cleanly

- What it proves: The solution is a valid patch
- How it checks: `git apply --check` plus a Python syntax check (`py_compile`)

### Base fail ratio

- What it proves: The task is in scope, real, safe and shaped right, before any Docker run
- How it checks: Rejects plans for exploit or malware work. Rejects solutions with no executable lines under `src/`. Enforces the batch rules early. Bans unreliable test patterns (network calls via `requests`/`socket`, `time.sleep`, `isatty`, `list(set(...))`). Rejects tests that use private names only the solution adds. Runs the feature tests on unchanged Click: at least `0.80` must fail and there must be at least `5` fail-to-pass tests; below `0.50` the task is rejected at once with no repair, because the feature probably already exists.

- Threshold (config.yaml): At least 0.8 of the feature tests fail on unchanged Click, with at least 5 fail-to-pass tests. Below 0.5 the task is rejected at once.

### G5 Every requirement tested

- What it proves: Instructions and tests match
- How it checks: Every requirement (`AC1..ACn`) has tagged tests, no test is untied to a requirement, every error message the tests check appears in `instruction.md`, and no solution internals leak into `instruction.md`

### G2 Fail-to-pass

- What it proves: The tests really test the new feature
- How it checks: The base project works; the feature tests pass with the solution; they fail cleanly without it (assertion or attribute errors, never import or syntax errors). Only tests that fail before and pass after go into `fail_to_pass.json`.

### G3 No regressions

- What it proves: Nothing that worked breaks
- How it checks: All `2,434` existing Click tests (`configs/click_pass_to_pass.json`) still pass with the solution

### G4 Same result every time

- What it proves: Tests are not flaky
- How it checks: Feature tests run `3` times with identical results

- Threshold (config.yaml): 3 runs with identical results.

### G6 Mutation testing

- What it proves: Tests catch a broken solution
- How it checks: Makes small deliberate bugs ("mutants") only in lines the solution adds under `src/`, runs them in Docker with no network, and requires at least `70%` to be caught. If some survive, the AI gets 1 repair to strengthen the tests. Operators used across the 5 tasks: `eq_to_neq`, `neq_to_eq`, `gt_to_le`, `lt_to_ge`, `is_none_flip`, `is_not_none_flip`, `not_in_flip`, `raise_remove`, `return_val_none`, `self_fail_remove`.

- Threshold (config.yaml): At least 70% of mutants caught.

### Harbor official checks

- What it proves: The package works the way judges grade it
- How it checks: Builds a clean package (no Tessera-internal files inside) and runs `harbor run -a nop` (must score `0.0`) and `harbor run -a oracle` (must score `1.0`)

### N1 Not already in Click

- What it proves: The feature is new
- How it checks: Fetches Click's latest default branch (`origin/HEAD`), checks the new names don't exist there, and checks the feature tests fail on it

### G7 Blind solve

- What it proves: The instructions are enough to solve the task
- How it checks: A separate, stronger model (`gpt-6.1-sol`) gets **only** `instruction.md` and the relevant base `src/` files (no tests, no solution) and has 2 attempts

- Threshold (config.yaml): 2 attempts.

_Descriptions come from docs/TECHNICAL_EXPLANATION.md, section 5._
