ref:main

runner: --dedicated flag + fix labels array handling #51

open colechristensen cole.christensen@gmail.com wants to merge feat/dedicated-runner-flag into main

Companion to fangorn/anvil#362 / anvil PR #225 (dedicated runners so a deploy runner can live safely on the production host).

  • anvil runner configure --dedicated — registers the runner with dedicated: true; the server then only hands it jobs whose runs_on names one of its user labels.
  • anvil runner update <ID> --dedicated true|false — flips the flag on an existing runner.
  • Fix: runner update --labels sent a comma-joined string where the server’s labels array column expects a JSON array — every labels update 422’d with a cast error.
  • Fix: runner list/runner view read labels with as_str(), but the server sends an array — the LABELS column always rendered empty (this is why the fleet looked label-less while diagnosing the stuck deploy-prod job). view also shows Dedicated: yes when set.

Testing: cargo fmt, cargo clippy --all-targets clean, cargo test 27 passed. Verified against the live server that --json runner list shows the real label arrays the table was dropping.

🤖 Generated with Claude Code

Created Jul 24, 2026 at 18:26 UTC