A virtualenv in the worktree stops every checkpoint and is committed into the pull request #105

Closed
opened 2026-09-29 00:05:49 -04:00 by cmoriarty · 1 comment
Owner

What happened

Run #26 on production (cmoriarty/scratch, "When the hand ends…") failed at git.commit.feature, and resuming it fails again with 0 commit(s) since entry, wanted 1.

  1. During openspec.apply[1] the agent made a .venv in the worktree to run the tests. The repository has no .gitignore, so its ~3,090 files are untracked rather than ignored.
  2. From then on no checkpoint was written. openspec.apply[1] has its entry checkpoint and no exit; apply[2], apply[3], agent.reconcile-tasks, agent.test.unit and git.commit.feature#1 have none. A checkpoint commit's message carries the untracked manifest and is passed to git commit-tree -m as one argument. The .venv paths alone come to 230,824 bytes, and Linux refuses any single argument over 131,072 (MAX_ARG_STRLEN), so each checkpoint failed ("Argument list too long"), was logged, and was skipped.
  3. git.commit.feature#1 then committed the whole worktree (git add -A): 3,126 files and 550,174 insertions, 3,090 of them the virtualenv. With no entry checkpoint its git-advanced check could not be evaluated, so the step failed after its commit had already landed.
  4. Resume (attempt 2) had nothing to roll back to, found nothing left to commit, and failed 0 commit(s) since entry, wanted 1.

Expected

  • A checkpoint is written however many untracked files the worktree holds.
  • A virtualenv, node_modules or tool cache that an agent creates in the worktree is never committed into the run's pull request, and is left out of checkpoints.

Related: #67 (the disk footprint of the same installs).

## What happened Run #26 on production (cmoriarty/scratch, "When the hand ends…") failed at `git.commit.feature`, and resuming it fails again with `0 commit(s) since entry, wanted 1`. 1. During `openspec.apply[1]` the agent made a `.venv` in the worktree to run the tests. The repository has no `.gitignore`, so its ~3,090 files are untracked rather than ignored. 2. From then on no checkpoint was written. `openspec.apply[1]` has its entry checkpoint and no exit; `apply[2]`, `apply[3]`, `agent.reconcile-tasks`, `agent.test.unit` and `git.commit.feature#1` have none. A checkpoint commit's message carries the untracked manifest and is passed to `git commit-tree -m` as one argument. The `.venv` paths alone come to 230,824 bytes, and Linux refuses any single argument over 131,072 (MAX_ARG_STRLEN), so each checkpoint failed ("Argument list too long"), was logged, and was skipped. 3. `git.commit.feature#1` then committed the whole worktree (`git add -A`): 3,126 files and 550,174 insertions, 3,090 of them the virtualenv. With no entry checkpoint its `git-advanced` check could not be evaluated, so the step failed after its commit had already landed. 4. Resume (attempt 2) had nothing to roll back to, found nothing left to commit, and failed `0 commit(s) since entry, wanted 1`. ## Expected - A checkpoint is written however many untracked files the worktree holds. - A virtualenv, `node_modules` or tool cache that an agent creates in the worktree is never committed into the run's pull request, and is left out of checkpoints. Related: #67 (the disk footprint of the same installs).
Author
Owner

Shipped in 4a6a643, as the OpenSpec change worktree-environments (now archived; its requirements are the new run-worktree spec).

  • Checkpoints of any size. A checkpoint's commit message, which carries the untracked-file manifest, now goes to git commit-tree -F - on stdin, and a scoped rollback's paths go to git reset --pathspec-from-file. Neither is limited any more by Linux's 128 KiB cap per argument. Run #26's checkpoints failed there (E2BIG) once the agent had made a 3,090-file .venv. Tests: a checkpoint of 1,500 untracked files with over 1 MB of paths, and a scoped rollback of 1,500 paths. Both fail on the old code.
  • Environments stay out. At admission, a run's worktree gets a block in .git/info/exclude: .venv/, venv/, node_modules/, __pycache__/, *.py[cod], .pytest_cache/, .mypy_cache/ and .ruff_cache/. An environment an agent creates stays out of the run's commits and checkpoints. Files the repository already tracks are still committed.
  • Verified on production after deploying 4b5a4f4: a new run on cmoriarty/scratch got the block in its worktree, and git check-ignore leaves out .venv/, node_modules/ and __pycache__/ there.

Run #26 can't be resumed cleanly. Its feature commit 0b53f1d already contains the .venv, and its first attempt at git.commit.feature has no entry checkpoint to roll back to. So the retry finds nothing new to commit, and "one commit since entry" fails.

Shipped in 4a6a643, as the OpenSpec change `worktree-environments` (now archived; its requirements are the new `run-worktree` spec). - **Checkpoints of any size.** A checkpoint's commit message, which carries the untracked-file manifest, now goes to `git commit-tree -F -` on stdin, and a scoped rollback's paths go to `git reset --pathspec-from-file`. Neither is limited any more by Linux's 128 KiB cap per argument. Run #26's checkpoints failed there (`E2BIG`) once the agent had made a 3,090-file `.venv`. Tests: a checkpoint of 1,500 untracked files with over 1 MB of paths, and a scoped rollback of 1,500 paths. Both fail on the old code. - **Environments stay out.** At admission, a run's worktree gets a block in `.git/info/exclude`: `.venv/`, `venv/`, `node_modules/`, `__pycache__/`, `*.py[cod]`, `.pytest_cache/`, `.mypy_cache/` and `.ruff_cache/`. An environment an agent creates stays out of the run's commits and checkpoints. Files the repository already tracks are still committed. - **Verified on production** after deploying 4b5a4f4: a new run on `cmoriarty/scratch` got the block in its worktree, and `git check-ignore` leaves out `.venv/`, `node_modules/` and `__pycache__/` there. Run #26 can't be resumed cleanly. Its feature commit `0b53f1d` already contains the `.venv`, and its first attempt at `git.commit.feature` has no entry checkpoint to roll back to. So the retry finds nothing new to commit, and "one commit since entry" fails.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cmoriarty/braid#105
No description provided.