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

A crew clone that fails on a broken mirror drops the mirror and clones plain, so one bad object never stops a run #5109

shipped production is serving it opened this has it
opened this

Intent: a damaged repository mirror under <data>/crew/.mirrors/<repo id> must cost one slower clone, never a run. Twice today (#5104) a builder's run ended at clone failed: fatal: unable to parse commit 4307b2d9… Clone succeeded, but checkout failed: cloneWithMirror (src/crew/mirror.ts) borrowed from a mirror holding a bad object and gave up.

Done:

  • [ ] In cloneWithMirror, when the --reference-if-able … --dissociate clone fails and the signal is not aborted, the partial dir is removed, the mirror is removed (inside the same exclusive chain), a warning is logged with the repository id and git's first line, and a plain git clone is tried once; its result is the answer
  • [ ] A cancelled clone still answers at once without retrying
  • [ ] Test (test/crew-mirror*.test.ts or a new one): build a mirror, corrupt one loose object or pack in it, call cloneWithMirror; the clone succeeds, checks out HEAD, and the mirror directory is gone (rebuilt on the next call). The test fails on today's main

Files: src/crew/mirror.ts, one test. Risk: never remove a mirror while another clone reads it — keep everything inside exclusive.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs