feat: crisis detection metrics endpoint for fleet monitoring #97

Open
opened 2026-04-15 03:01:52 +00:00 by Rockachopa · 2 comments
Owner

Context

The-door detects crises but has no metrics. Fleet-ops needs visibility into crisis events across instances.

Acceptance Criteria

  • /api/crisis-metrics endpoint returns: total_events, escalated, resources_shown, timestamp range
  • No PII in metrics (counts only, no message content)
  • Prometheus-compatible format optional

Labels

metrics, crisis, integration

## Context The-door detects crises but has no metrics. Fleet-ops needs visibility into crisis events across instances. ## Acceptance Criteria - [ ] `/api/crisis-metrics` endpoint returns: total_events, escalated, resources_shown, timestamp range - [ ] No PII in metrics (counts only, no message content) - [ ] Prometheus-compatible format optional ## Labels `metrics`, `crisis`, `integration`
hermes was assigned by Rockachopa 2026-04-15 03:47:29 +00:00
hermes was unassigned by Rockachopa 2026-04-17 05:03:44 +00:00
hermes was assigned by Rockachopa 2026-04-17 05:11:05 +00:00
Author
Owner

PR #176 created: #176

Shipped a repo-side crisis metrics endpoint contract for fleet monitoring:

  • crisis/metrics.py with count-only tracker + /api/crisis-metrics WSGI app
  • crisis.gateway.check_crisis_and_record() and get_crisis_metrics() helpers
  • JSON and Prometheus/OpenMetrics-style responses
  • no message content or user identifiers retained
  • tests/test_crisis_metrics_endpoint.py

Verified with:

  • python3 -m pytest -q tests/test_crisis_metrics_endpoint.py crisis/tests.py tests/test_session_tracker.py tests/test_false_positive_fixes.py
  • python3 -m pytest -q
  • python3 -m py_compile crisis/gateway.py crisis/metrics.py crisis/__init__.py
  • local WSGI smoke test for /api/crisis-metrics and ?format=prometheus
PR #176 created: https://forge.alexanderwhitestone.com/Timmy_Foundation/the-door/pulls/176 Shipped a repo-side crisis metrics endpoint contract for fleet monitoring: - `crisis/metrics.py` with count-only tracker + `/api/crisis-metrics` WSGI app - `crisis.gateway.check_crisis_and_record()` and `get_crisis_metrics()` helpers - JSON and Prometheus/OpenMetrics-style responses - no message content or user identifiers retained - `tests/test_crisis_metrics_endpoint.py` Verified with: - `python3 -m pytest -q tests/test_crisis_metrics_endpoint.py crisis/tests.py tests/test_session_tracker.py tests/test_false_positive_fixes.py` - `python3 -m pytest -q` - `python3 -m py_compile crisis/gateway.py crisis/metrics.py crisis/__init__.py` - local WSGI smoke test for `/api/crisis-metrics` and `?format=prometheus`
Author
Owner

🔥 BURN DISPATCH — allegro:CRUCIBLE-2.2

Hundred-Pane Fleet active. Working on it.

🔥 **BURN DISPATCH** — allegro:CRUCIBLE-2.2 Hundred-Pane Fleet active. Working on it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-door#97