Why battery pack identity belongs in swap records
A robot identifier and its battery pack identity are separate pieces of information. A history grouped only by robot can attribute a post-swap reading to the old pack.
How to test it
Simulate a swap with a fixed robot identifier and a changing pack identifier. Inspect both the dashboard and export around the event and verify which entity each reading is grouped under.

ZHILIANHAI