I think it would help a lot if the console command for invalidating report data would take the segment id, as an option.
So instead of:
/console core:invalidate-report-data --segment='eventCategory=<a class='mention' href='https://github.com/StringFoo'>@StringFoo</a>;visitIp!=127.0.0.1'
We could have:
/console core:invalidate-report-data --segment-id=2
Also makes sense when the core:archive command takes the segment-id as a parameter, a.k.a:
./console core:archive --force-idsegments=2
If this is a good idea, I could look into it and do a pull request. For non breaking changes we could keep the segment definition option still.