SSOT / GOVERNING REFERENCEDOCUMENT 15 OF 28

Operations, autoscaling, guardians and recovery

Status: normative · Owns: resource safety and production playbooks.

Default posture

Resident PHP ingress and durable state remain small; expensive workers are off. Boot checks database integrity, queue/scheduler supervision, secret access, event append capability, backup freshness and independent stop guardian. If guardian is degraded, new paid leases are disabled. Observability must continue even if the chat frontend becomes unavailable.

Typical execution runbook

  1. Parse and validate task; confirm rights, owner restrictions, idempotency.
  2. Qualify model/harness, compare current quotes, present owner plan and true maximum exposure.
  3. Request exact, revocable approval for permitted effects; revalidate immediately before dispatch.
  4. Commit outbox/lease, allocate via adapter and reconcile ambiguous API responses.
  5. Collect heartbeats and typed measurements without secrets; check task against oracle.
  6. Save checkpoint/result in durable location and verify integrity before retiring compute.
  7. Stop issuing new leases, drain, request provider termination, query external inventory.
  8. Mark termination_verified only after conclusive provider-side evidence. Reconcile late costs; persist incident if unknown.
  9. Reduce to Small; report separate task result and resource/bill status.

Incident playbooks

Uncertain create: do not blindly retry; query provider by owner/resource tags, reconcile idempotency, then decide. Stop API timeout: continue inventory polling with backoff and operator alert; uncertain is not off. Provider invoice differs: record late adjustments; review model and budget. VPS failure: independent guardian uses preassigned account scope to enumerate/stop paid resources; recover queue from backup/outbox. Malicious harness: revoke signed release, quarantine dependencies, rotate scoped credentials and audit affected jobs. Failed learned rule: disable its registry entry, revert to previous signed rule or approved model route, rerun impacted fixtures.

Signals

Track queue length/age, job acceptance, observed latency, spend estimate vs actual, provider inventory, unknown resource counts, time-to-terminate, rule hit/miss/drift, fallback fraction, data retention, backup restore proof, credential rotation and negative security test outcomes. Do not state energy saved as fact without meters.

SLO/SLA distinction

Design goals are not customer contractual SLA. Define uptime, max loss window, support hours and response times separately in written professional engagements. Small single-VPS reference deployment has no implied high availability. Establish tested RPO/RTO before promising recovery.

Related

Execution · Costs · Acceptance.