---
name: job_status_summary
kind: function
lang: go
domain: infra
version: "1.0.0"
purity: pure
signature: "func JobStatusSummary(counts map[string]int) string"
description: "Formatea un mapa de status→conteo en un resumen legible. Siempre incluye los cinco estados canonicos en orden fijo: pending, running, completed, failed, dead."
tags: [job, queue, status, summary, format, pure, infra, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [fmt, strings]
params:
  - name: counts
    desc: "mapa de nombre de status (pending/running/completed/failed/dead) a numero de jobs en ese estado"
output: "string formateado 'pending: N, running: N, completed: N, failed: N, dead: N'"
tested: true
tests:
  - "job_status_summary_format"
  - "job_status_summary_empty_map"
test_file_path: "functions/infra/job_queue_test.go"
file_path: "functions/infra/job_status.go"
---

## Ejemplo

```go
counts := map[string]int{"pending": 5, "running": 2, "completed": 10}
summary := JobStatusSummary(counts)
// "pending: 5, running: 2, completed: 10, failed: 0, dead: 0"
```

## Notas

Funcion pura. Los estados no presentes en el mapa se tratan como 0. El orden de salida es siempre fijo: pending, running, completed, failed, dead.
