Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions tests/data/regression_table_expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
| # | Task | Description | Size | Depends On |
| --- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- |
| 3.1 | Graceful Shutdown | Implement the server-wide graceful shutdown pattern. Use tokio_util::sync::CancellationToken for signalling and tokio_util::task::TaskTracker to ensure all connection actors terminate cleanly. | Large | #1.3 |
| 3.2 | Re-assembly DoS Protection | Harden the FragmentAdapter by adding a non-optional, configurable timeout for partial message re-assembly and strictly enforcing the max_message_size limit to prevent memory exhaustion. | Medium | #1.5 |
| 3.3 | Multiplexed Re-assembly | Enhance the FragmentAdapter's inbound logic to support concurrent re-assembly of multiple messages. Use the msg_id from FragmentMeta as a key into a dashmap::DashMap of partial messages. | Large | #3.2 |
| 3.4 | Per-Connection Rate Limiting | Integrate an asynchronous, token-bucket rate limiter into the PushHandle. The rate limit should be configurable on the WireframeApp builder and enforced on every push. | Medium | #2.2 |
| 3.5 | Dead Letter Queue (DLQ) | Implement the optional Dead Letter Queue mechanism. Allow a user to provide a DLQ channel sender during app setup; failed pushes (due to a full queue) can be routed there instead of being dropped. | Medium | #2.2 |
| 3.6 | Context-Aware FragmentStrategy | Enhance the FragmentStrategy trait. max_fragment_payload and encode_header should receive a reference to the logical Frame being processed, allowing for more dynamic fragmentation rules. | Small | #1.4 |
8 changes: 8 additions & 0 deletions tests/data/regression_table_input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
| # | Task | Description | Size | Depends On |
| --- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- |
| 3.1 | Graceful Shutdown | Implement the server-wide graceful shutdown pattern. Use tokio_util::sync::CancellationToken for signalling and tokio_util::task::TaskTracker to ensure all connection actors terminate cleanly. | Large | #1.3 |
| 3.2 | Re-assembly DoS Protection | Harden the FragmentAdapter by adding a non-optional, configurable timeout for partial message re-assembly and strictly enforcing the max_message_size limit to prevent memory exhaustion. | Medium | #1.5 |
| 3.3 | Multiplexed Re-assembly | Enhance the FragmentAdapter's inbound logic to support concurrent re-assembly of multiple messages. Use the msg_id from FragmentMeta as a key into a dashmap::DashMap of partial messages. | Large | #3.2 |
| 3.4 | Per-Connection Rate Limiting | Integrate an asynchronous, token-bucket rate limiter into the PushHandle. The rate limit should be configurable on the WireframeApp builder and enforced on every push. | Medium | #2.2 |
| 3.5 | Dead Letter Queue (DLQ) | Implement the optional Dead Letter Queue mechanism. Allow a user to provide a DLQ channel sender during app setup; failed pushes (due to a full queue) can be routed there instead of being dropped. | Medium | #2.2 |
| 3.6 | Context-Aware FragmentStrategy | Enhance the FragmentStrategy trait. max_fragment_payload and encode_header should receive a reference to the logical Frame being processed, allowing for more dynamic fragmentation rules. | Small | #1.4 |
18 changes: 18 additions & 0 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,3 +646,21 @@ fn test_preserve_hard_line_breaks() {
assert_eq!(output[0], "Line one with break.");
assert_eq!(output[1], "Line two follows.");
}

#[test]
/// Tests that `process_stream` preserves complex table formatting without modification.
///
/// This regression test ensures that properly formatted complex tables with multiple
/// columns and detailed content pass through the processing pipeline unchanged,
/// preventing regressions that might inadvertently alter correct formatting.
fn test_regression_complex_table() {
let input: Vec<String> = include_str!("data/regression_table_input.txt")
.lines()
.map(str::to_string)
.collect();
let expected: Vec<String> = include_str!("data/regression_table_expected.txt")
.lines()
.map(str::to_string)
.collect();
assert_eq!(process_stream(&input), expected);
}