Repository navigation
docs(adr-001): streaming example using event_stream_iter - #48
Merged
Merged
Conversation
Companion to event_driven_anomaly.rs. The earlier example called the per-event primitives directly; this one uses the iterator adapter (PR #45) and composes it with stdlib's iterator chain — the native Rust pattern RuView / Cognitum / Ruflo would adopt. Demonstrates: - One event stream → one iterator chain → reports. - Coherence-gated skip on tiny deltas (latency 0). - PlanBudget cap on cumulative ops; iterator ends gracefully when budget exhausted. - Per-event latency tracked by the iterator. Sample output (10-event stream, budget=4 SubLinear ops): event # status latency_us top-anomaly ──────────────────────────────────────────── 0 Solved 73 row 7 1 Skipped 0 row — 2 Solved 43 row 22 3 Skipped 0 row — 4 Solved 41 row 40 5 Solved 42 row 51 6 Skipped 0 row — 7 BudgetRefused 0 row — Summary: 4 solved, 3 skipped by gate, 1 budget-refused The architecture line is fully realised: streaming surface with stdlib iterator composition, per-event SubLinear cost, O(|δ|) gate, O(1) budget consume. Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to `event_driven_anomaly.rs` (PR #33/#35). The earlier example called the per-event primitives directly; this one uses the iterator adapter from PR #45 and composes it with stdlib's iterator chain — the native Rust pattern RuView / Cognitum / Ruflo would adopt.
Demonstrates
Sample output (10-event stream, budget=4 SubLinear ops)
```
event # status latency_us top-anomaly
─────────────────────────────────────────────
0 Solved 73 row 7
1 Skipped 0 row —
2 Solved 43 row 22
3 Skipped 0 row —
4 Solved 41 row 40
5 Solved 42 row 51
6 Skipped 0 row —
7 BudgetRefused 0 row —
Summary: 4 solved, 3 skipped by gate, 1 budget-refused
```
Architecture line fully realised
Test plan
🤖 Generated with claude-flow