Skip to content

fix(core): repair main after the tinybus and memory-subsystem PRs collided - #5467

Closed
senamakel wants to merge 2 commits into
tinyhumansai:mainfrom
senamakel:fix-tinybus-collision
Closed

senamakel wants to merge 2 commits into
tinyhumansai:mainfrom
senamakel:fix-tinybus-collision

Conversation

@senamakel

Copy link
Copy Markdown
Member

What

main does not compile — neither Cargo world — and has not since #5459 and #5446 both merged. #5459 deleted src/core/event_bus/ and moved the bus onto the vendored tinybus crate; #5446 added new references to crate::core::event_bus. Neither PR was wrong on its own; they were verified against different bases.

error[E0432]: unresolved import `crate::core::event_bus`
  --> src/openhuman/memory/guard/audit.rs:33:18
error[E0433]: cannot find `event_bus` in `core`
   --> src/openhuman/memory/binding.rs:398:26
error[E0432]: unresolved import `openhuman_core::core::event_bus`
  --> app/src-tauri/src/whatsapp_data/mod.rs:63:31

Every failing site is ungated code, so no feature selection avoids it.

The fix

File Change
memory/guard/audit.rs publish_global(..)BUS.publish(..); event_bus::DomainEventcore::events::DomainEvent
memory/binding.rs same, at the MemoryDriverBindFailed publish
app/src-tauri/src/whatsapp_data/mod.rs free fn register_native_globalBUS.native().register, one-for-one
memory/guard/provider_tests.rs the two step-7 tests migrated off init_global(..).raw_receiver()

The shell one is worth calling out: app/src-tauri is a separate Cargo world, so it is invisible to cargo check at the root and surfaces only in the Tauri clippy lane or the pre-push hook.

The test migration is the only part that is not a path rename. The old API was a synchronous tokio::sync::broadcast receiver drained with try_recv; tinybus has no equivalent, because delivery routes through a broker and is asynchronous. The tests now subscribe a recording EventHandler to the global bus — the idiom web_chat::event_bus's own tests already use — and poll:

  • the refusal test polls up to 2s, bounded so a regression fails instead of hanging CI;
  • the success-path test sleeps briefly before asserting absence, because asserting "nothing arrived" the instant after the call would pass even if something had. It still filters by driver id rather than asserting the recorder is empty, since the sibling test legitimately publishes onto the same process-global bus in parallel.

The rest of the diff

Two more artefacts of the same collision, both mechanical:

  • app/src-tauri/Cargo.lock never learned about tinybus / tinybus-macros.
  • cargo fmt --all and prettier both had work to do — refactor(core): replace the event bus with tinybus #5459 landed ~72 Rust files unformatted plus one .tsx reflow, so the fmt lane is red on main too. This is the bulk of the diff. Review the four files in the table above and skim the rest.

Not fixed here

memory::guard::families::tests::guard_explicit_scope_argument_wins_over_the_ambient_one fails deterministically on main, in isolation, in a file this PR does not touch: an explicit SourceScope argument is widened back to the ambient scope (Some("") where Some("gmail:me") is expected). That is a behavioural question for the memory-subsystem author, not a mechanical collision, so it is #5466 rather than a guess here.

Verification

cargo fmt --all -- --check                                  # clean
cargo check --lib --tests                                   # clean
cargo clippy --manifest-path app/src-tauri/Cargo.toml -- -D warnings   # clean
cargo test --lib memory::guard::provider                    # 12 passed, incl. both migrated tests

senamakel and others added 2 commits August 9, 2026 11:24
…lided

tinyhumansai#5459 deleted `src/core/event_bus/` and moved the bus onto the vendored
tinybus crate; tinyhumansai#5446 added new references to `crate::core::event_bus`. Both
merged, and neither Cargo world has compiled since. No feature selection avoids
it — every failing site is ungated code.

Four call sites, mechanically retargeted at the post-tinybus paths:

- `memory/guard/audit.rs`, `memory/binding.rs` — `publish_global(..)` is
  `BUS.publish(..)`, and `event_bus::DomainEvent` is `core::events::DomainEvent`.
- `app/src-tauri/src/whatsapp_data/mod.rs` — the free function
  `register_native_global` is `BUS.native().register`, one-for-one. The shell
  is a separate Cargo world, so this one is invisible to `cargo check` at the
  root and surfaces only in the Tauri clippy lane (or the pre-push hook).
- `memory/guard/provider_tests.rs` — the two step-7 tests observed the old
  synchronous `init_global(..).raw_receiver()` broadcast channel, which has no
  tinybus equivalent. They now subscribe a recording `EventHandler` to the
  global bus (the idiom `web_chat::event_bus`'s own tests use) and poll,
  because delivery routes through a broker and is asynchronous now. The refusal
  test polls with a 2s bound so a regression fails rather than hangs; the
  success-path test sleeps briefly before asserting absence, since asserting
  "nothing arrived" the instant after the call would pass even if something had.

Two more artefacts of the same collision:

- `app/src-tauri/Cargo.lock` never learned about `tinybus`/`tinybus-macros`.
- `cargo fmt --all` and prettier both had work to do: tinyhumansai#5459 landed ~72 Rust
  files unformatted and one `.tsx` reflow went with it, so the fmt lane is red
  on main too. That is the bulk of the diff and it is entirely mechanical.

NOT fixed here, because it is a behavioural question rather than a mechanical
one: `memory::guard::families::tests::guard_explicit_scope_argument_wins_over_the_ambient_one`
fails deterministically on main, in isolation, in a file this PR does not
touch — an explicit `SourceScope` argument is widened back to the ambient
scope. Filed separately.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted the ingest handler registration to use a single closure argument instead of a multi-line tuple, reducing visual nesting and making the code consistent with the other handler registrations in the same function.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel requested a review from a team August 9, 2026 08:27
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4d304ccb-f8fc-498c-9903-028368eea634

📥 Commits

Reviewing files that changed from the base of the PR and between 8774fe4 and 643f350.

⛔ Files ignored due to path filters (1)
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (77)
  • app/src-tauri/src/whatsapp_data/mod.rs
  • app/src/components/settings/panels/VoicePanel.tsx
  • src/core/bus.rs
  • src/core/jsonrpc.rs
  • src/core/mod.rs
  • src/openhuman/agent/artifacts/store_tests.rs
  • src/openhuman/agent/bus.rs
  • src/openhuman/agent/harness/session/runtime_tests.rs
  • src/openhuman/agent/harness/session/turn/tools.rs
  • src/openhuman/agent/learning/extract/signature.rs
  • src/openhuman/agent/learning/profile_md_renderer.rs
  • src/openhuman/agent/learning/startup.rs
  • src/openhuman/agent/orchestration/run_ledger_finalize.rs
  • src/openhuman/agent/orchestration/run_ledger_finalize_tests.rs
  • src/openhuman/agent/tinyagents/tools.rs
  • src/openhuman/agent/triage/escalation.rs
  • src/openhuman/agent/triage/evaluator.rs
  • src/openhuman/agent/triage/events.rs
  • src/openhuman/channels/bus.rs
  • src/openhuman/channels/host/adapters.rs
  • src/openhuman/channels/proactive.rs
  • src/openhuman/channels/providers/telegram/approval_surface.rs
  • src/openhuman/channels/providers/telegram/approval_surface_tests.rs
  • src/openhuman/channels/providers/telegram/bus.rs
  • src/openhuman/channels/providers/telegram/bus_tests.rs
  • src/openhuman/channels/routes_tests.rs
  • src/openhuman/channels/runtime/dispatch/processor.rs
  • src/openhuman/channels/runtime/test_support.rs
  • src/openhuman/channels/tests/health.rs
  • src/openhuman/channels/tests/runtime_dispatch.rs
  • src/openhuman/config/ops/agent.rs
  • src/openhuman/cron/bus.rs
  • src/openhuman/cron/scheduler_tests.rs
  • src/openhuman/desktop/notifications/bus.rs
  • src/openhuman/flows/bus.rs
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
  • src/openhuman/inference/provider/factory_tests.rs
  • src/openhuman/inference/provider/openhuman_backend_model.rs
  • src/openhuman/inference/provider/ops/http_error.rs
  • src/openhuman/inference/provider/ops_tests.rs
  • src/openhuman/integrations/composio/ops/direct_mode.rs
  • src/openhuman/integrations/task_sources/bus.rs
  • src/openhuman/meet/backend_bot/calendar.rs
  • src/openhuman/memory/binding.rs
  • src/openhuman/memory/conversations/bus.rs
  • src/openhuman/memory/diff/ops.rs
  • src/openhuman/memory/global.rs
  • src/openhuman/memory/guard/audit.rs
  • src/openhuman/memory/guard/provider_tests.rs
  • src/openhuman/memory/ops/sync.rs
  • src/openhuman/memory/store/client.rs
  • src/openhuman/memory/sync/composio/bus.rs
  • src/openhuman/memory/sync_events.rs
  • src/openhuman/memory/sync_pipeline_e2e_tests.rs
  • src/openhuman/memory/tinycortex/sync.rs
  • src/openhuman/memory/tree/tree_runtime/bus.rs
  • src/openhuman/security/approval/gate.rs
  • src/openhuman/security/credentials/bus.rs
  • src/openhuman/security/credentials/session_support.rs
  • src/openhuman/security/devices/bus.rs
  • src/openhuman/security/egress/emit_tests.rs
  • src/openhuman/security/keyring_consent/policy.rs
  • src/openhuman/skills/bus.rs
  • src/openhuman/skills/ops_create.rs
  • src/openhuman/skills/webhooks/bus.rs
  • src/openhuman/voice/bus.rs
  • src/openhuman/web_chat/event_bus.rs
  • tests/agent_harness_e2e.rs
  • tests/calendar_grounding_e2e.rs
  • tests/composio_list_tools_stack_overflow_regression.rs
  • tests/config_auth_app_state_connectivity_e2e.rs
  • tests/json_rpc_e2e.rs
  • tests/monitor_agent_e2e.rs
  • tests/subconscious_conversation_e2e.rs
  • tests/subconscious_fullstack_e2e.rs
  • tests/subconscious_triggers_e2e.rs

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

@senamakel

Copy link
Copy Markdown
Member Author

Superseded by #5469, which landed the same tinybus migration fixes on main (the memory/guard/audit.rs + memory/binding.rs retargeting, the whatsapp_data native-registration migration, the shell lockfile, and the formatting sweep). Verified against current main — all four sites are repaired there.

Closing rather than rebasing: there is nothing left in this branch that #5469 does not already cover.

The one thing #5469 did not pick up is #5466guard_explicit_scope_argument_wins_over_the_ambient_one still fails deterministically on main, where an explicit SourceScope is widened back to the ambient one. That issue stays open.

@senamakel senamakel closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant