Hands-on with the OpenAI Codex App · Challenge 03 · 中文版

Lesson 3: The bounded change, reviewed hunk by hunk

Checkpoint l0310 ptsgated by test suiteOpenAI Codex desktop app

Drive the starter to green through bounded turns — and use the app's diff review and approvals to keep every change yours.

Six agent-tool courses share this challenge. OpenAI Codex desktop app-specific steps are still being written — until they land and pass review, this page defers its canonical to the primary course's copy.

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-with-openai-codex`.

Lesson 3: The bounded change, reviewed hunk by hunk

Objective

The starter passes all nine tests through a sequence of bounded changes, and you can explain every diff the agent produced without reading the solution first.

Why this lesson exists

This is the lesson people skip — and the one that builds the actual skill. Letting a thread rewrite the file in one shot teaches you nothing and gives you a diff you cannot honestly review. Supervising small diffs, each pinned to a contract line, is how the code stays yours. The Codex app’s approval model exists for exactly this: commands ask before they run, and edits land as reviewable diffs.

The lesson

Start a fresh thread (a finished task’s thread carries stale context) and say:

“Work through TASK.md against starter/report_tool.py. One failing test group at a time: JSON loading, then validation isolation, then rounding, then atomic writes, then the end-to-end tests. After each group, run python verify.py starter and show me the diff before continuing.”

Hold it to the contract’s boundaries:

  • Only starter/report_tool.py changes. If a diff touches tests/, solution/, or scenario/, stop and ask why.
  • No new imports outside the standard library — and no import that is not needed by the change being made.
  • Each change should move toward one contract line. Reject drive-by refactors (“while I was here I renamed…”).
  • If the agent wants to change a test, the answer is no. Tests are the contract; the code moves.

Use the approval prompts deliberately. When the agent proposes a command, read it — python verify.py starter is safe; pip install anything is a stop sign. When it edits a file, open the diff view and read every hunk before accepting. A diff you cannot explain is a diff you reject.

Expect the failing count to drop group by group: 7 → 5 → 4 → 3 → 2 → 0.

Exercise

Pick one hunk the agent produced — ideally the validation-isolation change — and explain it back in the thread: “line N does X; that satisfies contract line Y.” If you cannot, ask the agent to walk you through its own diff before accepting the next change.

Checkpoint

Run python verify.py. This checkpoint’s code appears only when the starter suite is green. You pass the lesson when you can answer:

  1. How many turns did the bounded change take, and what made each turn bounded?
  2. Which approval prompt did you reject or narrow, and why?
  3. Point at the hunk that implements “isolate invalid rows with reasons” — where is it?

Expected evidence

A green python verify.py starter run, and your hunk-by-hunk explanation of the change that earned it.

Hints

Stuck? Open one at a time.

Hint 1 — What this checkpoint tests

That the starter passes all nine tests through changes you supervised — python verify.py shows this code only once the starter suite is green.

Hint 2 — Approvals are the boundary

The app asks before running commands and shows each file diff before it lands. Read the command, read the diff — approving blind is how bounded work becomes a rewrite.

Hint 3 — When you are done

Every diff maps to a contract line, and you can explain each one without opening solution/.

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 with the OpenAI Codex App" (course id course-codex-cli), checkpoint l03.
Machine-readable brief: https://flypython.com/api/challenges/hands-on-with-openai-codex
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 l03, 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-with-openai-codex","checkpoint":"l03","code":"<8-char code>"}]}'

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

Files

The starter and verifier

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