A node's worker label is worker, so a device is only a paired one

- NodeDef `device`/`device_policy` become `worker`/`worker_policy`, the
  issue `ignored_device` becomes `ignored_worker`, and the SDK's `@node`
  takes `worker=` and `worker_policy=`
- FlowStore._migrate renames the keys in published and draft documents
  once, bumping their version; a queued run's `needs` reads the old key
- placement passes the label as `label`, client regenerated
- docs: worker placement wording, MCP issuer without DOMAIN, device rows in
  the CLI data directory and the API table, device links in compose comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Melvin Strobl
2026-10-16 16:56:05 +02:00
co-authored by Claude Opus 5.5
parent f8011d2a8a
commit a9d453c9d9
40 changed files with 215 additions and 178 deletions
+8 -8
View File
@@ -378,23 +378,23 @@ def test_the_digest_identifies_the_inputs_not_their_order():
assert digest_of({"a": 1}, 3) != digest_of({"a": 1}, 4)
def test_labels_come_from_the_nodes_that_ask_for_a_device():
def test_labels_come_from_the_nodes_that_ask_for_a_worker():
flow = double_flow()
assert required_labels(flow) == []
flow.nodes[0].device = "gpu"
flow.nodes[0].worker = "gpu"
assert required_labels(flow) == ["gpu"]
def test_a_preferred_device_does_not_hold_a_run_back():
def test_a_preferred_worker_does_not_hold_a_run_back():
flow = double_flow()
flow.nodes[0].device = "gpu"
flow.nodes[0].device_policy = "prefer"
flow.nodes[0].worker = "gpu"
flow.nodes[0].worker_policy = "prefer"
# It runs on the engine when no such worker is attached, so waiting for
# one would be waiting for something the run does not need.
assert required_labels(flow) == []
def test_a_device_on_a_node_no_worker_could_run_is_not_waited_for():
def test_a_worker_on_a_node_no_worker_could_run_is_not_waited_for():
"""A connector is an entry point loaded here, so a worker cannot take it.
Holding the run for one is a run that never starts — and it looked exactly
@@ -402,7 +402,7 @@ def test_a_device_on_a_node_no_worker_could_run_is_not_waited_for():
"""
flow = double_flow()
flow.nodes[0].type = "mqtt"
flow.nodes[0].device = "gpu"
flow.nodes[0].worker = "gpu"
assert required_labels(flow) == []
@@ -416,7 +416,7 @@ def test_what_a_run_needs_is_the_largest_single_machine_it_asks_for():
"cpus": 8,
"gpus": 1,
"ram_mb": 0,
"device": "",
"worker": "",
}