chore(perf): record the measured executable origin and refuse cross-origin timing verdicts

Merged
TH
2d ago
+437-26

Summary

A timing verdict is valid only when every compared run measured a known executable of the same origin. summary.json described the harness checkout even when AGENT_DEVICE_PERF_CLI selected another executable.

  • metadata.origin records the CLI and the SDK entry as checkout, installed-package, or unknown, with version, and commit for checkouts.
  • An override counts only as one path to a package's published bin. Anything else is unknown.
  • Mixed or unknown origins give incomparable-origin with the runs named. Failures are still judged. Old artifacts stay readable as unknown.

Earlier artifacts: one without metadata.origin reads as checkout only with a runId, ref main, and a clean tree. Otherwise it is unknown. Since #3902, no perf-nightly.yml revision on main sets the override. Under this summary schema, only #3885's Android job did, uploading perf-android. All 75 main summary artifacts since 2026-10-23 match. Artifacts name no workflow; no other repository workflow runs pnpm perf.

Before / after

pnpm perf:compare of nightly run 46217057081 against 3 earlier nights, all pre-merge:

  • Previous head 7dd50737be: 106 incomparable-origin.
  • Now: 94 unchanged, 4 regression, 5 improvement, 2 insufficient-baseline, 1 insufficient-samples.

Validation

Head f0a706a473:

  • vitest on scripts/perf/compare.test.ts: 20 passed.
  • oxfmt on changed files. Other checks: CI, pending.
  • config.test.ts last ran at 7dd50737be.

report.md still prints only the harness version. No device run.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.