Lab Notes
Appendix

Appendix D: Failure Catalog

Los known failure modes del lab. Cada entry tiene un ID, una description, una detection rule, una recovery procedure y una severity.

Propósito

Este appendix es la referencia canónica para los known failure modes del lab. Cada failure mode tiene un ID (F-NNN), una description, una detection rule, una recovery procedure y una severity.

El catalog es la source del runbook (Runbook) y de los audit findings (Audit Model).

How to use this catalog

Cuando ocurre un incident:

  1. Encontrar el matching failure mode en este catalog.
  2. Seguir la recovery procedure.
  3. Si el failure no está en el catalog, documentarlo y añadirlo al catalog.

El catalog es un living document. Se añaden new failure modes según se descubren.

Failure modes

F-001: Coordinator gateway is unreachable

FieldValue
IDF-001
SeverityCritical
Detectioncurl -s http://localhost:18789/health devuelve un connection error.
DescriptionEl Coordinator gateway no responde.
RecoveryAplicar Runbook → Worker recovery.
PreventionMonitorear el heartbeat; setear un watchdog.

F-002: Scout gateway is unreachable

FieldValue
IDF-002
SeverityHigh
Detectioncurl -s http://localhost:18790/health devuelve un connection error.
DescriptionEl Scout gateway no responde.
RecoveryAplicar Runbook → Worker recovery.
PreventionMonitorear el heartbeat; setear un watchdog.

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

FieldValue
IDF-003
SeverityHigh
DetectionEl sub-agent sale con code 137; el log muestra Killed.
DescriptionEl sub-agent fue killed por el OS (típicamente SIGKILL) porque su task era demasiado grande.
RecoveryAplicar Runbook → Coding Assistant killed by timeout.
PreventionSplittear las tasks en prompts más pequeños; usar progressive prompts.

F-004: Model quota is exhausted

FieldValue
IDF-004
SeverityHigh
DetectionEl model devuelve 429 o quota_exceeded; el health probe del Coordinator reporta quota_exhausted: true.
DescriptionLa quota del model está exhausted.
RecoveryAplicar Runbook → Model quota exhausted.
PreventionTrackear la quota; avisar antes de que se agote.

F-005: Token pool is exhausted

FieldValue
IDF-005
SeverityHigh
DetectionTodos los tokens en token_pool_state.json están quota_exhausted; la P3 phase es failed_terminal.
DescriptionTodos los tokens del Perplexity token pool están exhausted.
RecoveryAplicar Runbook → Token pool exhausted.
PreventionTrackear la per-token quota; rotar tokens antes de que se agoten.

F-006: Browser CDP target is detached

FieldValue
IDF-006
SeverityHigh
DetectionLas browser actions devuelven connection refused o Target.detached; el CDP port no está listening.
DescriptionSe perdió la connection del browser's DevTools Protocol.
RecoveryAplicar Runbook → Browser CDP target detached.
PreventionMonitorear el browser; reiniciar ante repeated detach.

F-007: Media Lab Server is not responding

FieldValue
IDF-007
SeverityMedium
Detectioncurl -s http://127.0.0.1:8765/api/status devuelve un connection error.
DescriptionEl Media Lab Server no responde.
RecoveryAplicar Runbook → Media Lab Server not responding.
PreventionMonitorear el server; reiniciar ante repeated failures.

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

FieldValue
IDF-008
SeverityHigh
DetectionEl phase.json de una mission lleva en non-terminal state más del timeout.
DescriptionUna mission está stuck; el orchestrator no está progresando.
RecoveryInspeccionar el state; identificar la stuck phase; resumir o cancelar la mission.
PreventionSetear una maximum mission duration; alert ante overrun.

F-009: Phase fails with failed_terminal

FieldValue
IDF-009
SeverityHigh
DetectionEl status de la phase en phase.json es failed_terminal.
DescriptionUna phase falló de una forma que no se puede reintentar.
RecoveryInspeccionar el error; identificar la cause; reintentar la mission o aceptar el failure.
PreventionAñadir unit tests para la phase; revisar el error message antes de declararlo terminal.

F-010: External API returns 4xx

FieldValue
IDF-010
SeverityMedium
DetectionEl adapter devuelve 4xx.
DescriptionUna external API devolvió un 4xx error (distinto de 429).
RecoveryInspeccionar el error; arreglar la request; reintentar.
PreventionValidar la request antes de enviar; usar un schema validator.

F-011: External API returns 5xx

FieldValue
IDF-011
SeverityMedium
DetectionEl adapter devuelve 5xx.
DescriptionUna external API devolvió un 5xx error.
RecoveryReintentar con exponential backoff; si todos los retries fallan, caer a otro adapter.
PreventionUsar el request journal para detectar patterns; alertar ante 5xx sostenidos.

F-012: External API rate limit

FieldValue
IDF-012
SeverityMedium
DetectionEl adapter devuelve 429.
DescriptionSe hit el rate limit de la external API.
RecoveryEsperar a que el rate limit se resetee; reducir la request rate.
PreventionTrackear el per-adapter rate limit; usar el per-minute cap.

F-013: Artifact validation failure

FieldValue
IDF-013
SeverityHigh
DetectionEl ArtifactStore lanza un Pydantic validation error.
DescriptionUn artifact no matchea su schema.
RecoveryInspeccionar el artifact; arreglar el producer; regenerar el artifact.
PreventionAñadir unit tests para el schema; usar el schema en los tests del producer.

F-014: File permission is too permissive

FieldValue
IDF-014
SeverityLow
Detectionls -l muestra permissions más amplias que 0600 en un sensitive file.
DescriptionUn sensitive file es readable o writable por un grupo más amplio de lo necesario.
Recoverychmod 600 <file>; arreglar el producer para que setee los permissions correctos.
PreventionAñadir un check en el CI que falle cuando los permissions sean demasiado permisivos.

F-015: Outdated documentation

FieldValue
IDF-015
SeverityLow
DetectionLa documentation describe un sistema que ha cambiado.
DescriptionLa documentation está out of sync con el sistema.
RecoveryActualizar la documentation para que matchee el sistema.
PreventionActualizar la documentation con cada commit que cambie el sistema.

F-016: Missing dependency

FieldValue
IDF-016
SeverityMedium
DetectionUn import falla; una tool reporta un missing binary.
DescriptionUn required package o binary no está instalado.
RecoveryInstalar la dependency; documentar el install en el README.
PreventionAñadir un dependency check en el CI; documentar dependencies en el README.

F-017: Configuration drift

FieldValue
IDF-017
SeverityMedium
DetectionLa actual configuration difiere de la documented.
DescriptionLa configuration ha drifted de la documentation.
RecoveryActualizar la documentation para que matchee la configuration, o actualizar la configuration para que matchee la documentation.
PreventionAñadir un check en el CI que compare la live configuration con la documented.

F-018: Memory layer is full

FieldValue
IDF-018
SeverityMedium
DetectionEl disk usage de la memory layer supera el threshold.
DescriptionLa memory layer está usando demasiado disk space.
RecoveryAplicar la retention policy; archivar daily logs antiguos.
PreventionAñadir un disk usage check a las daily tasks.

F-019: Audit log is growing too fast

FieldValue
IDF-019
SeverityLow
DetectionEl growth rate del audit log supera el expected rate.
DescriptionEl audit log está creciendo más rápido de lo expected, lo que puede indicar un logging bug.
RecoveryInspeccionar el log; identificar la source del growth; arreglar el bug.
PreventionAñadir un growth-rate check a las weekly tasks.

F-020: Provider returns unexpected response

FieldValue
IDF-020
SeverityMedium
DetectionEl adapter devuelve una response que no matchea el expected schema.
DescriptionUn external provider devolvió una response en un formato inesperado.
RecoveryLoguear la unexpected response; caer a otro adapter; reportar al provider.
PreventionAñadir un schema check en el adapter; alertar ante schema violations.

Severity summary

SeverityCount
Critical1
High6
Medium9
Low4
Total20

Adding a new failure mode

Cuando se descubre un new failure mode:

  1. Añadir un entry a este catalog con el siguiente ID.
  2. Actualizar el runbook si el failure necesita un new procedure.
  3. Actualizar el audit report template si el failure afecta al audit.
  4. Actualizar la telemetry si el failure tiene una metric.

El new entry debe tener:

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

See also