Skip to content

Source priorities silently discard deltas from unlisted sources — and priority groups claim every path their sources emit, even paths not listed in the group #2927

Description

@voodoomatz

Environment: signalk-server 2.30.0, source priorities configured via Admin UI (3 priority groups, 18 path overrides), new source added later by a plugin (app.handleMessage with source: { label: ... } → sourceRef h5000-websocket.XX).

Expected: When a new source starts emitting on a path already served by another source, both appear under the path's values object and in the Data Browser, so the user notices the conflict and can configure priorities — the usual multiple-sources behavior.

Actual: Deltas from the unlisted source are silently discarded before reaching the delta cache and streams. Observed on the WebSocket stream (h5000 websocket plugin): the update arrives with its values array emptied ("values":[]) while the source keeps sending every second. No log entry, no UI indication anywhere that a source is being suppressed. From the user's perspective the plugin simply "doesn't work" — it took a packet-level investigation to find the cause.

Two aspects worth separating:

Silent discard with zero feedback. If prioritization drops a source's values, that is invisible: nothing in the Data Browser, server log, or plugin status. A counter, log line, or Data Browser badge ("suppressed by source priorities") would save users hours.
Undocumented path claiming by priority groups (deltaPriority.js): a group claims every path that any of its member sources ever emits — not just the paths listed for the group. With a broad source like an NMEA2000 gateway, effectively all of its paths become claimed, and any later source loses on all of them by default (LOWESTPRECEDENCE, precedence Infinity). The docs don't mention this; users reasonably assume unlisted paths are unaffected by priorities.
Repro: configure a priority group containing an N2K gateway source; add any plugin emitting to a path the gateway serves; observe values:[] in the stream and no second source under the path. Emitting to a fresh path works normally.

Suggested improvements: (a) log/debug output (e.g. under a signalk-server:sourcepriorities debug key) whenever a delta value is dropped by prioritization, plus a suppressed-source indicator in the Data Browser; (b) document the group path-claiming behavior, or restrict claiming to the paths actually listed in the group; (c) consider defaulting unknown sources to fan-out instead of discard when no explicit override exists for the path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions