Add a .gitignore so Module 25 propose_pr's git add -A doesn't sweep __pycache__/scaffolding into the review diff #25

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

Problem

propose_pr() runs git add -A then commits, so in the simulated path it commits agent_demo.py, test_agent_demo.py, the copied orchestrator/issue files, AND __pycache__/*.pyc. The lab then tells the learner to review this "clean agent diff" with the Module 10 checklist, but it's polluted with binary .pyc noise and unrelated scaffolding (agent_runner.py, issue-delete-command.md) — undermining the central point of reviewing a clean agent contribution.

Evidence

modules/25-autonomous-agents/lab/agent_runner.py (~line 162): subprocess.run(['git','add','-A']). README Part B (~lines 257-258) tells the learner to review this diff with the Module 10 checklist.
Reproduced: Part B output includes create mode 100644 __pycache__/agent_demo.cpython-XYZ.pyc plus the lab scaffolding committed alongside the ~8-line real change.

Why it matters

The "review a clean agent contribution" lesson is undermined by binary/scaffolding noise, contradicting the course's own Module 2 git-hygiene exemplar.

Proposed change

Add a .gitignore to the lab repo (__pycache__/, .pytest_cache/, .ruff_cache/, and the copied lab scaffolding such as agent_runner.py and issue-delete-command.md), and KEEP git add -A.
Do NOT narrow staging to specific files: the Part D real-agent path can touch unknown files, where git add -A is the correct behavior. The .gitignore keeps the diff clean while preserving Part D and reinforcing Module 2 discipline.

Acceptance criteria

  • After Part B, the proposed diff contains only the relevant source/test change (no .pyc, no scaffolding).
  • git add -A is retained so Part D's real-agent path still works.

Affected files

  • modules/25-autonomous-agents/lab/ (add .gitignore), modules/25-autonomous-agents/README.md (optional note)

References

Source finding F39 (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 `propose_pr()` runs `git add -A` then commits, so in the simulated path it commits `agent_demo.py`, `test_agent_demo.py`, the copied orchestrator/issue files, AND `__pycache__/*.pyc`. The lab then tells the learner to review this "clean agent diff" with the Module 10 checklist, but it's polluted with binary `.pyc` noise and unrelated scaffolding (`agent_runner.py`, `issue-delete-command.md`) — undermining the central point of reviewing a clean agent contribution. ## Evidence `modules/25-autonomous-agents/lab/agent_runner.py` (~line 162): `subprocess.run(['git','add','-A'])`. README Part B (~lines 257-258) tells the learner to review this diff with the Module 10 checklist. Reproduced: Part B output includes `create mode 100644 __pycache__/agent_demo.cpython-XYZ.pyc` plus the lab scaffolding committed alongside the ~8-line real change. ## Why it matters The "review a clean agent contribution" lesson is undermined by binary/scaffolding noise, contradicting the course's own Module 2 git-hygiene exemplar. ## Proposed change Add a `.gitignore` to the lab repo (`__pycache__/`, `.pytest_cache/`, `.ruff_cache/`, and the copied lab scaffolding such as `agent_runner.py` and `issue-delete-command.md`), and KEEP `git add -A`. Do NOT narrow staging to specific files: the Part D real-agent path can touch unknown files, where `git add -A` is the correct behavior. The `.gitignore` keeps the diff clean while preserving Part D and reinforcing Module 2 discipline. ## Acceptance criteria - [ ] After Part B, the proposed diff contains only the relevant source/test change (no `.pyc`, no scaffolding). - [ ] `git add -A` is retained so Part D's real-agent path still works. ## Affected files - `modules/25-autonomous-agents/lab/` (add `.gitignore`), `modules/25-autonomous-agents/README.md` (optional note) ## References Source finding F39 (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:49 -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#25