Skip to content

feat(inference): InferenceCoordinatorModule — stand up the lane coordinator + register its pool with the production broker (slice 4) - #1619

Merged
joelteply merged 2 commits into
canaryfrom
feat/inference-coordinator-module
Jun 14, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/inference-coordinator-module

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Slice 4 — the last-mile production wiring. The InferenceCoordinator, its evict_under_pressure walk, and the CoordinatorResourcePool bridge (ResourcePool::evict_at_least → evict_under_pressure) were all built + unit-tested, but nothing stood the coordinator up in production or registered its pool with the live PressureBroker — so the broker tick never drove lane eviction. This closes that gap.

Per Joel: "It lies in continuum as a service module yes."

New module — modules/inference_coordinator_module.rs

A ServiceModule mirroring pressure_broker_module.rs:

  • owns the single Arc<InferenceCoordinator>,
  • coordinator() getter (so the handle module can later share the same instance),
  • register_with_broker() wraps it as a CoordinatorResourcePool and registers it on the broker.
  • No command surface, no own tick — the broker drives eviction on its existing 5s tick.

Boot wiring

  • ipc/mod.rs: registered right after PressureBrokerModule; its pool registered inside the same broker block as the disk/memory pools.
  • runtime.rs MODULES manifest: ("inference-coordinator", Core) so the boot-time A.2.2 cross-check stays honest.
  • modules/mod.rs: declared.

Scope (honest)

This arms the pressure→eviction loop in production. It stays inert (usage 0 → Normal tier → broker no-ops) until opens route through this coordinator — the explicit next slice, which intersects the "handle_module isn't prod-registered today, only InferenceModule is" question (surfacing before building).

Validation (rust:1.95, continuum-core --lib)

test result: ok. 3 passed; 0 failed (config contract, single-instance getter, pool-registration puts inference-lanes on the broker) · whole lib compiles (ipc + runtime + module) · CARGO_EXIT=0.

🤖 Generated with Claude Code

…inator + register its pool with the production broker (slice 4)

Closes the last-mile wiring gap on the realistic-lane build: the
InferenceCoordinator, its `evict_under_pressure` walk, and the
`CoordinatorResourcePool` bridge were all built + unit-tested, but nothing
stood the coordinator up in production or registered its pool with the live
PressureBroker. Without that, the broker tick never drove lane eviction.

New `modules/inference_coordinator_module.rs` (ServiceModule, mirrors
`pressure_broker_module.rs`): owns the single `Arc<InferenceCoordinator>`,
exposes `coordinator()` (so the handle module can later share the same
instance) and `register_with_broker()` (wraps it as a
`CoordinatorResourcePool` and registers it). No command surface, no own
tick — the broker drives eviction on its existing 5s tick.

Boot wiring (ipc/mod.rs): registered right after PressureBrokerModule; its
pool registered inside the same broker block as the disk/memory pools.
Manifest (runtime.rs MODULES): added ("inference-coordinator", Core) so the
boot-time A.2.2 cross-check stays honest. modules/mod.rs: declared.

Per Joel (2026-06-14): "It lies in continuum as a service module yes."

Scope: this ARMS the pressure→eviction loop in production. It stays inert
(usage 0 → Normal tier → broker no-ops) until opens route through this
coordinator — the explicit follow-up slice, which intersects the
"handle_module isn't prod-registered today, only InferenceModule is"
question (to surface before building).

Validated rust:1.95 (continuum-core --lib): 3 module tests pass (config
contract, single-instance getter, pool-registration), whole lib compiles
(ipc + runtime + module), CARGO_EXIT=0.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…wer nit, #1619)

Mirrors the parent broker-fetch failure log — a load-bearing registration
that silently no-ops would hide the lane pool from pressure relief.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit 5591719 into canary Jun 14, 2026
@joelteply
joelteply deleted the feat/inference-coordinator-module branch June 14, 2026 22:49
joelteply added a commit that referenced this pull request Jun 15, 2026
…ifiedMemory CPU-floor default (#1628)

* feat(inference): coordinator detects hardware silicon — retire the UnifiedMemory CPU-floor default

Joel flagged the InferenceCoordinatorModule (#1619) shipping
`TargetSilicon::UnifiedMemory` as the production default — the CPU/Mac-floor
anchoring "GPU or bust" forbids. This wires the coordinator to the
governor's existing hardware detection (Mac's #1335 hw_probe +
classify_hardware, already on canary) so the prod default FOLLOWS the
hardware instead of a hardcoded floor.

- `coordinator_silicon_for(GovernorSilicon) -> TargetSilicon` — the seam
  between governor classification and the lane scheduler: AppleM →
  UnifiedMemory; NvidiaCuda/AmdRocm/IntelVulkan → Gpu; None → Cpu (honest,
  not a silent GPU pretense). (Per Mac's #1618 review: this bridge is the
  net-new code I own at the seam, since the two TargetSilicon enums don't
  share variants.)
- `CoordinatorConfig::for_silicon(silicon)` — canonical floor-shape builder
  retargeted to a silicon class; `realistic_floor_default()` now delegates
  to `for_silicon(UnifiedMemory)` (de-dup); `detected()` =
  probe_hardware_profile → classify_hardware → translate → for_silicon.
- `InferenceCoordinatorModule::with_detected_hardware()` (new production
  constructor) + ipc/mod.rs boot uses it. On the RTX 5090 the coordinator
  now targets `Gpu`; on Apple Silicon, `UnifiedMemory`; GPU-less, `Cpu`.

One-shot startup probe (a few file reads + per-backend FFI) — acceptable per
CONCURRENCY-STYLE-GUIDE. Per-tier budgets stay the realistic-floor numbers
until the governor's policy-file slice refines them; this fixes the SILICON
label, which is what Joel called out.

Validated rust:1.95 (continuum-core --lib): 6 tests pass (translation maps
discrete GPU→Gpu not floor / AppleM→UnifiedMemory / None→Cpu; for_silicon
targets one silicon end-to-end; detected() self-consistent), whole lib
compiles (no inference→governor cycle), CARGO_EXIT=0.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* chore(inference): drop dead with_realistic_floor, fix stale doc + test comment (reviewer nits, #1628)

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant