Skip to Content

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, crawler or import.
  • dataSource — where the app's data came from: fixture, local-core or staging.
  • 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, frozenClock and input. Fill in what you pinned down. seed is the scenario a fixture run opened the app on, and Live opens it again from there. input says how actions reached the UI: native-tap, semantics-click or typed-dispatch.
  • clock — anchors the monotonic t on 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, assert or idle. actor is human, agent, script, test or typed.
  • status — passed, failed, skipped or ineffective (the tap landed but nothing happened).
  • screen.identity — how the screen's key was derived: typed, structural, layout, visual or manual. 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. kind is an open string; screenshot and tree have meaning to the app. phase is before, action, after or settled.
  • proofLevel — set it only when the step differs from the run's level, either way: a step the server confirmed says server-asserted, a step left with no frame says typed-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 sends compactReplay: 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 with group: "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"]}
  • lines is the compact form: comma-separated line numbers, each with F (ran fully), P (ran partly) or no letter (unknown). For a single call site, use line and count instead.
  • tier — where the code sits: handler, state, presenter, composable, shell, async or server. 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.
  • commit and repo — 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.

On this page