Skip to content

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

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

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

Conversation

@M3gA-Mind

Copy link
Copy Markdown
Collaborator

Main is red: #11 merged its tests without the fix. This PR carries that fix.

#11 was meant to land two tests and then the fix, but it merged after the tests-only push, so the_shared_storage_service_name_reaches_the_host_serving_it now fails on main (storage_tests.rs:139, "storage callback destination must be a unique bus name").

Fix

storage::open treats exactly the shared storage service name (tinystoragedrivers_busproxy::HOST_NAME, ai.tinyhumans.tinystorage.Storage) 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 (the_shared_storage_service_name_fails_setup_when_nobody_serves_it, already on main).
  • An unadmitted unique name never reaches the global host (an_unadmitted_storage_destination_does_not_fall_back_to_global_storage, unchanged).

Without this, a host that serves one storage service for every module, as openhuman does, can't load the module: setup faults on the shared name.

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 memory storage under the shared service name and passes it as storage_callback, which runs this branch against the released artifact.

Docs

settings.rs, MODULE.md, tinybus_module/README.md and docs/specs/event-pipeline.md now describe the shared-service form of storage_callback.

No new tests: the two that cover this landed in #11. On main the first fails, and with this change it should pass.

Refs tinyhumansai/openhuman#8326

@tinysweeper

tinysweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: c02805d5e1021f760307f2f0e6c34cc95fd1b8a3

Findings

No active actionable findings.

Advisory notes

  • medium: Test the shared storage service name path in open() (crates/tinyeventqueues/src/tinybus_module/storage.rs:43)
    Problem: This adds a new branch in `open()`: when the configured `storage_callback` is exactly `HOST_NAME`, the module connects via `connect_storage` rather than `connect_storage_at`. No te
    Suggested fix:
    No concrete fix was supplied.

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 6 of 6 files.

Diagnostics and supporting details

Full summary

Pull request purpose (title): fix(storage): connect to a host's shared storage service by name. Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

Change surface Files Review signal Count
Production 3 Active findings 0
Tests 0 Noted findings 1
Documentation 3 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

The whole-pull-request title and description state this PR carries the fix that #11 merged without: on main, `the_shared_storage_service_name_reaches_the_host_serving_it` fails because `storage::open` did not recognize the shared storage service name. Across the full diff, `crates/tinyeventqueues/src/tinybus_module/storage.rs` now branches on whether `destination.as_str()` equals `tinystoragedrivers_busproxy::HOST_NAME` (the shared service name `ai.tinyhumans.tinystorage.Storage`): when equal, it connects with `tinystoragedrivers_busproxy::connect_storage(connection)`, otherwise it still uses `connect_storage_at(connection, destination)`, with the same error mapping for both. The no-fallback behavior is preserved: an absent callback still fails setup, a shared name nobody serves fails setup, and an unadmitted unique name never falls back to global storage. `crates/tinyeventqueues/examples/verify_github_release.rs` now spins up a `PerCallerEndpoint` backed by `MemoryBackend`, serves it via `serve(&host, Arc::new(endpoint))`, and loads the release with `serde_json::json!({ "storage_callback": HOST_NAME })` instead of an empty config, so the branch runs against the released artifact. Documentation is updated in `crates/tinyeventqueues/src/tinybus_module/settings.rs`, `MODULE.md`, `crates/tinyeventqueues/src/tinybus_module/README.md`, and `docs/specs/event-pipeline.md` to describe the shared-service form of `storage_callback` alongside the unique per-instance callback name. The description states no new tests were added because the two covering tests landed in #11.

Features

  • Modified — Shared storage service name routes to `connect_storage`: `storage::open` now distinguishes the exact shared service name from a per-instance callback binding: when `destination.as_str() == tinystoragedrivers_busproxy::HOST_NAME` it calls `connect_storage`, and every other name uses `connect_storage_at` unchanged, with identical error mapping for both branches. This lets a host that serves one storage service for every module, such as openhuman, load the module instead of faulting on the shared name, while preserving the no-fallback behavior for absent, unserved-shared, and unadmitted-unique names. (crates/tinyeventqueues/src/tinybus_module/storage.rs pub(crate) async fn open(connection: Connection, callback: Option<&str>) -> Resu)
  • Modified — Documented shared-service form of `storage_callback`: `settings.rs`, `MODULE.md`, `tinybus_module/README.md`, and `docs/specs/event-pipeline.md` now describe `storage_callback` as either the unique callback binding admitted for the instance or the shared storage service name `ai.tinyhumans.tinystorage.Storage` for a host that serves one storage service for every module, while still stating that missing or unusable host storage fails setup rather than starting with an ephemeral engine. (MODULE.md scope the host bound it to, documents for its `teq.*` state and the queue port, crates/tinyeventqueues/src/tinybus_module/README.md both., docs/specs/event-pipeline.md are in `tinyeventqueues-bus`.)

Tests

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

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 6 files; 0 findings.

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The security lane is answered, reviewed 3 of 3 applicable files with 0 findings, and states that MODULE.md, `crates/tinyeventqueues/src/tinybus_module/README.md`, and `docs/specs/event-pipeline.md` were not security-reviewed because they are prose or tabular data.
  • Lane summary: Reviewed 3 files; 0 findings. 3 files were not security-reviewed: MODULE.md (prose or tabular data), crates/tinyeventqueues/src/tinybus_module/README.md (prose or tabular data), docs/specs/event-pipeline.md (prose or tabular data).

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The tests lane is answered with no pending checks and reports a single observation: the new `HOST_NAME`/`connect_storage` branch is untested in this diff, and the `HOST_NAME`/`connect_storage` definitions could not be verified because the vendored storage submodule is not in the tree.
  • Lane summary: The behavioural change routes a `storage_callback` equal to the shared `HOST_NAME` through `connect_storage` instead of `connect_storage_at`, but no test in the diff exercises that branch, so the new path (and its failure path) can silently regress; the `storage_tests.rs` helpers only use `:1.999999`, `""` and the absent case. I could not verify the `HOST_NAME`/`connect_storage` definitions because the vendored storage submodule is not in the tree.

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The commits lane is answered and reports no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Provisional: the description matches the diff for the documented parts, but the example's use of `HOST_NAME`, `connect_storage`, `serve` and `PerCallerEndpoint` needs checking — the tree search found no such definitions and the vendor submodule is not checked out, so I cannot yet tell whether the example or the storage fix compiles. Requesting lookups.
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.001310
  • Tokens: 294389 input · 6696 output · 52224 cached · 249 embedding
  • Updated: 2026-10-23T18:12:30Z
Head State Pass summary
c02805d5e102 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-23T18:12:30Z)

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: b72a92a7-2857-4eed-993f-34ae9353e6c9
  • 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.0013

@M3gA-Mind
M3gA-Mind merged commit 97a2ad2 into tinyhumansai:main Oct 23, 2026
11 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