Hands-on Python with Claude Code · Challenge 04 · 中文版

Lesson 4: Verify like an engineer, review like a skeptic

Checkpoint l0410 ptsgated by test suiteClaude Code 2.x

Run the full verification loop, review the agent's diff for scope and side effects, and record what you did — and did not — prove.

Doing this with your agent? One sentence starts the whole course:

Read https://flypython.com/skills/flypython/SKILL.md and start the FlyPython course `hands-on-python-with-claude-code`.

Lesson 4: Verify like an engineer, review like a skeptic

Objective

You complete the full evidence loop — verify both directions, exercise all three scenario skins end to end, review the final diff for scope creep and side effects — and write a three-line verification record that says what is proven and what is not.

Why this lesson exists

“Tests pass” is the beginning of verification, not the end. The suite pins nine behaviors. It does not tell you whether the agent edited files it should not have, whether the tool leaves junk behind on real data, or whether the report numbers are right for your domain. That judgment is the part that stays human.

The lesson

Run the whole loop, in order:

python verify.py starter          # your finished implementation: 9/9
python verify.py solution         # reviewed reference: 9/9
git diff --stat                   # (or your tool's equivalent) what actually changed?

Then run the tool like a user, once per skin (each writes report.json inside its scenario folder — check .gitignore handles it, then inspect the output):

python starter/report_tool.py scenario/excel-report
python starter/report_tool.py scenario/data-monitor
python starter/report_tool.py scenario/api-tool

Check three things in each report.json: total = valid + invalid, every errors[i].reason names a real row you can find in the data file, and one group total you recompute by hand.

Now the skeptic’s diff review. For every change the agent made beyond the contract lines, ask: which test forced this? If the answer is “none”, it is scope creep — revert it and rerun the suite. Also check for side effects the tests cannot see: files created outside scenario/, network calls (there should be zero), and behavior on an empty data file (try it — what happens?).

Exercise

Write the verification record. Three lines, honest:

Verified: <commands run, date, result>
Not verified: <what the suite does not cover — e.g. encoding of real exports, huge files>
Known limits: <what would make this break — e.g. schema change in the source system>

Compare it with REVIEW.md at the course root — same discipline, maintainer version.

Checkpoint

You pass when: all three skins run clean, your hand-check of one group total matches, the diff review found (and reverted) at least one piece of unforced scope — or you can defend why every change was forced — and your three-line record exists.

Expected evidence

The verification record, the git diff --stat output, and one hand-checked group total. This is the artifact you would attach to a real change.

Hints

Stuck? Open one at a time.

Hint 1 — What this checkpoint tests

Both suites: your starter passes, and you demonstrate you can review evidence rather than only produce green.

Hint 2 — Exercise all three skins

Run run_scenario over every scenario folder — csv and json inputs plus the error paths. Then review your diff against the contract: any function doing more than its contract line is scope creep.

Hint 3 — The skeptic part

If the suite is green but you cannot explain a diff, that is the real failure. Re-read the change before claiming — the claim code says you verified, not that the tests did.

Submit

Done? Record it.

The 8-character code verify.py progress printed for this checkpoint — from the browser, or straight from your agent.

Youbrowser

Submit the claim code

Your agentauto-submit

Let the agent solve and submit

Hand it this checkpoint (copy button on hover) — it solves, verifies, and submits on its own:

Work on the FlyPython challenge "Hands-on Python with Claude Code" (course id course-claude-code), checkpoint l04.
Machine-readable brief: https://flypython.com/api/challenges/hands-on-python-with-claude-code
Open the course folder and read TASK.md first — it is the contract.
Rules: smallest change, no new dependencies, never edit tests/ or solution/.
Check with python verify.py until its gates pass, then report each claim code to me.
Target: solve only checkpoint l04, and submit it as soon as it passes.

With a token from your agent page (env FLYPYTHON_TOKEN), it records the result directly:

curl -X POST https://flypython.com/api/claims \
  -H "Authorization: Bearer $FLYPYTHON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"claims":[{"course":"hands-on-python-with-claude-code","checkpoint":"l04","code":"<8-char code>"}]}'

Or install the full FlyPython agent skill once and skip the paste.

Official demo · Pro

Watch how a human runs this challenge

An official walk-through of this exact checkpoint — the task-contract handoff, the moment the agent is stopped, the uncut failure correction, the verify.py gates. Included in Pro; there is no free preview, and the challenge itself stays free.

Files

The starter and verifier

Solving runs on your machine — your agent fetches the course files itself via /api/challenges/hands-on-python-with-claude-code/files; you download nothing by hand. Prefer reading the source? Browse the folder on GitHub ↗