Fix Module 25 reject(): git restore . leaves the simulated agent's untracked files in place #26

Closed
opened 2026-06-22 14:23:50 -04:00 by claude · 0 comments
Contributor

Problem

When the gate fails (Part A --simulate bad), reject() prints git restore . # throw the agent's change away (Module 2). In the simulated path the agent's change is the UNTRACKED files agent_demo.py and test_agent_demo.py (plus __pycache__). git restore only touches tracked files, so it removes nothing — the bad change persists. The printed cleanup is wrong for the exact mode the lab tells learners to run first, and it misteaches the Module 2 fact it cites.

Evidence

modules/25-autonomous-agents/lab/agent_runner.py (~lines 180-182) print git restore .. simulate_implement() creates agent_demo.py/test_agent_demo.py as NEW (untracked) files.
Reproduced: after --simulate bad, git restore . leaves agent_demo.py, test_agent_demo.py, __pycache__ unchanged.

Why it matters

The first-run mode the module promotes demonstrates a git fact that is false, undermining a Module-2 safety-net teaching in a course that promises honesty.

Proposed change

Make the printed/instructed cleanup match what actually discards the change:

  1. For the simulated path, have the simulator clean up its own demo artifacts on reject (or print a targeted rm agent_demo.py test_agent_demo.py).
  2. Keep git restore . only for the real-agent path that edits tracked files, with accurate wording.
    Do NOT use git clean -fd: it is over-broad (deletes all untracked files in the learner's repo) and would carry a "(Module 2)" callback to a command Module 2 never teaches.

Acceptance criteria

  • After a --simulate bad reject, the demo change is actually gone.
  • Any "(Module 2)" attribution only appears next to a command Module 2 taught (git restore on tracked edits).

Affected files

  • modules/25-autonomous-agents/lab/agent_runner.py

References

Source finding F40 (realVotes 3/3).


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.

## Problem When the gate fails (Part A `--simulate bad`), `reject()` prints `git restore . # throw the agent's change away (Module 2)`. In the simulated path the agent's change is the UNTRACKED files `agent_demo.py` and `test_agent_demo.py` (plus `__pycache__`). `git restore` only touches tracked files, so it removes nothing — the bad change persists. The printed cleanup is wrong for the exact mode the lab tells learners to run first, and it misteaches the Module 2 fact it cites. ## Evidence `modules/25-autonomous-agents/lab/agent_runner.py` (~lines 180-182) print `git restore .`. `simulate_implement()` creates `agent_demo.py`/`test_agent_demo.py` as NEW (untracked) files. Reproduced: after `--simulate bad`, `git restore .` leaves `agent_demo.py`, `test_agent_demo.py`, `__pycache__` unchanged. ## Why it matters The first-run mode the module promotes demonstrates a git fact that is false, undermining a Module-2 safety-net teaching in a course that promises honesty. ## Proposed change Make the printed/instructed cleanup match what actually discards the change: 1. For the simulated path, have the simulator clean up its own demo artifacts on reject (or print a targeted `rm agent_demo.py test_agent_demo.py`). 2. Keep `git restore .` only for the real-agent path that edits tracked files, with accurate wording. Do NOT use `git clean -fd`: it is over-broad (deletes all untracked files in the learner's repo) and would carry a "(Module 2)" callback to a command Module 2 never teaches. ## Acceptance criteria - [ ] After a `--simulate bad` reject, the demo change is actually gone. - [ ] Any "(Module 2)" attribution only appears next to a command Module 2 taught (`git restore` on tracked edits). ## Affected files - `modules/25-autonomous-agents/lab/agent_runner.py` ## References Source finding F40 (realVotes 3/3). --- *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.*
claude added the ai-readybugP1 labels 2026-06-22 14:23:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: justin/ai-workflow-course#26