inflearn logo

When AI Says “I’m Done” — Claude Code Verification Harness: TDD · Zero Regressions · QA Gate

Do you take AI’s “I’m done” at face value? Starting with a scenario where all 28 tests are green but the completion report is false, this builds a QA gate combining a baseline, regression comparisons, test tampering detection, report cross-checks, and hidden tests—and uses a stop hook to prevent Claude Code from finishing until it passes the gate.

1 learners are taking this course

Level Basic

Course period Unlimited

Python
Python
Git
Git
TDD
TDD
CI/CD
CI/CD
pytest
pytest
Python
Python
Git
Git
TDD
TDD
CI/CD
CI/CD
pytest
pytest

What you will gain after the course

  • Verify an AI’s completion report against the baseline in minutes, checking for regressions, test tampering, leftovers, and reported figures.

  • Recognize the eight types of false completion (not running it, doing only part of it, skipping it, changing expected values, hardcoding, deleting, inflating, and leaving remnants) and know what catches them.

  • Set up a stop-hook QA gate in Claude Code so it can’t finish until it passes, and define limits and human approval checkpoints.

  • Enforce Red→Green and normal, boundary, and failure testing through prompts and Claude MD rules, and require evidence to be included in reports.

  • Hidden tests and property checks weed out changes that only pass the public tests.

  • Compare the harness before and after numerically using a small agent evaluation that runs the same tasks multiple times.

  • Add a harness to an unfamiliar repository and run the same gate in CI.

A completion claim is a hypothesis; test output is evidence—build a harness to verify Claude Code’s “Done” with a single command, then run the same task multiple times and evaluate it quantitatively.

Do you take AI’s "I’m done" at face value? Starting with a case where the completion report is false even though all 28 tests pass, you’ll build a QA gate that combines a baseline, regression comparisons, test-tampering detection, report cross-checks, and hidden tests—and use a stop hook to prevent Claude Code from finishing until it passes the gate.

This is not a broad overview of how to build a harness (Claude MD, skills, and subagents). It focuses on one problem: determining whether code changes an agent claims to have finished are really done. Using actual Claude Code run logs and samples reproducing the eight types of false completion commonly seen in the field, you’ll directly measure what the gate catches and what it misses. It uses only deterministic checks, with no LLM judge.

By the end of this course

  • Verify an AI completion report against the baseline in just a few minutes, checking for regressions, test tampering, leftovers, and reported figures.

  • Recognize the 8 types of false completion (not run, partial, skipped, expected value changed, hardcoded, deleted, inflated, leftover) and know what catches each one.

  • Set up a stop-hook QA gate in Claude Code so it can’t finish until it passes, and define limits and human approval checkpoints.

  • Enforce red-to-green development and normal, boundary, and failure tests through prompt and Claude MD rules, and require evidence to be included in the report.

  • Use hidden tests and property checks to filter out changes that only pass the public tests.

  • Use small agent evaluations that run the same tasks multiple times to compare the before-and-after harness numerically.

  • Embed the harness in an unfamiliar repository and run the same gate in CI.

Recommended for people like these

  • A developer who has started using Claude Code at work but worries every time whether they can trust it when it says, “I’m done.”

  • Leads and senior developers who need to review AI-generated changes from their team members.

  • People who have taken a course on harnesses but aren’t sure how to put the verification steps into measurable terms.

Curriculum (8 sections · 44 lessons · approximately 310 minutes)

  • Section 1. Through the First Verification — Complete demo: 28 tests are green, gates are 2/6; when delegated without execution tools: verify “I couldn’t run it”; practice environment: Loopmarket returns module and rollback; baseline: record what’s green before making changes; a completion claim is a hypothesis: command, output, exit code

  • Section 2. The Faces of False Completion — Face 1: Saying "passed" without running tests, Face 2: Running only the tests you were told to — it worked this time, Face 3: Fixing the tests to make them pass, Face 4: Making it work only for specific inputs, Faces 5 and 6: Deleting tests and inflating reports, Classification table of 8 types of false completion

  • Section 3. Have AI do TDD — Read why it’s red: AI-written tests can be wrong too, don’t force a pass when it doesn’t turn green, normal/boundary/failure cases, fewer than three isn’t a test, bug fixes start with a reproduction test, get human approval before changing tests, refactor only when tests are green

  • Section 4. Eliminate Regressions — Don’t start if you don’t know the call sites, Change the spec while protecting shared functions, Dissect regression comparisons: failures, disappearances, and skips, Hidden tests: where agents can’t see, Property testing: thousands of random orders, Did the signature change or not? Prove it through the call sites.

  • Section 5. Build a QA Gate — QA gate structure: turn checklists into scripts, Step 1 syntax check: start with the cheapest checks, Step 3 tampering detection, Step 4 residue check, Step 6 report reconciliation and its limitations, gate results on one page

  • Section 6. Put the gate in the agent loop — Stop hooks: It can’t finish until it passes; limit the number of blocks and require human approval; validation rules in Claude MD: strict rules make it stop; separate the validator: rejection by the review agent; enforce a completion report format; what still remains; blocked by permissions but still got through: the tool-level trap.

  • Section 7. Evaluating Agents — One success may be luck: run it five times, Evaluation set: task-and-hidden-test pairs, Metrics: success rate, regression rate, and tampering rate, plus metric noise, Compare before and after the harness: when no difference is visible, Track cost and time too

  • Section 8. Bringing It into the Team and Capstone — The Same Gate in CI, What CI Can’t See, What the Gate Can’t Catch: Gaps in the Specification, Capstone: Adding a Harness to an Unfamiliar Repository, Wrap-Up: One Page That Turns “We’re Done” into Evidence

Hands-on Environment

Download and run the loopmarket-returns repository in the hands-on ZIP (a virtual shopping mall order and returns calculation module, Python 3.9+ and pytest). It includes a verification harness (baseline, regression comparison, tamper detection, residue checks, report cross-checking, QA gate, stop hook, and evaluation script), prompts for each lesson, 8 patches that reproduce false completion, hidden tests, and a small repository for the capstone. No Docker or cloud services are needed.

Prerequisites

  • Git basics (diff and commit)

  • Experience running tests

  • Experience using Claude Code (or a similar coding agent) at least once.

What This Course Does Not Cover

  • Installing Claude Code and basic usage

  • Explanation of Claude MD, Skills, MCP, and Subagent features

  • LLM response quality evaluation (judge models and embeddings)

  • The entire syntax of the testing framework

  • Adding Tests to Legacy Code

Notice

The narration for this lecture was created using a synthetic AI voice, and the Claude Code results shown on screen are from an actual run. The patch reproducing a false completion is a human-created sample for educational purposes, as stated on screen. AI response text, tokens, and timing may vary with each run. All data is fictional and for educational purposes; numbers may vary depending on the execution environment.

Recommended for
these people

Who is this course right for?

  • A developer who started using Claude Code at work and is always nervous about whether to trust its "I’m done."

  • Leads and senior engineers who need to review changes made by team members using AI

  • For those who have taken a harness course but are unsure how to quantify the validation stage.

Need to know before starting?

  • Git basics (diff·commit)

  • Experience running tests

  • Experience using Claude Code (or a similar coding agent) at least once

Hello
This is dorian05202988

Career Verified

A data craftsman with over 20 years of experience in databases and IT. As a DBA and manager of a DB Platform team, I work with database platforms and specialize in MySQL, PostgreSQL, Oracle, MongoDB, SQL tuning, AWS, Terraform, and Python. Drawing on experience in the gaming, finance, and IT services industries, I explain database and cloud architecture. I have published 『Oracle Practical Tuning: Learning SQL Patterns』 and 『Oracle Pro*C Practical Project Guide』, and have presented on serverless architectures, database selection, and multi-database strategies at AWS Summit 2018 and 2019 and DataYa Nolja 2020. Recently, I have been working on slow-query analysis and tuning recommendations using Bedrock LLM, automated DB specification sizing, and query workflows through a DB metadata MCP server and Slack bot. I explain database automation for developers and AI applications for non-developers through hands-on exercises tailored to the audience and objectives of each course. Rather than applying AI suggestions as-is, I teach a decision-making framework that verifies result equivalence, execution plans, and observability conditions, and defers action when the supporting evidence is insufficient. Company operational data and credentials are not included in the course materials.

More

Curriculum

All

44 lectures ∙ (5hr 9min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

dorian05202988's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

Limited time deal

$56,320.00

20%

$55.00