Repository navigation
Description
Parent: #8147
Summary
Wire the ClassifySalience host callback (cheap-model triage) for channel traffic, so borderline channel messages are classified noise / fyi / actionable / urgent rather than all becoming turns.
Problem
#8136 implements ClassifySalience with run_triage, but the module only calls it for items whose rule-based score falls in the borderline range, and Composio triggers and webhooks almost never land there. Once channels go through the queues (hosted and native channel issues), channel messages will be the main borderline traffic, and the callback needs tuning for them.
Solution
- Tune the salience thresholds and features (addressed?, DM?, known contact, source weight) in
pipeline.jsonfor channel sources. - Give the callback a per-tick model budget; past the budget, fall back to the rule score.
- Record the classification in the delivered envelope so the turn can see why it was woken.
Acceptance criteria
- Borderline channel messages are classified — a test with a fake classifier shows noise is not delivered as a turn and urgent is promoted.
- Budgeted — beyond the budget no classifier calls are made and the rule score decides.
- Observable — classification outcomes are counted in
inbound.stats. - Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by
.github/workflows/ci-fast.yml).
Related
Part of #8147. Builds on #8136 (inbound domain, tinyeventqueues v0.1.2) and tinyhumansai/tinyeventqueues#6. Depends on #8148 and #8149.
Audit findings (2026-10-20)
- When the module asks:
ClassifySalienceis consulted once per flushed batch, for its top-scoring event only (pipeline/pass.rs:174), when the rule score falls in the half-open band[30, 45)(pass.rs:504). It is budgeted at 120 calls/hour by token bucket (gate/mod.rs:74-80,salience.borderlineinpipeline.json). A host error falls back to the rule score. - Host side:
inbound/deliver.rs:54-57caches classifications (256 entries, 10 min TTL) and wrapsrun_triageviaRemoteTriage(triage/runner.rs:60-66). - What [inbound-queues] salience: let an Urgent verdict skip a cadence; ship channel and notification policies senamakel/tinyeventqueues#4 adds: an
Urgentverdict that skips a cadence, and the class onTurn. This leaf tunes thresholds and features for channel sources and uses the class in the turn.
Agent brief
Depends on: senamakel/tinyeventqueues#4, #8148, #8149 · Blocks: none · Parallel with: #8153, senamakel#515
Research first
- Real score distributions. Run a captured channel sample through the module's salience stage (
Drainwith a fake clock) to place the band before changing thresholds. - Whether triage's prompt (
crates/openhuman-core/src/agent/prompts/) suits one chat message rather than a trigger payload.
Files to consider
- Read:
crates/openhuman-core/src/inbound/deliver.rs:54-123,250-330,triage/runner.rs, the module'spipeline.jsonsalienceblock - Change: the host's
pipeline.jsonoverride (via[inbound] pipeline_pathor the shipped defaults upstream),inbound/deliver/classification handler - Tests:
inbound/deliver_tests.rs,triage/*_tests.rs
Workflow: implementing-an-epic step.
Subagents: tdd-implementer (Sonnet), then code-reviewer.
Gates: cargo check --manifest-path Cargo.toml · pnpm rust:clippy · cargo test -p openhuman inbound triage
Activity
M3gA-Mind commentedon Nov 16, 2026
Re-checked on current main: not started.
ClassifySalienceis still the generic callback, and the pipeline config giveschannel:*sources zero weight. It needs #8148 and #8149 first, since channel messages don't reach the queues yet. Keeping it open.