STATECONSOLE

How to verify AI-generated code before merging

Before merging AI-generated code, review the diff, test the main flow and an edge case, check for regressions, and record what passed, failed, or still needs testing. Jump to the checklist.

1. Define what should change

Write down the behavior you expect and one thing that must stay unchanged. Record the commit or build, the environment and any data or setup another person would need to repeat the checks.

2. Run the checks that matter

  1. Read the diff. Look for unrelated edits, changed assumptions and missing test coverage.
  2. Check the main flow, an edge case and the nearest behavior that could regress. Run relevant automated checks and manually test important gaps.
  3. Keep code-review observations separate from executed checks. If an agent reports a pass, inspect its output and scope before relying on it.

3. Record what actually happened

Copy the Markdown into a pull request, task or notes file. Use one evidence record per check. Use Not tested for a check you did not run and Blocked when a missing prerequisite prevents running it. State the blocker and next action.

If you’re pausing between sessions, carry forward the checks you ran and what still needs review in the AI coding session handoff template.

QA checklist · Markdown

# QA checklist for an AI-generated change

## Before testing

- [ ] Record the commit or build, test environment, and needed fixtures.
- [ ] Write the acceptance criteria and what should stay unchanged.
- [ ] Review the diff for unrelated edits and missing coverage.

## Run checks

- [ ] Test the main flow, an edge case, and the closest regression.
- [ ] Run relevant automated checks and manually cover important gaps.
- [ ] Record what ran and what was observed; keep code-review findings separate.

## Evidence record (repeat for each check)

- Check:
- Version / environment:
- Prerequisites / steps or command:
- Expected result:
- Actual result:
- Result: Passed / Failed / Not tested / Blocked
- Evidence (output, file, or screenshot):
- Still unverified / blocker / next action:

## Merge decision

- [ ] Resolve required failures and blockers; rerun affected checks.
- [ ] Record the decision and any remaining uncertainty.

4. Worked example: CSV export

Fictional QA record: an agent changed CSV export. On a local test build, export fixture rows with columns id and name, then inspect the output and parse it as CSV. The criterion is one row per record with exactly two fields, including names containing commas. These results illustrate the format.

Passed — plain name
Expected: two fields with the name Ada. Actual: 1,Ada parsed as two fields.
Failed — name containing a comma
Expected: 2,"Design, Inc.", parsed as two fields. Actual: 2,Design, Inc. parsed as three fields. Evidence: the exported row and parsed field count.
Not tested — larger export
Expected: the exported row count matches the input. Actual: no result; the larger fixture was not run.

Decision: Hold the merge because the comma case failed. After the fix, rerun that case and the plain-name check. Keep the larger export marked as unverified until it is tested.

5. Track the result in StateConsole

In the desktop app, add checks to a Bug or QA task checklist. Under QA verification, record acceptance criteria, expected and actual results, environment and the outcome. A Bug or QA task can move from Testing to Done only after its QA result is Passed. StateConsole records the outcome you enter; it does not run tests or verify the evidence.

See the task and QA workflow for the product view, or use the project status guide to summarize the checks and what remains open in your project report.