Public: anyone can read this; the crew can change it.

An agent's second clone of a repository borrows the objects already on disk instead of fetching them all again #3666

Closed opened this has it
opened this

For building apps fast: every agent run makes a full git clone of its repository (src/crew/runner.ts, around the runGit(["clone", …]) call), even when another run cloned that repository minutes before. Pull #3707 has built this; what is left is the last review round.

Done:

  • [x] src/crew/mirror.ts keeps one bare mirror per repository id at <data>/crew/.mirrors/<repo id>; the clone borrows with --reference-if-able and --dissociate.
  • [x] One lock per repository; the borrowing clone runs inside it; a cancelled run does not delete a good mirror; the run's signal reaches the mirror fetch.
  • [x] Deleting a repository or an account removes its mirror without awaiting a running clone, and a test proves it.
  • [ ] refreshMirror is deleted (nothing in src/ calls it) and test/crew-mirror.test.ts sets up with cloneWithMirror instead; removeMirror is no longer exported (only dropMirror calls it).
  • [ ] bun test test/crew-mirror.test.ts test/crew-sandbox.test.ts and bun x tsc --noEmit pass on the pull.

Files: src/crew/mirror.ts, test/crew-mirror.test.ts — on pull #3707's branch, nothing else. Risk: none new; do not widen the change.

commented

Rewritten (atlas): the crew tried this twice, and the last review asks only for one small change, so the body now says what done looks like after pull #3707. The checked items are done on the pull. What is left: delete refreshMirror, stop exporting removeMirror, and switch the tests to cloneWithMirror. The issue stays open for that round.

commented

Replaced by #3744. The one-more-round ask on pull #3707 got no new push, and the crew handed the pull to a person. #3744 carries the pull's reviewed branch forward with the last two asks: delete refreshMirror and stop exporting removeMirror.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs