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

A run queued again after a restart is not charged again for the minutes the interrupted run already paid #11582

open not picked up yet opened this
opened this

Intent: an interruption costs the owner its minutes once, not twice. Second third of #11560.

Done:

  • [ ] read how a run's minutes reach the credit (src/core/cost.ts costOf and its callers) and make the run that carries on after an interruption count only its own minutes, so the interrupted run is counted once
  • [ ] a test in test/crew-stopped-twice.test.ts (in-process, no servers): an interrupted run then its follow-up are charged the sum of their own minutes, never the first twice; fails without the change
  • [ ] bun x tsc --noEmit and the touched tests pass in the sandbox before the push

Files: src/core/cost.ts or the one module that charges a run, test/crew-stopped-twice.test.ts. Risks: if the ledger already counts each run once, say so with the test as proof, and the pull is the test alone. Suggested brief: scout.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs