Repository navigation
Conversation
|
Batch compatibility receipt (2026-08-24) Built the inspectable synthetic branch
No manual merge resolution was required, including the shared Combined validation:
The stale Browserslist notice and authentication-dependent Phase C skips are unchanged environmental disclosures. #2903 remains draft because synthetic compatibility does not replace its declared live host-agent lifecycle gate and independent human review. |
|
Thanks for this contribution. We're closing outside-contributor pull requests that have had no activity for 14 days or more, so the queue reflects work that can still land. This isn't a judgment on the change itself. If it's still needed, please rebase onto |
Why this matters
Automation currently has to poll full status payloads and infer whether service health actually changed. This adds an authenticated, cache-backed Server-Sent Events contract that emits only meaningful state transitions. It avoids probing containers per client, ignores noisy latency-only changes, supports resumable consumers, and can terminate after a bounded event count for scripts and health collectors.
Fleet consumers rarely own every service. Repeating
service=now scopes the snapshot and transition fingerprint to the requested services, so an automation watchingllama-serveris not awakened by unrelated dashboard or extension churn.Overlap check
Searched open and closed upstream PRs for
SSE service health,service event stream, and filtered health streams, plus the changed production files. No active PR implements this endpoint or filter. PR #2906 is an independent pull-based Prometheus surface; PRs #2731, #2736, and #2819 change CSRF, key lifecycle, and Docker preflight behavior in other regions. This existing canonical branch was strengthened rather than creating a second observability PR.What changed
GET /api/events/serviceswith standard SSE framingLast-Event-IDso reconnecting clients wait for the next real changeservice=<id>to scope both snapshots and subsequent transitionsmax_eventsfor finite automationRegression coverage
The HTTP boundary tests exercise authentication, SSE headers/framing, bounded snapshots, repeated service filters, and query bounds. Tracker/stream tests prove latency-only deduplication, add/change/remove transitions, cache readiness, and resumption after
Last-Event-ID.Concrete pre-change evidence: requesting
service=open-webui&service=llama-serverreturned the unrelateddashboard-apistate as well. The new regression now returns exactly the two requested services in deterministic order.Validation
python -m pytest -q tests/test_service_events.py tests/test_main.py— 82 passed.python -m py_compile routers/events.py tests/test_service_events.py main.py— passed.WinError 1314.git diff --check— passed.Tradeoffs and rollback
Filters match current service IDs exactly and unknown IDs produce an empty scoped snapshot; the endpoint does not guess aliases. Filtering happens after reading the shared cache, so it creates no additional probes. Rollback removes only the event API/consumer contract and does not mutate service state. The stream is authenticated and intentionally remains read-only.