disclaw/tasks/DIS-104.md

1.2 KiB

id status phase priority labels branch assignee started pr merged
DIS-104 backlog 1 p1
phase:1
type:feat
priority:p1
phase-1/concurrency-semaphore null null null null

DIS-104: Globaler Semaphore (max_concurrent_agents)

Ziel

Globaler Cap auf parallele claude-Prozesse verhindert Ressourcen-Thrashing. Default 4, konfigurierbar via disclaw.yaml.

Kontext

docs/development-plan.md §2.3, Phase 1 Task 4.

Scope

  • In: src/runtime/concurrency.ts mit Semaphore(max) (acquire()/release()) · runner.ts umschließt Spawn-Call: semaphore.acquire() / try { ... } finally { semaphore.release() } · Config-Default 4 in disclaw.yaml kommentiert
  • Out: Dynamisches Auto-Scaling

Definition of Done

  • Unit-Test tests/unit/semaphore.test.ts: Acquire bei freien Slots, Queueing bei vollen Slots, Release gibt Wartende frei, Error-Path hält Counter konsistent
  • Config-Default 4 in disclaw.yaml
  • npm run build && npm test grün

Dateien (erwartet)

  • src/runtime/concurrency.ts
  • src/agent/runner.ts
  • src/config/loader.ts
  • disclaw.yaml
  • tests/unit/semaphore.test.ts

Abhängigkeiten

Keine harten. Kann parallel zu DIS-103 laufen.

Spec

docs/backlog.md #DIS-104