allowedTracePhases constant
Chrome Trace Event Format phase codes accepted in a capture. The
superset includes sync (B/E/X), async (b/e/n/i/I), metadata (M),
counter (C), and flow (s/f/t) phases. Unknown phases fail the
schema so a fabricated export cannot sneak through with ph: 'z'
entries.
'n' — async nestable instant — is the form Perfetto's traceconv
(the conversion path from DevTools' on-disk .pftrace binary to
Chrome Trace JSON) emits for Dart's Timeline.instantSync(...);
the Chrome-native path uses 'i'/'I'. Accepting both keeps the
schema agnostic to which DevTools export path produced the capture.
Implementation
static const Set<String> allowedTracePhases = {
'B',
'E',
'X',
'b',
'e',
'n',
'i',
'I',
'M',
'C',
's',
'f',
't',
};