Skip to content

fix(storage): connect to a host's shared storage service by name - #11

Merged
M3gA-Mind merged 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/shared-storage-service
Oct 23, 2026
Merged

M3gA-Mind merged 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/shared-storage-service

Conversation

@M3gA-Mind

Copy link
Copy Markdown
Collaborator

Problem

v0.2.0 can't be loaded by a host that serves one storage service for every module, which is how openhuman serves storage.

storage::open hands every storage_callback to tinystoragedrivers_busproxy::connect_storage_at. That function refuses any destination that isn't a unique bus name ("storage callback destination must be a unique bus name"). openhuman passes the shared service's well-known name, ai.tinyhumans.tinystorage.Storage, which is the same value TinyMCP already accepts. So the module faults at setup.

Fix

storage::open treats exactly that name (tinystoragedrivers_busproxy::HOST_NAME) as the shared service and connects with connect_storage. Every other name still goes through connect_storage_at as-is. This follows TinyMCP's bus_provider.

There is still no fallback:

  • An absent callback fails setup.
  • A shared name that nobody serves fails setup.
  • An unadmitted unique name still never reaches the global host (an_unadmitted_storage_destination_does_not_fall_back_to_global_storage is unchanged).

Release verification

examples/verify_github_release.rs loaded the release with an empty config and no storage, so v0.2.0's post-publish step faulted even though the artifact is fine. It now serves a memory storage host through host callbacks and passes that binding's storage_callback, the same way verify_module.rs does.

Tests

  • the_shared_storage_service_name_reaches_the_host_serving_it: the new branch. It fails on main, where the name is refused as not unique.
  • the_shared_storage_service_name_fails_setup_when_nobody_serves_it: no fallback when nobody serves the shared name.

The first push carries only the tests, so CI shows them failing against unchanged code. The fix follows in the next push.

Refs tinyhumansai/openhuman#8326

@tinysweeper

tinysweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

⚠️ Review of f7f250391312 stopped because the pull request closed or changed.
The last completed review (4f3233d068b7b4716c084caf25aad1b211d2632a) is shown below.

Last completed report

Tiny Sweeper review

Reviewed head: 4f3233d068b7b4716c084caf25aad1b211d2632a

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 1 of 1 files.
Pull request purpose (title): fix(storage): connec…

Diagnostics and supporting details

Full summary

Pull request purpose (title): fix(storage): connect to a host's shared storage service by name. The pull request titled "fix(storage): connect to a host's shared storage service by name" intends to let `storage::open` accept a host's shared storage service name (`tinystoragedrivers_busproxy::HOST_NAME`) and connect via `connect_storage`, while all other names still go through `connect_storage_at`, and to update the release verification example to serve memory storage through host callbacks. However, the reviewed diff contains only two new tests in `crates/tinyeventqueues/src/tinybus_module/storage_tests.rs`; the described production fix in `storage.rs` and the `examples/verify_github_release.rs` change are absent. The description itself notes the first push carries only the tests so CI shows them failing against unchanged code.

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: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

Only `crates/tinyeventqueues/src/tinybus_module/storage_tests.rs` is changed, adding 28 lines and deleting 0. Two `#[tokio::test]` functions were added: `the_shared_storage_service_name_reaches_the_host_serving_it` (lines 130–140), which builds a rig with storage served, connects a module, calls `open(module, Some(tinystoragedrivers_busproxy::HOST_NAME))`, and asserts the result is `Ok`; and `the_shared_storage_service_name_fails_setup_when_nobody_serves_it` (lines 142–156), which builds a rig without storage served, calls the same `open`, asserts the result is an error, and asserts the error string contains `"storage_callback"`. No production code, dependency, or CI change is present in the reviewed diff.

Features

  • Added — Test: shared storage service name reaches the host serving it: Adds a test asserting that `storage::open` with `tinystoragedrivers_busproxy::HOST_NAME` succeeds when a host serves that storage service; the description says it fails on main where the name is refused as not unique, and the critique lane notes the positive case rests on an unverified assumption about what HOST_NAME is and whether serve() claims that well-known name. (crates/tinyeventqueues/src/tinybus_module/storage_tests.rs async fn an_invalid_storage_destination_is_rejected_before_connecting() {)
  • Added — Test: shared storage service name fails setup when nobody serves it: Adds a test asserting that `storage::open` with the shared name fails when nobody serves it, and that the failure carries the "storage_callback" message, verifying there is no fallback. (crates/tinyeventqueues/src/tinybus_module/storage_tests.rs async fn an_invalid_storage_destination_is_rejected_before_connecting() {)

Tests

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

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Two new tests assert that passing tinystoragedrivers_busproxy::HOST_NAME as the storage destination succeeds when a host serves storage and fails with a "storage_callback" message when it does not; the assertions match what storage::open does for a valid bus name, and the tests are structured consistently with the neighbouring cases. I could not verify what HOST_NAME actually is or whether serve() claims that well-known name, since tinystoragedrivers_busproxy is not in the searched tree, so the soundness of the positive case rests on an unchecked assumption.

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Two new tests in storage_tests.rs exercise `open` with the shared storage service name; the change only adds test coverage and introduces no production code, no new sinks, and no CI or dependency changes. Nothing reportable.

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The diff is test-only: it adds two tests to storage_tests.rs asserting that the shared storage service name (tinystoragedrivers_busproxy::HOST_NAME) is accepted when a host serves storage and fails closed when nobody does. The tests exercise an existing production path (storage::open) with real assertions that can fail — a successful outcome must mean an actual connect, and a failure must carry the "storage_callback" message — and they correctly use the rig(true)/rig(false) distinction. A caller passing a constant name in a test is a fixture, not untrusted input. No reportable defects.

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: No sensitive content in committed files.
  • Lane summary: No sensitive content in committed files.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The diff adds only two tests to storage_tests.rs (lines 130–156) and contains no production change.
  • Lane summary: The diff adds only two tests to storage_tests.rs (lines 130–156); it contains no production change, and the description's claimed fix in storage.rs is absent from the reviewed diff. The tests reference `rig(true)`/`rig(false)`, `open`, and `tinystoragedrivers_busproxy::HOST_NAME`, and while `open` exists in storage.rs and is imported via `use super::*`, I could not verify the test helper module (crates/tinyeventqueues/src/tinybus_module/tests.rs does not exist at this commit) or the HOST_NAME constant, so I cannot confirm the tests compile against this branch. As it stands the description does not match the diff: the described fix, and the verify_github_release.rs change, are not present here, and the two new tests are red against unchanged code.
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.006182
  • Tokens: 162582 input · 4957 output · 28678 cached · 119 embedding
  • Updated: 2026-10-23T15:51:37Z
Head State Pass summary
4f3233d068b7 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-23T15:51:37Z)

tinysweeper 0.1.2

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ 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: da91b4e7-bc0f-4437-9ae3-9a7b2b48b399
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@M3gA-Mind
M3gA-Mind merged commit 4c30a80 into tinyhumansai:main Oct 23, 2026
5 of 6 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