@naftaly I submitted a somewhat relevant feedback a few years ago.
FB9616844 - MetricKit: MXDiagnostic, MXDiagnosticPayload and MXMetricPayload should have 'identifier' properties
I mostly wanted a unique identifier built-in because IPS files have them and then I wouldn't need to decorate the MetricKit payloads myself and it would be just built in.
If you want to correlate runtime data you captured against a payload, your best bet is to do this with diagnostics since those are truly the PID at time of diagnostic--well at least I assume. I've never bothered to check. This could easily be tested by crashing and check the PID in the IPS crash file against that identified in the MXDiagnosticPayload metadata. The metadata is required in the diagnostic payload but it isn't in the metrics payload. While I have not in practice seen the metrics metadata object to be empty in a metric payload, you're right that you can't do much for variation over time. The API just simply doesn't have a way to represent that.
My understanding is that it is the metadata at the time of reporting.
If you're truly interested in the low power mode value over time, I would capture this in your app and then enrich your metric kit payload over time. I think it is unreasonable to expect the system to give you details when your app is background and not executed. You could listen to this while your app is running and record. Exploring creating signpost events would also be an option, though I would do the signpost event, not signpost interval for low power mode changes.
https://developer.apple.com/documentation/foundation/processinfo/islowpowermodeenabled
I have never concerned myself with the PID in the MXMetricPayload's metadata because as you pointed out, it can change over time. What is less likely to change is the TestFlight status. For that, I have done a bit of investigation and I'm waiting on a feedback.
To answer your questions, you can, at the time a metric payload is delivered, check the system properties, PID, thermal state, etc., and just compare.
In the case of TestFlight, the property seems just busted.
FB15701498 - MetricKit / TestFlight: Production Issue - MXMetricManager not generating metric payloads as expected with iOS 18
This is another example where I capture information and enrich the MetricKit payload json when I ship off device. This is another example of 'value at time of payload'. I'm not tracking if the user was installing app store, Xcode, and TestFlight builds throughout a period of time--but my same advice about low power mode above could be taken if I truly was. StoreKit2 has a nice AppStore.Environment property that I switched from reading the sandbox receipt.