Perfetto Skills is released and tested independently. SmartPerfetto and Google Perfetto are reviewed upstream inputs, not runtime dependencies. All supported upstream state is immutable, checksum-pinned, dry-run by default, and promoted only after project-owned real-trace verification.
Run the impact checker before committing or pushing. Its path classifier only answers whether review is needed; a maintainer or agent must supply the semantic decision.
base="$(git merge-base HEAD origin/main)"
uv run python tools/check_cross_repo_impact.py \
--repository perfetto-skills --base "$base" \
--decision required --reason "paired runtime contract changed" \
--paired-path /absolute/path/to/SmartPerfetto \
--paired-ref "$(git -C /absolute/path/to/SmartPerfetto rev-parse HEAD)"The public triggers are catalog/, runtime scripts and assets, generated
references, src/, upstreams/, fixtures/, the SmartPerfetto exporter, and
the local compiler. The decisions mean:
required: validate--paired-pathand require--paired-refto name both an existing commit and the paired checkout's exact HEAD, change the paired repository, and run both repositories' gates;not_required: explain why the behavior or contract is local;deferred: explain the split and provide a durable issue, commit, or PR handoff with--handoff.
The default input is the union of merge-base-to-HEAD, staged, unstaged, and
untracked paths. Record the emitted change fingerprint and paired evidence in
commit or PR notes. If a required paired checkout/ref cannot be validated, use
deferred with a stable shared issue/task URL.
An overlay is a reviewed public-project divergence. Never copy it mechanically into SmartPerfetto. Re-express the behavior in SmartPerfetto's architecture, add its native tests, then regenerate the public projection if appropriate.
- Pin the reviewed SmartPerfetto repository and 40-character commit in
upstreams/smartperfetto.lock.json. - Run
uv run python tools/sync_smartperfetto.py --source PATH --report-dir test-output/sync. This imports into a temporary directory and reports added, removed, and changed imported files plus catalog and policy drift without mutation. Overlay conflicts are checked by the compiler after import. - Inspect the report and update SmartPerfetto export policy at its source when a product-owned Skill, Strategy, rendering-pipeline document, or SQL query is missing.
- Apply an approved import with the same command plus
--apply, then compile local overlays withuv run python tools/compile_skill.py --apply. If a base hash changed, review and rebase the affected overlay and its dependencies before compiling; do not discard local changes to clear the conflict. - Run the complete independent gate and the explicit pinned upstream gate. Record the cross-repository impact decision and paired commit when required.
Only files marked GENERATED FILE or listed in the generated-base manifest are
compiler output. The portable runtime under scripts/ is native
Perfetto-Skills source. Modify generated assets through the exporter, imported
base, or an explicit local overlay; never hand-edit a generated file.
Shared investigation profiles are imported as portable methodology. The exporter
validates their versioned YAML schema and renders each requirement's description
and applicability condition. It omits native producer metric bindings. Scene
contracts refer to that shared document and contribute their own methodology;
they do not install a product evidence ledger, assurance gate, or provider
configuration. Unknown profile fields or unsupported schema versions fail the
import and require an explicit exporter review. Product session history and turn
completion prompts remain excluded by the source export policy.
Scene imports also enforce the source schema's nonempty investigation and
exclusive exemption rules. Normalize shared and local requirements before
merging IDs: identical reuse is allowed, while differences in description,
condition, domain, required status or native metric bindings fail the import.
Metric bindings participate in this compatibility check but remain absent from
the public methodology text. A condition is either semantic (a description)
or evidence, which SmartPerfetto resolves from its producer ledger with
metric_id, operator (gt/gte/lt/lte) and a finite numeric value.
Only the description is rendered as "Apply when"; the ledger binding is kept
for the same compatibility check and never published.
The official Skill is a gap-check-only upstream. It is not a base package or a runtime dependency.
- Pin the canonical tag, peeled commit, and official Skill subtree in
upstreams/google-perfetto.lock.json. - Run
uv run python tools/sync_official_skill.py --perfetto PATH --report-dir test-output/sync. - Classify every current or removed file as
adopted,already_covered,not_applicable, orpending_review. The synchronizer applies only an exact(path, SHA-256)decision; unchanged files do not inherit an outcome from their directory. Record a non-pending result inupstreams/official-skill-decisions.jsonwith a concrete reason.adoptedandalready_coveredadditionally require the implementing local path, stable test id, and exact 40-character reviewed source commit.not_applicablemust explain the missing product/runtime boundary rather than imply implementation. Unknown fields, malformed hashes, duplicate decisions, and unresolved paths make pinned synchronization and--applyfail. - If adopted, implement it through this repository's normal source and tests,
then refresh the snapshot with
--apply; the tool refreshes the lock's complete snapshot hash before the complete gate runs.
android/skills is a second, independent gap-check-only upstream. It does not
share a release identity with google/perfetto and cannot change the pinned
trace processor or stdlib. Its repository content is read only from a
disposable or maintainer-owned checkout during review; no Android Skill,
reference, source inventory, or repository snapshot is stored here.
-
Review only
profilers/perfetto-sql/**andprofilers/perfetto-trace-analysis/**. -
Pin only the exact commit and both subtree tree IDs in
upstreams/android-skills.lock.json. Keep exact path/hash classifications in the reviewed decision registry; do not copy upstream Markdown or materialize an upstream snapshot. -
Run a dry review:
uv run python tools/sync_android_skills.py \ --source /absolute/path/to/android-skills \ --revision <candidate-commit> \ --report-dir test-output/android-skills-review
-
Classify every exact changed path/hash in
upstreams/android-skills-decisions.json.adoptedandalready_coveredrequire a local path, test id, and immutable local source commit. Unknown content remainspending_review. -
To promote a reviewed commit, make the pinned commit and candidate commit available in the local source checkout, then run the same tool with
--commit <commit> --apply. It updates only the commit/tree lock and the committed gap report when no unresolved decision remains. The source checkout is never copied into this repository. -
Run
uv run python tools/verify.py. The scheduled canary inventories Android Skillsmainwithout applying it, so new behavior can fail the non-blocking canary but cannot enter the package automatically.
Do not import the upstream workspace downloader, trace-adjacent scratchpad, or repository-wide Android development Skills. Translate only portable methodology into repository-owned wording, architecture, and tests. Retain only the upstream identity, immutable Git pins, reviewed path/hash decisions, and the gap report needed to audit a claimed local coverage decision.
The Google lock intentionally separates two identities. official_reference
is the stable tagged release used only for the official Skill gap review.
runtime is the exact source revision used by the shipped trace processor,
PerfettoSQL stdlib, generated SQL indexes, and runtime compatibility checks.
runtime.reported_version records what the binary prints; it is not a Git tag
or a claim that the runtime revision descends from the official release tag.
- Verify the official tag and peeled commit independently. Then verify that
the runtime revision, RPC API, trace-processor v2 lock, and runtime stdlib
tree ID agree in
upstreams/google-perfetto.lock.json. The binary cache key must use the full runtime revision. When Google publishes release-addressed artifacts instead of commit-addressed artifacts, the trace lock records a separateartifact_version; all five platform paths use that locator while source identity and cache isolation remain bound to the full revision. - Run
uv run python tools/sync_perfetto_stdlib.py --perfetto PATH --report-dir test-output/syncto index modules, exported symbols, hashes, documentation, and parse warnings throughgit ls-treeandgit show. - Resolve every removed/changed dependency and parse warning. Do not promote a lock while an imported query references an unresolved module or symbol.
- Apply the reviewed runtime index with
--apply; the tool refreshes only the runtime stdlib snapshot hash in the Google lock. It must not update the official Skill snapshot or its decisions. Bootstrap the locked processor, then runuv run python tools/validate_all_queries.pyplus the complete gate. The scheduled canary additionally downloads the newest reviewed processor, verifies its reported-version/revision/RPC identity, and executes owned real-trace semantic assertions with the current Skill queries without promoting that processor.
Local SQL replacements live under src/overrides/sql/ with a descriptor that
records the target, expected upstream SHA-256, replacement SHA-256, reason,
owned-fixture regression IDs, and upstream-candidate state. Full replacement
files make review and rebasing explicit.
Overlay descriptors use the *.overlay.json suffix. Skill and Strategy
overlays must list every dependent index/catalog replacement with both the
expected upstream SHA-256 and replacement SHA-256; compilation stops if either
the primary target or any dependent base changed.
Use this red-green sequence:
- Add or identify a project-owned real-trace assertion that fails against the recorded upstream base SQL; record its stable failure signature.
- Add the overlay descriptor and replacement. Run its focused regression and confirm the base fails while the replacement passes.
- Run
uv run python tools/compile_skill.py --checkanduv run python tools/validate_all_queries.py. Static validation parses SQL after bounded Perfetto-template normalization and checks parameters, fragments, setup/result dependencies, required symbols, hashes, and API coverage. Every query also reports processor-compatibility, execution, and semantic-verification axes; only the owned assertions executed by the full gate count as current execution evidence. - Run
uv run python tools/verify.pywith the checksum-verified fixture pack. - Run the impact checker and update SmartPerfetto when the decision is
required.
After any upstream sync, stale expected base hashes fail compilation instead of silently dropping or overwriting the local fix. Re-run the original regression, review whether the overlay is still needed, and either rebase it, remove it because upstream fixed the issue, or retain it with a new reviewed base hash.
Fixture packs are independent releases and are never rewritten. Before a new tag, run the v2 scanner over every manifest trace, review the private printable package/process inventory, and record the maintainer attestation without committing the identifier strings themselves:
uv run python tools/scan_fixture_privacy.py TRACE... \
--approve-identifiers REVIEWER --reviewed-at YYYY-MM-DD \
--output fixtures/privacy-scan-v2.json
uv run python tools/build_fixture_pack.py \
--manifest fixtures/manifest.json --source-root FIXTURE_ROOT \
--output perfetto-skills-fixtures-v2.tar.gzThe deterministic archive builder rejects any trace set that is not covered
exactly by the committed v2 privacy report or whose identifier review is not
approved. It packages that report, NOTICE, and the AGPL/Apache license texts;
the downloader verifies their lock-file hashes on every cache reuse. Commit the
manifest, report, licenses, lock, and builder changes before creating the tag,
then rebuild from that clean tagged commit and compare the archive SHA-256
before publishing. A later pack uses a new version and release tag; never
replace an existing asset.
Locks, imported SmartPerfetto bases, Google Perfetto indexes, reports, and fixture locks are ordinary versioned files. If promotion fails, abandon the uncommitted applied output or revert the synchronization commit, restore the previous immutable locks, clear only the local test cache, and rerun the prior complete gate. Android Skills remains gap-check-only and has no committed snapshot to restore. Never rewrite an existing fixture release asset or supported upstream tag.