SmartPerfetto Trace Corpus

July 31, 2026 ยท View on GitHub

This directory is the source-controlled trace test and reference corpus.

Skill execution quality: 4 assertion-backed semantic, 191 execution-only, 8 explicit graceful-empty, 0 explicit unavailable prerequisite, 32 definition-only.

Commands

npm run trace:validate checks manifests, hashes, generated indexes, publication gates, legacy path coupling, and exact current Skill/Strategy inventory coverage.

npm run trace:build deterministically materializes every base-plus-overlay case under ignored Trace/.generated/ and reparses it with the pinned trace processor.

npm run trace:sql-regression validates the catalog, materializes the committed base-plus-overlay cases without requiring the Perfetto source submodule, and executes every discovered Skill SQL contract. Production execution, explicit read-only/context probes, and isolated state-changing branch probes are reported separately; any skipped or unavailable SQL fails the gate. This is part of the default backend gate.

npm run trace:regression validates, builds, and executes the complete deterministic corpus. Per-case evidence is written below Trace/.generated/constructed/<case-id>/.

Add a real case

Stage a capture privately first; repeat --result, --log, and --tag as needed:

node Trace/tools/trace-corpus.cjs import-real --id typical-startup --title "Typical startup" --description "Representative cold start" --scene startup --trace /path/to/trace.pftrace --origin "maintainer capture" --result /path/to/result.json --log /path/to/session.log --android-release 16 --api-level 36 --device "Pixel"

The command copies evidence atomically into ignored Trace/real/.private/<id>/. Review the trace and manifest before publication. Promotion requires explicit approvals and rolls back if catalog validation fails:

node Trace/tools/trace-corpus.cjs promote-real typical-startup --license CC-BY-4.0 --consent owner-approved --privacy-review approved --sanitization-review approved

Extend constructed cases

Constructed cases keep source scenarios and overlay protobufs in Git; combined traces are generated. Copy the scenario template, declare Android compatibility in case.json, assign each target explicitly, then run npm run trace:regression. Adding a Skill or Strategy without a current expectation fails validation. Use separate case ids with non-overlapping API ranges when Android behavior differs.

Real cases

CaseSceneAndroidPublicationAnalysis
Android 16 customer scrollscrollingAndroid 16 / API 36legacy-tracked1 file(s)
Android 15 standard AOSP scrollscrollingAndroid 15 / API 35legacy-tracked1 file(s)
Android 16 heavy startupstartupAndroid 16 / API 36legacy-tracked1 file(s)
Android 16 light startupstartupAndroid 16 / API 36legacy-tracked1 file(s)
Android 15 Flutter SurfaceView scrollscrollingAndroid 15 / API 35legacy-tracked1 file(s)
Android 15 Flutter TextureView scrollscrollingAndroid 15 / API 35legacy-tracked1 file(s)

Constructed cases

| Case | Scene | Android | Base | Coverage | | --- | --- | --- | --- | --- | --- | | Binder, lock, and I/O blocking | io | Android 16 / API 36 (tested API 35-36) | android-startup-heavy | 25 target(s) | | Framework rendering pipeline signatures | pipeline | Android 16 / API 36 (tested API 35-36) | android-startup-heavy | 33 target(s) | | General analysis and runtime contracts | general | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 15 target(s) | | GPU workload and frequency | gpu | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 11 target(s) | | Input and interaction latency | interaction | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 14 target(s) | | Linux and Android system state | linux | Android 16 / API 36 (tested API 35-36) | android-startup-light | 5 target(s) | | Media, network, and camera pipeline | media | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 8 target(s) | | Memory and GC pressure | memory | Android 16 / API 36 (tested API 35-36) | android-startup-light | 20 target(s) | | Power and thermal throttling | power | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 19 target(s) | | Rendering pipeline jank | scrolling | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 46 target(s) | | Scheduler and CPU contention | cpu | Android 16 / API 36 (tested API 35-36) | android-scroll-customer | 36 target(s) | | Startup and process lifecycle | startup | Android 16 / API 36 (tested API 35-36) | android-startup-heavy | 24 target(s) |