Skip to content

Conversation

leynos
Copy link
Owner

@leynos leynos commented Jul 31, 2025

Summary

  • swap eprintln! calls in src/server.rs for tracing macros
  • keep existing behaviour in tests

Testing

  • make lint
  • make test

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

Summary by Sourcery

Enhancements:

  • Swap eprintln! calls in src/server.rs for tracing::warn and tracing::error macros to log errors and warnings

Copy link
Contributor

sourcery-ai bot commented Jul 31, 2025

Reviewer's Guide

Replaced unstructured stderr prints with structured tracing macros in server.rs, mapping each eprintln! to an appropriate tracing level (warn or error) while preserving test behavior.

Class diagram for logging changes in server.rs

classDiagram
    class Server {
        +worker_task()
        +process_stream()
    }
    class Tracing {
        +warn()
        +error()
    }
    Server ..> Tracing : uses
Loading

File-Level Changes

Change Details Files
Replace eprintln! calls with tracing logging macros
  • Replaced accept error prints with tracing::warn! including structured error field
  • Converted preamble callback errors to tracing::error! for elevated visibility
  • Changed preamble decode failure logs in tests to tracing::warn!
src/server.rs

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

Copy link
Contributor

coderabbitai bot commented Jul 31, 2025

Summary by CodeRabbit

  • New Features
    • Introduced structured logging for improved observability using the tracing system.
  • Documentation
    • Updated guidance to include instructions for setting up a global tracing subscriber for logging.
  • Style
    • Adjusted code attributes to streamline linting directives.
  • Refactor
    • Replaced direct error printing with structured logging for clearer and more contextual log output.

Walkthrough

Update the project to use structured logging by adding the tracing-subscriber dependency and initialising it in the main binary. Replace direct eprintln! calls with tracing macros in the server module. Enhance documentation to instruct users on setting up a global tracing subscriber.

Changes

Cohort / File(s) Change Summary
Dependency and Logging Setup
Cargo.toml, src/main.rs
Add tracing-subscriber dependency; initialise global tracing subscriber in main before program output.
Structured Logging in Server
src/server.rs
Replace eprintln! with tracing macros; improve log context; adjust lint attributes for test helper.
Documentation
docs/observability-operability-and-maturity.md
Add guidance on initialising a global tracing subscriber for observability.
Example Code Linting
examples/metadata_routing.rs
Change lint attribute from expect(dead_code, ...) to allow(dead_code).

Sequence Diagram(s)

sequenceDiagram
    participant Main
    participant TracingSubscriber
    participant Server
    participant Logger

    Main->>TracingSubscriber: init()
    Main->>Server: start()
    Server->>Logger: log (via tracing macros)
    Logger-->>TracingSubscriber: structured log event
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

Logs now structured, no more stray,
Tracing guides the server’s way.
Subscribers set, events won’t drop,
Observability climbs to the top.
With warnings clear and errors bright,
Wireframe’s logs are now a delight!

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/replace-eprintln-with-tracing-macros

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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 @leynos - I've reviewed your changes - here's some feedback:

  • Ensure a tracing subscriber (e.g. using tracing_subscriber::fmt::init()) is initialized early so these new logs actually get emitted.
  • Consider attaching contextual fields like peer address or connection ID to the tracing logs for better observability of errors.
  • Review log level choices for consistency—e.g., confirm recoverable errors stay as warn! and critical failures remain error! throughout the module.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Ensure a tracing subscriber (e.g. using tracing_subscriber::fmt::init()) is initialized early so these new logs actually get emitted.
- Consider attaching contextual fields like peer address or connection ID to the tracing logs for better observability of errors.
- Review log level choices for consistency—e.g., confirm recoverable errors stay as warn! and critical failures remain error! throughout the module.

## Individual Comments

### Comment 1
<location> `src/server.rs:706` </location>
<code_context>
             })
             .on_preamble_decode_failure(|_: &DecodeError| {
-                eprintln!("Preamble decode failed");
+                tracing::warn!("Preamble decode failed");
             })
             .bind(free_port)
</code_context>

<issue_to_address>
Include error context in the warning log.

Including error details in the log will make troubleshooting easier. Please add relevant error information to the warning message.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
            .on_preamble_decode_failure(|_: &DecodeError| {
                tracing::warn!("Preamble decode failed");
            })
=======
            .on_preamble_decode_failure(|err: &DecodeError| {
                tracing::warn!(error = ?err, "Preamble decode failed");
            })
>>>>>>> REPLACE

</suggested_fix>

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.

@leynos
Copy link
Owner Author

leynos commented Aug 1, 2025

@coderabbitai Have the following now been resolved?

Ensure a tracing subscriber (e.g. using tracing_subscriber::fmt::init()) is initialized early so these new logs actually get emitted.

Consider attaching contextual fields like peer address or connection ID to the tracing logs for better observability of errors.

Review log level choices for consistency—e.g., confirm recoverable errors stay as warn! and critical failures remain error! throughout the module.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Improved (1 files improve in Code Health)

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

View Improvements
File Code Health Impact Categories Improved
push.rs 9.69 → 10.00 Complex Conditional

Quality Gate Profile: Pay Down Tech Debt
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Copy link
Contributor

coderabbitai bot commented Aug 1, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, let's examine the current src/server.rs to see the tracing implementation
echo "=== Current src/server.rs content ==="
cat src/server.rs

echo -e "\n=== Searching for tracing subscriber initialization ==="
# Look for tracing subscriber initialization in common places
rg "tracing_subscriber|subscriber.*init|fmt.*init" --type rust

echo -e "\n=== Checking main.rs for initialization ==="
cat src/main.rs 2>/dev/null || echo "main.rs not found"

echo -e "\n=== Checking lib.rs for initialization ==="
cat src/lib.rs 2>/dev/null || echo "lib.rs not found"

echo -e "\n=== Looking for any tracing setup in the codebase ==="
rg "tracing::" --type rust -A 2 -B 2

echo -e "\n=== Checking Cargo.toml for tracing dependencies ==="
grep -A 20 -B 5 "tracing" Cargo.toml

Length of output: 40014


@leynos Yes, all three recommendations have been resolved:

✅ 1. Tracing subscriber initialization

The tracing subscriber is properly initialized in src/main.rs:

fn main() {
    // Enable structured logging for examples and integration tests.
    // Applications embedding the library should install their own subscriber.
    tracing_subscriber::fmt::init();
    println!("Hello from Wireframe!");
}

✅ 2. Contextual fields attached to logs

The tracing calls now include relevant contextual information:

  • Peer address context: tracing::error!(panic = %panic_msg, ?peer_addr, "connection task panicked")
  • Local address context: tracing::warn!(error = ?e, ?local_addr, "accept error")
  • Preamble callback context: tracing::error!(error = ?e, ?peer_addr, "preamble callback error")

✅ 3. Consistent log level choices

The log levels are appropriately chosen throughout the module:

  • warn! for recoverable errors:

    • Accept errors: tracing::warn!(error = ?e, ?local_addr, "accept error")
    • Failed readiness signals: tracing::warn!("Failed to send readiness signal: receiver dropped")
  • error! for critical failures:

    • Connection task panics: tracing::error!(panic = %panic_msg, ?peer_addr, "connection task panicked")
    • Preamble callback errors: tracing::error!(error = ?e, ?peer_addr, "preamble callback error")

The implementation demonstrates proper observability practices with structured logging and appropriate contextual information for debugging connection issues.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Improved (1 files improve in Code Health)

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

View Improvements
File Code Health Impact Categories Improved
push.rs 9.69 → 10.00 Complex Conditional

Quality Gate Profile: Pay Down Tech Debt
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Improved (1 files improve in Code Health)

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

View Improvements
File Code Health Impact Categories Improved
push.rs 9.69 → 10.00 Complex Conditional

Quality Gate Profile: Pay Down Tech Debt
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Copy link
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: 2

♻️ Duplicate comments (1)
src/server.rs (1)

743-745: LGTM: Structured logging in test callback.

The test properly uses tracing::warn! with error context, maintaining consistency with the production logging approach.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f98e3d and 2a3c599.

📒 Files selected for processing (5)
  • Cargo.toml (1 hunks)
  • docs/observability-operability-and-maturity.md (1 hunks)
  • examples/metadata_routing.rs (1 hunks)
  • src/main.rs (1 hunks)
  • src/server.rs (4 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.rs

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.rs: Clippy warnings MUST be disallowed.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider using Arc to reduce the amount of data returned.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Prefer immutable data and avoid unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not use return in single-line functions.
Use predicate functions for conditional criteria with more than two branches.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Prefer expect over allow.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums: Derive std::error::Error (via the thiserror crate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary: Use eyre::Report for human-readable logs; these should not be exposed in public APIs.
Never export the opaque type from a library: Convert to domain enums at API boundaries, and to eyre only in the main main() entrypoint or top-level async task.

Files:

  • examples/metadata_routing.rs
  • src/main.rs
  • src/server.rs

⚙️ CodeRabbit Configuration File

**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.

  • Adhere to single responsibility and CQRS

  • Place function attributes after doc comments.

  • Do not use return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless absolutely necessary.

  • Every module must begin with a //! doc comment that explains the module's purpose and utility.

  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar

  • Lints must not be silenced except as a last resort.

    • #[allow] is forbidden.
    • Only narrowly scoped #[expect(lint, reason = "...")] is allowed.
    • No lint groups, no blanket or file-wide suppression.
    • Include FIXME: with link if a fix is expected.
  • Use rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for mocks/stubs.

  • Prefer .expect() over .unwrap()

  • Ensure that any API or behavioural changes are reflected in the documentation in docs/

  • Ensure that any completed roadmap steps are recorded in the appropriate roadmap in docs/

  • Files must not exceed 400 lines in length

    • Large modules must be decomposed
    • Long match statements or dispatch tables should be decomposed by domain and collocated with targets
    • Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.

Files:

  • examples/metadata_routing.rs
  • src/main.rs
  • src/server.rs
Cargo.toml

📄 CodeRabbit Inference Engine (AGENTS.md)

Cargo.toml: Use explicit version ranges in Cargo.toml and keep dependencies up-to-date.
Mandate caret requirements for all dependencies: All crate versions specified in Cargo.toml must use SemVer-compatible caret requirements (e.g., some-crate = "1.2.3").
Prohibit unstable version specifiers: The use of wildcard (*) or open-ended inequality (>=) version requirements is strictly forbidden in Cargo.toml.
Tilde requirements (~) should only be used where a dependency must be locked to patch-level updates for a specific, documented reason.

Files:

  • Cargo.toml
docs/**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

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 decisions.
When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state.

Conventions for writing project documentation as described in the documentation style guide

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 ...

Files:

  • docs/observability-operability-and-maturity.md
**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.md: Documentation must use en-GB-oxendict spelling and grammar, except for the naming of the "LICENSE" file.
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks in Markdown must be wrapped at 120 columns.
Tables and headings in Markdown must not be wrapped.
Use dashes (-) for list bullets in Markdown.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.

Files:

  • docs/observability-operability-and-maturity.md

⚙️ CodeRabbit Configuration File

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

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
  • Code blocks should be wrapped to 120 columns.
  • 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/observability-operability-and-maturity.md
docs/**/*.{md,rs}

📄 CodeRabbit Inference Engine (docs/multi-packet-and-streaming-responses-design.md)

docs/**/*.{md,rs}: The official documentation and examples must exclusively use the declarative Response model for handler responses.
The async-stream pattern must be documented as the canonical approach for dynamic stream generation.

Files:

  • docs/observability-operability-and-maturity.md
🧬 Code Graph Analysis (1)
src/server.rs (1)
src/extractor.rs (1)
  • peer_addr (362-362)
⏰ Context from checks skipped due to timeout of 240000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-test
🔇 Additional comments (6)
Cargo.toml (1)

27-27: LGTM: Proper dependency addition.

The tracing-subscriber dependency follows the coding guidelines by using a caret requirement and supports the structured logging migration.

src/main.rs (1)

6-8: LGTM: Proper tracing subscriber initialization.

The placement and documentation of tracing_subscriber::fmt::init() correctly supports the structured logging migration whilst providing clear guidance for library users.

docs/observability-operability-and-maturity.md (1)

37-43: LGTM: Clear subscriber setup instructions.

The documentation properly instructs users on tracing subscriber initialization and clearly explains the consequences of omitting this step.

src/server.rs (3)

443-444: LGTM: Enhanced accept error logging.

The structured logging with local_addr context provides valuable debugging information and follows proper tracing practices.


507-507: LGTM: Peer address retrieval for logging context.

Obtaining the peer address early enables consistent contextual logging throughout the connection processing.


513-513: LGTM: Contextual preamble error logging.

The structured logging includes both error details and peer address context, addressing the previous review feedback effectively.


#[derive(bincode::Decode, bincode::Encode)]
#[expect(dead_code, reason = "used only in documentation example")]
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Revert this lint attribute change.

The coding guidelines explicitly forbid #[allow] and require #[expect(lint, reason = "...")] instead. The original code was compliant and should be restored.

-#[allow(dead_code)]
+#[expect(dead_code, reason = "used only in documentation example")]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#[allow(dead_code)]
#[expect(dead_code, reason = "used only in documentation example")]
🤖 Prompt for AI Agents
In examples/metadata_routing.rs at line 63, revert the #[allow(dead_code)]
attribute back to the original lint directive using #[expect(lint, reason =
"...")] as per coding guidelines. Remove the #[allow(dead_code)] and replace it
with the appropriate #[expect] attribute including a clear reason for the lint
expectation to maintain compliance.

/// Test helper preamble carrying no data.
#[derive(Debug, Clone, PartialEq, Encode, Decode)]
#[expect(dead_code, reason = "test helper for unused preamble type")]
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Revert this lint attribute change.

The coding guidelines explicitly forbid #[allow] and require #[expect(lint, reason = "...")] instead. Restore the compliant attribute.

-#[allow(dead_code)]
+#[expect(dead_code)]

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/server.rs at line 561, revert the #[allow(dead_code)] attribute to comply
with coding guidelines by replacing it with #[expect(dead_code, reason =
"...")], providing a clear reason for the expectation instead of allowing the
lint.

@leynos leynos merged commit 5b4448a into main Aug 1, 2025
5 checks passed
@leynos leynos deleted the codex/replace-eprintln-with-tracing-macros branch August 1, 2025 23:40
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