# 93 green tests. The rule never ran.

> Tests written from the code agree with the code.

- **Format:** short video, 9 steps, ~51 seconds
- **Topic:** AI agents for testing, code review, performance and UI review — a Flutter app with 93 green tests never exercises its cancel rule because both cancellation tests start from a placed order, and how a testing agent working from requirements, a UI state matrix and cited review findings fix it.
- **Author:** Suthahar Jegatheesan (MSDEVBUILD)
- **Category:** AI · AI
- **Published:** 2026-08-09
- **Tags:** testing, flutter, codereview, aiagents, qualityengineering, githubcopilot, aicoding, msdevbuild
- **Canonical URL:** https://blog.msdevbuild.com/shorts/ai-review-agents-green-tests-untested-rule/

---
## What you'll learn

- Why a green suite can skip the rule that matters
- How a testing agent writes tests that can fail
- What a UI state matrix finds that review does not

## Understand it one step at a time

### 1. 93 tests, all green

Unit, bloc, widget and data tests across nine files.

### 2. Both cancel tests start from placed

Each checks a note on the timeline. Neither cancels a preparing order.

### 3. Written from the code

A test from the implementation cannot disagree with the implementation.

### 4. Requirements first

AC-3: given preparing, cancel is refused. Named before any code is read.

### 5. The test fails. Good

cancelOrder accepts any status, so AC-3 fails, and is reported.

### 6. UI review: the state matrix

Rider dashboard: loading, empty and offline handled. Error is not.

### 7. Review: cite or drop

Every finding names the AGENTS.md rule it breaks. Uncited findings are dropped.

### 8. Green that means something

Every acceptance criterion has a test that names it. A hook checks.

### 9. Test the promise, not the code

Requirements first, a state matrix per screen, a rule behind every finding.

---

## The takeaway

**Test the promise. Not the code.**

A test written from the implementation cannot disagree with it.
