Skip to content

feat(#397): add batchGetStreamHealth() for multi-stream health evaluation - #489

Merged
Chuks-coderr merged 2 commits into
SoroStream:mainfrom
teslims2:feat/397-batch-stream-health
Aug 27, 2026
Merged

Chuks-coderr merged 2 commits into
SoroStream:mainfrom
teslims2:feat/397-batch-stream-health

Conversation

@teslims2

Copy link
Copy Markdown
Contributor

Summary

Add batchGetStreamHealth(streams, now?) that evaluates the health of multiple streams in a single call and returns per-stream results together with aggregated summary counts. This builds on the getStreamHealth scoring logic from #398.

Changes

  • src/types.ts: Added StreamHealthStatus, StreamHealthResult, BatchStreamHealthEntry, BatchStreamHealthSummary, and BatchStreamHealthResult types.
  • src/utils.ts: Implemented getStreamHealth() (single-stream scorer) and batchGetStreamHealth() (batch wrapper with summary aggregation). All logic is pure client-side — no network calls.
  • src/index.ts: Exported getStreamHealth, batchGetStreamHealth, and all associated types.
  • test/get_stream_health.test.ts: 12 tests for single-stream health scoring.
  • test/batch_stream_health.test.ts: 9 tests covering batch counting, ordering, empty input, and per-entry health results.

Acceptance Criteria

  • Feature is fully implemented
  • Tests pass (21/21)
  • Lint/type checks pass
  • PR references this issue number

Closes #397

…lth evaluation

Implement batchGetStreamHealth(streams, now?) that evaluates the health of
multiple streams in a single call and returns per-stream results with
aggregated summary counts.

- Add StreamHealthStatus, StreamHealthResult types (required by SoroStream#398/getStreamHealth)
- Add BatchStreamHealthEntry, BatchStreamHealthSummary, BatchStreamHealthResult types
- Implement getStreamHealth() helper for single-stream scoring
- Implement batchGetStreamHealth() with summary counts (healthy/warning/critical/etc.)
- Export all functions and types from index.ts
- Add 21 tests covering batch counting, ordering, empty input, and health scoring

Closes SoroStream#397
@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@teslims2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chuks-coderr
Chuks-coderr merged commit 061cada into SoroStream:main Aug 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add stream health score utility

2 participants