Skip to content

fix: gate Error::invalid_argument on the module feature - #38

Merged
senamakel merged 2 commits into
mainfrom
fix/warnings
Oct 2, 2026
Merged

senamakel merged 2 commits into
mainfrom
fix/warnings

Conversation

@senamakel

@senamakel senamakel commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Fixes the dead_code warning for Error::invalid_argument in builds without the module feature (its only non-test callers are in the TinyBus adapter). Compiled under any(feature = "module", test); no #[allow]. Default and all-features clippy on the workspace is clean; no-default-features lib tests pass (732).

Summary by CodeRabbit

  • Chores
    • Build configuration is more selective about when an internal error-handling utility is included. This does not change runtime behavior or add or remove any user-facing capabilities. No other end-user-visible changes are included in this update.

senamakel and others added 2 commits October 2, 2026 15:34
The `invalid_argument` constructor is only used by the TinyBus adapter, which is compiled only when the `module` feature is enabled. Adding a `#[cfg]` attribute prevents a dead-code warning or unused function error in builds without that feature.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Without the module feature nothing constructs InvalidArgument, so the
constructor tripped dead_code. Compile it only with the adapter (and tests).

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@tinysweeper

tinysweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Incomplete
Priority: none
Reviewed head: ab998edbdcfe
Updated: 1790944613 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 1 Active findings 0
Tests 0 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 0 Pending checks/questions 2

Completeness: Incomplete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Could not review: crates/tinymcp/src/error/mod.rs

Before merge

  • Complete the critique review for crates/tinymcp/src/error/mod.rs.
  • Complete the security review for crates/tinymcp/src/error/mod.rs.

How this fits together

flowchart LR
  n0["Error<br/>changed"]:::changed
  n1["one_of_every_variant"]:::impacted
  n2["assorted_other_errors"]:::impacted
  n3["Result"]:::impacted
  n4["oauth_challenge_error"]:::impacted
  n5["bare_unauthorized_error"]:::impacted
  n6["invalid_argument"]:::impacted
  n1 -->|uses| n0
  n1 -->|calls| n2
  n1 -->|calls| n4
  n1 -->|calls| n6
  n2 -->|uses| n0
  n3 -->|uses| n0
  n4 -->|uses| n0
  n5 -->|uses| n0
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinymcp/src/error/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 1 file could not be reviewed: crates/tinymcp/src/error/mod.rs.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinymcp/src/error/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 1 file could not be reviewed: crates/tinymcp/src/error/mod.rs.

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: _Code retrieval was unavailable (model: ladder embeddings returned 402 Payment Required: {"error":"Insufficient USD or Diem balance to complete request. Visit https://venice\.ai/settings/api to add credits."}), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: timed out after 10s), so this review ran without it._

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Gates `Error::invalid_argument` behind the `module` feature (or tests), fixing a dead_code warning. The change is correct and safe to merge. _Code retrieval was unavailable (model: ladder embeddings returned 402 Payment Required: {"error":"Insufficient USD or Diem balance to complete request. Visit https://venice\.ai/settings/api to add credits."}), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: timed out after 10s), so this review ran without it._

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No end-to-end harness in this repository: no e2e test files and no e2e workflow.
Evidence and run details
  • Models: deepseek/deepseek-v4-flash
  • Spend: $0.001846
  • Tokens: 13808 input · 5603 output · 5632 cached · 0 embedding
Head State Pass summary
ab998edbdcfe incomplete 0 active finding(s), 0 resolved finding(s) (at 1790944613)

tinysweeper 0.1.0

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T12:36:15.557239Z ab998ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d9346474-e9d5-4aa0-b02e-53e2d2f7ec95

📥 Commits

Reviewing files that changed from the base of the PR and between 9d640c4 and ab998ed.

📒 Files selected for processing (1)
  • crates/tinymcp/src/error/mod.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The crate-private Error::invalid_argument constructor now compiles only when the module feature or tests are enabled.

Changes

Error constructor gating

Layer / File(s) Summary
Gate the invalid-argument constructor
crates/tinymcp/src/error/mod.rs
Documentation and a compile-time condition restrict the constructor to builds with the module feature or tests.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ab998

The constructor remains available to the module and test code that use it, while being omitted from builds that need neither. No actionable merge risk was identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: gating Error::invalid_argument on the module feature.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


A rabbit checks the error gate,
The module key decides its fate.
When tests are near, it hops inside,
Else quiet builds let it reside.
One small condition marks the way,
And documentation joins the day.

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

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinymcp/src/error/mod.rs.

             $0.0018 · 13,808 in / 5,603 out · 5,632 cached (41%) · deepseek/deepseek-v4-flash
tests:       $0.0012 · 9,110 in  / 3,627 out · 3,840 cached (42%) · deepseek/deepseek-v4-flash
description: $0.0003 · 3,310 in  / 689 out   · 1,280 cached (39%) · deepseek/deepseek-v4-flash

@senamakel
senamakel merged commit 50a5af9 into main Oct 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant