Fix Module 4 lab so git restore . doesn't wipe the uncommitted delete feature
#2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Module 4 lab cannot be completed as written. Part B commits a clean checkpoint that does not contain the
deletecommand. Part C has the AI adddeleteacrosstasks.py/cli.pybut never commits it. Part D then makes a throwaway change and runsgit restore ., which resets all tracked files to the Part B commit — wiping the uncommitted Part Cdeletefeature along with the throwaway. So Part D's annotatedbash lab/verify.sh # still passesis false (verify.sh hard-requiresdelete, so it FAILS), and Part E's "commit the delete feature you kept in Part C" is impossible. The lab also self-contradicts the module's own "one rule" (commit before you turn the AI loose; never work on a dirty tree) — Part D runs the throwaway on top of uncommitted Part C work.Evidence
modules/04-getting-the-ai-out-of-the-browser/README.md, Part D step 8:Part E step 9: "Now commit the
deletefeature you kept in Part C (Part D's mess is already gone)".modules/04-getting-the-ai-out-of-the-browser/lab/verify.shruns"$PY" cli.py delete 1and FAILs if delete is missing.Reproduced: after
git restore ., thedeletemethod/branch is gone and verify.sh fails.Why it matters
This is the climax lab of a load-bearing Unit 1 module. Followed literally it breaks and, ironically, enacts the exact "restore wipes uncommitted work" failure the module warns against (
Where it breaks: "If you let the AI loose on a dirty tree, restore can't tell your work from its work and throws away both"). The lab's final committed state is unchanged, so Module 5 is unaffected.Proposed change
git restore .now correctly returns to the delete-containing checkpoint, sobash lab/verify.shlegitimately passes.git log --onelineto confirm the reviewed multi-file commit is the latest, plus the existing closing narrative. Do not commitdeletetwice.Acceptance criteria
deleteis committed at the end of Part C.git restore .returns to a state whereverify.shpasses (delete present).deletepresent in the final state.Affected files
modules/04-getting-the-ai-out-of-the-browser/README.mdReferences
Source finding F1 (realVotes 3/3, blocker). Related: the
bash lab/verify.shinvocation also needs the path fix in the Module 4/6/7/26 script-path issue (F6) to resolve at all.Filed from an adversarial multi-agent course review (217 raw findings → 54 adversarially-verified survivors). Scoped for manual review; intentionally not auto-assigned to an agent.