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

An outside runner picks up a new forge build between jobs, never mid-job #17099

opened this

Merged 42h 58m ago, live in production

The owner approved running check runners outside the forge's container. Such a runner outlives a release, so it must restart itself onto the new code without cutting a job.

Notes

opened this

The owner approved running check runners outside the forge's container. Such a runner outlives a release, so it must restart itself onto the new code without cutting a job.

  • The forge names its build in every claim answer, a job or the empty 204, as the x-forge-build header (buildOf: 0.7.684+a1b2c3d, or the version alone).
  • src/runner/main.ts keeps the first build it hears. When a later answer names another, no slot claims again and any claim waiting at the forge is let go. A job in hand is run and reported first, including one claimed on the new build. Then runRunner returns { upgraded: true }, and main logs both builds and exits 0.
  • FORGE_RUNNER_EXIT_ON_UPGRADE is on unless set to 0. The forge's own children (runner_pool.ts) run with it off, because they restart with the forge.
  • docs/features/runners.md describes it, plus the host pattern: a container with --restart=no, recreated from the current image by a timer once it has exited.

Try: POST /api/v1/runner/claim with a runner token and {"wait":0}; the 204 carries x-forge-build naming the preview's build Direction: a runner's work outlives a forge restart (#16990) No door: a runner-to-forge protocol header and a runner flag; no page, API route or terminal surface for people Replaces: nothing; runners outside the container are new (#17096)

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs