Files
clawmates/migrations/0058_mission_runtime_container.sql
T
Omar Sobh 5d24fd3460
ci / gates (push) Successful in 7s
ci / rust (push) Failing after 14s
ci / frontend (push) Successful in 29s
ci / e2e (push) Skipped
ci / publish (push) Skipped
missions: schema + provisioner skeleton for per-mission runtime containers (C3 slice 1)
- migration 0058: adds missions.runtime_container_name + runtime_endpoint
- new mission_runtime module (bollard): ensure_container /
  teardown_container. Container is spawned on clawmates_core +
  clawmates_edge networks with just /var/lib/clawmates-missions/{id}
  bind-mounted so agents scoped to /mission/repo can only see this
  missions repo.
- provider API keys forwarded from the server envs so per-mission
  runtimes inherit them.
- Mission struct + repo helpers updated for the two new columns +
  set_runtime_binding().
- Unit tests cover container naming determinism + entropy.

Not wired to the orchestrator yet — that lands in slice 2.
2026-07-21 22:17:41 -07:00

23 lines
1.0 KiB
SQL

-- Per-mission ZeroClaw runtime container.
--
-- C3 workspace-isolation model: each mission gets its own runtime
-- container so agents' sandboxed filesystem is scoped to that mission's
-- repo checkout. Replaces the shared clawmates-runtime container that
-- previously served all missions from one /zeroclaw-data/workspace.
--
-- runtime_container_name: docker container name owned by the mission.
-- Convention: cm-runtime-mission-{first 12 chars of mission uuid}.
-- runtime_endpoint: fully-qualified gateway URL that the
-- topology_worker's ZeroClawDriveExecutor connects to (e.g.
-- http://cm-runtime-mission-019f84a0f2a2:42617). Null when the
-- container hasn't been provisioned yet (or was torn down after
-- completion).
--
-- Both columns are set during on_launch (or lazily by phase_runner on
-- retries against pre-C3 missions) and cleared when the mission
-- terminates and the sweeper reaps its container.
ALTER TABLE missions
ADD COLUMN runtime_container_name TEXT,
ADD COLUMN runtime_endpoint TEXT;