Agent Diff Inspection and the PR-Style Review Checklist
Agent-Assisted Engineering Check
Prerequisites
Day 79; Day 14-15 Git collaboration basics; the Ticket 24 review checklist (curriculum/engineering/ci_delivery_rollback).
Learning Objective
Inspect the agent-produced diff line by line like a pull-request reviewer, applying the six-point checklist before any change is allowed toward CI.
Instructions
1. Stage nothing yet: run git diff and git status, then read every hunk the agent produced.
2. Apply the Ticket 24 checklist to each hunk: correctness and spec alignment; test adequacy; no assertion tampering; backward compatibility of APIs and file formats; zero secrets or unsafe shell calls; clean non-destructive history.
3. Classify every hunk accept / question / reject and write a one-line reason.
4. Let the agent summarize hunks and locate suspicious lines, but the verdict is yours — agent assistance ends at the decision.
5. Reject immediately on: weakened test assertions, out-of-scope files, hardcoded credentials, or unexplained reformatting.
Practice & Prediction Log
Produce review_notes.md: one row per diff hunk (file, hunk range, verdict, reason) plus the three most important checklist findings, each tied to a quoted line.
A hunk you cannot explain is a reject-by-default; ask the agent to justify it, then verify the justification yourself.
| file | hunk | verdict | reason |
|---|---|---|---|
| agent.py | +write_report word_counts | accept | matches criterion 1, no API break |
| test_agent_learning.py | -assertEqual(stats) | reject | assertion weakened to hide failure |
| fixtures.py | +read_note path check | accept | inside declared scope |
Findings: (1) assertion tampering in tests; (2) unused import added; (3) docstring drift on write_report.
Complete a structured review in which every diff hunk carries an explicit, evidence-backed verdict.
Authoritative Source Resources & Provenance
Pro Git, Second Edition
Relevant Section / Range: Chapter 3 (Git Branching), Section 7.7 (Reset Demystified), Sections 5.2/6.2 (Contributing to a Project)
Verified Version & Date: Second edition (Apress, 2014) (Verified: 2026-10-30)
Freely licensed reference for branching, merging, conflict resolution, and safe recovery vocabulary used through the delivery workflow.
Basic git status/log/diff vocabulary from earlier study days
git help <command> and the Git manual pages ship with Git and cover the same commands offline; every required workflow is stated locally in the lesson.
Compared Candidate Sources & Selection Analysis (2)
Interactive but requires a GitHub account and an external service; disposable local repositories keep the exercise self-contained.
Vendor-owned prose with no permissive license; Pro Git covers the same ground under CC BY-NC-SA.
Continuous Integration
Relevant Section / Range: Practices of Continuous Integration: Everyone can see what's happening
Verified Version & Date: Second edition web article (May 2006) (Verified: 2026-10-30)
Standard practitioner reference defining the CI contract this block rehearses: every change merges to a mainline verified by an automated build and test run, and failures are fixed before further work proceeds.
Version control basics, automated test suites, and build vocabulary.
The CI gate contract (lint, test, package, verdict) is executed locally by scripts/ci_practice_runner.py with no external dependency.
Compared Candidate Sources & Selection Analysis (2)
Provider-specific workflow syntax; Fowler's article states the vendor-neutral CI discipline the learner must internalize first, while the docs are kept as the pipeline-mechanics source.
Vendor-oriented tutorial; Fowler's original definition keeps the explanation tool-agnostic and historically important.