Repository navigation
Description
Milestone: Nov 9 - Nov 13 · Target: Dec 4 · Parent: tinyhumansai/team#42
This week (Nov 9 - Nov 13)
Status: Not started (0 of 17). Phase 0 shipped before the epic was filed.
- Event can be triaged twice when every queue ingest times out #8154: an event can be triaged twice
- Run the linked inbound e2e test in CI #8155: run the linked inbound e2e in CI
- [inbound-queues] dispatch: deliver turns concurrently per lane instead of inside the pass senamakel/tinyeventqueues#1: concurrent per-lane dispatch
Goal
Every inbound event reaches the agent through one durable, noise-tolerant pipeline: tinyeventqueues over the tinystoragedrivers QueueStore. That covers hosted channels, native channels, notifications, task sources, web chat, webhooks and Composio triggers.
- Durable: nothing inbound is lost on a restart or under a burst.
- Once: a platform redelivery never becomes a second turn.
- Noise: it is gated, coalesced, habituated and batched before it costs a turn.
- Visible: every drop has a reason you can see.
OpenHuman (the host) keeps:
- the platform adapters that build the envelope;
- the
DeliverandClassifySaliencecallbacks (triage and turns); - config, policy and the RPC/UI surface.
The pipeline itself lives in the module.
Where we are (deep dive, 2026-10-20)
Shipped (Phase 0):
- tinystoragedrivers has the
QueueStoreport: aDocumentQueueover every document driver, RabbitMQ, and thequeues.jsonmanifest (feat(queue): QueueStore port with a DocumentQueue over any document store tinystoragedrivers#71–Use Hosted Models via Fireworks AI #73). - tinyeventqueues v0.1.2 is the module: 5,779 LOC module plus a 2,105 LOC contract (De-template, define the event contract, and add the ingress stage tinyeventqueues#1–fix: stabilize daemon service lifecycle and align Agent Status UI #6).
- OpenHuman's
inbounddomain (1,184 LOC) routes Composio triggers and agent webhooks through it (feat(inbound): queue Composio triggers and agent webhooks through tinyeventqueues #8136).
| Inbound path | Today | Loss / duplicate risk | Leaf |
|---|---|---|---|
| Composio triggers | queued (integrations/composio/bus/trigger_subscriber.rs:223-324) |
ambiguous-timeout double triage (inbound/route.rs:122-130) |
#8154 |
| Agent webhooks | queued (skills/webhooks/bus.rs:267-299) |
same | #8154 |
Hosted channels (socket *:message) |
event bus → channels/bus/subscriber.rs, 180 s per turn, serial |
bus lag skips silently (SIGNAL_BUFFER = 256); no message id, no dedupe |
#8148 |
| Native channels (TinyChannels module) | mpsc::channel(100) (startup/start_channels.rs:164) |
lost on restart; platform acked before host persists (Telegram offset) | senamakel/tinychannels#84, #8149 |
| Desktop notifications | direct triage (desktop/notifications/rpc.rs:112,187), 60 s content dedupe |
Deferred dropped (L217-231); one triage per notification |
#8150 |
| Task sources | direct triage (integrations/task_sources/route.rs:84,93) |
Deferred dropped |
#8150 |
| Web chat | start_chat (web_chat/ops/start_chat.rs:141), RunQueue in memory |
not durable; no client message id reaches the core | #8151 |
What the module lacks before those migrations (tinyeventqueues origin/main df8d160):
| Gap | Evidence | Leaf |
|---|---|---|
Deliver is awaited inside the serialized pass; one long turn stalls every lane |
pipeline/dispatch.rs:133 |
senamakel/tinyeventqueues#1 |
after_dispatch vs after_turn acks are indistinguishable; no turn-completed signal |
pipeline/dispatch.rs:175-180 |
senamakel/tinyeventqueues#2 |
| No per-source gate bypass or debounce override; web chat waits ~1.5 s | SourcePolicy at tinyeventqueues-bus/src/config/types.rs:675-693 |
senamakel/tinyeventqueues#3 |
A host Urgent verdict doesn't skip a cadence; Turn has no salience; no notification:* policy |
pipeline/pass.rs:215-257,504 |
senamakel/tinyeventqueues#4 |
Stats has five totals only; context eviction and context on a dead-lettered turn are unrecorded |
tinyeventqueues-bus/src/outcome/types.rs:141-152 |
senamakel/tinyeventqueues#5 |
Host gap: inbound/deliver.rs:395-401 handles only trigger triage. Every other source is rejected (senamakel#514).
Target architecture
tinystoragedrivers QueueStore port + drivers (memory, sqlite, file, mongodb, rabbitmq); queues.json
tinyeventqueues the pipeline: ingress, gate, coalesce, salience, lanes, cadence, concurrent dispatch, DLQ;
pipeline.json defaults per source family; Stats by outcome/reason/source/lane
tinychannels provider listeners that commit the platform cursor only after the host's DeliverInbound
openhuman inbound/: envelope builders per source, a Deliver handler registry
(triage, agent turn, digest), ClassifySalience over triage, platform acks,
inbound.* RPCs and the settings panel; every adapter calls inbound::route,
its old path kept only as the direct fallback
Ground rules
- The upstream PR in the owning repo lands and is released first. Then the gitlink bump and re-pin (
scripts/modules/release-and-repin.mjs, pins from the publishedchecksum.tomlonly), then the host change. - Each migration keeps its old path as the direct fallback used when
[components] eventqueuesor[inbound] enabledis off, or the module is unavailable. It is not a second live path. - No silent loss. Every event ends delivered, context, digest, dead or dropped-with-reason, and every drop publishes
InboundEventDropped. - Every bug fix and every migration ships a failing-first regression test beside the code (
*_tests.rs, never inline). - Contract types are never redeclared in OpenHuman (call through
tinyeventqueues-bus). Wire names and RPC namespaces don't change. A newDomainEventbumpsEVENTS_VERSION. - CI and shipped builds use
releasemodule sources only.linkedstays test-only.
Sub-issues
Phase 0: foundations (done)
- feat(queue): QueueStore port with a DocumentQueue over any document store tinystoragedrivers#71
QueueStoreport,DocumentQueue, conformance - feat(bus): serve QueueStore over the storage bus as a Queues object tinystoragedrivers#72
QueueStoreover the storage bus (contract v5) - feat(rabbitmq): add a RabbitMQ QueueStore backend and a separate queue URL tinystoragedrivers#73 RabbitMQ queue driver
- De-template, define the event contract, and add the ingress stage tinyeventqueues#1 contract, ingress, dedupe, tombstones
- Gate, rate limits and coalescing for inbound events tinyeventqueues#2 gate, rate limits, coalesce
- Salience with habituation, attention lanes and digest spill tinyeventqueues#3 salience, habituation, lanes, digest
- Cadence scheduler with ingestion budgets and overflow folding tinyeventqueues#4 cadence, ingestion budgets, folding
- Dispatch with retries and dead letters, no-loss and flood tests tinyeventqueues#5 dispatch, retry, dead letters
- feat(module): run on host storage with a module-owned pass timer, config blob and static-link tinyeventqueues#6 host storage, module timer, static link (v0.1.2)
- feat(inbound): queue Composio triggers and agent webhooks through tinyeventqueues #8136
inbounddomain; Composio triggers and webhooks queued
Phase 1: module and contract changes (upstream, all parallel)
- [inbound-queues] dispatch: deliver turns concurrently per lane instead of inside the pass senamakel/tinyeventqueues#1 dispatch: deliver turns concurrently per lane instead of inside the pass
- [inbound-queues] contract: tag platform acks by policy and add a turn-completed signal senamakel/tinyeventqueues#2 contract: tag platform acks by policy and add a turn-completed signal
- [inbound-queues] sources: per-source gate bypass and debounce override for web chat senamakel/tinyeventqueues#3 sources: per-source gate bypass and debounce override for web chat
- [inbound-queues] salience: let an Urgent verdict skip a cadence; ship channel and notification policies senamakel/tinyeventqueues#4 salience: let an Urgent verdict skip a cadence; ship channel and notification policies
- [inbound-queues] stats: outcome counts by reason, source and lane; record lost context senamakel/tinyeventqueues#5 stats: outcome counts by reason, source and lane; record lost context
- [inbound-queues] providers: commit the platform cursor only after the host persists senamakel/tinychannels#84 providers: commit the platform cursor only after the host persists
- Refuse plaintext broker credentials in the RabbitMQ driver tinystoragedrivers#79 Refuse plaintext broker credentials in the RabbitMQ driver
Phase 2: host foundation and hardening
- [inbound-queues] inbound: Deliver handler registry for agent turns, digests and triage senamakel/openhuman#514 inbound: Deliver handler registry for agent turns, digests and triage
- Event can be triaged twice when every queue ingest times out #8154 Event can be triaged twice when every queue ingest times out
- Run the linked inbound e2e test in CI #8155 Run the linked inbound e2e test in CI
Phase 3: migrations
- Route hosted channel messages through the event queues #8148 Route hosted channel messages through the event queues
- Route native channel messages through the event queues #8149 Route native channel messages through the event queues
- Batch desktop notifications and task sources through the event queues #8150 Batch desktop notifications and task sources through the event queues
- Move web chat onto the event queues' interactive lane #8151 Move web chat onto the event queues' interactive lane
Phase 4: tuning and visibility
- Classify borderline channel messages with ClassifySalience #8152 Classify borderline channel messages with ClassifySalience
- Show inbound queue stats and dead letters in settings #8153 Show inbound queue stats and dead letters in settings
Phase 5: definition of done
- [inbound-queues] e2e: no loss and no duplicate turns across restart and flood senamakel/openhuman#515 e2e: no loss and no duplicate turns across restart and flood
Suggested order
- Start now, in parallel: [inbound-queues] dispatch: deliver turns concurrently per lane instead of inside the pass senamakel/tinyeventqueues#1, [inbound-queues] contract: tag platform acks by policy and add a turn-completed signal senamakel/tinyeventqueues#2, [inbound-queues] sources: per-source gate bypass and debounce override for web chat senamakel/tinyeventqueues#3, [inbound-queues] salience: let an Urgent verdict skip a cadence; ship channel and notification policies senamakel/tinyeventqueues#4, [inbound-queues] stats: outcome counts by reason, source and lane; record lost context senamakel/tinyeventqueues#5, [inbound-queues] providers: commit the platform cursor only after the host persists senamakel/tinychannels#84, Refuse plaintext broker credentials in the RabbitMQ driver tinystoragedrivers#79, Event can be triaged twice when every queue ingest times out #8154 and Run the linked inbound e2e test in CI #8155. None depends on another. Batch the five module leaves into as few tinyeventqueues releases as is practical.
- [inbound-queues] inbound: Deliver handler registry for agent turns, digests and triage senamakel/openhuman#514 once [inbound-queues] dispatch: deliver turns concurrently per lane instead of inside the pass senamakel/tinyeventqueues#1 and [inbound-queues] contract: tag platform acks by policy and add a turn-completed signal senamakel/tinyeventqueues#2 are released. It unblocks every migration.
- Route hosted channel messages through the event queues #8148 (most lossy) and Batch desktop notifications and task sources through the event queues #8150 right after [inbound-queues] inbound: Deliver handler registry for agent turns, digests and triage senamakel/openhuman#514. Route native channel messages through the event queues #8149 once [inbound-queues] providers: commit the platform cursor only after the host persists senamakel/tinychannels#84 is released and the feat(channels): debounce and serialize inbound messages per conversation #8130 decision is made. Move web chat onto the event queues' interactive lane #8151 once [inbound-queues] sources: per-source gate bypass and debounce override for web chat senamakel/tinyeventqueues#3 is released, and last because of its latency risk.
- Classify borderline channel messages with ClassifySalience #8152 after the channel migrations; Show inbound queue stats and dead letters in settings #8153 after [inbound-queues] stats: outcome counts by reason, source and lane; record lost context senamakel/tinyeventqueues#5.
- Definition of done: [inbound-queues] e2e: no loss and no duplicate turns across restart and flood senamakel/openhuman#515. A restart test and a 10k-event flood across every source, on sqlite and RabbitMQ: no loss, no duplicate turns, and outcome counts that add up.
Decisions needed
- feat(channels): debounce and serialize inbound messages per conversation #8130 (open) adds an in-process per-conversation debounce on the native channel path. The queues already coalesce per conversation. Close it in favour of Route native channel messages through the event queues #8149, or land it and remove it there.
- Rollout:
[inbound] enabledand[components] eventqueuesdefault to on. Each migration ships live unless it is staged behind the flag.
Related
- Epic: TinyChannels v2: one channel API for every surface, adapters for every provider #7964 TinyChannels v2. Highest overlap: hosted, native and web channels go through its adapters. Agree the inbound envelope and commit hook with it ([inbound-queues] providers: commit the platform cursor only after the host persists senamakel/tinychannels#84).
- Epic: tinystoragedrivers as a hardened static primitive (types + API + per-primitive crates, engines as features) #8131 tinystoragedrivers hardening (the queue's durability; Refuse plaintext broker credentials in the RabbitMQ driver tinystoragedrivers#79).
- Epic: Shrink the core crate #7390 and Epic: Smaller modules folder #8056 keep the host thin. The pipeline logic stays in the module.
- Epic: test ownership — move module-behaviour tests to their tiny* repos, delete duplicates and coverage padding #8089 (test ownership) and Epic: Cross-platform module testing #7335 (cross-OS e2e per TinyBus module), for Run the linked inbound e2e test in CI #8155.
- Linked, not part of this tree:
- Channel message idempotency_key is sent but honoured by nobody #5231: channel
idempotency_keyhonoured by nobody. Outbound, but the same key discipline. - hooks: fire beforeSubmitPrompt for every turn entry point, not only web chat #8124:
beforeSubmitPromptfor every turn entry point. One entry point once everything is queued. - Record what a trigger's verdict actually led to #5408: record what a trigger's verdict led to.
- Approval parks raised by background tasks have no decider — they always TTL-deny #5746: approval parks from background tasks.
- Read the task-source dedup ledger once per fetch, not twice per task #8113: task-source dedupe ledger; land before Batch desktop notifications and task sources through the event queues #8150.
- Channel message idempotency_key is sent but honoured by nobody #5231: channel
- Background, closed: One inbound path: native channel listeners onto the shared runner with durable sessions #7968 (native listeners on the shared runner), Make trigger handling optional to reduce local LLM load from high-volume triggers like email #1064, [UX] Alerts / Notifications: reduce noise; stop duplicating in-thread agent turns #923 and [UX] Telegram: stream/thinking updates should not trigger noisy notifications #931 (the original noise issues), Background triage has no backoff and no real fallback: fixed 30 s re-defer produced 90 failed invokes across a 3.5 h backend outage #6522.
Activity
[-]Route all inbound events through the durable event queues[/-][+]Epic: Route all inbound events through the durable event queues[/+][-]Epic: Route all inbound events through the durable event queues[/-][+]Epic: Reliable inbound events[/+]tinysweeper commentedon Nov 9, 2026
Tracking epic for a durable, deduplicated inbound event pipeline (tinyeventqueues over QueueStore), with phased sub-issues across module, channels, storage and host repos. It is a coordination/planning artifact rather than a single bug or feature; the concrete work lives in the linked leaves. No candidate is the same underlying issue, so no duplicate is named.
Labelled
priority: p2.