Conversation
Reviewer's GuideThis PR standardizes spelling and markdown formatting, ensures generics in Mermaid diagrams are properly escaped, and clarifies queue operations by introducing an explicit Outbox participant in the sequence diagrams. Sequence diagram for outbound frame enqueue and delivery (with explicit Outbox)sequenceDiagram
participant Client
participant ConnectionActor
participant Outbox
participant Socket
Client->>ConnectionActor: Initiate connection/request
Note over ConnectionActor: Manages high/low priority queues
ConnectionActor->>Outbox: enqueue outbound frame
Outbox->>ConnectionActor: dequeue frame
ConnectionActor->>Socket: Write outbound frame
Socket-->>Client: Delivers outbound message
Note over Outbox: Holds frames while socket busy
Sequence diagram for application task pushing frames (with explicit Outbox)sequenceDiagram
participant AppTask as Application Task
participant SessionRegistry
participant ConnectionActor
participant Outbox
participant Socket
AppTask->>SessionRegistry: get PushHandle for session
AppTask->>ConnectionActor: push(OK packet or LOCAL INFILE)
ConnectionActor->>Outbox: enqueue frame
Outbox->>ConnectionActor: dequeue frame
ConnectionActor->>Socket: write frame (when idle or after command completes)
Sequence diagram for heart-beat timer push (with explicit Outbox)sequenceDiagram
participant Timer as Heart-beat Timer
participant ConnectionActor
participant Outbox
participant Socket
Timer->>ConnectionActor: push_high_priority(Ping frame)
ConnectionActor->>Outbox: enqueue Ping in high-priority queue
Outbox->>ConnectionActor: dequeue Ping
ConnectionActor->>Socket: write Ping frame (even during response stream)
Sequence diagram for frame drop on full queue (clarified)sequenceDiagram
participant ConnectionActor
participant Socket
alt Queue not full
ConnectionActor->>Socket: write PUBLISH frame
else Queue full
Note over ConnectionActor: Drop frame due to full queue
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Rate limit exceeded@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 47 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughThe documentation for asynchronous outbound messaging was updated to clarify the architecture by explicitly introducing an "Outbox" entity in diagrams and descriptions. Formatting, numbering, and spelling were standardised, and sequence diagrams were revised to better illustrate frame flow and queue behaviour. No code or API changes were made. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ApplicationTask
participant Timer
participant ConnectionActor
participant Outbox
participant Socket
Client->>ConnectionActor: Send frame
ApplicationTask->>ConnectionActor: Send frame
Timer->>ConnectionActor: Send frame
ConnectionActor->>Outbox: Enqueue frame
Outbox->>ConnectionActor: Dequeue frame (when ready)
ConnectionActor->>Socket: Write frame
Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 7
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
docs/asynchronous-outbound-messaging-design.md(7 hunks)
🧰 Additional context used
🧠 Learnings (1)
docs/asynchronous-outbound-messaging-design.md (7)
Learnt from: CR
PR: leynos/wireframe#0
File: docs/wireframe-1-0-detailed-development-roadmap.md:0-0
Timestamp: 2025-06-24T16:43:46.789Z
Learning: When implementing a connection actor in Rust (e.g., for duplex communication), use a biased select! loop to prioritize shutdown signals, high/low priority pushes, and handler response streams in a strict order. This ensures predictable and robust processing of events.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/asynchronous-outbound-messaging-design.md:0-0
Timestamp: 2025-06-24T18:46:37.516Z
Learning: The connection actor's write loop should use a tokio::select! loop with the biased keyword to enforce strict polling order: first for shutdown signals, then high-priority push messages, then low-priority push messages, and finally the response stream. This ensures urgent messages are never starved by lower-priority traffic.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/the-road-to-wireframe-1-0-feature-set-philosophy-and-capability-maturity.md:0-0
Timestamp: 2025-06-24T16:43:37.907Z
Learning: When multiplexing multiple sources of outbound frames in a connection actor, use tokio::select!(biased;) to prioritize critical events such as graceful shutdown signals and high-priority push channels over standard handler responses. This ensures timely handling of control messages.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/the-road-to-wireframe-1-0-feature-set-philosophy-and-capability-maturity.md:0-0
Timestamp: 2025-06-24T16:43:37.907Z
Learning: The actor-per-connection model is recommended for managing TCP connections in asynchronous Rust servers. Each connection is handled by a dedicated async task, serializing all I/O and simplifying resource management.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/asynchronous-outbound-messaging-design.md:0-0
Timestamp: 2025-06-24T18:46:37.516Z
Learning: In the wireframe framework, asynchronous outbound messaging is implemented using a stateful actor-per-connection model, where each connection is managed by a dedicated async task that serializes all I/O and maintains per-connection state, such as sequence counters and push queues. This design eliminates the need for complex locking and simplifies concurrency.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/wireframe-1-0-detailed-development-roadmap.md:0-0
Timestamp: 2025-06-24T16:43:46.789Z
Learning: For asynchronous push mechanisms, implement a dual-channel (high/low priority) mpsc system to allow prioritized frame delivery. Expose a PushHandle API with push, try_push, and policy-based push_with_policy methods for ergonomic and flexible usage.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/asynchronous-outbound-messaging-design.md:0-0
Timestamp: 2025-06-24T18:46:37.516Z
Learning: Outbound message prioritization is achieved by maintaining two bounded tokio::mpsc channels per connection: one for high-priority and one for low-priority frames. The bounded nature of these channels provides robust back-pressure, suspending producers when the queue is full.
🪛 LanguageTool
docs/asynchronous-outbound-messaging-design.md
[uncategorized] ~73-~73: Loose punctuation mark.
Context: ...low_priority_push_rx: mpsc::Receiver`: For standard, non-urgent background ...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (2)
docs/asynchronous-outbound-messaging-design.md (2)
35-36: Anchor link looks fine – no action needed
The heading anchor#3-core-architecture-the-connection-actorresolves correctly on GitHub, so the intra-doc link will work.
42-48: Table formatting LGTM
Column alignment and Oxford “-ize” spelling in the requirement texts are consistent; no issues spotted.
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
docs/asynchronous-outbound-messaging-design.md(6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`docs/**/*.md`: Use the markdown files within the `docs/` directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decision...
docs/**/*.md: Use the markdown files within thedocs/directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
Proactively update the relevant file(s) in thedocs/directory to reflect the latest state when new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve.
Documentation in thedocs/directory must use en-GB-oxendict spelling and grammar, except for the word 'license'.
docs/asynchronous-outbound-messaging-design.md
`**/*.md`: Validate Markdown files using `markdownlint *.md **/*.md`. Run `mdformat-all` after any documentation changes to format all Markdown files and fix table markup. Validate...
**/*.md: Validate Markdown files usingmarkdownlint *.md **/*.md.
Runmdformat-allafter any documentation changes to format all Markdown files and fix table markup.
Validate Markdown Mermaid diagrams using thenixieCLI by runningnixie *.md **/*.md.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks in Markdown files must be wrapped at 120 columns.
Tables and headings in Markdown files must not be wrapped.
docs/asynchronous-outbound-messaging-design.md
🧠 Learnings (1)
docs/asynchronous-outbound-messaging-design.md (5)
Learnt from: CR
PR: leynos/wireframe#0
File: docs/wireframe-1-0-detailed-development-roadmap.md:0-0
Timestamp: 2025-06-24T16:43:46.789Z
Learning: When implementing a connection actor in Rust (e.g., for duplex communication), use a biased select! loop to prioritize shutdown signals, high/low priority pushes, and handler response streams in a strict order. This ensures predictable and robust processing of events.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/asynchronous-outbound-messaging-design.md:0-0
Timestamp: 2025-06-24T18:46:37.516Z
Learning: The connection actor's write loop should use a tokio::select! loop with the biased keyword to enforce strict polling order: first for shutdown signals, then high-priority push messages, then low-priority push messages, and finally the response stream. This ensures urgent messages are never starved by lower-priority traffic.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/asynchronous-outbound-messaging-design.md:0-0
Timestamp: 2025-06-24T18:46:37.516Z
Learning: In the wireframe framework, asynchronous outbound messaging is implemented using a stateful actor-per-connection model, where each connection is managed by a dedicated async task that serializes all I/O and maintains per-connection state, such as sequence counters and push queues. This design eliminates the need for complex locking and simplifies concurrency.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/asynchronous-outbound-messaging-design.md:0-0
Timestamp: 2025-06-24T18:46:37.516Z
Learning: The actor-per-connection model, prioritised message queues, and PushHandle API together enable use cases such as server-initiated packets (e.g., MySQL session tracker data), heart-beat pings (e.g., WebSocket), and broker-side fan-out (e.g., MQTT PUBLISH), all with correct ordering, back-pressure, and resilience.
Learnt from: CR
PR: leynos/wireframe#0
File: docs/the-road-to-wireframe-1-0-feature-set-philosophy-and-capability-maturity.md:0-0
Timestamp: 2025-06-24T16:43:37.907Z
Learning: The actor-per-connection model is recommended for managing TCP connections in asynchronous Rust servers. Each connection is handled by a dedicated async task, serializing all I/O and simplifying resource management.
🔇 Additional comments (1)
docs/asynchronous-outbound-messaging-design.md (1)
54-62: [web_search]What is the preferred spelling of “serialize” in the Oxford English Dictionary?
Summary
OutboxparticipantTesting
markdownlint docs/asynchronous-outbound-messaging-design.mdnixie *.md docs/*.mdmake fmtmake lintmake testhttps://chatgpt.com/codex/tasks/task_e_685af2732fe48322813b6d66c57526b4
Summary by Sourcery
Refine the asynchronous outbound messaging design documentation by standardizing spelling, properly escaping generics, and introducing an explicit Outbox participant in sequence diagrams to clarify enqueue/dequeue semantics.
Documentation: