Files
clawmates/crates/bins/clawmates-server/Cargo.toml
T
Omar SobhandClaude Opus 4.8 148705769f
ci / gates (push) Has been cancelled
ci / rust (push) Has been cancelled
ci / sandbox-k8s (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / e2e (push) Has been cancelled
Reaping: sandbox orphan reaper + DB expiry/retention sweeper + volume-init retry
Closes the cleanup gaps found in review (latent today; bites under load/crashes).

Sandbox containers (cm-sandbox / cm-runtime):
- label every sandbox `clawmates.sandbox={agent|browser}` at create
- SandboxDriver::list_managed(kind) (Docker label filter + K8s label selector)
- SandboxManager::reconcile_orphans(ttl) + spawn_reaper: removes engine
  containers no live handle owns (ZERO = all)
- boot reconciliation (every pre-existing sandbox is an orphan from a dead
  process) + periodic reaper (5m interval / 10m TTL)
- SIGTERM graceful drain: serve().with_graceful_shutdown → shutdown() both
  managers so a redeploy can't leak; destroy errors now logged not swallowed

DB expiry/retention (cm-db cleanup.rs + cm-api cleanup_sweeper, hourly):
- expire auth_sessions + oauth_states past expires_at (security)
- prune sent outbox(7d), run_events(14d), routine_runs(30d), terminal
  topology_runs(90d), consumed execution_grants(7d)

Compose: volume-init restart "no" → on-failure:5 (retry instead of wedging boot).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-19 04:55:27 -07:00

29 lines
797 B
TOML

[package]
name = "clawmates-server"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
publish.workspace = true
[dependencies]
axum = "0.8"
serde_json = { workspace = true }
sqlx = { workspace = true }
cm-api = { path = "../../cm-api" }
cm-auth = { path = "../../cm-auth" }
cm-config = { path = "../../cm-config" }
cm-db = { path = "../../cm-db" }
cm-files = { path = "../../cm-files" }
cm-llm = { path = "../../cm-llm" }
cm-runtime = { path = "../../cm-runtime" }
cm-telemetry = { path = "../../cm-telemetry" }
cm-sandbox = { path = "../../cm-sandbox" }
cm-scheduler = { path = "../../cm-scheduler" }
cm-domain = { path = "../../cm-domain" }
time = { workspace = true }
tokio = { workspace = true, features = ["signal"] }
[lints]
workspace = true