Skip to content

Create users' guide for library features#363

Merged
leynos merged 4 commits intomainfrom
codex/create-users-guide-for-library-features
Sep 21, 2025
Merged

Create users' guide for library features#363
leynos merged 4 commits intomainfrom
codex/create-users-guide-for-library-features

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Sep 20, 2025

Summary

  • convert the users guide citations to GitHub-flavoured Markdown footnotes and add numbered references for each source file

Testing

  • make fmt
  • make markdownlint
  • make nixie

https://chatgpt.com/codex/tasks/task_e_68cddc3b824c8322b7df649476bb090c

Summary by Sourcery

Convert users guide citations to GitHub-flavored Markdown footnotes and add numbered references for each implementation source file

Documentation:

  • Switch users guide citations to GFM footnotes
  • Add numbered footnote references linking documentation to source code

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Sep 20, 2025

Reviewer's Guide

Converted the users guide document’s inline citations to GitHub-flavored Markdown footnotes and appended a numbered references section mapping each footnote to its source file and line ranges.

File-Level Changes

Change Details Files
Switched inline citations to footnote markers
  • Replaced bracketed citations (e.g. [1], [2][3]) with [^n] syntax
  • Renumbered markers to maintain sequential order
  • Adjusted adjacent punctuation and spacing for footnote syntax
docs/users-guide.md
Added footnote definitions section
  • Appended a list of [^n] definitions at the end of the document
  • Linked each footnote to its corresponding source file and line range
docs/users-guide.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 20, 2025

Warning

Rate limit exceeded

@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 4 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 8a2e241 and ce05814.

📒 Files selected for processing (1)
  • docs/users-guide.md (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive user guide for the Wireframe library, covering quick start, routing, middleware, request/response flow, connection lifecycle, protocol hooks, server operation, push queues and session management, streaming responses, metrics and observability, configuration options (serialisation, buffers, timeouts), and error handling.
    • Includes practical code examples and cross-references to related components to aid setup, understanding of runtime behaviour, and troubleshooting.

Walkthrough

Document the Wireframe user guide covering quick start, routing, middleware, serialization, extractors, request handling, connection lifecycle, protocol hooks, server execution, push queues, sessions, streaming responses, metrics, utilities, configuration defaults, limits and error surfaces, with code examples and internal references.

Changes

Cohort / File(s) Change Summary
Documentation
docs/users-guide.md
Add a comprehensive user guide covering quick start, routing, middleware, packet/serialization concepts, extractors, request and middleware flow, connection lifecycle, protocol hooks, running the server, push queues, session management, streaming responses, metrics/observability, defaults and configurables, error handling, and utilities with Rust examples and internal references.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A guide appears to lead the way,
Routes and hooks in bright array.
Streams, sessions, metrics clear—
Read the notes, the path is near.
Docs alight to start the play. 🔧📘

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed Confirm that the title "Create users' guide for library features" succinctly describes the primary change — the addition of docs/users-guide.md — and directly maps to the changeset. Keep the phrasing concise and focused; it avoids file lists, emojis, or vague labels and will be clear to reviewers scanning PR history. Accept the title as passing the check.
Description Check ✅ Passed Verify that the PR description documents the specific change — switching to GitHub-flavoured Markdown footnotes and adding numbered references — and includes testing commands, which are directly relevant to the changeset that modifies or adds docs/users-guide.md. Keep the description topical and related to the changeset; it is not off-topic or unrelated. Accept the description as passing this lenient check.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Comment @coderabbitai help to get the list of available commands and usage tips.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `docs/users-guide.md:1` </location>
<code_context>
+# Wireframe user guide
+
+Wireframe is a Rust library for building asynchronous binary protocol servers
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Heading uses 'user', which is a 2nd person reference and should be avoided per instructions.

Consider rephrasing the heading to avoid the word 'user', which is a 2nd person reference. For example, 'Wireframe Guide' or 'Wireframe Library Guide'.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Avoid 2nd person or 1st person pronouns ("I", "you", "we")

</details>
</issue_to_address>

### Comment 2
<location> `docs/users-guide.md:4` </location>
<code_context>
+# Wireframe user guide
+
+Wireframe is a Rust library for building asynchronous binary protocol servers
+with pluggable routing, middleware, and connection utilities.[^1] This guide
+walks through the major components available today and explains how they fit
+together when you assemble an application.
</code_context>

<issue_to_address>
**suggestion (review_instructions):** The phrase 'This guide' uses a 1st person reference and should be avoided.

Consider rephrasing to avoid 'This guide'. For example, 'The following sections walk through...' or 'Major components are described below.'

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Avoid 2nd person or 1st person pronouns ("I", "you", "we")

</details>
</issue_to_address>

### Comment 3
<location> `docs/users-guide.md:6` </location>
<code_context>
+Wireframe is a Rust library for building asynchronous binary protocol servers
+with pluggable routing, middleware, and connection utilities.[^1] This guide
+walks through the major components available today and explains how they fit
+together when you assemble an application.
+
+## Quick start: building an application
</code_context>

<issue_to_address>
**suggestion (review_instructions):** The sentence uses 'you', which is a 2nd person pronoun and should be avoided.

Please rephrase to avoid 'you'. For example, '...when assembling an application.'

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Avoid 2nd person or 1st person pronouns ("I", "you", "we")

</details>
</issue_to_address>

### Comment 4
<location> `docs/users-guide.md:48` </location>
<code_context>
+state for extractors using `app_data`, which registers values keyed by `TypeId`
+so they can be retrieved from request contexts.[^8][^9]
+
+Once a stream is accepted—either from a manual accept loop or via
+`WireframeServer`—call `handle_connection(stream)` to deserialise frames, build
+or reuse the middleware chain, execute handlers, and write responses back using
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 5
<location> `docs/users-guide.md:54` </location>
<code_context>
+length-delimited framing. Deserialisation failures are logged, counted, and the
+connection is closed after ten consecutive errors. [^10] If you need to emit a
+response immediately, use `send_response` or `send_response_framed` to
+serialise a `Message` value with the configured `Serializer` and write it to an
+async stream; errors surface as `SendError` variants that distinguish
+serialisation failures from I/O problems.[^11][^12]
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 6
<location> `docs/users-guide.md:55` </location>
<code_context>
+connection is closed after ten consecutive errors. [^10] If you need to emit a
+response immediately, use `send_response` or `send_response_framed` to
+serialise a `Message` value with the configured `Serializer` and write it to an
+async stream; errors surface as `SendError` variants that distinguish
+serialisation failures from I/O problems.[^11][^12]
+
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 7
<location> `docs/users-guide.md:61` </location>
<code_context>
+## Understanding packets and serialisation
+
+Wireframe works with user-defined messages that implement the `Message` trait,
+which provides helpers for bincode encoding and decoding.[^13] Serialisers plug
+into the `Serializer` trait; the default `BincodeSerializer` uses bincode’s
+standard configuration and also implements `FrameMetadata` so the framework can
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 8
<location> `docs/users-guide.md:67` </location>
<code_context>
+extract envelope metadata without decoding the full payload.[^14] Swap
+serialisers with `WireframeApp::with_serializer` during construction or the
+`serializer` method later in the builder chain when you need a different
+encoding strategy.[^15] Messages are wrapped in packets implementing the
+`Packet` trait. The bundled `Envelope` stores the route identifier, an optional
+correlation identifier, and raw payload bytes. Utilities on `PacketParts` let
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 9
<location> `docs/users-guide.md:71` </location>
<code_context>
+`Packet` trait. The bundled `Envelope` stores the route identifier, an optional
+correlation identifier, and raw payload bytes. Utilities on `PacketParts` let
+you inherit or overwrite correlation identifiers before a response is
+sent.[^16] When processing frames the application first tries to parse metadata
+via `FrameMetadata::parse`, falling back to full deserialisation if the
+shortcut fails.[^17]
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 10
<location> `docs/users-guide.md:77` </location>
<code_context>
+
+## Accessing request data with extractors
+
+`MessageRequest` records connection metadata and shared state populated by
+`WireframeApp::app_data`, making it available to extractors without global
+variables.[^18] Custom extractors implement `FromMessageRequest`, receiving the
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 11
<location> `docs/users-guide.md:80` </location>
<code_context>
+`MessageRequest` records connection metadata and shared state populated by
+`WireframeApp::app_data`, making it available to extractors without global
+variables.[^18] Custom extractors implement `FromMessageRequest`, receiving the
+request context and a `Payload` view over the remaining bytes; helper methods
+let you advance the payload safely or query how much data is left.[^19]
+Built-in extractors cover common needs: `SharedState<T>` retrieves registered
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 12
<location> `docs/users-guide.md:90` </location>
<code_context>
+
+## Handling requests with middleware
+
+Middleware is responsible for decoding incoming frames, applying cross-cutting
+behaviour, and shaping the response payload. Each request flows through a chain
+of `Service` implementations that accept a `ServiceRequest` and return a
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 13
<location> `docs/users-guide.md:92` </location>
<code_context>
+
+Middleware is responsible for decoding incoming frames, applying cross-cutting
+behaviour, and shaping the response payload. Each request flows through a chain
+of `Service` implementations that accept a `ServiceRequest` and return a
+`ServiceResponse`. Both wrappers expose methods to inspect or mutate the frame
+buffer and correlation identifier when building a reply.[^22] The `Next`
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 14
<location> `docs/users-guide.md:107` </location>
<code_context>
+
+## Connection lifecycle
+
+During `handle_connection`, the builder optionally runs per-connection setup
+and teardown callbacks. Setup is invoked once per connection and may return
+state of any type; the returned value is held until teardown runs after the
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 15
<location> `docs/users-guide.md:111` </location>
<code_context>
+and teardown callbacks. Setup is invoked once per connection and may return
+state of any type; the returned value is held until teardown runs after the
+stream finishes processing.[^26] The connection driver runs the teardown
+callback once the stream completes processing.[^27] Framed I/O uses a
+`LengthDelimitedCodec` configured with the application’s buffer capacity, and
+every read is wrapped in a timeout window derived from `read_timeout_ms`.[^28]
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 16
<location> `docs/users-guide.md:116` </location>
<code_context>
+every read is wrapped in a timeout window derived from `read_timeout_ms`.[^28]
+Inbound frames increment the inbound metrics counter, while serialisation and
+handler failures bump error counters before warnings are logged.[^29][^30]
+Responses inherit correlation identifiers via
+`PacketParts::inherit_correlation` so that mis-matched values are corrected and
+logged rather than silently propagated.[^31]
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 17
<location> `docs/users-guide.md:122` </location>
<code_context>
+
+## Protocol hooks
+
+Implement `WireframeProtocol` when you need to run custom logic around outbound
+frames. The trait exposes callbacks for connection setup, pre-send mutation,
+command completion, protocol error handling, and optional end-of-stream frame
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Sentence uses 'you', which is a 2nd person pronoun and should be avoided.

Please rephrase to avoid 'you'. For example, 'Implement `WireframeProtocol` to run custom logic around outbound frames.'

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Avoid 2nd person or 1st person pronouns ("I", "you", "we")

</details>
</issue_to_address>

### Comment 18
<location> `docs/users-guide.md:127` </location>
<code_context>
+command completion, protocol error handling, and optional end-of-stream frame
+generation.[^32] Attach a protocol to the builder with `with_protocol`. Use
+`protocol_hooks()` to convert the stored implementation into `ProtocolHooks`
+when constructing a `ConnectionActor`.[^33] `ConnectionActor::with_hooks`
+installs these callbacks so that pushes and streamed responses invoke them
+consistently alongside any connection metrics or fairness logic.[^34][^35]
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 19
<location> `docs/users-guide.md:133` </location>
<code_context>
+
+## Running servers
+
+`WireframeServer::new` clones an application factory per worker and starts in
+the unbound state; bind a socket with `bind` or `bind_existing_listener` before
+calling any run method. A convenience `worker_count` accessor reports the
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 20
<location> `docs/users-guide.md:136` </location>
<code_context>
+`WireframeServer::new` clones an application factory per worker and starts in
+the unbound state; bind a socket with `bind` or `bind_existing_listener` before
+calling any run method. A convenience `worker_count` accessor reports the
+current worker total, which defaults to the host CPU count but never drops
+below one.[^36] You can install a one-shot readiness notifier with
+`ready_signal` and customise accept-loop backoff delays using `accept_backoff`,
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 21
<location> `docs/users-guide.md:139` </location>
<code_context>
+current worker total, which defaults to the host CPU count but never drops
+below one.[^36] You can install a one-shot readiness notifier with
+`ready_signal` and customise accept-loop backoff delays using `accept_backoff`,
+which normalises values via `BackoffConfig` to keep them within sensible
+bounds.[^37] The runtime enforces those normalised limits inside the accept
+loop to prevent runaway retries.[^38] Binding transitions the server into the
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 22
<location> `docs/users-guide.md:146` </location>
<code_context>
+listener when required; failures surface as `ServerError::Bind` or
+`ServerError::Accept` variants.[^39][^40]
+
+`run` awaits Ctrl+C for shutdown, while `run_with_shutdown` accepts any future
+and cancels all worker tasks once it resolves.[^41] Each worker runs an accept
+loop that clones the factory, applies optional preamble handlers, rewinds
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 23
<location> `docs/users-guide.md:162` </location>
<code_context>
+
+## Push queues and connection actors
+
+Push queues buffer outbound frames that originate from background tasks.[^47]
+The fluent `PushQueuesBuilder` configures separate capacities for high- and
+low-priority queues, an optional global rate limit (default 100 pushes per
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 24
<location> `docs/users-guide.md:163` </location>
<code_context>
+## Push queues and connection actors
+
+Push queues buffer outbound frames that originate from background tasks.[^47]
+The fluent `PushQueuesBuilder` configures separate capacities for high- and
+low-priority queues, an optional global rate limit (default 100 pushes per
+second), and an optional dead-letter queue with adjustable logging cadence for
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 25
<location> `docs/users-guide.md:168` </location>
<code_context>
+second), and an optional dead-letter queue with adjustable logging cadence for
+dropped frames.[^48] Builder helpers such as `unlimited`, `dlq`, and
+`dlq_log_every_n` make it easy to tune throughput and observability.[^48]
+Validation ensures capacities are non-zero and that rate limits fall within
+`1..=MAX_PUSH_RATE` (10 000 messages per second).[^49] Frames are drained with
+`recv`, which prioritises the high-priority queue but eventually yields
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 26
<location> `docs/users-guide.md:182` </location>
<code_context>
+capacities or rates.[^52] All frame types must implement the marker trait
+`FrameLike`, which simply requires `Send + 'static`.[^53]
+
+`ConnectionActor` consumes the push queues, optional streaming responses, and a
+shutdown token. It keeps per-connection metrics via an RAII guard, exposes
+`set_response` for attaching a `FrameStream`, and offers `set_fairness` to tune
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 27
<location> `docs/users-guide.md:199` </location>
<code_context>
+
+## Session management
+
+`ConnectionId` wraps a `u64` identifier with convenience constructors and
+formatting helpers.[^59] `SessionRegistry` stores weak references to
+`PushHandle` instances keyed by `ConnectionId`, allowing other tasks to
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 28
<location> `docs/users-guide.md:210` </location>
<code_context>
+
+## Streaming responses
+
+The `Response` enum models several response styles: a single frame, a vector of
+frames, a streamed response, a multi-packet channel backed by `tokio::mpsc`, or
+an empty response. Call `into_stream` to convert any variant into a boxed
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 29
<location> `docs/users-guide.md:220` </location>
<code_context>
+
+## Metrics and observability
+
+When the optional `metrics` feature is enabled, Wireframe updates several named
+counters and gauges: `wireframe_connections_active`,
+`wireframe_frames_processed_total` tagged by direction,
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Paragraph exceeds 80 columns and should be wrapped accordingly.

Please wrap this paragraph and others in the document to 80 columns for improved readability and compliance with the instructions.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 30
<location> `docs/users-guide.md:225` </location>
<code_context>
+`wireframe_frames_processed_total` tagged by direction,
+`wireframe_errors_total` with error type labels, and
+`wireframe_connection_panics_total` for panicking connection tasks.[^63][^64]
+Each helper becomes a no-op when the feature is disabled, so you can enable
+instrumentation without sprinkling conditional compilation throughout your
+code. Outbound and inbound frames call these helpers from both the connection
</code_context>

<issue_to_address>
**suggestion (review_instructions):** Sentence uses 'you', which is a 2nd person pronoun and should be avoided.

Please rephrase to avoid 'you'. For example, 'Instrumentation can be enabled without...'

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Avoid 2nd person or 1st person pronouns ("I", "you", "we")

</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/users-guide.md (1)

240-305: Stabilise source references or add a maintenance note.

File/line footnotes will drift; pin permalinks or add a note that line ranges are indicative.

Proposed addition beneath the footnotes header:

- [^1]: Implemented in `src/lib.rs` (lines 2-33).
+ [^1]: Implemented in `src/lib.rs` (lines 2-33). Line numbers are indicative
+       and may drift; prefer repository permalinks when citing in issues.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 941f2b6 and 881f876.

📒 Files selected for processing (1)
  • docs/users-guide.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (docs/documentation-style-guide.md)

docs/**/*.md: Use British English based on the Oxford English Dictionary (en-oxendict) for documentation text.
The word "outwith" is acceptable in documentation.
Keep US spelling when used in an API, for example color.
Use the Oxford comma in documentation text.
Treat company names as collective nouns in documentation (e.g., "Lille Industries are expanding").
Write headings in sentence case in documentation.
Use Markdown headings (#, ##, ###, etc.) in order without skipping levels.
Follow markdownlint recommendations for Markdown files.
Provide code blocks and lists using standard Markdown syntax.
Always provide a language identifier for fenced code blocks; use plaintext for non-code text.
Use - as the first level bullet and renumber lists when items change.
Prefer inline links using [text](url) or angle brackets around the URL; avoid reference-style links like [foo][bar].
Ensure blank lines before and after bulleted lists and fenced blocks in Markdown.
Ensure tables have a delimiter line below the header row in Markdown.
Expand any uncommon acronym on first use, for example, Continuous Integration (CI).
Wrap paragraphs at 80 columns in documentation.
Wrap code at 120 columns in documentation.
Do not wrap tables in documentation.
Use sequentially numbered footnotes referenced with [^1] and place definitions at the end of the file.
Where it adds clarity, include Mermaid diagrams in documentation.
When embedding figures, use ![alt text](path/to/image) and provide concise alt text describing the content.
Add a brief description before each Mermaid diagram in documentation for screen readers.

Document examples showing how to deprecate old message versions gracefully

docs/**/*.md: Use docs/ markdown as the source of truth for requirements and decisions
Proactively update docs/ when requirements, dependencies, or architecture change
Documentation must use en-GB-oxendict spelling and grammar (LICENSE name exempt)

When long lines are warranted in ...

Files:

  • docs/users-guide.md
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Markdown paragraphs and bullet points must be wrapped at 80 columns
Markdown code blocks must be wrapped at 120 columns
Do not wrap tables and headings in Markdown
Use dashes (-) for list bullets in Markdown
Use GitHub-flavoured Markdown footnotes ([^1])

Files:

  • docs/users-guide.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/users-guide.md
docs/**

📄 CodeRabbit inference engine (docs/wireframe-1-0-detailed-development-roadmap.md)

docs/**: Document async-stream as the canonical way to create streams imperatively
Write comprehensive user guides for Duplex Messaging & Pushes, Streaming Responses, and Message Fragmentation with runnable examples

Files:

  • docs/users-guide.md
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review
🔇 Additional comments (2)
docs/users-guide.md (2)

1-239: Verify markdownlint MD013 and footnote ordering.

Wrap paragraphs at 80 columns, or disable MD013 inline where necessary. Confirm footnotes are sequential by first appearance and definitions remain at file end.

Run the linter and check ordering:

#!/bin/bash
set -euo pipefail
mdspell -rn docs/users-guide.md || true
markdownlint docs/users-guide.md
grep -n ' \[\^' -n docs/users-guide.md | awk '{print NR ":" $0}'

197-208: Avoid second person in session management.

Maintain impersonal tone.

Apply this diff:

-allowing other tasks to
-discover active connections without preventing cleanup. Lookups attempt to
+allowing other tasks to
+discover active connections without preventing cleanup. Lookups attempt to
 upgrade the stored pointer and prune dead entries automatically; explicit
 `prune` calls remove stale handles in bulk. Dedicated methods insert or remove
-handles, and helper accessors return either the live handle pairs or just their
-identifiers.[^60]
+handles, and helper accessors return either the live handle pairs or their
+identifiers.[^60]

Likely an incorrect or invalid review comment.

Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md
Comment thread docs/users-guide.md Outdated
@leynos leynos changed the title Switch users guide citations to GFM footnotes Create users' guide for library features Sep 20, 2025
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/users-guide.md (1)

1-267: Renumber footnotes to follow first-appearance order; reorder definitions block.

  • Renumber all inline markers ([^n]) sequentially in the order they first appear and reorder the definitions at the end to match.
  • Remove or fix the orphan footnote marker on line 207.
  • Verify all references resolve to definitions after renumbering; keep the definitions block at the end of the file.
♻️ Duplicate comments (2)
docs/users-guide.md (2)

130-131: Remove second‑person language in protocol hooks paragraph.

Rewrite to neutral phrasing.

-the configured maximum delay.[^18][^19] Preamble hooks support asynchronous
-success handlers and synchronous failure callbacks, letting you reject
-connections or log decode errors before the application runs.[^20]
+the configured maximum delay.[^18][^19] Preamble hooks support asynchronous
+success handlers and synchronous failure callbacks, enabling connection rejection
+or structured logging of decode errors before the application runs.[^20]

37-43: Purge second‑person phrasing in routing paragraph; keep impersonal tone.

Rewrite to eliminate “you” and imperative phrasing.

 Route identifiers must be unique; the builder returns
-`WireframeError::DuplicateRoute` when you try to register a handler twice,
-keeping the dispatch table unambiguous.[^2][^5] New applications default to the
+`WireframeError::DuplicateRoute` on duplicate registration,
+keeping the dispatch table unambiguous.[^2][^5] New applications default to the
 bundled bincode serializer, a 1024-byte frame buffer, and a 100 ms read
-timeout. Clamp these limits with `buffer_capacity` and `read_timeout_ms`, or
-swap the serializer with `with_serializer` when you need a different encoding
-strategy.[^3][^4]
+timeout. Clamp these limits with `buffer_capacity` and `read_timeout_ms`, or
+swap the serializer with `with_serializer` when a different encoding strategy
+is required.[^3][^4]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 881f876 and 8a2e241.

📒 Files selected for processing (1)
  • docs/users-guide.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (docs/documentation-style-guide.md)

docs/**/*.md: Use British English based on the Oxford English Dictionary (en-oxendict) for documentation text.
The word "outwith" is acceptable in documentation.
Keep US spelling when used in an API, for example color.
Use the Oxford comma in documentation text.
Treat company names as collective nouns in documentation (e.g., "Lille Industries are expanding").
Write headings in sentence case in documentation.
Use Markdown headings (#, ##, ###, etc.) in order without skipping levels.
Follow markdownlint recommendations for Markdown files.
Provide code blocks and lists using standard Markdown syntax.
Always provide a language identifier for fenced code blocks; use plaintext for non-code text.
Use - as the first level bullet and renumber lists when items change.
Prefer inline links using [text](url) or angle brackets around the URL; avoid reference-style links like [foo][bar].
Ensure blank lines before and after bulleted lists and fenced blocks in Markdown.
Ensure tables have a delimiter line below the header row in Markdown.
Expand any uncommon acronym on first use, for example, Continuous Integration (CI).
Wrap paragraphs at 80 columns in documentation.
Wrap code at 120 columns in documentation.
Do not wrap tables in documentation.
Use sequentially numbered footnotes referenced with [^1] and place definitions at the end of the file.
Where it adds clarity, include Mermaid diagrams in documentation.
When embedding figures, use ![alt text](path/to/image) and provide concise alt text describing the content.
Add a brief description before each Mermaid diagram in documentation for screen readers.

Document examples showing how to deprecate old message versions gracefully

docs/**/*.md: Use docs/ markdown as the source of truth for requirements and decisions
Proactively update docs/ when requirements, dependencies, or architecture change
Documentation must use en-GB-oxendict spelling and grammar (LICENSE name exempt)

When long lines are warranted in ...

Files:

  • docs/users-guide.md
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Markdown paragraphs and bullet points must be wrapped at 80 columns
Markdown code blocks must be wrapped at 120 columns
Do not wrap tables and headings in Markdown
Use dashes (-) for list bullets in Markdown
Use GitHub-flavoured Markdown footnotes ([^1])

Files:

  • docs/users-guide.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/users-guide.md
docs/**

📄 CodeRabbit inference engine (docs/wireframe-1-0-detailed-development-roadmap.md)

docs/**: Document async-stream as the canonical way to create streams imperatively
Write comprehensive user guides for Duplex Messaging & Pushes, Streaming Responses, and Message Fragmentation with runnable examples

Files:

  • docs/users-guide.md
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-test
  • GitHub Check: Sourcery review
🔇 Additional comments (1)
docs/users-guide.md (1)

228-267: Approve: footnote targets and line ranges verified

All referenced files exist and every cited line range falls within its file length.

Comment thread docs/users-guide.md
Comment thread docs/users-guide.md
Comment thread docs/users-guide.md Outdated
Comment thread docs/users-guide.md
@leynos leynos merged commit 1a69280 into main Sep 21, 2025
6 checks passed
@leynos leynos deleted the codex/create-users-guide-for-library-features branch September 21, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant