Fix Module 14 Part C recovery: git restore is a no-op on the committed bad change, so CI never goes green
#4
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
Module 14 Part C's recovery is broken. Step 7 commits and pushes the bad
pending()change (the push is required to make CI red in step 8). Step 9 then tells the learnergit restore tasks.py"throws away the bad change (Module 2's safety net)" and "CI goes green again." Butgit restoreonly discards uncommitted edits and resets the file to HEAD — which is now the bad commit. The file keeps the bug, the follow-upgit commit -amhas nothing to commit (exits non-zero, "nothing to commit, working tree clean"), the push is empty, and CI stays red. The "(Module 2's safety net)" attribution is also wrong — Module 2 teachesrestorefor uncommitted edits only.Evidence
modules/14-continuous-integration/README.md, Part C step 9 (~lines 267-283):Reproduced: after
git restore, the file still containsreturn self.tasks;git commit -amcommits nothing; push is empty; CI stays red.Why it matters
This is the module's climactic recovery — "the whole point" — and it leaves any follower stuck at the payoff. It also misteaches
restorevs committed/pushed undo, which Module 12 explicitly distinguishes.Proposed change
Recover by actually fixing the committed code, then commit and push:
return [t for t in self.tasks if not t.done].git commit -am "Fix pending() to exclude done tasks"thengit push→ CI goes green.restorecannot undo a committed+pushed change.Acceptable alternative (course-coherent, since Module 12 precedes Module 14 and teaches revert as the team-safe undo for pushed changes):
git revert HEADthen push. Step 9's commit message already says "Revert:…", so this variant fits — but pick one and make the prose consistent.Acceptance criteria
pending()no longer containing the bug, with a real commit and push.git restoreundoes a committed/pushed change; the "(Module 2's safety net)" note is removed or corrected.Affected files
modules/14-continuous-integration/README.mdReferences
Source finding F3 (realVotes 3/3, blocker). Module 12 (revert vs restore) precedes this module.
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.