Lab Notes
Appendix

Appendix D: Failure Catalog

The lab's known failure modes. Each entry has an ID, a description, a detection rule, a recovery procedure, and a severity.

Purpose

This appendix is the canonical reference for the lab's known failure modes. Each failure mode has an ID (F-NNN), a description, a detection rule, a recovery procedure, and a severity.

The catalog is the source for the runbook (Runbook) and the audit findings (Audit Model).

How to use this catalog

When an incident occurs:

  1. Find the matching failure mode in this catalog.
  2. Follow the recovery procedure.
  3. If the failure is not in the catalog, document it and add it to the catalog.

The catalog is a living document. New failure modes are added as they are discovered.

Failure modes

F-001: Coordinator gateway is unreachable

FieldValue
IDF-001
SeverityCritical
Detectioncurl -s http://localhost:18789/health returns a connection error.
DescriptionThe Coordinator gateway is not responding.
RecoveryApply Runbook → Worker recovery.
PreventionMonitor the heartbeat; set up a watchdog.

F-002: Scout gateway is unreachable

FieldValue
IDF-002
SeverityHigh
Detectioncurl -s http://localhost:18790/health returns a connection error.
DescriptionThe Scout gateway is not responding.
RecoveryApply Runbook → Worker recovery.
PreventionMonitor the heartbeat; set up a watchdog.

F-003: Coding sub-agent is killed by the OS

FieldValue
IDF-003
SeverityHigh
DetectionThe sub-agent exits with code 137; log shows Killed.
DescriptionThe sub-agent was killed by the OS (typically SIGKILL) because its task was too large.
RecoveryApply Runbook → Coding Assistant killed by timeout.
PreventionSplit tasks into smaller prompts; use progressive prompts.

F-004: Model quota is exhausted

FieldValue
IDF-004
SeverityHigh
DetectionThe model returns 429 or quota_exceeded; the Coordinator's health probe reports quota_exhausted: true.
DescriptionThe model's quota is exhausted.
RecoveryApply Runbook → Model quota exhausted.
PreventionTrack the quota; warn before the quota is exhausted.

F-005: Token pool is exhausted

FieldValue
IDF-005
SeverityHigh
DetectionAll tokens in token_pool_state.json are quota_exhausted; the P3 phase is failed_terminal.
DescriptionAll tokens in the Perplexity token pool are exhausted.
RecoveryApply Runbook → Token pool exhausted.
PreventionTrack the per-token quota; rotate tokens before they are exhausted.

F-006: Browser CDP target is detached

FieldValue
IDF-006
SeverityHigh
DetectionBrowser actions return connection refused or Target.detached; the CDP port is not listening.
DescriptionThe browser's DevTools Protocol connection is lost.
RecoveryApply Runbook → Browser CDP target detached.
PreventionMonitor the browser; restart on repeated detach.

F-007: Media Lab Server is not responding

FieldValue
IDF-007
SeverityMedium
Detectioncurl -s http://127.0.0.1:8765/api/status returns a connection error.
DescriptionThe Media Lab Server is not responding.
RecoveryApply Runbook → Media Lab Server not responding.
PreventionMonitor the server; restart on repeated failures.

F-008: Mission is stuck in a non-terminal state

FieldValue
IDF-008
SeverityHigh
DetectionA mission's phase.json has been in a non-terminal state for more than the timeout.
DescriptionA mission is stuck; the orchestrator is not progressing.
RecoveryInspect the state; identify the stuck phase; resume or cancel the mission.
PreventionSet a maximum mission duration; alert on overrun.

F-009: Phase fails with failed_terminal

FieldValue
IDF-009
SeverityHigh
DetectionThe phase's status in phase.json is failed_terminal.
DescriptionA phase failed in a way that cannot be retried.
RecoveryInspect the error; identify the cause; retry the mission or accept the failure.
PreventionAdd unit tests for the phase; review the error message before declaring it terminal.

F-010: External API returns 4xx

FieldValue
IDF-010
SeverityMedium
DetectionThe adapter returns 4xx.
DescriptionAn external API returned a 4xx error (other than 429).
RecoveryInspect the error; fix the request; retry.
PreventionValidate the request before sending; use a schema validator.

F-011: External API returns 5xx

FieldValue
IDF-011
SeverityMedium
DetectionThe adapter returns 5xx.
DescriptionAn external API returned a 5xx error.
RecoveryRetry with exponential backoff; if all retries fail, fall back to another adapter.
PreventionUse the request journal to detect patterns; alert on sustained 5xx.

F-012: External API rate limit

FieldValue
IDF-012
SeverityMedium
DetectionThe adapter returns 429.
DescriptionThe external API rate limit was hit.
RecoveryWait for the rate limit to reset; reduce the request rate.
PreventionTrack the per-adapter rate limit; use the per-minute cap.

F-013: Artifact validation failure

FieldValue
IDF-013
SeverityHigh
DetectionThe ArtifactStore raises a Pydantic validation error.
DescriptionAn artifact does not match its schema.
RecoveryInspect the artifact; fix the producer; regenerate the artifact.
PreventionAdd unit tests for the schema; use the schema in the producer's tests.

F-014: File permission is too permissive

FieldValue
IDF-014
SeverityLow
Detectionls -l shows permissions wider than 0600 on a sensitive file.
DescriptionA sensitive file is readable or writable by a broader group than necessary.
Recoverychmod 600 <file>; fix the producer to set the correct permissions.
PreventionAdd a check in the CI that fails when permissions are too permissive.

F-015: Outdated documentation

FieldValue
IDF-015
SeverityLow
DetectionThe documentation describes a system that has changed.
DescriptionThe documentation is out of sync with the system.
RecoveryUpdate the documentation to match the system.
PreventionUpdate the documentation with every commit that changes the system.

F-016: Missing dependency

FieldValue
IDF-016
SeverityMedium
DetectionAn import fails; a tool reports a missing binary.
DescriptionA required package or binary is not installed.
RecoveryInstall the dependency; document the install in the README.
PreventionAdd a dependency check in the CI; document dependencies in the README.

F-017: Configuration drift

FieldValue
IDF-017
SeverityMedium
DetectionThe actual configuration differs from the documented one.
DescriptionThe configuration has drifted from the documentation.
RecoveryUpdate the documentation to match the configuration, or update the configuration to match the documentation.
PreventionAdd a CI check that compares the live configuration to the documented one.

F-018: Memory layer is full

FieldValue
IDF-018
SeverityMedium
DetectionThe memory layer's disk usage exceeds the threshold.
DescriptionThe memory layer is using too much disk space.
RecoveryApply the retention policy; archive old daily logs.
PreventionAdd a disk usage check to the daily tasks.

F-019: Audit log is growing too fast

FieldValue
IDF-019
SeverityLow
DetectionThe audit log's growth rate exceeds the expected rate.
DescriptionThe audit log is growing faster than expected, which may indicate a logging bug.
RecoveryInspect the log; identify the source of the growth; fix the bug.
PreventionAdd a growth-rate check to the weekly tasks.

F-020: Provider returns unexpected response

FieldValue
IDF-020
SeverityMedium
DetectionThe adapter returns a response that does not match the expected schema.
DescriptionAn external provider returned a response in an unexpected format.
RecoveryLog the unexpected response; fall back to another adapter; report to the provider.
PreventionAdd a schema check in the adapter; alert on schema violations.

Severity summary

SeverityCount
Critical1
High6
Medium9
Low4
Total20

Adding a new failure mode

When a new failure mode is discovered:

  1. Add an entry to this catalog with the next ID.
  2. Update the runbook if the failure needs a new procedure.
  3. Update the audit report template if the failure affects the audit.
  4. Update the telemetry if the failure has a metric.

The new entry must have:

  • A unique ID (F-NNN).
  • A clear description.
  • A reliable detection rule.
  • A tested recovery procedure.
  • A severity.

See also