Skip to content

feat: disaggregated serving-mode plumbing and coordinator skeleton - #188

Merged
inureyes merged 1 commit into
mainfrom
feature/issue-126-b2a-serving-mode-plumbing
Jun 9, 2026
Merged

inureyes merged 1 commit into
mainfrom
feature/issue-126-b2a-serving-mode-plumbing

Conversation

@inureyes

@inureyes inureyes commented Jun 9, 2026

Copy link
Copy Markdown
Member

Part of #126 (epic #116). B2a of the disaggregated serving productionization: the additive plumbing and a model-free coordinator skeleton, with the live single-node path byte-unchanged.

What

  • Thread the serving role from --node-role to the worker. build_server_config derives a ServingMode (Hybrid when the flag is absent), carried on ServerConfig through the model-provider ladder to WorkerSchedulerConfig, mirroring the kv_cache_budget / enable_vlm_prefix_cache plumbing. The worker logs a non-hybrid role and runs the standard scheduler loop unchanged.
  • Add ServingCoordinator (distributed::disaggregated::coordinator): binds a serving mode to a dyn Transport and its handoff peer, owning the transport seam (send_handoff / recv_handoff) over the B1 async byte bridge. It does not yet hold a BatchScheduler; the scheduler-driving run loop is the next step (B2b), which keeps this skeleton model-free and unit-testable over an in-process MockTransport.
  • 3 unit tests: mode/peer binding, handoff round-trip, non-handoff rejection.

Scope (dormant, additive)

Mirrors B1's additive-then-wired pattern. The serving-role coordinator that drives the scheduler over the B1 handoff hooks lands in B2b; a real network transport in B3. Until then every role runs the standard single-node loop, so Hybrid (the default) and a misconfigured single node both keep serving rather than hanging. The in-process MockTransport connects two roles only within one process (cfg(test, test-utils)), which is how a real-model 2-role handoff is exercised in B2c.

Hybrid (the default) and every existing call site stay byte-identical: the new ServerConfig / WorkerSchedulerConfig field defaults to Hybrid, and every struct-literal and spread site already resolves to it.

Verified

  • lib and tests compile (metal,accelerate)
  • coordinator unit tests pass; 1106 server lib tests pass (plumbing non-regressive)
  • cold clippy -D warnings clean on metal,accelerate and +test-utils, --all-targets
  • rustfmt clean

Part of #126 (epic #116). B2a of the disaggregated serving productionization:
additive plumbing plus a model-free coordinator skeleton, with the live
single-node path byte-unchanged.

- Thread the serving role from `--node-role` to the worker. `build_server_config`
  derives a `ServingMode` (Hybrid when the flag is absent), carried on
  `ServerConfig` through the model-provider ladder to `WorkerSchedulerConfig`.
  The worker logs a non-hybrid role and runs the standard scheduler loop
  unchanged; the serving-role coordinator that drives the scheduler over the B1
  handoff hooks lands in B2b, and a real network transport in B3.
- Add `ServingCoordinator` (distributed::disaggregated::coordinator): binds a
  serving mode to a `dyn Transport` and its handoff peer, owning the transport
  seam (`send_handoff` / `recv_handoff`) over the B1 async byte bridge. It does
  not yet hold a `BatchScheduler`; the scheduler-driving run loop is B2b, which
  keeps the skeleton model-free and unit-testable over an in-process
  `MockTransport`.
- 3 unit tests: mode/peer binding, handoff round-trip, non-handoff rejection.

Hybrid (the default) and every existing call site stay byte-identical: the new
`ServerConfig` / `WorkerSchedulerConfig` field defaults to Hybrid and every
struct-literal and spread site already resolves to it.

Verified: lib and tests compile (metal,accelerate); coordinator tests pass;
1106 server lib tests pass; cold clippy -D warnings clean (metal,accelerate and
+test-utils, --all-targets); rustfmt clean.
@inureyes
inureyes merged commit e2ae842 into main Jun 9, 2026
4 checks passed
@inureyes
inureyes deleted the feature/issue-126-b2a-serving-mode-plumbing branch June 9, 2026 05:35
@inureyes inureyes self-assigned this Jun 10, 2026
@inureyes inureyes added status:done Completed type:enhancement New features, capabilities, or significant additions priority:medium Medium priority labels Jun 10, 2026
@inureyes inureyes added this to the 0.2 milestone Jun 21, 2026
be-free-snowboy pushed a commit to freestylejs/snowbrain-mlxcel that referenced this pull request Oct 27, 2026
…ablup#188)

Part of lablup#126 (epic lablup#116). B2a of the disaggregated serving productionization:
additive plumbing plus a model-free coordinator skeleton, with the live
single-node path byte-unchanged.

- Thread the serving role from `--node-role` to the worker. `build_server_config`
  derives a `ServingMode` (Hybrid when the flag is absent), carried on
  `ServerConfig` through the model-provider ladder to `WorkerSchedulerConfig`.
  The worker logs a non-hybrid role and runs the standard scheduler loop
  unchanged; the serving-role coordinator that drives the scheduler over the B1
  handoff hooks lands in B2b, and a real network transport in B3.
- Add `ServingCoordinator` (distributed::disaggregated::coordinator): binds a
  serving mode to a `dyn Transport` and its handoff peer, owning the transport
  seam (`send_handoff` / `recv_handoff`) over the B1 async byte bridge. It does
  not yet hold a `BatchScheduler`; the scheduler-driving run loop is B2b, which
  keeps the skeleton model-free and unit-testable over an in-process
  `MockTransport`.
- 3 unit tests: mode/peer binding, handoff round-trip, non-handoff rejection.

Hybrid (the default) and every existing call site stay byte-identical: the new
`ServerConfig` / `WorkerSchedulerConfig` field defaults to Hybrid and every
struct-literal and spread site already resolves to it.

Verified: lib and tests compile (metal,accelerate); coordinator tests pass;
1106 server lib tests pass; cold clippy -D warnings clean (metal,accelerate and
+test-utils, --all-targets); rustfmt clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Medium priority status:done Completed type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant