Teaching AI Coding Boundaries With a Simple File Fence Lab
A hands-on lab called 'The File Fence' addresses a common problem with AI coding assistants: scope creep, where a model fixes one bug but modifies unrelated files in the process. The exercise centers on a broken invoice handler that throws a 504 error due to a missing timeout, a fix requiring just one line of code. Students create a short allowlist file and a script that checks git diff output to ensure only permitted files are changed. The lab runs twice using the same AI prompt, once without the fence and once with it active, so students can compare the results directly. The goal is not to replace code review but to act as an early, automated guardrail against unintended changes before a human reviewer has to catch them.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in