Skip to content

test: install host storage in module startup fixtures - #152

Merged
senamakel merged 1 commit into
mainfrom
test-to-green-20261022
Oct 24, 2026
Merged

senamakel merged 1 commit into
mainfrom
test-to-green-20261022

Conversation

@senamakel

@senamakel senamakel commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

The module startup tests that construct their own in-memory bus skipped the host storage provider installed by the shared test-bus helper. Those tests therefore depended on another test having initialized the process-global provider first, and the no-configuration startup case failed when run alone.

Install the shared test provider in the common in-process bus helper and use that helper for the standalone startup cases. Construct the custom stdio service with an explicit test provider as well.

Verification

  • a_module_loaded_with_no_configuration_comes_up failed alone before this fixture change with the host has not installed storage ports.
  • The four affected tests pass together under Nextest.
  • cargo nextest run --manifest-path vendor/tinymcp/Cargo.toml -p tinymcp --no-fail-fast: 1516/1516 passed.
  • TinyMCP workspace formatting check passed.

Summary by CodeRabbit

  • Tests
    • Updated automated checks for configured tool calls in in-process and sandboxed scenarios, with consistent test storage setup across bus-based cases. This helps ensure these scenarios are exercised reliably.

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

tinysweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: 5f92b5f82f3a098146d1326f76b2f728b4bae653

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 1 of 1 files.
Pull request purpose (title): test: install host s…

Diagnostics and supporting details

Full summary

Pull request purpose (title): test: install host storage in module startup fixtures. Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

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

Completeness: Complete
Test assessment: Test coverage is assessed from changed tests and lane evidence; execution is not claimed without trusted check data.

What changed

Test-fixture refactor confined to crates/tinymcp/src/tinybus_module/mod_tests.rs. Provider installation is extracted into install_test_provider() (a std::sync::Once-guarded call to crate::storage::install_provider(crate::storage::shared_test_provider())), and a new in_process_bus() helper calls install_test_provider() before MemoryBus::new(); in_process_connection() now builds its bus through in_process_bus(). The counted mock-server test now calls install_test_provider() before constructing its MemoryBus directly. Two standalone startup tests (a_module_that_came_up_answers_a_call_on_its_object_path and a_module_loaded_with_no_configuration_comes_up) switch from MemoryBus::new() to in_process_bus(), and configured_tool_call_runs_confidentially_without_registering_server switches from McpService::new_with_stdio to McpService::with_provider_and_stdio with an explicit per-test std::sync::Arc<crate::storage::MemoryProvider>. The diffstat is 15 additions and 5 deletions in one file; no production code is touched.

Features

  • Added — install_test_provider() helper: Encapsulates the once-guarded installation of the shared test storage provider so any test constructing an in-process bus can ensure the host storage ports are installed before use, removing the prior ordering dependency on another test having initialized the process-global provider first. (crates/tinymcp/src/tinybus_module/mod_tests.rs fn a_service_builds_from_a_null_configuration() {)
  • Added — in_process_bus() helper: Builds a MemoryBus after calling install_test_provider(), giving standalone startup tests a self-sufficient bus construction path instead of a bare MemoryBus::new(). (crates/tinymcp/src/tinybus_module/mod_tests.rs async fn a_module_that_came_up_answers_a_call_on_its_object_path() {)
  • Modified — configured_tool_call_runs_confidentially_without_registering_server uses an explicit per-test provider: Switches the custom stdio service construction from McpService::new_with_stdio, which pulls the process-wide installed provider, to McpService::with_provider_and_stdio with an explicit per-test MemoryProvider, decoupling this test from global provider state. (crates/tinymcp/src/tinybus_module/mod_tests.rs async fn configured_tool_call_runs_confidentially_without_registering_server() {)
  • Modified — RecordingSpawner stdio spawner impl retained for the sandbox launcher test: The test's recording stdio spawner remains wired into the sandboxed StdioLaunchers so the configured tool call path can still be observed while the service is built with an explicit provider. (crates/tinymcp/src/tinybus_module/mod_tests.rs impl crate::transport::stdio::StdioSpawner for RecordingSpawner {)

Tests

  • fixture — Extracts install_test_provider() from the previous in_process_connection() body and introduces in_process_bus(), which installs the shared test provider before creating a MemoryBus, with in_process_connection() now delegating to in_process_bus().: Test-only helper extraction; the tests lane reported no behavior to regress and no test gap to report, and the critique lane found no defect in the refactor. (crates/tinymcp/src/tinybus_module/mod_tests.rs async fn a_module_that_came_up_answers_a_call_on_its_object_path() {)
  • fixture — Changes the custom stdio service construction to McpService::with_provider_and_stdio with an explicit Arc<MemoryProvider>, replacing McpService::new_with_stdio.: Both the tests and security lanes noted they could not verify the McpService::with_provider_and_stdio signature because the vendor submodule is not checked out, but neither raised a finding; the critique lane reported the signature and provider argument position are consistent with the definitions it checked. (crates/tinymcp/src/tinybus_module/mod_tests.rs async fn configured_tool_call_runs_confidentially_without_registering_server() {)
  • fixture — Keeps the Broker import and RecordingSpawner stdio spawner implementation in place for the in-process broker and sandbox-launcher tests.: No findings from any answering lane; unchanged supporting test scaffolding. (crates/tinymcp/src/tinybus_module/mod_tests.rs use tinybus::broker::Broker;, crates/tinymcp/src/tinybus_module/mod_tests.rs impl crate::transport::stdio::StdioSpawner for RecordingSpawner {)

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The critique lane answered with no findings, stating the changes are consistent with the surrounding tests and the definitions it checked, including that with_provider_and_stdio takes the provider as its second argument and that install_provider from multiple tests is idempotent because shared_test_provider is OnceLock-backed.
  • Lane summary: The change extracts provider installation into a `install_test_provider()` helper called from `in_process_bus()`, adds that call to the counted mock-server test, and switches one test from `McpService::new_with_stdio` (which pulls the process-wide installed provider) to `McpService::with_provider_and_stdio` with an explicit per-test `MemoryProvider`. All of these look consistent with the surrounding tests and with the definitions I checked (`with_provider_and_stdio` takes the provider as its second argument, and `shared_test_provider` is a `OnceLock`-backed shared memory provider, so `install_provider` from multiple tests is idempotent). I found no defect to report.

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The security lane answered with no findings, noting the diff only refactors test helpers and touches no untrusted input path, network or subprocess behavior, secret handling, or CI configuration.
  • Lane summary: This diff only refactors test helpers in `crates/tinymcp/src/tinybus_module/mod_tests.rs`: it extracts `install_test_provider()` and `in_process_bus()` from `in_process_connection()`, calls the installer in one test that builds a bus directly, and switches one test service construction to `McpService::with_provider_and_stdio` with an explicit in-memory provider. No untrusted input path, network/subprocess behaviour, secret handling, or CI configuration is touched. I could not verify the `McpService::with_provider_and_stdio` signature because the vendor submodule is not checked out, but nothing in the diff suggests a mismatch.

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The tests lane answered with no findings, reporting the diff is confined to test-only helpers with no production code changes and no test gap to report.
  • Lane summary: The diff is confined to test-only helpers in `crates/tinymcp/src/tinybus_module/mod_tests.rs`: it extracts a `install_test_provider()`/`in_process_bus()` pair so every in-process test bus installs the shared test storage provider, and swaps one test's construction to `McpService::with_provider_and_stdio`. No production code changes, so there is no behaviour to regress and no test gap to report; I could not verify the existence of `McpService::with_provider_and_stdio`, but the diff alone does not prove it missing, so no finding is raised on that basis.

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The commits lane answered with no findings, reporting no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The description lane answered with no findings, reporting the change is a self-consistent test-fixture refactor whose description matches what the diff does.
  • Lane summary: The change is a test-fixture refactor: it extracts `install_test_provider` and `in_process_bus` helpers so in-process startup tests install the shared storage provider before building a `MemoryBus`, and it swaps `McpService::new_with_stdio` for `McpService::with_provider_and_stdio` with an explicit `MemoryProvider` in one test. The diff is self-consistent with the code it touches, and the description matches what the diff does; I found no defect worth reporting.
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.004907
  • Tokens: 107151 input · 3556 output · 9856 cached · 123 embedding
  • Updated: 2026-10-23T14:54:42Z
Head State Pass summary
5f92b5f82f3a ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-23T14:54:42Z)

tinysweeper 0.1.2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T14:56:00.936456Z 5f92b5f 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 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 96fbd99d-c069-4397-95f6-1f3a8956207e
📥 Commits

Reviewing files that changed from the base of the PR and between 563ede7 and 5f92b5f.

📒 Files selected for processing: 1
  • crates/tinymcp/src/tinybus_module/mod_tests.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

Test fixtures now install the shared storage provider before creating in-process buses. The sandboxed configured-tool-call test supplies a MemoryProvider to its service.

Changes: Test provider initialization

Layer / File(s) Summary
Provider setup for test buses and services
crates/tinymcp/src/tinybus_module/mod_tests.rs
The in-process bus helper installs the shared test provider before creating a MemoryBus. Bus-based tests use the helper. The sandboxed configured-tool-call test passes a MemoryProvider to with_provider_and_stdio.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • tinyhumansai/openhuman#8131 — The PR installs the shared test storage provider in module test fixtures, matching the issue’s host-supplied provider requirement.

Possibly related PRs

Suggested reviewers: oxoxdev, tinysweeper

Merge Risk: ⚪ Minimal · up to 5f92b

The test fixtures consistently provide storage before startup, including sandboxed services, so the change is mergeable.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 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: installing the host storage provider in module startup test fixtures.
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: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.99.0)

Clippy execution failed

A rabbit checks the bus before the ride,
A provider waits, installed inside.
Memory joins the service call,
Test helpers guide them all.
The rabbit hops along, satisfied.

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

Diagnostics

Total spend: $0.0049

@senamakel
senamakel merged commit 79b4207 into main Oct 24, 2026
20 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