Skip to content

feat(orchestration): orchestrator_provider (SLM-as-orchestrator) and AdmissionGate (admission control)#3617

Merged
bug-ops merged 2 commits intomainfrom
paramanager-hivemind-orchestration
May 5, 2026
Merged

feat(orchestration): orchestrator_provider (SLM-as-orchestrator) and AdmissionGate (admission control)#3617
bug-ops merged 2 commits intomainfrom
paramanager-hivemind-orchestration

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 5, 2026

Summary

  • Implements arXiv:2604.17009 (ParaManager) pattern: adds orchestrator_provider config field so a cheap/fast provider (e.g. gpt-4o-mini) can serve as the orchestration decision-maker, reducing cost without sacrificing task quality.
  • Implements arXiv:2604.17111 (HiveMind) admission control: AdmissionGate with per-provider semaphores prevents provider overcommit under concurrent subagent workloads; per-task token budget is warn-only in this MVP.

Changes

#3300 — orchestrator_provider

  • OrchestrationConfig.orchestrator_provider: ProviderName (zeph-config)
  • Wired through OrchestrationState, AgentBuilder, bootstrap (runner/daemon/acp)
  • Fallback chain: explicit provider → orchestrator_provider → primary; applies to verifier, predicate, and aggregator
  • Migration step 43 (migrate_orchestration_orchestrator_provider)

#3299 — AdmissionGate

  • ProviderEntry.max_concurrent: Option<u32>None = unlimited (default)
  • New crates/zeph-orchestration/src/admission.rs: AdmissionGate keyed by provider name
  • DagScheduler acquires permit before Spawn via agent_provider_map; defers on capacity using existing deferral_backoff
  • Permit cleanup in record_spawn_failure (prevents semaphore slot leak)
  • Warn-only budget check on task completion via CostTracker
  • Migration step 44 (migrate_provider_max_concurrent)

Config Example

[orchestration]
orchestrator_provider = "fast"   # cheap model handles planner decisions

[[llm.providers]]
name = "quality"
type = "openai"
model = "gpt-5.4"
max_concurrent = 3               # cap concurrent subagents on this provider

[[llm.providers]]
name = "fast"
type = "openai"
model = "gpt-4o-mini"

Test Plan

  • cargo nextest run --workspace --lib --bins — 8876 tests pass
  • cargo clippy --workspace -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • New unit tests: 10 added (admission wiring ×3, orchestrator_provider accessor ×2, migration steps 43/44 ×4, permit cleanup ×1)
  • Live session test with orchestrator_provider = "fast" — verify orchestration uses fast provider, no 400/422 errors

Closes #3300, #3299

@bug-ops bug-ops enabled auto-merge (squash) May 5, 2026 17:18
…issues #3300 and #3299

## orchestrator_provider (#3300)

Implements the ParaManager pattern from arXiv:2604.17009: a cheap small model
can serve as orchestrator, reducing cost without sacrificing task quality.

- Add `orchestrator_provider: ProviderName` to `OrchestrationConfig`
- Wire through `OrchestrationState` and `AgentBuilder`
- Fallback chain in `plan.rs`: verify_provider → orchestrator_provider → primary;
  aggregator and predicate follow the same chain
- Update `scheduler_loop.rs` predicate resolution (M4 fix)
- Migration step 43 (`migrate_orchestration_orchestrator_provider`)

## AdmissionGate (#3299)

Implements HiveMind OS-inspired scheduling primitives from arXiv:2604.17111:
admission control prevents provider overcommit; per-task budget is warn-only
(hard enforcement deferred until per-task CostTracker scoping is available).

- Add `max_concurrent: Option<u32>` to `ProviderEntry`
- New `crates/zeph-orchestration/src/admission.rs`: `AdmissionGate` wrapping
  per-provider semaphores, keyed by provider name
- `DagScheduler` acquires permit before Spawn via `agent_provider_map`
  (agent-def-name → provider-name); defers on capacity using existing backoff
- `record_spawn_failure` cleans up `pending_permits` to prevent semaphore leak
- Warn-only budget check on task completion; reuses `CostTracker`
- Migration step 44 (`migrate_provider_max_concurrent`)

Closes #3300, #3299
@bug-ops bug-ops force-pushed the paramanager-hivemind-orchestration branch from 77921a2 to 0739ad4 Compare May 5, 2026 17:18
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate labels May 5, 2026
@github-actions github-actions Bot added enhancement New feature or request size/XL Extra large PR (500+ lines) labels May 5, 2026
…arg signature

DagScheduler::new gained an admission_gate: Option<AdmissionGate> parameter
in the AdmissionGate implementation. The orchestration_integration tests
were not updated alongside the scheduler internals.
@github-actions github-actions Bot added the tests Test-related changes label May 5, 2026
@bug-ops bug-ops merged commit 7bbdc65 into main May 5, 2026
32 checks passed
@bug-ops bug-ops deleted the paramanager-hivemind-orchestration branch May 5, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines) tests Test-related changes

Projects

None yet

1 participant