Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ Python 3.12 Β· FastAPI Β· asyncio Β· Pydantic v2 Β· Postgres 16 + `pgvector` Β·
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## HTTP API

Pydantic-validated request *and* response on every boundary; the OpenAPI schema is publishable (`make openapi`). Shipped (PRs #58 / #59 / #60):

| Method | Path | |
|--------|------|--|
| `POST` | `/webhooks/{source}` | ingest β€” HMAC + payload-hash idempotent; returns `202` |
| `POST` | `/incidents` | manual create through the fingerprint + ingest path |
| `GET` | `/incidents` | list with `status` / `service` / `severity` filters + pagination |
| `GET` | `/incidents/{id}` | detail incl. assembled context + latest diagnosis |
| `POST` | `/incidents/{id}/resolve` | submit resolution (triggers embedding refresh on resolve) |
| `POST` | `/incidents/{id}/diagnose` | re-run diagnosis β€” replay-backed, suggest-only |
| `GET` | `/evals/runs` Β· `/evals/runs/{id}` Β· `/evals/baseline` | eval-run history + current baseline |
| `GET` | `/metrics` | Prometheus exposition |
| `GET` | `/healthz` Β· `/readyz` | liveness; readiness (Postgres + Redis probes + consumer aliveness) |

Realtime SSE (`/incidents/{id}/stream`) and WebSocket (`/ws/incidents`) are the remaining slice (Work Area I, PR 3).

## Module map

```
Expand All @@ -117,14 +135,14 @@ sentinel/
β”œβ”€β”€ persistence/ SQLAlchemy models, Alembic migrations, repositories
β”œβ”€β”€ observability/ Prometheus metrics, OTel tracing, structlog, LLM audit log + cost meter
β”œβ”€β”€ schemas/ Pydantic v2 contracts shared across modules (NormalizedAlert, Diagnosis, …)
β”œβ”€β”€ api/ FastAPI app (routes/health, routes/webhooks)
β”œβ”€β”€ api/ FastAPI app β€” routes: health, webhooks, incidents, resolve, diagnose, evals, metrics
β”œβ”€β”€ evals/ eval harness: postmortem corpus, scoring, multi-shot stability, CI gate
└── config/ pydantic-settings, per-env defaults, secret loading
```

## Project status

Built work area by work area, each behind a green CI gate. The eval harness (K) was prioritized ahead of the remaining API surface (I) and UI (L).
Built work area by work area, each behind a green CI gate. The eval harness (K) was prioritized ahead of the API surface (I); the REST surface has since landed (PRs #58 / #59 / #60), leaving realtime (SSE/WS) and the UI (L).

| Phase | Work area | Status |
|------:|-----------|--------|
Expand All @@ -134,7 +152,7 @@ Built work area by work area, each behind a green CI gate. The eval harness (K)
| 4 | Enrichment pipeline (F) β€” parallel fetchers, circuit breakers, `incident.enriched` event | βœ… Landed |
| 5 | Diagnosis agent (G) β€” versioned prompt, Anthropic call, schema + evidence gate, idempotent persistence | βœ… Landed |
| 6 | Memory / feedback loop (H) β€” embedding on resolve, similar-incident retrieval feedback | βœ… Landed |
| 7 | API surface (I) β€” REST + SSE/WS, `/readyz` dependency checks, OpenAPI publish | ⏳ Planned |
| 7 | API surface (I) β€” REST (incidents CRUD/list/detail, re-diagnose, `/metrics`, `/readyz` PG+Redis probes, evals reads), publishable OpenAPI βœ… landed; realtime SSE/WS ⏳ | πŸ”„ REST landed |
| 8 | Eval harness (K) β€” postmortem corpus, scoring, multi-shot stability, CI gate + nightly full | βœ… Landed |
| 9 | UI (L) β€” Next.js incident view | ⏳ Planned |
| 10 | Load + chaos (M) β€” Locust ingestion load, Toxiproxy Redis-outage + in-process breaker fault injection | βœ… Landed |
Expand Down Expand Up @@ -190,7 +208,7 @@ make readme-numbers # patch README from the latest eval run
make load-smoke # concurrent-ingestion invariants (zero-drop + p95); needs docker
make load # locust 100 req/s x 5min, consumers-off stack (creditless)
make chaos # resilience: breaker fault-injection + toxiproxy Redis outage
make openapi # export OpenAPI JSON (placeholder until Work Area I)
make openapi # export the publishable OpenAPI schema to openapi.json
```

`make load` and `make chaos` never call the Anthropic API: load runs the stack
Expand Down
Loading