Skip to content

feat(export): add hop start and relay node columns to CSV export#5822

Merged
jamesarich merged 1 commit into
mainfrom
claude/interesting-mayer-c95c70
Jun 17, 2026
Merged

feat(export): add hop start and relay node columns to CSV export#5822
jamesarich merged 1 commit into
mainfrom
claude/interesting-mayer-c95c70

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

The packet CSV dump only exposed hop limit, which is enough to map whole-network coverage but not to tell which repeater relayed a given packet. This surfaces the relaying repeater (and the original hop count) so users can map the coverage of individual repeaters.

Resolves #5801

🌟 New Features

  • Add a relay node column carrying the relay_node byte from MeshPacket — the last byte of the relaying node's NodeNum. It's emitted as a 2-digit hex value so it matches the tail of a node id (e.g. !a1b2c3d4"d4"), and left blank when unset (0). This is the "last hop byte" requested in the issue: it identifies the repeater a packet was heard from.
  • Add a hop start column alongside the existing hop limit so a reader can derive hops-away (hop_start - hop_limit) and confirm whether a packet was a direct vs. relayed reception.

🛠️ Notes on column ordering

  • Both new columns are inserted before payload, keeping the free-text payload field last (safest for CSV with embedded commas/quotes) and leaving every pre-existing column at its current index. Tools that read columns by header name are unaffected; tools that read payload by fixed position will need to shift it two columns right.

Testing Performed

  • Updated ExportDataUseCaseTest (core/domain commonTest):
    • invoke writes header to sink now asserts the new "hop start","relay node","payload" header tail.
    • invoke writes hop start and relay node columns — verifies a packet with hop_limit=2, hop_start=3, relay_node=77 serializes as "2","3","4d","Hello".
    • invoke leaves relay node blank when unset — verifies relay_node=0 produces a blank field.
  • Full baseline: ./gradlew spotlessApply spotlessCheck detekt assembleDebug test allTests — all pass.

@github-actions github-actions Bot added the enhancement New feature or request label Jun 17, 2026
@jamesarich jamesarich marked this pull request as ready for review June 17, 2026 00:48
@jamesarich jamesarich added this to the 2.8.0 milestone Jun 17, 2026
The packet CSV dump only exposed `hop limit`, which is enough to map
whole-network coverage but not to tell which repeater relayed a given
packet. Surface the relaying repeater so users can map the coverage of
individual repeaters.

- Add a `relay node` column carrying the `relay_node` byte (the last
  byte of the relaying node's NodeNum), emitted as a 2-digit hex value
  so it matches the tail of a node id (e.g. !a1b2c3d4 -> "d4"); blank
  when unset (0).
- Add a `hop start` column alongside the existing `hop limit` so a
  reader can derive hops-away (hop_start - hop_limit).
- Insert both columns before `payload` to keep the free-text payload
  last and leave every existing column index unchanged.

Fixes #5801

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jamesarich jamesarich force-pushed the claude/interesting-mayer-c95c70 branch from 3b6d028 to 84ab12e Compare June 17, 2026 02:00
@jamesarich jamesarich enabled auto-merge June 17, 2026 02:00
@jamesarich jamesarich added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit d9fe169 Jun 17, 2026
18 checks passed
@jamesarich jamesarich deleted the claude/interesting-mayer-c95c70 branch June 17, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Include last hop byte in csv export

1 participant