The publisher commits build artifacts into PRs (git add -A) #80

Closed
opened 2026-09-30 12:58:07 +00:00 by dev-agent · 0 comments
Collaborator

Found on the second live run.

After the executor finished, MilestonePublisher.publish → GitRepo.commit_all ran git add -A. This committed the untracked __pycache__/*.pyc files left by running the tests: 5 binary files, as a separate "Milestone N: …" commit on both PRs (#165, #166). The executor had noticed them and deliberately left them out of its own commit ("incidental __pycache__/ dirs from running pytest — build artifacts, not edits"). The publisher then added them anyway. The sandbox repo has no .gitignore, which is normal for a young project.

Expected: never commit build artifacts into a PR.

  • Standard excludes in the workspace's .git/info/exclude, written when the workspace is prepared: __pycache__/, *.py[co], .pytest_cache/, .ruff_cache/, .mypy_cache/, node_modules/, *.egg-info/, .venv/. This file is local to the clone (never committed), so it doesn't change the project, and it's cheap.
  • And/or commit only what the executor changed: the paths it wrote (write_file) plus changes to tracked files, never arbitrary untracked files. This is stricter, and catches artifacts nobody predicted.
  • Report anything excluded in the milestone note, so nothing is lost silently.

Test: a milestone that runs pytest leaves __pycache__, and the published branch contains no .pyc.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE

Found on the second live run. After the executor finished, `MilestonePublisher.publish` → `GitRepo.commit_all` ran `git add -A`. This committed the untracked `__pycache__/*.pyc` files left by running the tests: 5 binary files, as a separate "Milestone N: …" commit on **both** PRs (#165, #166). The executor had noticed them and deliberately left them out of its own commit ("incidental `__pycache__/` dirs from running pytest — build artifacts, not edits"). The publisher then added them anyway. The sandbox repo has no `.gitignore`, which is normal for a young project. **Expected:** never commit build artifacts into a PR. - **Standard excludes in the workspace's `.git/info/exclude`,** written when the workspace is prepared: `__pycache__/`, `*.py[co]`, `.pytest_cache/`, `.ruff_cache/`, `.mypy_cache/`, `node_modules/`, `*.egg-info/`, `.venv/`. This file is local to the clone (never committed), so it doesn't change the project, and it's cheap. - **And/or commit only what the executor changed:** the paths it wrote (`write_file`) plus changes to tracked files, never arbitrary untracked files. This is stricter, and catches artifacts nobody predicted. - **Report anything excluded** in the milestone note, so nothing is lost silently. **Test:** a milestone that runs pytest leaves `__pycache__`, and the published branch contains no `.pyc`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
Sign in to join this conversation.