Skip to content

Make the stale-packet gate opt-in per latest-wins topic (it's over-broad) #34

Description

@rolker

Make the stale-packet gate opt-in per latest-wins topic

The stale-packet gate added in b7ae191 (import PR #33, deployed on the
2026-06-29 BizzyBoat deployment) ships global default-ON and keyed
per-destination-topic. The field found it over-broad: it is correct only for
single-stream latest-wins topics (heartbeat/video/costmap — which it fixed) but
wrong for:

  • every-sample-matters topics (raw sonar sonar_image_*, pointclouds) — each
    ping is unique data, so an out-of-order drop is a gap, not a dedup;
  • multiplexed topics like /tf — one topic carries many frames; a late /tf
    for frame A is dropped because a newer /tf for frame B advanced the
    per-topic high-water, dropping valid transforms.

Field evidence (2026-06-29 salmon log, 18:04 / 18:11): ~677k cumulative drops
including sonar_image_down/port/starboard, /tf, cameras, mavros, odom.
Live-display only — recorded survey data is boat-side and complete.

Proposed fix

Make the gate opt-in per topic: a configured allowlist of latest-wins topics
the gate applies to (default empty = gate off for all topics), or equivalently an
exclude-list for sonar/tf/pointcloud. Do not revert — the gate genuinely
fixed the backwards-jumping-stamp complaint on the latest-wins topics.

Stopgap for the next run before this lands: -p drop_stale_packets:=false
(restores pre-change behavior).

Context


Authored-By: Claude Code Agent
Model: Claude Opus 4.8 (1M context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    rcaRoot cause analysis

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions