The trace
trace.ndjson is the heart of every core: one JSON object per line, in the order things happened.
trace.ndjson is the heart of every core. One JSON object per line, in the order things
happened. Unknown record types and unknown fields are ignored, so a core can add its own, and a
newer core still loads in an older app. A level 2 core streams the same records over JSON-RPC
and appends them to this file, so a crash leaves usable data.
meta — first, once
{"type":"meta","schema":"pitafix.trace/1","run":"r_1731150000","commit":"73cd05e","dirty":false,"source":"test","dataSource":"fixture","proofLevel":"rendered-fixture","core":{"id":"my-core","version":"0.1.0"},"driver":{"name":"chromedp","version":"0.23.0"},"facets":{"platform":"web","renderer":"chromium","locale":"sv-SE"},"clock":{"wallStart":"2026-11-09T13:00:00+09:00","monoStart":812341}}source— who drove the run:human,test,agent,typed-crawl,crawlerorimport.dataSource— where the app's data came from:fixture,local-coreorstaging.proofLevel— the least any frame of this run proves. See the rules.facets— the run's conditions:platform,renderer,deviceModel,os,locale,theme,textScale,widthClass,role,seed,frozenClockandinput. Fill in what you pinned down.seedis the scenario a fixture run opened the app on, and Live opens it again from there.inputsays how actions reached the UI:native-tap,semantics-clickortyped-dispatch.clock— anchors the monotonicton steps to wall time.
There is exactly one meta record; a second one is an error and the first stands.
journey — names a walk the following steps belong to
{"type":"journey","id":"today-job","name":"Today → Job","intent":"Open today's first job","section":"Field","role":"happy-path","expectedOutcome":"The job screen shows its visits","sourceRefs":[{"kind":"test","ref":"JobFlowTest.kt","line":12}]}id is what steps name in their journey field. sourceRefs point at where the journey comes
from — an audit, a flow test, a doc — with kind an open string (audit, test, scenario,
doc, human, agent).
A run that opens the app on more than one scenario, as a crawl does for each person, leaves
facets.seed empty and sets "seed" on each journey record instead. Live reads the run's seed
first and the journey's second. A crawl with neither cannot start Live from its screens.
step — one action and what it did
{"type":"step","id":"st_7","seq":7,"journey":"today-job","t":1240,"dur":380,"status":"passed","action":{"kind":"tap","actor":"script","target":{"selectors":[{"strategy":"text","value":"On my way"}]},"semantic":"tap"},"nav":{"before":"Today","after":"Job"},"screen":{"name":"Job","surface":"screen","identity":{"method":"structural","key":"Job"}},"artifacts":[{"kind":"screenshot","phase":"after","path":"artifacts/0007.png","sha256":"…","w":1170,"h":2532,"format":"png"},{"kind":"tree","phase":"after","path":"artifacts/0007.tree.json","sha256":"…"}],"counters":{"traceEvents":412},"proofLevel":"native-tap"}action.kind—tap,longPress,swipe,type,key,back,launch,deeplink,system,dispatch,assertoridle.actorishuman,agent,script,testortyped.status—passed,failed,skippedorineffective(the tap landed but nothing happened).screen.identity— how the screen's key was derived:typed,structural,layout,visualormanual. The key is how frames across runs and platforms become one screen, so keep it stable: same screen, same key.artifacts— files beside the trace, paths relative to the run folder, each with its SHA-256.kindis an open string;screenshotandtreehave meaning to the app.phaseisbefore,action,afterorsettled.proofLevel— set it only when the step differs from the run's level, either way: a step the server confirmed saysserver-asserted, a step left with no frame saystyped-only.depth,parentStepId,group,attempt— how a step sits among others: a retried tap, a sub-step of "log in".replayPath— ordered IDs of earlier original steps in the same trace. Set it on the journey's first own step when the capture request sendscompactReplay: true. PitaFix reads the path from the original actions and frames. For an older host or a prefix from another trace, write the prefix as steps withgroup: "replay".
attribution — this code ran for this step
{"type":"attribution","step":"st_7","file":"feature/jobs/JobScreen.kt","symbol":"JobScreen","lines":"511F,512F,516P","confidence":0.95,"tier":"composable","source":"coverage","flags":["inlined"]}linesis the compact form: comma-separated line numbers, each withF(ran fully),P(ran partly) or no letter (unknown). For a single call site, uselineandcountinstead.tier— where the code sits:handler,state,presenter,composable,shell,asyncorserver. The inspector groups by tier and keeps accessors hidden until asked.source— how you know:coverage, a trace hook, a probe. Your word, kept with the record.commitandrepo— set these when the file is not in the run's own project at the run's commit: a phone's step that ran server code names the server's checkout and commit, and the app reads the code from there.
end — last, once
{"type":"end","status":"passed"}status is passed, failed or cancelled. A trace with no end record reads as a crash or a
run still going — which is exactly what you want when the core dies mid-walk.