fix(monitor): agent.completed events + nested concurrency config #16

Merged
Snider merged 2 commits from feat/monitor-notifications-and-concurrency into dev 2026-03-24 14:44:03 +00:00
Member

Changes

  • agent.completed event: emitted per task with repo/agent/workspace/status (was only emitting on failure)
  • queue.drained fix: now verifies PIDs are alive via kill(0) instead of trusting stale status files
  • Nested concurrency: supports per-model limits under agent pools (codex: {total: 2, gpt-5.4: 1})
  • Export ReadStatus: was unexported, needed by monitor package
  • Docker mount fix: /root/ → /home/dev/ for non-root container

Test plan

  • go build ./... passes
  • go test ./pkg/agentic/... passes
  • go test ./pkg/monitor/... passes
## Changes - **agent.completed event**: emitted per task with repo/agent/workspace/status (was only emitting on failure) - **queue.drained fix**: now verifies PIDs are alive via kill(0) instead of trusting stale status files - **Nested concurrency**: supports per-model limits under agent pools (`codex: {total: 2, gpt-5.4: 1}`) - **Export ReadStatus**: was unexported, needed by monitor package - **Docker mount fix**: /root/ → /home/dev/ for non-root container ## Test plan - [x] `go build ./...` passes - [x] `go test ./pkg/agentic/...` passes - [x] `go test ./pkg/monitor/...` passes
Virgil added 2 commits 2026-03-24 13:05:55 +00:00
- Export ReadStatus (was readStatus) for cross-package use
- AgentCompleted now emits agent.completed with repo/agent/workspace/status
  for every finished task, not just failures
- queue.drained only fires when genuinely empty — verified by checking
  PIDs are alive via kill(0), not just trusting stale status files
- Fix Docker mount paths: /root/ → /home/dev/ for non-root container
- Update all callers and tests

Co-Authored-By: Virgil <virgil@lethean.io>
Concurrency config now supports both flat and nested formats:

  claude: 1                    # flat — 1 total
  codex:                       # nested — 2 total, per-model caps
    total: 2
    gpt-5.4: 1
    gpt-5.3-codex-spark: 1

canDispatchAgent checks pool total first, then per-model limit.
countRunningByModel added for exact agent string matching.
ConcurrencyLimit custom YAML unmarshaler handles both int and map.

Co-Authored-By: Virgil <virgil@lethean.io>
Snider merged commit b5873a8f31 into dev 2026-03-24 14:44:03 +00:00
Snider deleted branch feat/monitor-notifications-and-concurrency 2026-03-24 14:44:03 +00:00
Sign in to join this conversation.
No description provided.