Lab Notes
Operations

Health Checks

The health verification system. The liveness probes, the correctness checks, the performance checks, and the alerts.

Purpose

This page documents the lab's health checks: the liveness probes, the correctness checks, the performance checks, and the alerting policy.

The health checks are part of the operational cadence (Operations) and the runbook (Runbook).

Categories

The lab's health checks fall into three categories:

CategoryQuestion it answers
LivenessIs the component up?
CorrectnessIs the component behaving correctly?
PerformanceIs the component meeting its performance targets?

A failure in any category is a finding. The severity depends on the category and the component.

Liveness probes

Liveness probes are simple HTTP or process checks.

Coordinator gateway

curl -s http://localhost:18789/health

Expected: {"status": "ok", "uptime_s": N} with HTTP 200.

Scout gateway

curl -s http://localhost:18790/health

Expected: {"status": "ok", "uptime_s": N} with HTTP 200.

Browser CDP

lsof -nP -iTCP:18800 -sTCP:LISTEN

Expected: the command returns a PID.

Media Lab Server

curl -s http://127.0.0.1:8765/api/status

Expected: {"status": "ok", "server": "DevClaw Media Lab v2"} with HTTP 200.

Coding sub-agent

The coding sub-agent is a CLI tool, not a long-running process. The liveness check is the binary's presence:

which codex

Expected: a path to the binary.

Correctness checks

Correctness checks verify that the component is behaving correctly, not just that it is up.

Coordinator correctness

CheckExpected
Memory layer is readableReading MEMORY.md returns the expected content.
Skill loader activates a known skillActivating browser-automation returns the skill.
Session store accepts a new sessionA new session is created and listed.
Routing to the Research Worker worksA research request is dispatched and returns a result.

Research Worker correctness

CheckExpected
Mission initialization worksA new mission is created in the research root.
Phase F0 runs and produces task.jsonThe artifact is written and validates.
Phase F1 runs and produces candidates.jsonThe artifact is written and validates.
The orchestrator can resume a paused missionThe state is loaded and the next phase runs.

Media Agent correctness

CheckExpected
Device discovery works (when devices exist)A non-empty device list is returned.
A playback request is acceptedThe agent returns a result without error.
The media backend selector picks the right backendThe selected backend matches the rules.

Web Agent correctness

CheckExpected
A URL can be openedThe page loads and a snapshot is returned.
A fillable form can be filledThe form fields are filled and the form is submittable.
A snapshot returns actionable elementsThe snapshot has at least one clickable element.

Coding Assistant correctness

CheckExpected
A simple task produces codeThe sub-agent returns code that passes the tests.
The review rejects bad codeA code with a clear bug is rejected.
The integration places files in the right locationThe files are in the project's expected paths.

Performance checks

Performance checks verify that the component meets its performance targets.

Coordinator performance

CheckTarget
duration_ms.p50< 5,000 ms
duration_ms.p95< 15,000 ms
duration_ms.p99< 30,000 ms
Tokens per request (avg)< 5,000
Memory usage< 2 GB
CPU usage (per request)< 50% of one core (avg)

Research Worker performance

CheckTarget
Mission duration (typical)< 5 minutes
F1_candidates.duration_ms.p50< 30,000 ms
F2_reviews.duration_ms.p50< 30,000 ms
F4_price.duration_ms.p50< 30,000 ms
F6_report.duration_ms.p50< 5,000 ms
Memory usage< 1 GB

Media Agent performance

CheckTarget
Playback initiation< 5,000 ms
Backend selection< 100 ms
Device discovery (cached)< 50 ms
Device discovery (cold)< 5,000 ms

Web Agent performance

CheckTarget
act.duration_ms.p50< 1,000 ms
snapshot.duration_ms.p50< 2,000 ms

How to run the health checks

The health checks can be run individually (as in the probes above) or as a script. The lab has a script at {workspace-root}/ops/cheatsheets/health-check.sh that runs all the checks in order and produces a report.

The script's output is a JSON document with one entry per check:

{
  "timestamp": "2026-06-10T20:00:00Z",
  "checks": [
    {"name": "coordinator.liveness", "status": "ok", "duration_ms": 12},
    {"name": "scout.liveness", "status": "ok", "duration_ms": 8},
    {"name": "browser.liveness", "status": "ok", "duration_ms": 5},
    {"name": "media-lab.liveness", "status": "ok", "duration_ms": 23},
    {"name": "research.correctness.f1", "status": "ok", "duration_ms": 4123}
  ]
}

The report is written to {workspace-root}/logs/health-check-<timestamp>.json.

Alerting

The lab does not have an alerting system. The operator is the alerting system.

The operator checks the health checks:

  • Daily. During the daily checks.
  • On heartbeat. If the heartbeat probe detects an issue.
  • On user request. When the user asks "is everything OK?".

When a check fails, the operator follows the relevant runbook procedure. The runbook is in Runbook.

Failure modes

FailureSeverityAction
Coordinator gateway is downCriticalApply Worker recovery.
Scout gateway is downHighApply Worker recovery.
Browser CDP is detachedHighApply Browser CDP target detached.
Media Lab Server is downMediumApply Media Lab Server not responding.
Model quota exhaustedHighApply Model quota exhausted.
Token pool exhaustedHighApply Token pool: all tokens exhausted.
Mission stuck in a non-terminal stateHighResume or cancel the mission.
Memory layer not writableCriticalInvestigate filesystem permissions.
Audit log growing too fastLowApply retention policy.

The full failure catalog is in Failure Catalog.

See also