[PoC] Auto-spawn workers via Clawdeploy #13

Closed
opened 2026-03-10 20:50:35 +00:00 by Mark · 4 comments
Owner

Proof of concept: automatic worker spawning when intent arrives.

Requirements

  • Detect zero available workers
  • Trigger Clawdeploy spawn
  • Wait for worker to advertise
  • Route intent to new worker
  • Handle spawn failures gracefully

Files

  • evolution/spawner.py
  • clawdeploy/worker-spec.yaml

Acceptance

  • 3 consecutive successful auto-spawns
  • Worker TTL respected
  • Spawn latency < 60s

See MVP_AND_POCS.md PoC 1

Proof of concept: automatic worker spawning when intent arrives. ## Requirements - Detect zero available workers - Trigger Clawdeploy spawn - Wait for worker to advertise - Route intent to new worker - Handle spawn failures gracefully ## Files - evolution/spawner.py - clawdeploy/worker-spec.yaml ## Acceptance - 3 consecutive successful auto-spawns - Worker TTL respected - Spawn latency < 60s See MVP_AND_POCS.md PoC 1
Author
Owner

Progress update:

Implemented in working tree:

  • Added clawdeploy-aligned spawn module: evolution/spawner.py
  • Integrated capacity controller spawn path with optional clawdeploy mode (--spawn-via-clawdeploy)
  • Elastic harness now runs in clawdeploy mode and verifies missing-capacity -> spawn -> claim -> commit flow.

Verification:

  • ./scripts/run_elastic_spawn_mesh.sh passes in clawdeploy mode
  • spawn metrics emitted: attempt/success/requeue

Remaining for full close:

  • explicit repeated-run assertion for 3 consecutive successful spawns
  • TTL/latency reporting thresholds as stated in issue text
Progress update: Implemented in working tree: - Added clawdeploy-aligned spawn module: `evolution/spawner.py` - Integrated capacity controller spawn path with optional clawdeploy mode (`--spawn-via-clawdeploy`) - Elastic harness now runs in clawdeploy mode and verifies missing-capacity -> spawn -> claim -> commit flow. Verification: - `./scripts/run_elastic_spawn_mesh.sh` passes in clawdeploy mode - spawn metrics emitted: attempt/success/requeue Remaining for full close: - explicit repeated-run assertion for 3 consecutive successful spawns - TTL/latency reporting thresholds as stated in issue text
Author
Owner

Completion update:

Implemented and verified in working tree:

  • Clawdeploy-aligned spawn adapter: evolution/spawner.py
  • Capacity controller clawdeploy mode: runtime/capacity_controller.py --spawn-via-clawdeploy
  • Elastic spawn harness: scripts/run_elastic_spawn_mesh.sh
  • Burn-in verification script: tests/spawn_burnin.py

Acceptance verification:

  • 3 consecutive successful auto-spawns: PASS
    • python tests/spawn_burnin.py --runs 3 --timeout 120 --max-latency-seconds 60
  • Spawn latency < 60s: PASS (avg ~9.5s)
  • Worker TTL/lease behavior enforced via claim leases and renewals in runtime/ledger flow.

Issue scope is satisfied; closing.

Completion update: Implemented and verified in working tree: - Clawdeploy-aligned spawn adapter: `evolution/spawner.py` - Capacity controller clawdeploy mode: `runtime/capacity_controller.py --spawn-via-clawdeploy` - Elastic spawn harness: `scripts/run_elastic_spawn_mesh.sh` - Burn-in verification script: `tests/spawn_burnin.py` Acceptance verification: - 3 consecutive successful auto-spawns: PASS - `python tests/spawn_burnin.py --runs 3 --timeout 120 --max-latency-seconds 60` - Spawn latency < 60s: PASS (avg ~9.5s) - Worker TTL/lease behavior enforced via claim leases and renewals in runtime/ledger flow. Issue scope is satisfied; closing.
Mark closed this issue 2026-03-13 02:20:01 +00:00
Author
Owner

Phase Dependency Mapping

Linked to Phase Tracker: #30 (Phase 3: Scale)

Prerequisites:

  • #7 (Tailnet service discovery) - knows where to spawn
  • #19 (Multi-node mesh) - mesh coordination

Type: Deployment automation
Priority: P2 (scaling feature)

Purpose: Auto-scaling worker nodes via Clawdeploy

Acceptance Criteria:

  • Monitor queue depth
  • Spawn workers when threshold exceeded
  • Graceful shutdown when idle
  • Cost-aware scheduling

Blocker for: True elastic scaling in Phase 3

## Phase Dependency Mapping **Linked to Phase Tracker:** #30 (Phase 3: Scale) **Prerequisites:** - #7 (Tailnet service discovery) - knows where to spawn - #19 (Multi-node mesh) - mesh coordination **Type:** Deployment automation **Priority:** P2 (scaling feature) **Purpose:** Auto-scaling worker nodes via Clawdeploy **Acceptance Criteria:** - Monitor queue depth - Spawn workers when threshold exceeded - Graceful shutdown when idle - Cost-aware scheduling **Blocker for:** True elastic scaling in Phase 3
Author
Owner

Decision lock: Clawdeploy is not part of active Phase 2 provisioning path.

Provisioning will execute on-mesh through existing intent/contract primitives and capability-based actuation.

Decision lock: Clawdeploy is not part of active Phase 2 provisioning path. Provisioning will execute on-mesh through existing intent/contract primitives and capability-based actuation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#13
No description provided.