Skip to content

Split message scanning into its own sensor (per-observation lane selection) #139

Description

@aaronsb

Follow-up from the ADR-136 message-lane refactor (PR #138, code review).

Problem

The message lane is selected per sensor in tools/attend/src/cmd/run/tick.rs via slot.name() == "peers". But the peers sensor emits two kinds of observation from one poll():

  • authored messages (read_signals) — message lane, correctly;
  • peer-presence events (discover_peers diff: peer started/exited, status, context-pressure) — these are EVENT-lane per ADR-136's own classification.

Because the partition is per-sensor, peer-presence events currently ride the message lane: they bypass the action-potential refractory, ride the permissive 3s governor, and record no engagement (so the neuron-decay model never builds for them).

Impact

No message loss. Only the noise-control for peer-presence is relaxed — peer churn/flapping surfaces more readily than the event lane intends. Also brittle: a future second message-bearing sensor inherits no lane.

Fix

Choose the lane per observation, not per sensor. Cleanest approach: split message scanning (read_signals + its message state: seen-set, cold-start baseline, digest) into its own Sensor (e.g. messages), leaving peers as the presence/event sensor. This removes the name() == "peers" discriminator and is the natural seam for a future external-chat (Slack) event sensor.

Documented at the tick.rs partition and ADR-136 Consequences. Refs ADR-136 (Decision 1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    adr:acceptedADR accepted; this issue tracks implementationarea:sensorsSensor implementations (crate or script) and authoring ergonomicseffort:mediumA few sittingsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions