Skip to content

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

Merged
thymikee merged 2 commits into
mainfrom
perf/bench-executable-origin
Nov 29, 2026
Merged

thymikee merged 2 commits into
mainfrom
perf/bench-executable-origin

Conversation

@thymikee

@thymikee thymikee commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

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 7dd5073: 106 incomparable-origin.
  • Now: 94 unchanged, 4 regression, 5 improvement, 2 insufficient-baseline, 1 insufficient-samples.

Validation

Head f0a706a:

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

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.

View guided diff Turn on auto-fix

…rigin timing verdicts

The harness recorded only its own checkout, while AGENT_DEVICE_PERF_CLI can
select another executable. summary.json now records the origin of the CLI and
the SDK entry, and the comparison gives no timing verdict for mixed or unknown
origins.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.70 MB 6.70 MB 0 B
Package (unpacked) 6.69 MB 6.69 MB 0 B
Package (download) 2.04 MB 2.04 MB +3 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.9 ms 19.4 ms -5.5 ms
CLI --help 51.5 ms 44.4 ms -7.1 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 1 new finding on 7dd5073. The verdict and the full list are in the summary comment.

Comment thread scripts/perf/compare.ts Resolved
Artifacts written before `metadata.origin` would withhold every timing
verdict until the whole nightly baseline is rewritten. A clean CI run of
`main` measured the checkout, so it reads as `checkout`. Every other
summary without an origin record stays `unknown`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of f0a706a

Since the review of 7dd5073: 0 new · 0 still open · 1 no longer raised (1 marked fixed)

No open findings.

🔧 1 finding marked fixed in their threads
Finding Fixed by Where
Origin gate withholds every timing verdict for the 7 nights after merge thymikee f0a706a and 4621705 · reply

Reviewed with this repository's own Sentinel configuration (47e3fbe2758c).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This is ready at f0a706a: no blocking problems were found.

Not blocking, take or leave: the checkout origin records the source commit and dirty flag, but the measured executables load the gitignored dist/ build, so a stale build in a clean tree still reads as that commit, and a short follow-up note could say that the commit describes the source, not the build.

The earlier thread no longer applies and can be resolved, because a clean main CI artifact without an origin is now read as a checkout, with test coverage.

All 22 checks pass.

Not verified here: the claim of 75 matching main summaries and the before and after perf:compare counts, since the nightly artifacts were not downloaded.

Nothing else needs to happen before merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 29, 2026
@thymikee
thymikee merged commit 09082f5 into main Nov 29, 2026
22 checks passed
@thymikee
thymikee deleted the perf/bench-executable-origin branch November 29, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant