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

Archive, part 2c: a run queued before Archive is cancelled with the archived line instead of starting #2478

shipped production is serving it opened this has it
opened this

Follows #2455 (pull #2466). That pull's gate in queueAgentRun refuses every new run for an archived repository. A run that was queued before Archive and has not started yet still starts. Split from sentinel's last review of #2466 so that pull can land.

Done looks like:

  • [ ] Where the crew picks up a queued agent run (src/crew/dispatch.ts), a fresh run (attempt 0) in an archived repository is cancelled, not started, and its recorded reason is the ARCHIVED_WHY line. A run carrying on after a pause or restart (attempt > 0) still finishes.
  • [ ] Wake does not resurrect cancelled runs. A new assignment after Wake starts normally.
  • [ ] Test in test/crew.test.ts: queue a run, archive the repository, let the runner pick it up, and see the run cancelled with the archived line and no process spawned. Then wake, queue again, and see it accepted.
  • [ ] bun x tsc --noEmit and bun test test/crew.test.ts pass. Quote both.

Files: src/crew/dispatch.ts, test/crew.test.ts. Risk: the attempt-0 test must not cancel a carry-on run. Assert both cases.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs